Skip to main content
Visitor II
June 6, 2022
Solved

How to change USB type C device tree configuration into USB Type A .?

  • June 6, 2022
  • 4 replies
  • 2225 views

Hello , 

Currently, i am working on STM32MP157.  

I am trying to change the device tree USB type C configuration into a USB type A host.

I've disabled usbotg option under stm32mp1571.dtsi file. I would like to know where i could add USB A host configuration.

Thank you

    This topic has been closed for replies.
    Best answer by JSIGA.1

    Hello Kevin,

    Thank you for contacting me.

    I made some mistakes in the compilation. After proper compilation, I could use both USB (usbphyc_port1,usbphyc_port0 ) as USBH.  

    Regards

    SJ

    4 replies

    Technical Moderator
    June 6, 2022

    HI @JSIGA.1​ 

    Do you want to add an USB Type-A config on OTG (USB_DP2/USB_DM2 pins) or just force the OTP in host mode (with USB micro-A)?

    Note that OTG is not intended to be a full Type-A as it does not support USB Hub and has probably lower performances than USBH.

    For host usages, it is recommended to use USBH which could manage two external ports on port0 and port1 (respectively USB_DP1/USB_DM1 and USB_DP2/USB_DM2 pins)

    See https://wiki.st.com/stm32mpu/wiki/USBH_device_tree_configuration.

    Regards.

    JSIGA.1Author
    Visitor II
    June 6, 2022

    Hello,

    Thank you for your response.

    My case is USB_DP1/USB_DM1 is configured as USBH and USB_DP2/USB_DM2 is configured as Type-C.

    I am trying USB_DP2/USB_DM2 to configure as USBH.

    I've tried disabling "usbotg_hs" disabled and added 2 physical port in USBH configuration.

    &usbh_ehci {

    phys = <&usbphyc_port0>, <&usbphyc_port1 1>;

    phy-names = "usb","usb";

    status = "okay";

    };

    &usbh_ohci {

      phys = <&usbphyc_port0>, <&usbphyc_port1 1>;

      phy-names = "usb","usb";

      status = "okay";

    };

    &usbphyc {

    status = "okay";

    };

    &usbotg_hs{

    status = "disabled";

    };

    USBH (USB_DP2/USB_DM2) not detect any USB devices .

    Technical Moderator
    June 7, 2022

    Hi,

    not expert, but maybe missing some entries in &usbphyc node (e.g. 'connector' )

    https://wiki.st.com/stm32mpu/wiki/USBPHYC_device_tree_configuration#DT_configuration_example

    Maybe share more details on your issue (e.g.. log files)

    Regards,

    Patrick

    Technical Moderator
    June 8, 2022

    Hello @JSIGA.1​ ,

    Your configuration seems consistent with what you are trying to do.

    As wrote by Patrick, we will need several information to help you.

    Please can you send us:

    • Your DTS and the complete DTB file.
    • The complete boot log traces.

    Regards,

    Kevin

    JSIGA.1AuthorAnswer
    Visitor II
    June 8, 2022

    Hello Kevin,

    Thank you for contacting me.

    I made some mistakes in the compilation. After proper compilation, I could use both USB (usbphyc_port1,usbphyc_port0 ) as USBH.  

    Regards

    SJ