This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM4378: Device tree can not control USB1_DRVVBUS

Part Number: AM4378


Hi! I am developing usb host mode based on linux 4.19y and am4378 chip.

I checked the DRVVBUS and VBUS pin.

I find sometime stange.

I set the usb device tree as am437x-epos-evm.dts

/*pinset*/      usb2_phy1_default: usb2_phy1_default {
            pinctrl-single,pins = <
                AM4372_IOPAD(0xac0, PIN_INPUT_PULLDOWN | MUX_MODE0)
            >;
        };

        usb2_phy1_sleep: usb2_phy1_sleep {
            pinctrl-single,pins = <
                AM4372_IOPAD(0xac0, DS0_PULL_UP_DOWN_EN | PIN_INPUT_PULLDOWN | MUX_MODE7)
            >;
        };

        usb2_phy2_default: usb2_phy2_default {
            pinctrl-single,pins = <
                AM4372_IOPAD(0xac4, PIN_INPUT_PULLDOWN | MUX_MODE0)
            >;
        };

        usb2_phy2_sleep: usb2_phy2_sleep {
            pinctrl-single,pins = <
                AM4372_IOPAD(0xac4, DS0_PULL_UP_DOWN_EN | PIN_INPUT_PULLDOWN | MUX_MODE7)
            >;
        };



/*device setting*/
&usb2_phy1 {
    status = "okay";
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&usb2_phy1_default>;
    pinctrl-1 = <&usb2_phy1_sleep>;
};

&usb1 {
    dr_mode = "otg";
    status = "okay";
};

&usb2_phy2 {
    status = "okay";
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&usb2_phy2_default>;
    pinctrl-1 = <&usb2_phy2_sleep>;
};

&usb2 {
    dr_mode = "host";
    status = "okay";
};

The usb0,&&usb1_VBUS is 5V.It is okay.

But i check the voltage of USB0_DRVVBUS and USB1_DRVVBUS is 0V.

when i set the their dr_mode both to "host", i check the voltage of USB0_DRVVBUS is 3.3V and the voltage of USB1_VBUS is 0V.

I config the USB1_DRRVBUS pin to OUTPUT_PULLUP,OUTPUT_PULLDOWN,INPUT_PULLDOWN,INPUT_PULLUP,the voltage of USB1_VBUS is always 0V.

According to the doc, I set the pin to mode7 OUTPUT_PULLUP,and the voltage of USB1_VBUS is always 1.68V. So i think the config of the pin is okay, at least the address is okay/

It makes me confused. And I think it is the reason why my USB plugs in without response.

Regrads,

Zikai

  • Hi Zikai,

    Is this on you custom board or TI EVM? If former, please post the USB section of the board schematics.

  • Hi Bin!

    This is on my  custom board;

    The the USB section of the board schematics:

  • Hi Zikai,

    zhang zikai said:

    The usb0,&&usb1_VBUS is 5V.It is okay.

    But i check the voltage of USB0_DRVVBUS and USB1_DRVVBUS is 0V.

    It is not okay if USB_VBUS is 5V but USB_DRVVBUS is 0.

    USB_VBUS should be 0 when USB_DRVVBUS is 0 and USB_VBUS should be 5v when USB_DRVVBUS is 3.3v.

    zhang zikai said:
    when i set the their dr_mode both to "host", i check the voltage of USB0_DRVVBUS is 3.3V and the voltage of USB1_VBUS is 0V.

    Based on these descriptions, it seem your discrete USB power switch design is not correct. I won't be able to tell where the problem in your schematics is as I am a software guy. But please review your design, the USB_VBUS and USB_DRVVBUS pins should behave as I explained above.

    BTY, your attached schematics do not show how the USB pins from AM4378, but please replace the two 10K resisters on USB0_ID and USB1_ID pins with 0ohm ones. 10K would cause undefined behavior.

  • Hi Bin!

    Thank you sir! Although my problem does not be solved,I think you gave me a lot of advice to face to it. I hope it also helps other people, so I choose your reply as answer!

    Regards,

    zikai.