[PATCH] arm64: dts: imx8m: correct usb power domain

Jun Li jun.li at nxp.com
Fri Apr 29 03:09:26 PDT 2022



> -----Original Message-----
> From: Frieder Schrempf <frieder.schrempf at kontron.de>
> Sent: Friday, April 29, 2022 5:04 PM
> To: Jun Li <jun.li at nxp.com>; shawnguo at kernel.org
> Cc: robh+dt at kernel.org; krzysztof.kozlowski+dt at linaro.org;
> s.hauer at pengutronix.de; kernel at pengutronix.de; festevam at gmail.com;
> dl-linux-imx <linux-imx at nxp.com>; l.stach at pengutronix.de;
> aford173 at gmail.com; tharvey at gateworks.com; devicetree at vger.kernel.org;
> linux-arm-kernel at lists.infradead.org; Jacky Bai <ping.bai at nxp.com>
> Subject: Re: [PATCH] arm64: dts: imx8m: correct usb power domain
> 
> Am 29.04.22 um 09:43 schrieb Li Jun:
> > pgc_otg1/2 is for each usb phy and pgc_hsiomix is shared by 2 usb
> > controllers, so assign those power domains to correct controller and
> > phy node, decouple the pgc_otg1/2 from pgc_hsiomix since there is no
> > hardware dependency.
> >
> > Suggested-by: Jacky Bai <ping.bai at nxp.com>
> > Signed-off-by: Li Jun <jun.li at nxp.com>
> 
> Thanks for the patch!
> 
> In my previous test I probably made some mistake. The second USB controller
> was kept enabled by the onboard hub. When I disable the second port and test
> the patch with the first port only, resuming from autosuspend still doesn't
> work, even when I keep the HSIOMIX as parent for OTG1/2. So there's probably
> still something missing...

My test was done with both second USB port and PCIE disabled, so
while autosuspend of first port, the pgc_hsiomix is off, it works
fine on my HW:

root at imx8mqevk:~# [   81.021437] usb 1-1: USB disconnect, device number 3
 
root at imx8mqevk:~# cat /sys/kernel/debug/pm_genpd/usb-otg1/current_state
on
root at imx8mqevk:~# cat /sys/kernel/debug/pm_genpd/hsiomix/current_state 
off-0
root at imx8mqevk:~# cat /sys/kernel/debug/pm_genpd/usb-otg2/current_state                                                                                                                      
off-0
root at imx8mqevk:~# [  182.196450] usb 1-1: new high-speed USB device number 4 using ci_hdrc
[  182.356130] usb-storage 1-1:1.0: USB Mass Storage device detected
[  182.357632] scsi host0: usb-storage 1-1:1.0
[  183.367923] scsi 0:0:0:0: Direct-Access     SanDisk  Ultra            1.00 PQ: 0 ANSI: 6
[  183.370559] sd 0:0:0:0: [sda] 60062500 512-byte logical blocks: (30.8 GB/28.6 GiB)
[  183.372332] sd 0:0:0:0: [sda] Write Protect is off
[  183.373061] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[  183.384709] sd 0:0:0:0: [sda] Attached SCSI removable disk
[  184.207552] EXT4-fs (sda): mounted filesystem with ordered data mode. Quota mode: none.

root at imx8mqevk:~# ls /sys/bus/platform/devices/*usb* -d
/sys/bus/platform/devices/32e40000.usb
/sys/bus/platform/devices/32e40200.usbmisc
/sys/bus/platform/devices/usbphynop1

So basically you are saying your first port cannot work even both pgc_otg1 and
pgc_hsiomix are on if you disable 2nd port? 

Li Jun


More information about the linux-arm-kernel mailing list