Hi experts
If I want to configure the DRD mode, how do I use GPIO as the USB_ID signal function? Is this GPIO specific, how does the software associate the signal of the GPIO with the USBSS?
BR
Ethan
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.
Hi experts
If I want to configure the DRD mode, how do I use GPIO as the USB_ID signal function? Is this GPIO specific, how does the software associate the signal of the GPIO with the USBSS?
BR
Ethan
Hi Ethan,
From the conversation offline, I know you are asking the configuration for Linux.
If the hardware design uses USB type-C connector, the USB_ID signal is not needed, so no need to specify a GPIO pin. The DRD mode switching is controlled by the USB type-C companion device. The AM62x SK EVM USB0 port design can be used as a reference.
If the hardware design uses USB micro-AB connector, the USB_ID signal from the connector should be routed to a GPIO pin. It can be any available GPIO pin. Then the GPIO pin is specified in the board device tree file, including the pinmux setting of the GPIO pin. The following DTS code shows how to configure the GPIO for USB_ID signal, using GPIO1_5 as an example:
&main_pmx0 { usb0_id_pin_default: usb0-pin-default { # gpio1_5 pinmux setting here } }; extcon_usb0: extcon_usb0 { compatible = "linux,extcon-usb-gpio"; id-gpio = <&main_gpio1 5 GPIO_ACTIVE_HIGH>; }; &usb0 { dr_mode = "otg"; extcon = <&extcon_usb0>; pinctrl-names = "default"; pinctrl-0 = <&usb0_id_pin_default>; };