cancel
Showing results for 
Search instead for 
Did you mean: 

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

JSIGA.1
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
JSIGA.1
Associate II

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

View solution in original post

5 REPLIES 5
PatrickF
ST Employee

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.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
JSIGA.1
Associate II

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 .

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

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Kevin HUBER
ST Employee

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

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
JSIGA.1
Associate II

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