Commit 0bb9b4db authored by Jinjian Song's avatar Jinjian Song Committed by Hubert Mazur
Browse files

UPSTREAM: net: wwan: t7xx: Add debug ports

Add support for userspace to enable/disable the debug ports(ADB,MIPC).
 - ADB port: /dev/wwan0adb0
 - MIPC port: /dev/wwan0mipc0

Application can use ADB (Android Debug Bridge) port to implement
functions (shell, pull, push ...) by ADB protocol commands.
E.g., ADB commands:
 - A_OPEN: OPEN(local-id, 0, "destination")
 - A_WRTE: WRITE(local-id, remote-id, "data")
 - A_OKEY: READY(local-id, remote-id, "")
 - A_CLSE: CLOSE(local-id, remote-id, "")

Link: https://android.googlesource.com/platform/packages/modules/adb/+/refs/heads/main/README.md



Application can use MIPC (Modem Information Process Center) port
to debug antenna tuner or noise profiling through this MTK modem
diagnostic interface.

By default, debug ports are not exposed, so using the command
to enable or disable debug ports.

Enable debug ports:
 - enable: 'echo 1 > /sys/bus/pci/devices/${bdf}/t7xx_debug_ports

Disable debug ports:
 - disable: 'echo 0 > /sys/bus/pci/devices/${bdf}/t7xx_debug_ports

Signed-off-by: default avatarJinjian Song <jinjian.song@fibocom.com>
Reviewed-by: default avatarSergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>

(cherry picked from commit 61329a11)
Signed-off-by: default avatarqifeng.liu <qifeng.liu@rollingwireless.corp-partner.google.com>

BUG=b:383572694
TEST=check npt tool support on nissa.

Change-Id: Icd13e34acb109717c684b6069a57af512fb6fa62
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/6186564


Reviewed-by: default avatarDaniel Winkler <danielwinkler@google.com>
Tested-by: default avatarDaniel Winkler <danielwinkler@google.com>
Reviewed-by: default avatarUjjwal Pande <ujjwalpande@google.com>
Commit-Queue: Daniel Winkler <danielwinkler@google.com>
Reviewed-by: default avatarSean Paul <sean@poorly.run>
Signed-off-by: default avatarHubert Mazur <hmazur@google.com>
parent ede209fe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment