xref: /freebsd/sys/contrib/device-tree/src/arm64/ti/k3-am654-icssg2.dtso (revision 01950c46b8155250f64374fb72fc11faa44bf099)
1*01950c46SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-only OR MIT
284943d6fSEmmanuel Vadot/**
384943d6fSEmmanuel Vadot * DT overlay for IDK application board on AM654 EVM
484943d6fSEmmanuel Vadot *
5*01950c46SEmmanuel Vadot * Copyright (C) 2018-2024 Texas Instruments Incorporated - https://www.ti.com/
684943d6fSEmmanuel Vadot */
784943d6fSEmmanuel Vadot
884943d6fSEmmanuel Vadot/dts-v1/;
984943d6fSEmmanuel Vadot/plugin/;
1084943d6fSEmmanuel Vadot
1184943d6fSEmmanuel Vadot#include <dt-bindings/net/ti-dp83867.h>
1284943d6fSEmmanuel Vadot#include "k3-pinctrl.h"
1384943d6fSEmmanuel Vadot
1484943d6fSEmmanuel Vadot&{/} {
1584943d6fSEmmanuel Vadot	aliases {
1684943d6fSEmmanuel Vadot		ethernet1 = "/icssg2-eth/ethernet-ports/port@0";
1784943d6fSEmmanuel Vadot		ethernet2 = "/icssg2-eth/ethernet-ports/port@1";
1884943d6fSEmmanuel Vadot	};
1984943d6fSEmmanuel Vadot
2084943d6fSEmmanuel Vadot	/* Ethernet node on PRU-ICSSG2 */
2184943d6fSEmmanuel Vadot	icssg2_eth: icssg2-eth {
2284943d6fSEmmanuel Vadot		compatible = "ti,am654-icssg-prueth";
2384943d6fSEmmanuel Vadot		pinctrl-names = "default";
2484943d6fSEmmanuel Vadot		pinctrl-0 = <&icssg2_rgmii_pins_default>;
2584943d6fSEmmanuel Vadot		sram = <&msmc_ram>;
2684943d6fSEmmanuel Vadot		ti,prus = <&pru2_0>, <&rtu2_0>, <&tx_pru2_0>,
2784943d6fSEmmanuel Vadot			<&pru2_1>, <&rtu2_1>, <&tx_pru2_1>;
2884943d6fSEmmanuel Vadot		firmware-name = "ti-pruss/am65x-sr2-pru0-prueth-fw.elf",
2984943d6fSEmmanuel Vadot				"ti-pruss/am65x-sr2-rtu0-prueth-fw.elf",
3084943d6fSEmmanuel Vadot				"ti-pruss/am65x-sr2-txpru0-prueth-fw.elf",
3184943d6fSEmmanuel Vadot				"ti-pruss/am65x-sr2-pru1-prueth-fw.elf",
3284943d6fSEmmanuel Vadot				"ti-pruss/am65x-sr2-rtu1-prueth-fw.elf",
3384943d6fSEmmanuel Vadot				"ti-pruss/am65x-sr2-txpru1-prueth-fw.elf";
3484943d6fSEmmanuel Vadot
3584943d6fSEmmanuel Vadot		ti,pruss-gp-mux-sel = <2>,      /* MII mode */
3684943d6fSEmmanuel Vadot				      <2>,
3784943d6fSEmmanuel Vadot				      <2>,
3884943d6fSEmmanuel Vadot				      <2>,	/* MII mode */
3984943d6fSEmmanuel Vadot				      <2>,
4084943d6fSEmmanuel Vadot				      <2>;
4184943d6fSEmmanuel Vadot
4284943d6fSEmmanuel Vadot		ti,mii-g-rt = <&icssg2_mii_g_rt>;
4384943d6fSEmmanuel Vadot		ti,mii-rt = <&icssg2_mii_rt>;
4484943d6fSEmmanuel Vadot		ti,iep = <&icssg2_iep0>, <&icssg2_iep1>;
4584943d6fSEmmanuel Vadot
4684943d6fSEmmanuel Vadot		interrupt-parent = <&icssg2_intc>;
4784943d6fSEmmanuel Vadot		interrupts = <24 0 2>, <25 1 3>;
4884943d6fSEmmanuel Vadot		interrupt-names = "tx_ts0", "tx_ts1";
4984943d6fSEmmanuel Vadot
5084943d6fSEmmanuel Vadot		dmas = <&main_udmap 0xc300>, /* egress slice 0 */
5184943d6fSEmmanuel Vadot		       <&main_udmap 0xc301>, /* egress slice 0 */
5284943d6fSEmmanuel Vadot		       <&main_udmap 0xc302>, /* egress slice 0 */
5384943d6fSEmmanuel Vadot		       <&main_udmap 0xc303>, /* egress slice 0 */
5484943d6fSEmmanuel Vadot		       <&main_udmap 0xc304>, /* egress slice 1 */
5584943d6fSEmmanuel Vadot		       <&main_udmap 0xc305>, /* egress slice 1 */
5684943d6fSEmmanuel Vadot		       <&main_udmap 0xc306>, /* egress slice 1 */
5784943d6fSEmmanuel Vadot		       <&main_udmap 0xc307>, /* egress slice 1 */
5884943d6fSEmmanuel Vadot		       <&main_udmap 0x4300>, /* ingress slice 0 */
5984943d6fSEmmanuel Vadot		       <&main_udmap 0x4301>; /* ingress slice 1 */
6084943d6fSEmmanuel Vadot
6184943d6fSEmmanuel Vadot		dma-names = "tx0-0", "tx0-1", "tx0-2", "tx0-3",
6284943d6fSEmmanuel Vadot			    "tx1-0", "tx1-1", "tx1-2", "tx1-3",
6384943d6fSEmmanuel Vadot			    "rx0", "rx1";
6484943d6fSEmmanuel Vadot		ethernet-ports {
6584943d6fSEmmanuel Vadot			#address-cells = <1>;
6684943d6fSEmmanuel Vadot			#size-cells = <0>;
6784943d6fSEmmanuel Vadot			icssg2_emac0: port@0 {
6884943d6fSEmmanuel Vadot				reg = <0>;
6984943d6fSEmmanuel Vadot				phy-handle = <&icssg2_phy0>;
7084943d6fSEmmanuel Vadot				phy-mode = "rgmii-id";
7184943d6fSEmmanuel Vadot				ti,syscon-rgmii-delay = <&scm_conf 0x4120>;
7284943d6fSEmmanuel Vadot				/* Filled in by bootloader */
7384943d6fSEmmanuel Vadot				local-mac-address = [00 00 00 00 00 00];
7484943d6fSEmmanuel Vadot			};
7584943d6fSEmmanuel Vadot			icssg2_emac1: port@1 {
7684943d6fSEmmanuel Vadot				reg = <1>;
7784943d6fSEmmanuel Vadot				phy-handle = <&icssg2_phy1>;
7884943d6fSEmmanuel Vadot				phy-mode = "rgmii-id";
7984943d6fSEmmanuel Vadot				ti,syscon-rgmii-delay = <&scm_conf 0x4124>;
8084943d6fSEmmanuel Vadot				/* Filled in by bootloader */
8184943d6fSEmmanuel Vadot				local-mac-address = [00 00 00 00 00 00];
8284943d6fSEmmanuel Vadot			};
8384943d6fSEmmanuel Vadot		};
8484943d6fSEmmanuel Vadot	};
8584943d6fSEmmanuel Vadot};
8684943d6fSEmmanuel Vadot
8784943d6fSEmmanuel Vadot&main_pmx0 {
8884943d6fSEmmanuel Vadot
8984943d6fSEmmanuel Vadot	icssg2_mdio_pins_default: icssg2-mdio-default-pins {
9084943d6fSEmmanuel Vadot		pinctrl-single,pins = <
9184943d6fSEmmanuel Vadot			AM65X_IOPAD(0x0094, PIN_INPUT, 2) /* (AC19) PRG2_PRU0_GPO7.PRG2_MDIO0_MDIO */
9284943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00c8, PIN_OUTPUT, 2) /* (AE15) PRG2_PRU1_GPO7.PRG2_MDIO0_MDC */
9384943d6fSEmmanuel Vadot		>;
9484943d6fSEmmanuel Vadot	};
9584943d6fSEmmanuel Vadot
9684943d6fSEmmanuel Vadot	icssg2_rgmii_pins_default: icssg2-rgmii-default-pins {
9784943d6fSEmmanuel Vadot		pinctrl-single,pins = <
9884943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00ac, PIN_INPUT, 2) /* (AH15) PRG2_PRU1_GPO0.PRG2_RGMII2_RD0 */
9984943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00b0, PIN_INPUT, 2) /* (AC16) PRG2_PRU1_GPO1.PRG2_RGMII2_RD1 */
10084943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00b4, PIN_INPUT, 2) /* (AD17) PRG2_PRU1_GPO2.PRG2_RGMII2_RD2 */
10184943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00b8, PIN_INPUT, 2) /* (AH14) PRG2_PRU1_GPO3.PRG2_RGMII2_RD3 */
10284943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00cc, PIN_OUTPUT, 2) /* (AD15) PRG2_PRU1_GPO8.PRG2_RGMII2_TD0 */
10384943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00d0, PIN_OUTPUT, 2) /* (AF14) PRG2_PRU1_GPO9.PRG2_RGMII2_TD1 */
10484943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00d4, PIN_OUTPUT, 2) /* (AC15) PRG2_PRU1_GPO10.PRG2_RGMII2_TD2 */
10584943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00d8, PIN_OUTPUT, 2) /* (AD14) PRG2_PRU1_GPO11.PRG2_RGMII2_TD3 */
10684943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00dc, PIN_INPUT, 2) /* (AE14) PRG2_PRU1_GPO16.PRG2_RGMII2_TXC */
10784943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00c4, PIN_OUTPUT, 2) /* (AC17) PRG2_PRU1_GPO6.PRG2_RGMII2_TX_CTL */
10884943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00c0, PIN_INPUT, 2) /* (AG15) PRG2_PRU1_GPO5.PRG2_RGMII2_RXC */
10984943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00bc, PIN_INPUT, 2) /* (AG14) PRG2_PRU1_GPO4.PRG2_RGMII2_RX_CTL */
11084943d6fSEmmanuel Vadot
11184943d6fSEmmanuel Vadot			AM65X_IOPAD(0x0078, PIN_INPUT, 2) /* (AF18) PRG2_PRU0_GPO0.PRG2_RGMII1_RD0 */
11284943d6fSEmmanuel Vadot			AM65X_IOPAD(0x007c, PIN_INPUT, 2) /* (AE18) PRG2_PRU0_GPO1.PRG2_RGMII1_RD1 */
11384943d6fSEmmanuel Vadot			AM65X_IOPAD(0x0080, PIN_INPUT, 2) /* (AH17) PRG2_PRU0_GPO2.PRG2_RGMII1_RD2 */
11484943d6fSEmmanuel Vadot			AM65X_IOPAD(0x0084, PIN_INPUT, 2) /* (AG18) PRG2_PRU0_GPO3.PRG2_RGMII1_RD3 */
11584943d6fSEmmanuel Vadot			AM65X_IOPAD(0x0098, PIN_OUTPUT, 2) /* (AH16) PRG2_PRU0_GPO8.PRG2_RGMII1_TD0 */
11684943d6fSEmmanuel Vadot			AM65X_IOPAD(0x009c, PIN_OUTPUT, 2) /* (AG16) PRG2_PRU0_GPO9.PRG2_RGMII1_TD1 */
11784943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00a0, PIN_OUTPUT, 2) /* (AF16) PRG2_PRU0_GPO10.PRG2_RGMII1_TD2 */
11884943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00a4, PIN_OUTPUT, 2) /* (AE16) PRG2_PRU0_GPO11.PRG2_RGMII1_TD3 */
11984943d6fSEmmanuel Vadot			AM65X_IOPAD(0x00a8, PIN_INPUT, 2) /* (AD16) PRG2_PRU0_GPO16.PRG2_RGMII1_TXC */
12084943d6fSEmmanuel Vadot			AM65X_IOPAD(0x0090, PIN_OUTPUT, 2) /* (AE17) PRG2_PRU0_GPO6.PRG2_RGMII1_TX_CTL */
12184943d6fSEmmanuel Vadot			AM65X_IOPAD(0x008c, PIN_INPUT, 2) /* (AF17) PRG2_PRU0_GPO5.PRG2_RGMII1_RXC */
12284943d6fSEmmanuel Vadot			AM65X_IOPAD(0x0088, PIN_INPUT, 2) /* (AG17) PRG2_PRU0_GPO4.PRG2_RGMII1_RX_CTL */
12384943d6fSEmmanuel Vadot		>;
12484943d6fSEmmanuel Vadot	};
12584943d6fSEmmanuel Vadot};
12684943d6fSEmmanuel Vadot
12784943d6fSEmmanuel Vadot&icssg2_mdio {
12884943d6fSEmmanuel Vadot	status = "okay";
12984943d6fSEmmanuel Vadot	pinctrl-names = "default";
13084943d6fSEmmanuel Vadot	pinctrl-0 = <&icssg2_mdio_pins_default>;
13184943d6fSEmmanuel Vadot	#address-cells = <1>;
13284943d6fSEmmanuel Vadot	#size-cells = <0>;
13384943d6fSEmmanuel Vadot
13484943d6fSEmmanuel Vadot	icssg2_phy0: ethernet-phy@0 {
13584943d6fSEmmanuel Vadot		reg = <0>;
13684943d6fSEmmanuel Vadot		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
13784943d6fSEmmanuel Vadot		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
13884943d6fSEmmanuel Vadot	};
13984943d6fSEmmanuel Vadot
14084943d6fSEmmanuel Vadot	icssg2_phy1: ethernet-phy@3 {
14184943d6fSEmmanuel Vadot		reg = <3>;
14284943d6fSEmmanuel Vadot		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
14384943d6fSEmmanuel Vadot		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
14484943d6fSEmmanuel Vadot	};
14584943d6fSEmmanuel Vadot};
146