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.

AM625: Does AM62xx support USB OTG?

Part Number: AM625

Customer is asking this.

DS is saying we don't support.

So, this is not supported even HW + SW for the OTG?

If this, why this E2E said the OTG is do-able?

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1247135/am62a7-usb-otg-support-in-kernel?tisearch=e2e-sitesearch&keymatch=AM62%25252520USB%25252520OTG#

Please confirm if we support the OTG.

If yes, please fix the datasheet !! Bcz DS told us it's not supported.

  • Hi Rio,

    "OTG" is a often misused term. By "OTG", if you meant the OTG protocols, such as HNP or SRP, those are not supported. But if you meant the "dual-role" mode, in which the USB port can work in either device mode or host mode based on the USB cable connection, this is supported.

  • Hi Bin:

    OTG mode can cover the dual-role.

    That means: Dual role is a subset of the OTG.

    Is my understanding correct?

    BR Rio

  • Hi Rio,

    In the "dual-role" context, OTG is a misused term, please try not to use "OTG" when communicate with customers whenever possible.

  • Hi, Bin,

    #1. Use gpio as ID pin, will USB insertion trigger gpio interrupt or just read the gpio status in driver? 

    #2. Regarding to the readme to modify dts for "otg", when use a different gpio, besides changing in extcon_usb1 node,  need changes in usb node? especially what is the interrupts number denotes? 

    +    #include <dt-bindings/soc/ti,sci_pm_domain.h>
    +    #include <dt-bindings/interrupt-controller/arm-gic.h>
    +    #include <dt-bindings/gpio/gpio.h>
    +
    +    extcon_usb1: extcon-usb1 {
    +      id-gpios = <&main_gpio1 51 GPIO_ACTIVE_HIGH>;
    +    };
    +
    +    bus {
    +      #address-cells = <2>;
    +      #size-cells = <2>;
    +
    +      usbss1: usb@f910000 {
    +        compatible = "ti,am62-usb";
    +        reg = <0x00 0x0f910000 0x00 0x800>;
    +        interrupts = <GIC_SPI 234 IRQ_TYPE_LEVEL_HIGH>; /* MISC IRQ */
    +        clocks = <&k3_clks 162 3>;
    +        clock-names = "ref";
    +        ti,syscon-phy-pll-refclk = <&wkup_conf 0x4018>;
    +        power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>;
    +        #address-cells = <2>;
    +        #size-cells = <2>;
    +
    +        usb@31100000 {
    +          compatible = "snps,dwc3";
    +          reg =<0x00 0x31100000 0x00 0x50000>;
    +          interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>, /* irq.0 */
    +                       <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>; /* irq.0 */
    +          interrupt-names = "host", "peripheral";
    +          maximum-speed = "high-speed";
    +          extcon = <&extcon_usb1>;
    +          dr_mode = "otg";
    +        };
    +      };
    +    };
    -- 
    2.17.1
  • Hi Tony,

    #1. Use gpio as ID pin, will USB insertion trigger gpio interrupt or just read the gpio status in driver? 

    The USB driver register a callback to the kernel gpio framework. Then when the ID pin is grounded or becomes float, it triggers GPIO interrupt which is handled by the kernel gpio framework, which calls the USB driver callback to notify the ID pin status change.

    #2. Regarding to the readme to modify dts for "otg", when use a different gpio, besides changing in extcon_usb1 node,  need changes in usb node? especially what is the interrupts number denotes? 

    Please point me to the README file.

    Since all the AM6x SK boards use type-C, which doesn't require extcon_usb node for ID pin detection, I haven't closely followed the kernel development, but I think the way it uses gpio to detect ID pin has been changed in the past few years.

  • For whatever reason, the extcon_usb1 node in the example is not the DT binding doc in kernel source code. Anyway,

    #2. Regarding to the readme to modify dts for "otg", when use a different gpio, besides changing in extcon_usb1 node,  need changes in usb node? especially what is the interrupts number denotes? 

    no other changes in the usb node, except the gpio pin number in the extcon_usb1 node.