Skip to content

Commit c1453d3

Browse files
rogerqnmenon
authored andcommitted
arm64: dts: ti: k3-am62p: add the USB sub-system
There are two USB instances available on the am62p5 starter kit. Include and enable them for use on the board. USB LPM feature is kept disabled as it is not supported. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20240412-for-v6-10-am62-usb-typec-dt-v7-2-93b827adf97e@kernel.org Signed-off-by: Nishanth Menon <nm@ti.com>
1 parent ef80ebe commit c1453d3

3 files changed

Lines changed: 129 additions & 0 deletions

File tree

arch/arm64/boot/dts/ti/k3-am62p-main.dtsi

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,58 @@
635635
status = "disabled";
636636
};
637637

638+
usbss0: usb@f900000 {
639+
compatible = "ti,am62-usb";
640+
reg = <0x00 0x0f900000 0x00 0x800>,
641+
<0x00 0x0f908000 0x00 0x400>;
642+
clocks = <&k3_clks 161 3>;
643+
clock-names = "ref";
644+
ti,syscon-phy-pll-refclk = <&usb0_phy_ctrl 0x0>;
645+
#address-cells = <2>;
646+
#size-cells = <2>;
647+
power-domains = <&k3_pds 178 TI_SCI_PD_EXCLUSIVE>;
648+
ranges;
649+
status = "disabled";
650+
651+
usb0: usb@31000000 {
652+
compatible = "snps,dwc3";
653+
reg = <0x00 0x31000000 0x00 0x50000>;
654+
interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>, /* irq.0 */
655+
<GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>; /* irq.0 */
656+
interrupt-names = "host", "peripheral";
657+
maximum-speed = "high-speed";
658+
dr_mode = "otg";
659+
snps,usb2-gadget-lpm-disable;
660+
snps,usb2-lpm-disable;
661+
};
662+
};
663+
664+
usbss1: usb@f910000 {
665+
compatible = "ti,am62-usb";
666+
reg = <0x00 0x0f910000 0x00 0x800>,
667+
<0x00 0x0f918000 0x00 0x400>;
668+
clocks = <&k3_clks 162 3>;
669+
clock-names = "ref";
670+
ti,syscon-phy-pll-refclk = <&usb1_phy_ctrl 0x0>;
671+
#address-cells = <2>;
672+
#size-cells = <2>;
673+
power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>;
674+
ranges;
675+
status = "disabled";
676+
677+
usb1: usb@31100000 {
678+
compatible = "snps,dwc3";
679+
reg = <0x00 0x31100000 0x00 0x50000>;
680+
interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>, /* irq.0 */
681+
<GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>; /* irq.0 */
682+
interrupt-names = "host", "peripheral";
683+
maximum-speed = "high-speed";
684+
dr_mode = "otg";
685+
snps,usb2-gadget-lpm-disable;
686+
snps,usb2-lpm-disable;
687+
};
688+
};
689+
638690
fss: bus@fc00000 {
639691
compatible = "simple-bus";
640692
reg = <0x00 0x0fc00000 0x00 0x70000>;

arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818
reg = <0x14 0x4>;
1919
bootph-all;
2020
};
21+
22+
usb0_phy_ctrl: syscon@4008 {
23+
compatible = "ti,am62-usb-phy-ctrl", "syscon";
24+
reg = <0x4008 0x4>;
25+
};
26+
27+
usb1_phy_ctrl: syscon@4018 {
28+
compatible = "ti,am62-usb-phy-ctrl", "syscon";
29+
reg = <0x4018 0x4>;
30+
};
2131
};
2232

2333
wkup_uart0: serial@2b300000 {

arch/arm64/boot/dts/ti/k3-am62p5-sk.dts

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
spi0 = &ospi0;
2828
ethernet0 = &cpsw_port1;
2929
ethernet1 = &cpsw_port2;
30+
usb0 = &usb0;
31+
usb1 = &usb1;
3032
};
3133

3234
chosen {
@@ -297,6 +299,12 @@
297299
bootph-all;
298300
};
299301

302+
main_usb1_pins_default: main-usb1-default-pins {
303+
pinctrl-single,pins = <
304+
AM62PX_IOPAD(0x0258, PIN_INPUT, 0) /* (G21) USB1_DRVVBUS */
305+
>;
306+
};
307+
300308
main_wlirq_pins_default: main-wlirq-default-pins {
301309
pinctrl-single,pins = <
302310
AM62PX_IOPAD(0x0128, PIN_INPUT, 7) /* (K25) MMC2_SDWP.GPIO0_72 */
@@ -340,6 +348,36 @@
340348
};
341349
};
342350

351+
&main_i2c0 {
352+
status = "okay";
353+
pinctrl-names = "default";
354+
pinctrl-0 = <&main_i2c0_pins_default>;
355+
clock-frequency = <400000>;
356+
357+
typec_pd0: usb-power-controller@3f {
358+
compatible = "ti,tps6598x";
359+
reg = <0x3f>;
360+
361+
connector {
362+
compatible = "usb-c-connector";
363+
label = "USB-C";
364+
self-powered;
365+
data-role = "dual";
366+
power-role = "sink";
367+
ports {
368+
#address-cells = <1>;
369+
#size-cells = <0>;
370+
port@0 {
371+
reg = <0>;
372+
usb_con_hs: endpoint {
373+
remote-endpoint = <&usb0_hs_ep>;
374+
};
375+
};
376+
};
377+
};
378+
};
379+
};
380+
343381
&main_i2c1 {
344382
status = "okay";
345383
pinctrl-names = "default";
@@ -466,6 +504,35 @@
466504
};
467505
};
468506

507+
&usbss0 {
508+
status = "okay";
509+
ti,vbus-divider;
510+
};
511+
512+
&usbss1 {
513+
status = "okay";
514+
ti,vbus-divider;
515+
};
516+
517+
&usb0 {
518+
usb-role-switch;
519+
#address-cells = <1>;
520+
#size-cells = <0>;
521+
522+
port@0 {
523+
reg = <0>;
524+
usb0_hs_ep: endpoint {
525+
remote-endpoint = <&usb_con_hs>;
526+
};
527+
};
528+
};
529+
530+
&usb1 {
531+
dr_mode = "host";
532+
pinctrl-names = "default";
533+
pinctrl-0 = <&main_usb1_pins_default>;
534+
};
535+
469536
&mcasp1 {
470537
status = "okay";
471538
#sound-dai-cells = <0>;

0 commit comments

Comments
 (0)