Skip to content

Commit

Permalink
arm64: dts: ti: k3-am625-sk: Add support for USB
Browse files Browse the repository at this point in the history
AM62 SoC has two instances of USB and they are brought on to the board
in the following way,

-> USB0 instance
 - This is brought out to a USB TypeC connector on board through TPS6598 PD
   controller. The PD controller should decide the role based on CC pin in
   the connector. Unfortunately the irq line for the TPS isn't hooked up
   which is a mode not yet support by the driver (some patches were
   submitted earlier this year[0]). So for now the PD controller is left
   out and peripheral mode chosen.

-> USB1 instance
 - This is brought out to a USB TypeA connector on board.

Therefore, add the required device tree support for the above in the board
dts file.

0: https://lore.kernel.org/lkml/f714ee55-ef47-317d-81b9-57020dda064b@ti.com/T/

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Tested-by: Martyn Welch <martyn.welch@collabora.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Link: https://lore.kernel.org/r/20230112162847.973869-4-sjoerd@collabora.com
  • Loading branch information
Aswath Govindraju authored and Vignesh Raghavendra committed Jan 15, 2023
1 parent 2240f96 commit 2d94dfc
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions arch/arm64/boot/dts/ti/k3-am625-sk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
spi0 = &ospi0;
ethernet0 = &cpsw_port1;
ethernet1 = &cpsw_port2;
usb0 = &usb0;
usb1 = &usb1;
};

chosen {
Expand Down Expand Up @@ -284,6 +286,12 @@
AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */
>;
};

main_usb1_pins_default: main-usb1-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18) USB1_DRVVBUS */
>;
};
};

&wkup_uart0 {
Expand Down Expand Up @@ -464,3 +472,22 @@
};
};
};

&usbss0 {
status = "okay";
ti,vbus-divider;
};

&usbss1 {
status = "okay";
};

&usb0 {
dr_mode = "peripheral";
};

&usb1 {
dr_mode = "host";
pinctrl-names = "default";
pinctrl-0 = <&main_usb1_pins_default>;
};

0 comments on commit 2d94dfc

Please sign in to comment.