Skip to main content
JSIGA.1
Associate II
June 6, 2022
Solved

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

  • June 6, 2022
  • 4 replies
  • 2227 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

PatrickF
ST Employee
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.

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
JSIGA.1
JSIGA.1Author
Associate 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 .

PatrickF
ST Employee
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

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
Kevin HUBER
ST Employee
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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
JSIGA.1
JSIGA.1AuthorBest answer
Associate 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