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.

Linux: USB 3.0 device tree configuration

Other Parts Discussed in Thread: TDA2

Tool/software: Linux

Hi,

We have custom tda2px board and want to enable USB 3.0 in device tree. This is schematic for USB module:

I have 5V on VBUS on CN8. Is everything ok with schematic? If everything is ok which changes should I implement in device tree to enable this module? 

Regards,

Suzana Komarcevski

  • Hi Suzana,

    One little comment about the schematic - USB2.0 data pins also need an ESD protection.

    Regards,

    Stan

  • Hi Suzana,

    Few questions:
    Looking at the schematics, it has the USB-A 3.0 receptacle. So we assume you are planning to have the USB Host mode functionality only. Is that correct?
    To comment on the device tree entries, Can you tell us which TI SDK release version are you using/referring. So that we can point you to the correct file to refer?

    Thanks,
    Praveen
  • Hi Praveen,

    Yes, you are correct. We are planning to have host mode functionality only. We are using PROCESSOR_SDK_VISION_03_03_00_00.

    Thanks,
    Suzana
  • Hi Suzana,

    I am assuming that along with the PROCESSOR_SDK_VISION_03_03_00_00,you are using one of the TI Linux SDKs to run the Linux OS on the A15 core.

    If this is correct, then the device tree files can be found in the the Linux Kernel path ./arch/arm/boot/dts. Please identify the correct dts files to use for your platform. Please refer the vision sdk release documentation for this information.

    For USB1 DT entry example: Refer to dra7.dtsi file - Search for the section start with line: omap_dwc3_1: omap_dwc3_1@48880000 {

    The only change required for your case is:  dr_mode = "host";

    Thanks,

    Praveen

  • Hi,

    I made following change in dra76-evm.dts but usb device is not detected:

    &usb1 {

       dr_mode = "host";

    };

    When I plug in usb 2.0 (4GB)  this is the output of lsusb and lsblk commands:

    Do I need to set USB1_DRV_VBUS as GPIO in oreder to get 5V output? Do I need to use extcon driver?

    Regards,

    Suzana

  • Suzana,
    In your initial post you said: "I have 5V on VBUS on CN8. ". Did you mean "I don't have..."?
  • Stanislav,

    I have 5V when I change muxmode for USB1_DRV_VBUS to 14. Sorry, my mistake, I did not explain well.
  • Suzana,

    The default muxmode 0 for USB1_DRVVBUS is sufficient to get the VBUS ON. Once the USB1 is configured in host mode, the usb1_drvvbus line is asserted such that it enables the external charge pump/power switch. There is no need to configure it is as GPIO (muxmode 14).

    In your case, extcon driver is not need. This is only required if there is a need for vbus detect and/or ID detect logic. In the attached schematics we does not see that this is present. Since your need is to have the USB1 is host mode only, this is not necessary.
    For more detailed undersanding, please refer the "Figure 24-142. SuperSpeed USB Controller Application: USB3.0 DRD" of the TDA2 TRM.

    Regarding the usb device not getting detected , have you made sure that the clock and power to the USB2 PHY are properly taken care?
    Can you share the kernel log by running "dmesg"?

    Thanks,
    Praveen
  • Praveen,

    I refered to Linux_kernel _path/arch/arm/boot/dts/dra72-evm-common.dtsi and made similar changes in dra76-evm.dts:

        extcon_usb1: extcon_usb1 {
    		    compatible = "linux,extcon-usb-gpio";
    		    id-gpio = <&gpio6 12 GPIO_ACTIVE_HIGH>;
    	    };
    
    &dra7_pmx_core {
    	gpio6_pins: gpio6_pins {
    		pinctrl-single,pins = <
    			0x280 (PIN_OUTPUT_PULLUP | MUX_MODE14)
    		>;
    	};
    };
    
    &gpio6 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&gpio6_pins>;
    };
    
    &omap_dwc3_1 {
    	status = "okay";
    	extcon = <&extcon_usb1>;
    };
    
    &usb1 {
    	dr_mode = "host";
    };

    This resolved my issue. From your previous post I conclude that this is the wrong way but it works in my case, so my question is should I leave it like this or not?

    Thanks,

    Suzana

  • Suzana,

    Good to know that the issue is resolved.

    Would like to leave the decision to you if you want to go with this or analyze further why this works. In case, you are happy with the resolution, suggest you to close this thread.

    Thanks,
    Praveen