Rockchip Android13 x3588 USB 2.0 debugging notes

The documentation for rk's USB module is quite detailed. Just follow the basic documentation and make slight changes.

Compare the document "Rockchip_RK3588_Developer_Guide_USB_CN.pdf"

usb is divided into:

  • Type C types, including:

  • type C usb 3.1/DP

  • type-C to Type-A USB 3.1/DP

  • type-C to Type-A USB 2.0/DP

  • type-C to Type-A USB 2.0/DP)

  • Type-A interface type:

  • type-A USB 3.1

  • type-A USB 2.0

  • Micro interface type:

  • micro USB 3.1

  • micro USB 2.1

The public resources and attributes of the USB controller and PHY in the DTSI file of rk3588 have been configured in rk3588-evb.dtsi. You only need to configure the unused USB nodes as "disabled".

The USB DTS nodes corresponding to public resources and attributes are as follows:

When we debug USB 2.0, just refer to the <Type-A USB 2.0 Hardware Circuit> chapter of the document.

Below is the USB interface of the board. I found that there was no response when connecting the mouse and USB disk, and there was no connection to the serial port for printing.

  • Debugging steps:

First we refer to the document <Type-A USB 2.0 DTS Configuration> chapter:

Let’s look at the dts configuration of our board x3588:

// rk3588-x3588-sdk.dts
.....
// #VBUS GPIO配置,在USB2.0 PHY驱动中控制该GPIO
vcc5v0_host: vcc5v0-host {
        compatible = "regulator-fixed";
        regulator-name = "vcc5v0_host";
        regulator-boot-on;
        regulator-always-on;
        regulator-min-microvolt = <5000000>;
        regulator-max-microvolt = <5000000>;
        enable-active-high;
        gpio = <&gpio1 RK_PD7 GPIO_ACTIVE_HIGH>; // GPIO:USB_HOST_PWREN_H
        vin-supply = <&vcc5v0_usb>;
        pinctrl-names = "default";
        pinctrl-0 = <&vcc5v0_host_en>;
}; 
......
// #USB2.0 PHY2/3配置"phy-supply"属性,用于控制VBUS输出5V
&u2phy2_host {
    phy-supply = <&vcc5v0_host>;
};

&u2phy3_host {
    phy-supply = <&vcc5v0_host>;
};

 //include rk3588-evb.dtsi
// usb 2.0 host 0/1 controller
&usb_host0_ehci {
    status = "okay";
};

&usb_host0_ohci {
    status = "okay";
};

&usb_host1_ehci {
    status = "okay";
};

&usb_host1_ohci {
    status = "okay";
};

In the hardware schematic diagram, hub_host4 and host1 are composite connections:

Host1 here is connected to hub_host4

So check the power supply on the usb hub accordingly.

Use a multimeter to check and find that the capacitor C350 of the GPIO port here has no voltage and needs to be configured in dts.

Add code: drivers/misc/5v_en.c, add hardware customized GPIO port code.

You need to modify the Makefile to compile the added code into the .o file to take effect. You can add printing in the code and check whether the compilation takes effect in the boot serial port log.

reference:

https://blog.csdn.net/weixin_43245753/article/details/123496262

RKDocs/common/usb/Rockchip_RK3588_Developer_Guide_USB_CN.pdf

Guess you like

Origin blog.csdn.net/zhoudidong/article/details/129767212