Tool/software:
Hi,
one of our customers is trying to enable USB test mode on the AM62A USB on the xhci0 instance.
They are currently using these commands
am62ax xhci0 test packet
=======================
devmem2 0x31000420 w 0xA0 # PORTSC, PP='0'
devmem2 0x31000020 w 0x4 # USBCMD, clear bit0 (Run/Stop)
devmem2 0x31000424 w 0x40000000 # POERPMSC, set testmode
am62ax xhci1 test packet
=======================
devmem2 0x31100420 w 0xA0
devmem2 0x31100020 w 0x4
devmem2 0x31100424 w 0x40000000
However one of the registers 0x31000424 cannot be accessed somehow.
echo host > /sys/kernel/debug/usb/31000000.usb/mode
[ 1002.887632] dwc3 31000000.usb: request 00000000249a968f was not queued to ep0out
[ 1002.897985] android_work: sent uevent USB_STATE=DISCONNECTED
[ 1002.998541] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[ 1002.998569] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 1
[ 1002.998708] xhci-hcd xhci-hcd.2.auto: USB3 root hub has no ports
[ 1002.998715] xhci-hcd xhci-hcd.2.auto: hcc params 0x0258fe6d hci version 0x110 quirks 0x0000008000010010
[ 1002.998756] xhci-hcd xhci-hcd.2.auto: irq 264, io mem 0x31000000
[ 1002.999596] hub 1-0:1.0: USB hub found
[ 1002.999638] hub 1-0:1.0: 1 port detected
First register
devmem2 0x31000420 w 0xA0
devmem2 0x31000424 w 0x/dev/mem opened.
Memory mapped at address 0xffff83e14000.
Value at address 0x31000420 (0xffff83e14420): 0xA0002A0
Written 0xA0; readback 0xA0
Second register
devmem2 0x31000020 w 0x4
/dev/mem opened.
Memory mapped at address 0xffff962be000.
Value at address 0x31000020 (0xffff962be020): 0x5
Written 0x4; readback 0x4
Third register
devmem2 0x31000424 w 0x40000000
/dev/mem opened.
[ 1010.633870] audit: type=1701 audit(1016.340:4): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=483 comm="devmem2" exe="/usr/bin/devmem2" sig=7 res=1
Memory mapped at address 0xffff9a9aa000.
Bus error (core dumped)
The problem is not only writing to this address, even reading, it crashes:
devmem2 0x31000424
/dev/mem opened.
[ 1421.145698] audit: type=1701 audit(1426.852:5): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=493 comm="devmem2" exe="/usr/bin/devmem2" sig=7 res=1
Memory mapped at address 0xffff9f620000.
Bus error (core dumped)
Please let us know what the issue could be.
Thanks!
--Gunter