Skip to content

Commit a2ff7f1

Browse files
Siddharth-Vadapalli-at-TInmenon
authored andcommitted
arm64: dts: ti: k3-j721e: Add CPSW9G nodes
TI's J721E SoC has a 9 port Ethernet Switch instance with 8 external ports and 1 host port, referred to as CPSW9G. Add device-tree nodes for CPSW9G and disable it by default. Device-tree overlays will be used to enable it. Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20230315062307.1612220-2-s-vadapalli@ti.com Signed-off-by: Nishanth Menon <nm@ti.com>
1 parent 6cd4b7c commit a2ff7f1

2 files changed

Lines changed: 117 additions & 0 deletions

File tree

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

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@
6161
<J721E_SERDES4_LANE2_EDP_LANE2>, <J721E_SERDES4_LANE3_EDP_LANE3>;
6262
};
6363

64+
cpsw0_phy_gmii_sel: phy@4044 {
65+
compatible = "ti,j721e-cpsw9g-phy-gmii-sel";
66+
ti,qsgmii-main-ports = <2>, <2>;
67+
reg = <0x4044 0x20>;
68+
#phy-cells = <1>;
69+
};
70+
6471
usb_serdes_mux: mux-controller@4000 {
6572
compatible = "mmio-mux";
6673
#mux-control-cells = <1>;
@@ -404,6 +411,115 @@
404411
};
405412
};
406413

414+
cpsw0: ethernet@c000000 {
415+
compatible = "ti,j721e-cpswxg-nuss";
416+
#address-cells = <2>;
417+
#size-cells = <2>;
418+
reg = <0x0 0xc000000 0x0 0x200000>;
419+
reg-names = "cpsw_nuss";
420+
ranges = <0x0 0x0 0x0 0x0c000000 0x0 0x200000>;
421+
clocks = <&k3_clks 19 89>;
422+
clock-names = "fck";
423+
power-domains = <&k3_pds 19 TI_SCI_PD_EXCLUSIVE>;
424+
425+
dmas = <&main_udmap 0xca00>,
426+
<&main_udmap 0xca01>,
427+
<&main_udmap 0xca02>,
428+
<&main_udmap 0xca03>,
429+
<&main_udmap 0xca04>,
430+
<&main_udmap 0xca05>,
431+
<&main_udmap 0xca06>,
432+
<&main_udmap 0xca07>,
433+
<&main_udmap 0x4a00>;
434+
dma-names = "tx0", "tx1", "tx2", "tx3",
435+
"tx4", "tx5", "tx6", "tx7",
436+
"rx";
437+
438+
status = "disabled";
439+
440+
ethernet-ports {
441+
#address-cells = <1>;
442+
#size-cells = <0>;
443+
cpsw0_port1: port@1 {
444+
reg = <1>;
445+
ti,mac-only;
446+
label = "port1";
447+
status = "disabled";
448+
};
449+
450+
cpsw0_port2: port@2 {
451+
reg = <2>;
452+
ti,mac-only;
453+
label = "port2";
454+
status = "disabled";
455+
};
456+
457+
cpsw0_port3: port@3 {
458+
reg = <3>;
459+
ti,mac-only;
460+
label = "port3";
461+
status = "disabled";
462+
};
463+
464+
cpsw0_port4: port@4 {
465+
reg = <4>;
466+
ti,mac-only;
467+
label = "port4";
468+
status = "disabled";
469+
};
470+
471+
cpsw0_port5: port@5 {
472+
reg = <5>;
473+
ti,mac-only;
474+
label = "port5";
475+
status = "disabled";
476+
};
477+
478+
cpsw0_port6: port@6 {
479+
reg = <6>;
480+
ti,mac-only;
481+
label = "port6";
482+
status = "disabled";
483+
};
484+
485+
cpsw0_port7: port@7 {
486+
reg = <7>;
487+
ti,mac-only;
488+
label = "port7";
489+
status = "disabled";
490+
};
491+
492+
cpsw0_port8: port@8 {
493+
reg = <8>;
494+
ti,mac-only;
495+
label = "port8";
496+
status = "disabled";
497+
};
498+
};
499+
500+
cpsw9g_mdio: mdio@f00 {
501+
compatible = "ti,cpsw-mdio","ti,davinci_mdio";
502+
reg = <0x0 0xf00 0x0 0x100>;
503+
#address-cells = <1>;
504+
#size-cells = <0>;
505+
clocks = <&k3_clks 19 89>;
506+
clock-names = "fck";
507+
bus_freq = <1000000>;
508+
status = "disabled";
509+
};
510+
511+
cpts@3d000 {
512+
compatible = "ti,j721e-cpts";
513+
reg = <0x0 0x3d000 0x0 0x400>;
514+
clocks = <&k3_clks 19 16>;
515+
clock-names = "cpts";
516+
interrupts-extended = <&gic500 GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
517+
interrupt-names = "cpts";
518+
ti,cpts-ext-ts-inputs = <4>;
519+
ti,cpts-periodic-outputs = <2>;
520+
};
521+
};
522+
407523
main_crypto: crypto@4e00000 {
408524
compatible = "ti,j721e-sa2ul";
409525
reg = <0x0 0x4e00000 0x0 0x1200>;

arch/arm64/boot/dts/ti/k3-j721e.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
<0x00 0x06000000 0x00 0x06000000 0x00 0x00400000>, /* USBSS0 */
137137
<0x00 0x06400000 0x00 0x06400000 0x00 0x00400000>, /* USBSS1 */
138138
<0x00 0x01000000 0x00 0x01000000 0x00 0x0af02400>, /* Most peripherals */
139+
<0x00 0x0c000000 0x00 0x0c000000 0x00 0x0d000000>, /* CPSW9G */
139140
<0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>, /* MAIN NAVSS */
140141
<0x00 0x0d000000 0x00 0x0d000000 0x00 0x01800000>, /* PCIe Core*/
141142
<0x00 0x0e000000 0x00 0x0e000000 0x00 0x01800000>, /* PCIe Core*/

0 commit comments

Comments
 (0)