Unable to Load PHY Drivers Automatically for ARM SoCs
ARM SoCs require PHY drivers for proper functionality of USB and PCIe interfaces. Currently, these drivers do not load automatically even with modules: phy_rockchip_inno_usb2,phy_rockchip_snps_pcie3. It only works with modules_force_load: phy_rockchip_inno_usb2,phy_rockchip_snps_pcie3. I hope the PHY drivers could load automatically with the default configuration.
Booster version: 0.12 OS: Alpine Linux edge
Related issue: alpine/mkinitfs#76
Thank you for the report.
I tried to grep linux sources for phy_rockchip_inno_usb2 but there is nothing there. But I assume it is this driver https://github.com/torvalds/linux/blob/master/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
Hows does ARM load the drivers? Is it still udev events? Does your system send a udev event specific for the hardware you mentioned?
I tried to grep linux sources for
phy_rockchip_inno_usb2but there is nothing there. But I assume it is this driver https://github.com/torvalds/linux/blob/master/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
Yes, that's the driver needed.
Hows does ARM load the drivers? Is it still udev events? Does your system send a udev event specific for the hardware you mentioned?
Here are the debug messages related to USB when PHY drivers are force-loaded:
udev event {Action:add KObj:/devices/platform/fe8a0000.usb2phy/extcon/extcon0 Env: map[ACTION:add DEVPATH:/devices/platform/fe8a0000.usb2phy/extcon/extcon0 SEQNUM:1088 SUBSYSTEM:extcon]}
udev event {Action:add KObj:/devices/virtual/devlink/regulator:regulator.6--phy:phy-fe8a0000.usb2phy.4 Env:map[ACTION:add DEVPATH:/devices/virtual/devlink/regulator:regulator.6--phy:phy-fe8a0000.usb2phy.4 SEQNUM:1091 SUBSYSTEM:devlink]}
udev event {Action:add KObj:/devices/platform/fe8a0000.usb2phy/phy/phy-fe8a0000.usb2phy.4 Env:map[ACTION:add DEVPATH:/devices/platform/fe8a0000.usb2phy/phy/phy-fe8a0000.usb2phy.4 OF_COMPATIBLE_N:0 OF_FULLNAME:/usb2phy@fe8a0000/host-port OF_NAME:host-port SEQNUM:1093 SUBSYSTEM:phy]}
udev event {Action:add KObj:/devices/platform/fe8a0000.usb2phy/phy/phy-fe8a0000.usb2phy.5 Env:map[ACTION:add DEVPATH:/devices/platform/fe8a0000.usb2phy/phy/phy-fe8a0000.usb2phy.5 OF_COMPATIBLE_N:0 OF_FULLNAME:/usb2phy@fe8a0000/otg-port OF_NAME:otg-port SEQNUM:1095 SUBSYSTEM:phy]}
udev event {Action:add KObj:/devices/virtual/devlink/platform:fe8a0000.usb2phy--platform:fd000000.usb Env:map[ACTION:add DEVPATH:/devices/virtual/devlink/platform:fe8a0000.usb2phy--platform:fd000000.usb SEQNUM:1098 SUBSYSTEM:devlink]}
udev event {Action:remove KObj:/devices/virtual/devlink/platform:vcc5v0-usb-host-regulator--platform:fe8a0000.usb2phy Env:map[ACTION:remove DEVPATH:/devices/virtual/devlink/platform:vcc5v0-usb-host-regulator--platform:fe8a0000.usb2phy SEQNUM:1099 SUBSYSTEM:devlink]}
udev event {Action:bind KObj:/devices/platform/fe8a0000.usb2phy Env:map[ACTION:bind DEVPATH:/devices/platform/fe8a0000.usb2phy DRIVER:rockchip-usb2phy MODALIAS:of: Nusb2phyT(null)Crockchip,rk3568-usb2phy OF_COMPATIBLE_0:rockchip,rk3568-usb2phy OF_COMPATIBLE_N:1 OF_FULLNAME:/usb2phy@fe8a0000 OF_NAME:usb2phy SEQNUM:1100 SUBSYSTEM:platform]}
modalias of:Nusb2phyT(null)Crockchip,rk3568_usb2phy matched module phy_rockchip_inno_usb2
When the drivers are not force-loaded, the output is as follows:
modalias of:Nusb2phyT(null)Crockchip,rk3568-usb2phy matched module uio_pdrv_genirq