Rock Pi S + radxa kernel linux-6.1-stan-rkr1 - inactive USB host?

Hi,

Upon compiling radxa kernel linux-6.1-stan-rkr1 with the rk3308_linux_defconfig, the EHCI/UHCI controller does not seem to service the USB-A port. The only message in dmesg regarding USB host is

rockchip-usb2phy ff008000.syscon:usb2phy@100: error -ENXIO: IRQ index 0 not found

I do not know if this is a fatal error, as it results from platform_get_irq_optional() call https://github.com/radxa/kernel/blob/7fe0e59bb81b910d0aa815217bfa5f162702cf26/drivers/base/platform.c#L263-L266 and the result value is not even checked in https://github.com/radxa/kernel/blob/7fe0e59bb81b910d0aa815217bfa5f162702cf26/drivers/phy/rockchip/phy-rockchip-inno-usb2.c#L2326

The drivers seem to be loaded, in /sys

root@rock-pi-s:/sys/devices/platform# ls *usb* -1
ff400000.usb:
driver
driver_override
gadget.0
modalias
of_node
power
subsystem
supplier:phy:phy-ff008000.syscon:usb2phy@100.0
supplier:platform:ff008000.syscon:usb2phy@100
supplier:regulator:regulator.0
udc
uevent

ff440000.usb:
driver_override
modalias
of_node
power
subsystem
supplier:platform:ff008000.syscon:usb2phy@100
uevent
waiting_for_supplier

ff450000.usb:
driver_override
modalias
of_node
power
subsystem
supplier:platform:ff008000.syscon:usb2phy@100
uevent
waiting_for_supplier

Yet no USB device is detected upon plugging into the USB-A port (dmesg, lsusb).

Thanks a lot,

Pavel.

The dwc2 controller is in device/gadget mode. IIUC the ff440000.usb and ff450000.usb INNO devices are different from the ff400000.usb Synopsys DWC2 device, yet all three have:

supplier:platform:ff008000.syscon:usb2phy@100

Is that actually correct?

Is there any reason you need to use linux-6.1-stan-rkr1? This is currently unsupported from us, and we plan to use upstream 6.1 kernel for ROCK Pi S in our next release.

You can try this RC image:

https://github.com/radxa-build/rock-pi-s/releases/download/b40/rock-pi-s_debian_bookworm_cli_b40.img.xz

I am afraid yes, for now. The current upstream for RK3308 has major issues with I2S - DMA communication - see Rock Pi S - I2S0 - anyone getting clean 96/192kHz? and RockPi S + CS42448 I2S/I2C DAC setup . I tested bsp 6.6 (latest) and 6.1 (stable), no difference. The android kernel linux-6.1-stan-rkr1 works perfectly in this regard. There must be something different.

Actually I have also tested your CM3 (RK3566) and CM5 (RK3588S) with the bsp kernel (they all use the rockchip-i2s-tdm and pl330 drivers), and also hit the I2S - DMA issues, no matter how much I tried to increase the pl330 DMAC clock, AHBUS clock, nothing made a difference. I also tried increasing the DMA buffer and maxburst size as described in RockPi S + CS42448 I2S/I2C DAC setup , no difference. Installing your 6.1 android kernel fixed it right away on RK3308 (not tested on the other SoCs)

@Mitchell please take a look at this I2S issue.

Please add this patch.

@Stephen Thanks a lot. That fixed EHCI (highspeed). For OHCI (USB1) I had to add CONFIG_USB_OHCI_HCD_PLATFORM.

Also please consider adding CONFIG_DTC_SYMBOLS so that overlays can be used, e.g. through your rsetup tool.

Thanks a lot,

Pavel.