Skip to content

Commit 485705d

Browse files
arm64: dts: ti: k3-j722s: Enable PCIe and USB support on J722S-EVM
Enable PCIe0 instance of PCIe in Root Complex mode of operation with Lane 0 of the SERDES1 instance of SERDES. Also enable USB0 instance of USB to interface with the Type-C port via the USB hub, by configuring the pin P05 of the GPIO expander on the EVM. Enable USB1 instance of USB in SuperSpeed mode of operation with Lane 0 of the SERDES0 instance of SERDES. Co-developed-by: Ravi Gunasekaran <r-gunasekaran@ti.com> Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Acked-by: Roger Quadros <rogerq@kernel.org> Link: https://lore.kernel.org/r/20240615081600.3602462-8-s-vadapalli@ti.com Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
1 parent 628e0a0 commit 485705d

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

arch/arm64/boot/dts/ti/k3-j722s-evm.dts

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
/dts-v1/;
1010

1111
#include <dt-bindings/net/ti-dp83867.h>
12+
#include <dt-bindings/phy/phy.h>
1213
#include "k3-j722s.dtsi"
14+
#include "k3-serdes.h"
1315

1416
/ {
1517
compatible = "ti,j722s-evm", "ti,j722s";
@@ -202,6 +204,12 @@
202204
J722S_IOPAD(0x012c, PIN_OUTPUT, 0) /* (AF25) RGMII1_TX_CTL */
203205
>;
204206
};
207+
208+
main_usb1_pins_default: main-usb1-default-pins {
209+
pinctrl-single,pins = <
210+
J722S_IOPAD(0x0258, PIN_INPUT, 0) /* (B27) USB1_DRVVBUS */
211+
>;
212+
};
205213
};
206214

207215
&cpsw3g {
@@ -301,6 +309,13 @@
301309
"PCIe0_1L_RC_RSTz", "PCIe0_1L_PRSNT#",
302310
"ENET1_EXP_SPARE2", "ENET1_EXP_PWRDN",
303311
"PD_I2ENET1_I2CMUX_SELC_IRQ", "ENET1_EXP_RESETZ";
312+
313+
p05-hog {
314+
/* P05 - USB2.0_MUX_SEL */
315+
gpio-hog;
316+
gpios = <5 GPIO_ACTIVE_HIGH>;
317+
output-high;
318+
};
304319
};
305320
};
306321

@@ -384,3 +399,61 @@
384399
status = "okay";
385400
bootph-all;
386401
};
402+
403+
&serdes_ln_ctrl {
404+
idle-states = <J722S_SERDES0_LANE0_USB>,
405+
<J722S_SERDES1_LANE0_PCIE0_LANE0>;
406+
};
407+
408+
&serdes0 {
409+
status = "okay";
410+
serdes0_usb_link: phy@0 {
411+
reg = <0>;
412+
cdns,num-lanes = <1>;
413+
#phy-cells = <0>;
414+
cdns,phy-type = <PHY_TYPE_USB3>;
415+
resets = <&serdes_wiz0 1>;
416+
};
417+
};
418+
419+
&serdes1 {
420+
status = "okay";
421+
serdes1_pcie_link: phy@0 {
422+
reg = <0>;
423+
cdns,num-lanes = <1>;
424+
#phy-cells = <0>;
425+
cdns,phy-type = <PHY_TYPE_PCIE>;
426+
resets = <&serdes_wiz1 1>;
427+
};
428+
};
429+
430+
&pcie0_rc {
431+
reset-gpios = <&exp1 18 GPIO_ACTIVE_HIGH>;
432+
phys = <&serdes1_pcie_link>;
433+
phy-names = "pcie-phy";
434+
status = "okay";
435+
};
436+
437+
&usbss0 {
438+
ti,vbus-divider;
439+
status = "okay";
440+
};
441+
442+
&usb0 {
443+
dr_mode = "otg";
444+
usb-role-switch;
445+
};
446+
447+
&usbss1 {
448+
pinctrl-names = "default";
449+
pinctrl-0 = <&main_usb1_pins_default>;
450+
ti,vbus-divider;
451+
status = "okay";
452+
};
453+
454+
&usb1 {
455+
dr_mode = "host";
456+
maximum-speed = "super-speed";
457+
phys = <&serdes0_usb_link>;
458+
phy-names = "cdns3,usb3-phy";
459+
};

0 commit comments

Comments
 (0)