how to make USB OTG work without PTN5110

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to make USB OTG work without PTN5110

1,129 Views
Chandrasekhar-carrier
Contributor II

On our custom board with the IMX8MP, we want to configure the USB as OTG without using the PTN5110 IC.

For the ID function, we intend to use GPIO1_10. Below are the code modifications we have made in the DTS.

  1. Are these modifications correct, or do we need to make any further changes to enable USB OTG functionality?
  2. Can we use the OTG_ID pin from the processor instead of using this GPIO? If so, what modifications are necessary to enable OTG functionality?

Your suggestions are appreciated.

 

 

&usb3_phy0 {

        fsl,phy-tx-vref-tune = <6>;

        fsl,phy-tx-rise-tune = <0>;

        fsl,phy-tx-preemp-amp-tune = <3>;

        fsl,phy-tx-vboost-level = <5>;

        fsl,phy-comp-dis-tune = <7>;

        fsl,pcs-tx-deemph-3p5db = <0x21>;

        fsl,phy-pcs-tx-swing-full = <0x7f>;

        status = "okay";

};

 

&usb3_0 {

        status = "okay";

};

 

&usb_dwc3_0 {

        dr_mode = "otg";

        hnp-disable;

        srp-disable;

        adp-disable;

        extcon = <&extcon_usb0>;

        status = "okay";

 

};

extcon_usb0: extcon-usb0 {

                compatible = "linux,extcon-usb-gpio";

                pinctrl-names = "default";

                pinctrl-0 = <&pinctrl_usb0_extcon>;

                id-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;

        };



Labels (1)
0 Kudos
Reply
3 Replies

1,064 Views
lapohab
Contributor III

Can we use the OTG_ID pin from the processor instead of using this GPIO? If so, what modifications are necessary to enable OTG functionality?

https://www.nxp.com/design/design-center/development-boards-and-designs/8MPLUSLPD4-PEVK

 

1.png

0 Kudos
Reply

1,096 Views
Oswalag
NXP TechSupport
NXP TechSupport

Hello,

I Highly recommend you to use the ptn5110 for PD control and CC logic control.

Our default BSP support it. If you are using other CC logic you need to realize in the software yourself.

BR.

0 Kudos
Reply

1,067 Views
lapohab
Contributor III

I strongly disagree with your statement. Most products do not require a Type-C interface. NXP is pushing its Type-C chips by forcibly incorporating Type-C peripheral circuits into the hardware design. This is particularly unreasonable. To be blunt, this is a poor design. Furthermore, you even tried to impose so-called "suggestions" when answering questions. However, your colleagues did make some compensations.

 

 

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8MM-i-MX8MQ-USB2-0-Design-Without-US...

 

https://community.nxp.com/t5/i-MX-Processors/USB-OTG-IMX8MPlus/m-p/1692585

Linux already has a binding guide, and other companies have also done hardware designs without Type-C and corresponding device trees.

 

https://github.com/nxp-imx/linux-imx/blob/lf-6.6.36-2.1.0/Documentation/devicetree/bindings/extcon/e...

https://github.com/nxp-imx/linux-imx/blob/lf-6.6.36-2.1.0/Documentation/devicetree/bindings/usb/usb-...

https://github.com/nxp-imx/linux-imx/blob/lf-6.6.36-2.1.0/arch/arm64/boot/dts/freescale/imx8mp-verdi...

&usb_dwc3_0 {
	/* dual role only, not full featured OTG */
	adp-disable;
	dr_mode = "otg";
	hnp-disable;
	maximum-speed = "high-speed";
	role-switch-default-mode = "peripheral";
	srp-disable;
	usb-role-switch;

	connector {
		compatible = "gpio-usb-b-connector", "usb-b-connector";
		id-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
		label = "Type-C";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_usb_1_id>;
		self-powered;
		type = "micro";
		vbus-supply = <&reg_usb1_vbus>;
	};
};

 

https://github.com/nxp-imx/linux-imx/blob/lf-6.6.36-2.1.0/Documentation/devicetree/bindings/connecto...

 

 

0 Kudos
Reply