This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRA829V: Enable cpsw0 main domain ethernet switch in u-boot

Part Number: DRA829V
Other Parts Discussed in Thread: DRA829

Hello experts,

Our custom board does not have an ethernet port on the mcu-domain, hence we cannot
use mcu_cpsw as defined in k3-j721e-mcu-wakeup.dtsi.

I have tried to add the cpsw0 stuff from the k3-j721e-evm-gesi-exp-board.dtbo, but u-boot says:

Failed to probe am65_cpsw_nuss driver
Net: No ethernet found.

Also, I have no mdio:

=> mdio list
No MDIO bus found

What I have done:

1. Added the full cpsw0: ethernet@c000000 block from linux-ti-staging into u-boot-ti-staging.

2. Added the k3-j721e-evm-gesi-exp-board.dtbo cpsw0 related things into my u-boot dts.

3. Removed all references to mcu_cpsw

Any help is appreciated.

/Bo

  • Hi,

    Please refer to the patches (based on SDK8.2) for enabling the CPSW9G from u-boot, and integrate the changes needed into your SDK.

    The patch has support for both TDAVM (J721e/DRA829) and TDAVH (J784s4), please take only DRA829 changes of device tree files and rest common for both SOCs.
    j784s4-08_02_02_06-cpsw9g-uboot.zip


    Best Regards,
    Sudheer

  • Thank you for your support. I managed to get the first port up, but I still cant get ethernet traffic to work.

    I applied the following patches that seemed relevant:

    0001, 0002, 0003, 0010, 0011, 0012, 0013, 0014

    Booting to U-Boot now looks like this:

    U-Boot 2023.04-g999 (Aug 31 2023 - 10:31:29 +0000)

    SoC: J721E SR1.1 GP
    Model: Texas Instruments K3 J721E SoC
    DRAM: 4 GiB
    Core: 139 devices, 32 uclasses, devicetree: separate
    Warning: Device tree includes old 'u-boot,dm-' tags: please fix by 2023.07!
    Flash: 0 Bytes
    MMC: mmc@4f80000: 0
    Loading Environment from nowhere... OK
    In: serial@2800000
    Out: serial@2800000
    Err: serial@2800000
    am65_cpsw_nuss ethernet@c000000: K3 CPSW: nuss_ver: 0x6BA01901 cpsw_ver: 0x6BA80101 ale_ver: 0x00294104 Ports:8 mdio_freq:1000000
    Net:
    Warning: ethernet@c000000port@1 (eth0) using random MAC address - fe:74:ce:96:e3:c5
    eth0: ethernet@c000000port@1
    Hit any key to stop autoboot: 0
    => mdio list
    ethernet@c000000port@1:
    0 - TI DP83867 <--> ethernet@c000000port@1
    =>
    => setenv ipaddr 10.142.3.9
    => setenv netmask 255.255.252.0
    => setenv serverip 10.142.0.1
    => ping 10.142.0.1
    k3-navss-ringacc ringacc@3c000000: Ring Accelerator probed rings:1024, gp-rings[440,150] sci-dev-id:211
    k3-navss-ringacc ringacc@3c000000: dma-ring-reset-quirk: disabled
    am65_cpsw_nuss_port ethernet@c000000port@1: K3 CPSW: rflow_id_base: 16
    link up on port 1, speed 1000, full duplex
    Using ethernet@c000000port@1 device

    Abort
    ping failed; host 10.142.0.1 is not alive

    Any help is greatly appreciated.

    /Bo

  • Hi,

    => setenv ipaddr 10.142.3.9
    => setenv netmask 255.255.252.0
    => setenv serverip 10.142.0.1

    Can you please make sure that Server is configured with 10.142.0.1 which is connected to MAC Port-1 on GESI card if you are using EVM (Please refer to RTOS SDK EVM setup details for Port information).

    Also, configure the local ip address in the same domain of server like 10.142.0.x (instead of 10.145.3.9 use 10.145.0.9) and try ping for Server IP.

    Best Regards,
    Sudheer

  • Our network is a 255.255.252.0 - network. The netmask has to be this.

    Also, we can use 10.142.3.xxx för static test purposes, so this is why I set the local IP to 10.142.3.9 which is perfectly in the same domain as server.

    The gateway is 10.142.0.1 - this is not a TFTP server.

  • I tested with a local server as well. I can see that the auto-negotiation is working, the LED lights up green to indicate 100Mbit, full duplex. In the above case it stayed yellow (1000Mbit, full duplex). Still no traffic:

    => setenv ipaddr 10.110.210.20
    => setenv netmask 255.255.255.0
    => setenv serverip 10.110.210.1
    => ping 10.110.210.1
    k3-navss-ringacc ringacc@3c000000: Ring Accelerator probed rings:1024, gp-rings[440,150] sci-dev-id:211
    k3-navss-ringacc ringacc@3c000000: dma-ring-reset-quirk: disabled
    am65_cpsw_nuss_port ethernet@c000000port@1: K3 CPSW: rflow_id_base: 16
    link up on port 1, speed 100, full duplex
    Using ethernet@c000000port@1 device

    Abort
    ping failed; host 10.110.210.1 is not alive
    =>

  • Hi,

    Can you please check Network configuration is as mentioned in SDK Documentation or not?

    Best Regards,
    Sudheer

  • I'm sorry, I can't set it to that configuration exactly. I have a local gateway at 10.110.210.1.

    In U-Boot:

    ping failed; host 10.110.210.1 is not alive
    => pri ipaddr
    ipaddr=10.110.210.20
    => pri serverip
    serverip=10.110.210.1
    => pri gatewayip
    gatewayip=10.110.210.1
    => pri netmask
    netmask=255.255.255.0

  • Hi,

    Can you read CPSW statistics registers and check any Tx packet count at Port1 and Rx packet count in Host Port of CPSW2G?
    Refer to 12.2.1.6.8 MCU_CPSW0_STAT0 Registers from TRM.
    MCU_CPSW0_NUSS_STAT0 4600 0000h

    Best Regards,
    Sudheer

  • I don't have anything connected to MCU_CPSW0, I assume that you meant the CPSW9G-switch on the main-domain.

    Anyway, on registers at CPSW0_NUSS_STAT (0x0C03 A000) when I ping my server from u-boot, I can see both RXGOODFRAMES_k and TXGOODFRAMES_k increasing. TX more than RX.

    Pinging from the server to the DRA829 doesn't increase anything.

    Something wrong with the PHY-connection? mdio list show the following:

    => mdio list
    ethernet@c000000port@1:
    0 - TI DP83867 <--> ethernet@c000000port@1

    also, I can reach the phy registers fine:

    => mii dump 0 0
    0. (1140) -- PHY control register --
    (8000:0000) 0.15 = 0 reset
    (4000:0000) 0.14 = 0 loopback
    (2040:0040) 0. 6,13 = b10 speed selection = 1000 Mbps
    (1000:1000) 0.12 = 1 A/N enable
    (0800:0000) 0.11 = 0 power-down
    (0400:0000) 0.10 = 0 isolate
    (0200:0000) 0. 9 = 0 restart A/N
    (0100:0100) 0. 8 = 1 duplex = full
    (0080:0000) 0. 7 = 0 collision test enable
    (003f:0000) 0. 5- 0 = 0 (reserved)

    I should also add that we have three ethernet ports connected, and port 2 and 3 does not come up as they should. The interfaces are

    eth0: RGMII
    eth1: RMII
    eth2: RMII

    All three PHYS have their own 25MHz crystal. Do I need to specify this in the DTS somehow?

    am65_cpsw_nuss ethernet@c000000: K3 CPSW: nuss_ver: 0x6BA01901 cpsw_ver: 0x6BA80 101 ale_ver: 0x00294104 Ports:8 mdio_freq:1000000
    Net:
    Warning: ethernet@c000000port@1 (eth0) using random MAC address - 6a:a3:ec:c2:c1 :e8
    eth0: ethernet@c000000port@1
    Could not get PHY for ethernet@c000000port@1: addr 4

    am65_cpsw_nuss_port ethernet@c000000port@2: phy_connect() failed
    Could not get PHY for ethernet@c000000port@1: addr 5
    am65_cpsw_nuss_port ethernet@c000000port@3: phy_connect() failed

    Best regards,

    /Bo

  • Bump. Please help out if you can.

    Could you also provide an example of how to define the reset-gpios for the different phys? All three are on the same mdio bus, addresses 0, 4 and 5, and the reset-gpios are connected to gpio0_8, 9 and 10.

    Phy0 reset has external pull-up. The other two have external pull-down.

    /Bo

  • Hi,

    Sorry for the delay, will check internally and update you soon.

    Best Regards,
    Sudheer

  • Hello Bo,

    Could you please share the device-tree files as well as the am65-cpsw-nuss.c driver file?

    Regards,
    Siddharth.

  • Hello Siddharth,

    Sure. Here are the relevant dts and dtsi. Keep in mind that they are inside u-boot.

    k3-j721-asp3.dts:

    // SPDX-License-Identifier: GPL-2.0
    /*
     * Copyright (C) 2019 Texas Instruments Incorporated - https://www.ti.com/
     */
    
    /dts-v1/;
    
    #include "k3-j721e-som-p0.dtsi"
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/input/input.h>
    #include <dt-bindings/net/ti-dp83867.h>
    #include <dt-bindings/phy/phy-cadence.h>
    
    / {
    	chosen {
    		stdout-path = "serial2:115200n8";
    		bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";
    	};
    
    	gpio_keys: gpio-keys {
    		compatible = "gpio-keys";
    		autorepeat;
    		pinctrl-names = "default";
    		pinctrl-0 = <&sw10_button_pins_default &sw11_button_pins_default>;
    
    		sw10: sw10 {
    			label = "GPIO Key USER1";
    			linux,code = <BTN_0>;
    			gpios = <&main_gpio0 0 GPIO_ACTIVE_LOW>;
    		};
    
    		sw11: sw11 {
    			label = "GPIO Key USER2";
    			linux,code = <BTN_1>;
    			gpios = <&wkup_gpio0 7 GPIO_ACTIVE_LOW>;
    		};
    	};
    
    	evm_12v0: fixedregulator-evm12v0 {
    		/* main supply */
    		compatible = "regulator-fixed";
    		regulator-name = "evm_12v0";
    		regulator-min-microvolt = <12000000>;
    		regulator-max-microvolt = <12000000>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vsys_3v3: fixedregulator-vsys3v3 {
    		/* Output of LMS140 */
    		compatible = "regulator-fixed";
    		regulator-name = "vsys_3v3";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		vin-supply = <&evm_12v0>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vsys_5v0: fixedregulator-vsys5v0 {
    		/* Output of LM5140 */
    		compatible = "regulator-fixed";
    		regulator-name = "vsys_5v0";
    		regulator-min-microvolt = <5000000>;
    		regulator-max-microvolt = <5000000>;
    		vin-supply = <&evm_12v0>;
    		regulator-always-on;
    		regulator-boot-on;
    	};
    
    	vdd_mmc1: fixedregulator-sd {
    		compatible = "regulator-fixed";
    		regulator-name = "vdd_mmc1";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-boot-on;
    		enable-active-high;
    		vin-supply = <&vsys_3v3>;
    	};
    
    	vdd_sd_dv_alt: gpio-regulator-TLV71033 {
    		compatible = "regulator-gpio";
    		pinctrl-names = "default";
    		pinctrl-0 = <&vdd_sd_dv_alt_pins_default>;
    		regulator-name = "tlv71033";
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-boot-on;
    		vin-supply = <&vsys_5v0>;
    		gpios = <&main_gpio0 117 GPIO_ACTIVE_HIGH>;
    		states = <1800000 0x0>,
    			 <3300000 0x1>;
    	};
    };
    
    &main_pmx0 {
    	sw10_button_pins_default: sw10-button-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x0, PIN_INPUT, 7) /* (AC18) EXTINTn.GPIO0_0 */
    		>;
    	};
    
    	main_mmc1_pins_default: main-mmc1-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x254, PIN_INPUT, 0) /* (R29) MMC1_CMD */
    			J721E_IOPAD(0x250, PIN_INPUT, 0) /* (P25) MMC1_CLK */
    			J721E_IOPAD(0x2ac, PIN_INPUT, 0) /* (P25) MMC1_CLKLB */
    			J721E_IOPAD(0x24c, PIN_INPUT, 0) /* (R24) MMC1_DAT0 */
    			J721E_IOPAD(0x248, PIN_INPUT, 0) /* (P24) MMC1_DAT1 */
    			J721E_IOPAD(0x244, PIN_INPUT, 0) /* (R25) MMC1_DAT2 */
    			J721E_IOPAD(0x240, PIN_INPUT, 0) /* (R26) MMC1_DAT3 */
    			J721E_IOPAD(0x258, PIN_INPUT, 0) /* (P23) MMC1_SDCD */
    			J721E_IOPAD(0x25c, PIN_INPUT, 0) /* (R28) MMC1_SDWP */
    		>;
    	};
    
    	vdd_sd_dv_alt_pins_default: vdd-sd-dv-alt-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x1d8, PIN_INPUT, 7) /* (W4) SPI1_CS1.GPIO0_117 */
    		>;
    	};
    
    	main_usbss0_pins_default: main-usbss0-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x290, PIN_OUTPUT, 0) /* (U6) USB0_DRVVBUS */
    			J721E_IOPAD(0x210, PIN_INPUT, 7) /* (W3) MCAN1_RX.GPIO1_3 */
    		>;
    	};
    
    	main_usbss1_pins_default: main-usbss1-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x214, PIN_OUTPUT, 4) /* (V4) MCAN1_TX.USB1_DRVVBUS */
    		>;
    	};
    
    	main_i2c3_pins_default: main-i2c3-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x270, PIN_INPUT_PULLUP, 4) /* (T26) MMC2_CLK.I2C3_SCL */
    			J721E_IOPAD(0x274, PIN_INPUT_PULLUP, 4) /* (T25) MMC2_CMD.I2C3_SDA */
    		>;
    	};
    
    	main_i2c6_pins_default: main-i2c6-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x1d0, PIN_INPUT_PULLUP, 2) /* (AA3) SPI0_D1.I2C6_SCL */
    			J721E_IOPAD(0x1e4, PIN_INPUT_PULLUP, 2) /* (Y2) SPI1_D1.I2C6_SDA */
    		>;
    	};
    
    	mcasp10_pins_default: mcasp10-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x158, PIN_OUTPUT_PULLDOWN, 12) /* (U23) RGMII5_TX_CTL.MCASP10_ACLKX */
    			J721E_IOPAD(0x15c, PIN_OUTPUT_PULLDOWN, 12) /* (U26) RGMII5_RX_CTL.MCASP10_AFSX */
    			J721E_IOPAD(0x160, PIN_OUTPUT_PULLDOWN, 12) /* (V28) RGMII5_TD3.MCASP10_AXR0 */
    			J721E_IOPAD(0x164, PIN_OUTPUT_PULLDOWN, 12) /* (V29) RGMII5_TD2.MCASP10_AXR1 */
    			J721E_IOPAD(0x170, PIN_OUTPUT_PULLDOWN, 12) /* (U29) RGMII5_TXC.MCASP10_AXR2 */
    			J721E_IOPAD(0x174, PIN_OUTPUT_PULLDOWN, 12) /* (U25) RGMII5_RXC.MCASP10_AXR3 */
    			J721E_IOPAD(0x198, PIN_INPUT_PULLDOWN, 12) /* (V25) RGMII6_TD1.MCASP10_AXR4 */
    			J721E_IOPAD(0x19c, PIN_INPUT_PULLDOWN, 12) /* (W27) RGMII6_TD0.MCASP10_AXR5 */
    			J721E_IOPAD(0x1a0, PIN_INPUT_PULLDOWN, 12) /* (W29) RGMII6_TXC.MCASP10_AXR6 */
    		>;
    	};
    
    	audi_ext_refclk2_pins_default: audi-ext-refclk2-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x1a4, PIN_OUTPUT, 3) /* (W26) RGMII6_RXC.AUDIO_EXT_REFCLK2 */
    		>;
    	};
    
    	debugs_pins_default: debugs-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x28c, PIN_INPUT, 0) /* (V2) TMS */
    			J721E_IOPAD(0x284, PIN_INPUT, 0) /* (V1) TDI */
    			J721E_IOPAD(0x288, PIN_OUTPUT, 0) /* (V3) TDO */
    		>;
    	};
    
    	gpio1_pins_default: gpio1-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x210, PIN_INPUT, 7) /* (W3) MCAN1_RX.GPIO1_3 */
    			J721E_IOPAD(0x218, PIN_INPUT, 7) /* (W2) I3C0_SCL.GPIO1_5 */
    		>;
    	};
    
    	gpio0_pins_default: gpio0-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x4c, PIN_INPUT, 7) /* (AJ21) PRG1_PRU0_GPO17.GPIO0_18 */
    			J721E_IOPAD(0x50, PIN_INPUT, 7) /* (AE21) PRG1_PRU0_GPO18.GPIO0_19 */
    			J721E_IOPAD(0x5c, PIN_INPUT, 7) /* (AG23) PRG1_PRU1_GPO1.GPIO0_22 */
    			J721E_IOPAD(0x60, PIN_INPUT, 7) /* (AF23) PRG1_PRU1_GPO2.GPIO0_23 */
    			J721E_IOPAD(0x68, PIN_INPUT, 7) /* (AH24) PRG1_PRU1_GPO4.GPIO0_25 */
    			J721E_IOPAD(0x6c, PIN_INPUT, 7) /* (AG21) PRG1_PRU1_GPO5.GPIO0_26 */
    			J721E_IOPAD(0x70, PIN_INPUT, 7) /* (AE23) PRG1_PRU1_GPO6.GPIO0_27 */
    			J721E_IOPAD(0x74, PIN_INPUT, 7) /* (AC21) PRG1_PRU1_GPO7.GPIO0_28 */
    			J721E_IOPAD(0x78, PIN_INPUT, 7) /* (Y23) PRG1_PRU1_GPO8.GPIO0_29 */
    			J721E_IOPAD(0x7c, PIN_INPUT, 7) /* (AF21) PRG1_PRU1_GPO9.GPIO0_30 */
    			J721E_IOPAD(0x94, PIN_INPUT, 7) /* (AJ27) PRG1_PRU1_GPO15.GPIO0_36 */
    			J721E_IOPAD(0x98, PIN_INPUT, 7) /* (AJ26) PRG1_PRU1_GPO16.GPIO0_37 */
    			J721E_IOPAD(0xf8, PIN_INPUT, 7) /* (AB29) PRG0_PRU0_GPO18.GPIO0_61 */
    			J721E_IOPAD(0xfc, PIN_INPUT, 7) /* (AB28) PRG0_PRU0_GPO19.GPIO0_62 */
    			J721E_IOPAD(0x188, PIN_INPUT, 7) /* (Y28) RGMII6_TX_CTL.GPIO0_97 */
    			J721E_IOPAD(0x18c, PIN_INPUT, 7) /* (V23) RGMII6_RX_CTL.GPIO0_98 */
    			J721E_IOPAD(0x190, PIN_INPUT, 7) /* (W23) RGMII6_TD3.GPIO0_99 */
    			J721E_IOPAD(0x1c4, PIN_INPUT, 7) /* (Y4) SPI0_CS1.GPIO0_112 */
    
    			/* RGMII reset gpios */
    			J721E_IOPAD(0x20, PIN_INPUT, 7) /* (AE20) GPIO0_8 */
    			J721E_IOPAD(0x24, PIN_INPUT, 7) /* (AJ20) GPIO0_9 */
    			J721E_IOPAD(0x28, PIN_INPUT, 7) /* (AG20) GPIO0_10 */
    		>;
    		u-boot,dm-spl;
    	};
    
    	m2_i2c0_pins_default: m2-i2c0-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x220, PIN_INPUT_PULLUP, 0) /* (AC5) I2C0_SCL */
    			J721E_IOPAD(0x224, PIN_INPUT_PULLUP, 0) /* (AA5) I2C0_SDA */
    		>;
    	};
    
    	rtc_i2c1_pins_default: rtc-i2c1-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x228, PIN_INPUT_PULLUP, 0) /* (Y6) I2C1_SCL */
    			J721E_IOPAD(0x22c, PIN_INPUT_PULLUP, 0) /* (AA6) I2C1_SDA */
    		>;
    	};
    
    	spare2_i2c2_pins_default: spare2-i2c2-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x208, PIN_INPUT_PULLUP, 4) /* (W5) MCAN0_RX.I2C2_SCL */
    			J721E_IOPAD(0x20c, PIN_INPUT_PULLUP, 4) /* (W6) MCAN0_TX.I2C2_SDA */
    		>;
    	};
    
    	m2_mcasp_pins_default: m2-mcasp-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x158, PIN_INPUT_PULLDOWN, 12) /* (U23) RGMII5_TX_CTL.MCASP10_ACLKX */
    			J721E_IOPAD(0x15c, PIN_INPUT_PULLDOWN, 12) /* (U26) RGMII5_RX_CTL.MCASP10_AFSX */
    			J721E_IOPAD(0x160, PIN_INPUT_PULLDOWN, 12) /* (V28) RGMII5_TD3.MCASP10_AXR0 */
    		>;
    	};
    
    	main_cpsw0_mdio_pins_default: main-cpsw0-mdio-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x1bc, PIN_OUTPUT, 0) /* (V24) MDIO0_MDC */
    			J721E_IOPAD(0x1b8, PIN_INPUT, 0) /* (V26) MDIO0_MDIO */
    		>;
    	};
    
    	m2_sdio_pins_default: m2-sdio-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x274, PIN_INPUT, 0) /* (T25) MMC2_CMD */
    			J721E_IOPAD(0x270, PIN_INPUT, 0) /* (T26) MMC2_CLK */
    			J721E_IOPAD(0x2b0, PIN_INPUT, 0) /* (T26) MMC2_CLKLB */
    			J721E_IOPAD(0x26c, PIN_INPUT, 0) /* (T24) MMC2_DAT0 */
    			J721E_IOPAD(0x268, PIN_INPUT, 0) /* (T27) MMC2_DAT1 */
    			J721E_IOPAD(0x264, PIN_INPUT, 0) /* (T29) MMC2_DAT2 */
    			J721E_IOPAD(0x260, PIN_INPUT, 0) /* (T28) MMC2_DAT3 */
    		>;
    	};
    
    	pcie_m2_serdes1_pins_default: pcie-m2-serdes1-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x21c, PIN_INPUT, 6) /* (W1) I3C0_SDA.PCIE1_CLKREQn */
    		>;
    	};
    
    	rgmii3_pins_default: rgmii3-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0xb0, PIN_INPUT, 4) /* (AF28) PRG0_PRU0_GPO0.RGMII3_RD0 */
    			J721E_IOPAD(0xb4, PIN_INPUT, 4) /* (AE28) PRG0_PRU0_GPO1.RGMII3_RD1 */
    			J721E_IOPAD(0xb8, PIN_INPUT, 4) /* (AE27) PRG0_PRU0_GPO2.RGMII3_RD2 */
    			J721E_IOPAD(0xbc, PIN_INPUT, 4) /* (AD26) PRG0_PRU0_GPO3.RGMII3_RD3 */
    			J721E_IOPAD(0xc8, PIN_INPUT, 4) /* (AE26) PRG0_PRU0_GPO6.RGMII3_RXC */
    			J721E_IOPAD(0xc0, PIN_INPUT, 4) /* (AD25) PRG0_PRU0_GPO4.RGMII3_RX_CTL */
    			J721E_IOPAD(0xdc, PIN_OUTPUT, 4) /* (AJ28) PRG0_PRU0_GPO11.RGMII3_TD0 */
    			J721E_IOPAD(0xe0, PIN_OUTPUT, 4) /* (AH27) PRG0_PRU0_GPO12.RGMII3_TD1 */
    			J721E_IOPAD(0xe4, PIN_OUTPUT, 4) /* (AH29) PRG0_PRU0_GPO13.RGMII3_TD2 */
    			J721E_IOPAD(0xe8, PIN_OUTPUT, 4) /* (AG28) PRG0_PRU0_GPO14.RGMII3_TD3 */
    			J721E_IOPAD(0xf0, PIN_OUTPUT, 4) /* (AH28) PRG0_PRU0_GPO16.RGMII3_TXC */
    			J721E_IOPAD(0xec, PIN_OUTPUT, 4) /* (AG27) PRG0_PRU0_GPO15.RGMII3_TX_CTL */
    		>;
    	};
    
    	rgmii4_pins_default: rgmii4-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x100, PIN_INPUT, 4) /* (AE29) PRG0_PRU1_GPO0.RGMII4_RD0 */
    			J721E_IOPAD(0x104, PIN_INPUT, 4) /* (AD28) PRG0_PRU1_GPO1.RGMII4_RD1 */
    			J721E_IOPAD(0x108, PIN_INPUT, 4) /* (AD27) PRG0_PRU1_GPO2.RGMII4_RD2 */
    			J721E_IOPAD(0x10c, PIN_INPUT, 4) /* (AC25) PRG0_PRU1_GPO3.RGMII4_RD3 */
    			J721E_IOPAD(0x118, PIN_INPUT, 4) /* (AC26) PRG0_PRU1_GPO6.RGMII4_RXC */
    			J721E_IOPAD(0x110, PIN_INPUT, 4) /* (AD29) PRG0_PRU1_GPO4.RGMII4_RX_CTL */
    			J721E_IOPAD(0x12c, PIN_OUTPUT, 4) /* (AG26) PRG0_PRU1_GPO11.RGMII4_TD0 */
    			J721E_IOPAD(0x130, PIN_OUTPUT, 4) /* (AF27) PRG0_PRU1_GPO12.RGMII4_TD1 */
    			J721E_IOPAD(0x134, PIN_OUTPUT, 4) /* (AF26) PRG0_PRU1_GPO13.RGMII4_TD2 */
    			J721E_IOPAD(0x138, PIN_OUTPUT, 4) /* (AE25) PRG0_PRU1_GPO14.RGMII4_TD3 */
    			J721E_IOPAD(0x140, PIN_OUTPUT, 4) /* (AG29) PRG0_PRU1_GPO16.RGMII4_TXC */
    			J721E_IOPAD(0x13c, PIN_OUTPUT, 4) /* (AF29) PRG0_PRU1_GPO15.RGMII4_TX_CTL */
    		>;
    	};
    
    	rgmii1_pins_default: rgmii1-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x4, PIN_INPUT, 4) /* (AC23) PRG1_PRU0_GPO0.RGMII1_RD0 */
    			J721E_IOPAD(0x8, PIN_INPUT, 4) /* (AG22) PRG1_PRU0_GPO1.RGMII1_RD1 */
    			J721E_IOPAD(0xc, PIN_INPUT, 4) /* (AF22) PRG1_PRU0_GPO2.RGMII1_RD2 */
    			J721E_IOPAD(0x10, PIN_INPUT, 4) /* (AJ23) PRG1_PRU0_GPO3.RGMII1_RD3 */
    			J721E_IOPAD(0x1c, PIN_INPUT, 4) /* (AD22) PRG1_PRU0_GPO6.RGMII1_RXC */
    			J721E_IOPAD(0x14, PIN_INPUT, 4) /* (AH23) PRG1_PRU0_GPO4.RGMII1_RX_CTL */
    			J721E_IOPAD(0x30, PIN_OUTPUT, 4) /* (AF24) PRG1_PRU0_GPO11.RGMII1_TD0 */
    			J721E_IOPAD(0x34, PIN_OUTPUT, 4) /* (AJ24) PRG1_PRU0_GPO12.RGMII1_TD1 */
    			J721E_IOPAD(0x38, PIN_OUTPUT, 4) /* (AG24) PRG1_PRU0_GPO13.RGMII1_TD2 */
    			J721E_IOPAD(0x3c, PIN_OUTPUT, 4) /* (AD24) PRG1_PRU0_GPO14.RGMII1_TD3 */
    			J721E_IOPAD(0x44, PIN_OUTPUT, 4) /* (AE24) PRG1_PRU0_GPO16.RGMII1_TXC */
    			J721E_IOPAD(0x40, PIN_OUTPUT, 4) /* (AC24) PRG1_PRU0_GPO15.RGMII1_TX_CTL */
    		>;
    	};
    
    	lon_spi2_pins_default: lon-spi2-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x1f4, PIN_OUTPUT, 4) /* (AB1) UART0_RTSn.SPI2_CLK */
    			J721E_IOPAD(0x1f0, PIN_OUTPUT, 4) /* (AC2) UART0_CTSn.SPI2_CS0 */
    			J721E_IOPAD(0x200, PIN_OUTPUT, 4) /* (AC4) UART1_CTSn.SPI2_D0 */
    			J721E_IOPAD(0x204, PIN_INPUT, 4) /* (AD5) UART1_RTSn.SPI2_D1 */
    		>;
    	};
    
    	tpm_spi5_pins_default: tpm-spi5-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x1a0, PIN_INPUT, 3) /* (W29) RGMII6_TXC.SPI5_CLK */
    			J721E_IOPAD(0x19c, PIN_INPUT, 3) /* (W27) RGMII6_TD0.SPI5_CS0 */
    			J721E_IOPAD(0x198, PIN_INPUT, 3) /* (V25) RGMII6_TD1.SPI5_D0 */
    			J721E_IOPAD(0x1b0, PIN_INPUT, 3) /* (W24) RGMII6_RD1.SPI5_D1 */
    		>;
    	};
    
    	spare_spi1_pins_default: spare-spi1-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x1dc, PIN_INPUT, 0) /* (Y1) SPI1_CLK */
    			J721E_IOPAD(0x1d4, PIN_INPUT, 0) /* (Y3) SPI1_CS0 */
    			J721E_IOPAD(0x1e0, PIN_INPUT, 0) /* (Y5) SPI1_D0 */
    			J721E_IOPAD(0x1e4, PIN_INPUT, 0) /* (Y2) SPI1_D1 */
    		>;
    	};
    
    	spare_spi7_pins_default: spare-spi7-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x234, PIN_INPUT, 6) /* (U3) EXT_REFCLK1.SPI7_CLK */
    			J721E_IOPAD(0x230, PIN_INPUT, 6) /* (U2) ECAP0_IN_APWM_OUT.SPI7_CS0 */
    			J721E_IOPAD(0x238, PIN_INPUT, 6) /* (V6) TIMER_IO0.SPI7_D0 */
    			J721E_IOPAD(0x23c, PIN_INPUT, 6) /* (V5) TIMER_IO1.SPI7_D1 */
    		>;
    	};
    
    	system_pins_default: system-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x278, PIN_OUTPUT, 0) /* (T6) RESETSTATz */
    			J721E_IOPAD(0x280, PIN_INPUT, 0) /* (U4) SOC_SAFETY_ERRORn */
    		>;
    	};
    
    	coma_uart7_pins_default: coma-uart7-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x24c, PIN_OUTPUT, 7) /* (R24) MMC1_DAT0.UART7_RTSn as GPIO! */
    			J721E_IOPAD(0x240, PIN_INPUT, 1) /* (R26) MMC1_DAT3.UART7_RXD */
    			J721E_IOPAD(0x244, PIN_OUTPUT, 1) /* (R25) MMC1_DAT2.UART7_TXD */
    		>;
    	};
    
    	comb_uart6_pins_default: comb-uart6-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x214, PIN_OUTPUT, 7) /* (V4) MCAN1_TX.UART6_RTSn as GPIO! */
    			J721E_IOPAD(0xd0, PIN_INPUT, 14) /* (AC27) PRG0_PRU0_GPO8.UART6_RXD */
    			J721E_IOPAD(0xd4, PIN_OUTPUT, 14) /* (AB26) PRG0_PRU0_GPO9.UART6_TXD */
    		>;
    	};
    
    	comc_uart4_pins_default: comc-uart4-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x1ac, PIN_OUTPUT, 7) /* (Y27) RGMII6_RD2.UART4_RTSn as GPIO! */
    			J721E_IOPAD(0x248, PIN_INPUT, 5) /* (P24) MMC1_DAT1.UART4_RXD */
    			J721E_IOPAD(0x194, PIN_OUTPUT, 1) /* (W28) RGMII6_TD2.UART4_TXD */
    		>;
    	};
    
    	stm32_uart2_pins_default: stm32-uart2-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x148, PIN_INPUT, 14) /* (AA26) PRG0_PRU1_GPO18.UART2_RXD */
    			J721E_IOPAD(0x11c, PIN_OUTPUT, 14) /* (AA24) PRG0_PRU1_GPO7.UART2_TXD */
    		>;
    	};
    
    	soc_debug_uart0_pins_default: soc-debug-uart0-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x1e8, PIN_INPUT, 0) /* (AB2) UART0_RXD */
    			J721E_IOPAD(0x1ec, PIN_OUTPUT, 0) /* (AB3) UART0_TXD */
    		>;
    	};
    
    	m2_uart1_pins_default: m2-uart1-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x1c8, PIN_INPUT, 1) /* (AA1) SPI0_CLK.UART1_CTSn */
    			J721E_IOPAD(0x1cc, PIN_OUTPUT, 1) /* (AB5) SPI0_D0.UART1_RTSn */
    			J721E_IOPAD(0x1f8, PIN_INPUT, 0) /* (AA4) UART1_RXD */
    			J721E_IOPAD(0x1fc, PIN_OUTPUT, 0) /* (AB4) UART1_TXD */
    		>;
    	};
    
    	spare_uart5_pins_default: spare-uart5-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x1a8, PIN_INPUT, 3) /* (Y29) RGMII6_RD3.UART5_RXD */
    			J721E_IOPAD(0x1d8, PIN_OUTPUT, 3) /* (W4) SPI1_CS1.UART5_TXD */
    		>;
    	};
    
    	usba_pins_default: usba-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x290, PIN_OUTPUT, 1) /* (U6) USB0_DRVVBUS.USB1_DRVVBUS */
    		>;
    	};
    };
    
    &wkup_pmx0 {
    	sw11_button_pins_default: sw11-button-pins-default {
    		pinctrl-single,pins = <
    			J721E_WKUP_IOPAD(0xcc, PIN_INPUT, 7) /* (G28) WKUP_GPIO0_7 */
    		>;
    	};
    
    	mcu_mdio_pins_default: mcu-mdio1-pins-default {
    		pinctrl-single,pins = <
    			J721E_WKUP_IOPAD(0x008c, PIN_OUTPUT, 0) /* MCU_MDIO0_MDC */
    			J721E_WKUP_IOPAD(0x0088, PIN_INPUT, 0) /* MCU_MDIO0_MDIO */
    		>;
    	};
    
    	mcu_adc0_pins_default: mcu-adc0-pins-default {
    		pinctrl-single,pins = <
    			J721E_WKUP_IOPAD(0x130, PIN_INPUT, 0) /* (K25) MCU_ADC0_AIN0 */
    		>;
    	};
    
    	nor_flash_qspi1_pins_default: nor-flash-qspi1-pins-default {
    		pinctrl-single,pins = <
    			J721E_WKUP_IOPAD(0x34, PIN_OUTPUT, 0) /* (F22) MCU_OSPI1_CLK */
    			J721E_WKUP_IOPAD(0x50, PIN_OUTPUT, 0) /* (C22) MCU_OSPI1_CSn0 */
    			J721E_WKUP_IOPAD(0x40, PIN_INPUT, 0) /* (D22) MCU_OSPI1_D0 */
    			J721E_WKUP_IOPAD(0x44, PIN_INPUT, 0) /* (G22) MCU_OSPI1_D1 */
    			J721E_WKUP_IOPAD(0x48, PIN_INPUT, 0) /* (D23) MCU_OSPI1_D2 */
    			J721E_WKUP_IOPAD(0x4c, PIN_INPUT, 0) /* (C23) MCU_OSPI1_D3 */
    		>;
    	};
    
    	mcu_cpsw_pins_default: mcu-cpsw-pins-default {
    		pinctrl-single,pins = <
    			J721E_WKUP_IOPAD(0x0058, PIN_OUTPUT, 0) /* MCU_RGMII1_TX_CTL */
    			J721E_WKUP_IOPAD(0x005c, PIN_INPUT, 0) /* MCU_RGMII1_RX_CTL */
    			J721E_WKUP_IOPAD(0x0060, PIN_OUTPUT, 0) /* MCU_RGMII1_TD3 */
    			J721E_WKUP_IOPAD(0x0064, PIN_OUTPUT, 0) /* MCU_RGMII1_TD2 */
    			J721E_WKUP_IOPAD(0x0068, PIN_OUTPUT, 0) /* MCU_RGMII1_TD1 */
    			J721E_WKUP_IOPAD(0x006c, PIN_OUTPUT, 0) /* MCU_RGMII1_TD0 */
    			J721E_WKUP_IOPAD(0x0078, PIN_INPUT, 0) /* MCU_RGMII1_RD3 */
    			J721E_WKUP_IOPAD(0x007c, PIN_INPUT, 0) /* MCU_RGMII1_RD2 */
    			J721E_WKUP_IOPAD(0x0080, PIN_INPUT, 0) /* MCU_RGMII1_RD1 */
    			J721E_WKUP_IOPAD(0x0084, PIN_INPUT, 0) /* MCU_RGMII1_RD0 */
    			J721E_WKUP_IOPAD(0x0070, PIN_OUTPUT, 0) /* MCU_RGMII1_TXC */
    			J721E_WKUP_IOPAD(0x0074, PIN_INPUT, 0) /* MCU_RGMII1_RXC */
    		>;
    	};
    
    	stm32_mcu_spi1_pins_default: stm32-mcu-spi1-pins-default {
    		pinctrl-single,pins = <
    			J721E_WKUP_IOPAD(0xb0, PIN_INPUT, 0) /* (F26) WKUP_GPIO0_0.MCU_SPI1_CLK */
    			J721E_WKUP_IOPAD(0xbc, PIN_INPUT, 0) /* (F27) WKUP_GPIO0_3.MCU_SPI1_CS0 */
    			J721E_WKUP_IOPAD(0xb4, PIN_INPUT, 0) /* (F25) WKUP_GPIO0_1.MCU_SPI1_D0 */
    			J721E_WKUP_IOPAD(0xb8, PIN_INPUT, 0) /* (F28) WKUP_GPIO0_2.MCU_SPI1_D1 */
    		>;
    	};
    
    	central_io_pins_default: central-io-pins-default {
    		pinctrl-single,pins = <
    			J721E_WKUP_IOPAD(0xf4, PIN_OUTPUT, 7) /* (D25) MCU_I3C0_SDA.MCU_UART0_RTSn as GPIO! */
    			J721E_WKUP_IOPAD(0xdc, PIN_INPUT, 2) /* (H27) WKUP_GPIO0_11.MCU_UART0_RXD */
    			J721E_WKUP_IOPAD(0xd8, PIN_OUTPUT, 2) /* (H26) WKUP_GPIO0_10.MCU_UART0_TXD */
    		>;
    	};
    
    	wkup_debug_pins_default: wkup-debug-pins-default {
    		pinctrl-single,pins = <
    			J721E_WKUP_IOPAD(0x128, PIN_INPUT, 0) /* (C26) EMU0 */
    			J721E_WKUP_IOPAD(0x12c, PIN_INPUT, 0) /* (B29) EMU1 */
    			J721E_WKUP_IOPAD(0x120, PIN_INPUT, 0) /* (E29) TCK */
    			J721E_WKUP_IOPAD(0x124, PIN_INPUT, 0) /* (F24) TRSTn */
    		>;
    	};
    
    	wkup_gpio_pins_default: wkup-gpio-pins-default {
    		pinctrl-single,pins = <
    			J721E_WKUP_IOPAD(0xc0, PIN_INPUT, 7) /* (G25) WKUP_GPIO0_4 */
    			J721E_WKUP_IOPAD(0xc4, PIN_INPUT, 7) /* (G24) WKUP_GPIO0_5 */
    			J721E_WKUP_IOPAD(0xc8, PIN_INPUT, 7) /* (F29) WKUP_GPIO0_6 */
    			J721E_WKUP_IOPAD(0xcc, PIN_INPUT, 7) /* (G28) WKUP_GPIO0_7 */
    		>;
    	};
    
    	mywkup_system1_pins_default: mywkup-system1-pins-default {
    		pinctrl-single,pins = <
    			J721E_WKUP_IOPAD(0x118, PIN_OUTPUT, 0) /* (C27) MCU_RESETSTATz */
    			J721E_WKUP_IOPAD(0x110, PIN_INPUT, 0) /* (D27) MCU_SAFETY_ERRORn */
    			J721E_WKUP_IOPAD(0x10c, PIN_OUTPUT, 0) /* (G23) PMIC_POWER_EN1 */
    			J721E_WKUP_IOPAD(0x174, PIN_INPUT, 0) /* (J24) PORz */
    		>;
    	};
    
    	mcu_debug_uart_pins_default: mcu-debug-uart-pins-default {
    		pinctrl-single,pins = <
    			J721E_WKUP_IOPAD(0xa0, PIN_INPUT, 0) /* (J29) WKUP_UART0_RXD */
    			J721E_WKUP_IOPAD(0xa4, PIN_OUTPUT, 0) /* (J28) WKUP_UART0_TXD */
    		>;
    	};
    
    };
    
    &wkup_uart0 {
    	/* Wakeup UART is used by System firmware */
    	status = "reserved";
    };
    
    &main_uart0 {
    	power-domains = <&k3_pds 146 TI_SCI_PD_SHARED>;
    };
    
    &main_uart3 {
    	/* UART not brought out */
    	status = "disabled";
    };
    
    &main_uart8 {
    	/* UART not brought out */
    	status = "disabled";
    };
    
    &main_gpio2 {
    	status = "disabled";
    };
    
    &main_gpio3 {
    	status = "disabled";
    };
    
    &main_gpio4 {
    	status = "disabled";
    };
    
    &main_gpio5 {
    	status = "disabled";
    };
    
    &main_gpio6 {
    	status = "disabled";
    };
    
    &main_gpio7 {
    	status = "disabled";
    };
    
    &wkup_gpio1 {
    	status = "disabled";
    };
    
    &main_sdhci0 {
    	/* eMMC */
    	non-removable;
    	ti,driver-strength-ohm = <50>;
    	disable-wp;
    };
    
    &main_sdhci1 {
    	status = "disabled";
    };
    
    &main_sdhci2 {
    	/* Unused */
    	status = "disabled";
    };
    
    &usb_serdes_mux {
    	idle-states = <1>, <0>; /* USB0 to SERDES3, USB1 to SERDES1 */
    };
    
    &serdes_ln_ctrl {
    	idle-states = <J721E_SERDES0_LANE0_PCIE0_LANE0>, <J721E_SERDES0_LANE1_QSGMII_LANE2>,
    		      <J721E_SERDES1_LANE0_PCIE1_LANE0>, <J721E_SERDES1_LANE1_PCIE1_LANE1>,
    		      <J721E_SERDES2_LANE0_PCIE2_LANE0>, <J721E_SERDES2_LANE1_PCIE2_LANE1>,
    		      <J721E_SERDES3_LANE0_USB3_0_SWAP>, <J721E_SERDES3_LANE1_USB3_0>,
    		      <J721E_SERDES4_LANE0_EDP_LANE0>, <J721E_SERDES4_LANE1_EDP_LANE1>,
    		      <J721E_SERDES4_LANE2_EDP_LANE2>, <J721E_SERDES4_LANE3_EDP_LANE3>;
    };
    
    &serdes_wiz3 {
    	typec-dir-gpios = <&main_gpio1 3 GPIO_ACTIVE_HIGH>;
    	typec-dir-debounce-ms = <700>;	/* TUSB321, tCCB_DEFAULT 133 ms */
    };
    
    &serdes3 {
    	serdes3_usb_link: phy@0 {
    		reg = <0>;
    		cdns,num-lanes = <2>;
    		#phy-cells = <0>;
    		cdns,phy-type = <PHY_TYPE_USB3>;
    		resets = <&serdes_wiz3 1>, <&serdes_wiz3 2>;
    	};
    };
    
    &usbss0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_usbss0_pins_default>;
    	ti,vbus-divider;
    };
    
    &usb0 {
    	dr_mode = "otg";
    	maximum-speed = "super-speed";
    	phys = <&serdes3_usb_link>;
    	phy-names = "cdns3,usb3-phy";
    };
    
    &wkup_gpio0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&wkup_gpio_pins_default>;
    };
    
    &usbss1 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_usbss1_pins_default>;
    	ti,usb2-only;
    };
    
    &ospi1 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&nor_flash_qspi1_pins_default>;
    
    	flash@0{
    		compatible = "jedec,spi-nor";
    		reg = <0x0>;
    		spi-tx-bus-width = <1>;
    		spi-rx-bus-width = <4>;
    		spi-max-frequency = <40000000>;
    		cdns,tshsl-ns = <60>;
    		cdns,tsd2d-ns = <60>;
    		cdns,tchsh-ns = <60>;
    		cdns,tslch-ns = <60>;
    		cdns,read-delay = <2>;
    
    		partitions {
    			compatible = "fixed-partitions";
    			#address-cells = <1>;
    			#size-cells = <1>;
    
    			partition@0 {
    				label = "qspi.tiboot3";
    				reg = <0x0 0x80000>;
    			};
    
    			partition@80000 {
    				label = "qspi.tispl";
    				reg = <0x80000 0x200000>;
    			};
    
    			partition@280000 {
    				label = "qspi.u-boot";
    				reg = <0x280000 0x400000>;
    			};
    
    			partition@680000 {
    				label = "qspi.env";
    				reg = <0x680000 0x20000>;
    			};
    
    			partition@6a0000 {
    				label = "qspi.env.backup";
    				reg = <0x6a0000 0x20000>;
    			};
    
    			partition@6c0000 {
    				label = "qspi.sysfw";
    				reg = <0x6c0000 0x100000>;
    			};
    
    			partition@800000 {
    				label = "qspi.rootfs";
    				reg = <0x800000 0x37c0000>;
    			};
    
    			partition@3fe0000 {
    				label = "qspi.phypattern";
    				reg = <0x3fe0000 0x20000>;
    			};
    		};
    	};
    };
    
    &tscadc0 {
    	adc {
    		ti,adc-channels = <0 1 2 3 4 5 6 7>;
    	};
    };
    
    &tscadc1 {
    	adc {
    		ti,adc-channels = <0 1 2 3 4 5 6 7>;
    	};
    };
    
    &main_i2c0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&m2_i2c0_pins_default>;
    	clock-frequency = <400000>;
    };
    
    &main_i2c1 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&rtc_i2c1_pins_default>;
    	clock-frequency = <400000>;
    };
    
    &k3_clks {
    	/* Confiure AUDIO_EXT_REFCLK2 pin as output */
    	pinctrl-names = "default";
    	pinctrl-0 = <&audi_ext_refclk2_pins_default>;
    };
    
    &mcu_cpsw {
    	status = "disabled";
    	pinctrl-names = "default";
    	pinctrl-0 = <&mcu_cpsw_pins_default &mcu_mdio_pins_default>;
    };
    
    &davinci_mdio {
    	status = "disabled";
    	phy0: ethernet-phy@0 {
    		reg = <0>;
    		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
    		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    	};
    };
    
    &cpsw_port1 {
    	status = "disabled";
    	phy-mode = "rgmii-rxid";
    	phy-handle = <&phy0>;
    };
    
    &dss {
    	status = "disabled";
    };
    
    &mcasp0 {
    	status = "disabled";
    };
    
    &mcasp1 {
    	status = "disabled";
    };
    
    &mcasp2 {
    	status = "disabled";
    };
    
    &mcasp3 {
    	status = "disabled";
    };
    
    &mcasp4 {
    	status = "disabled";
    };
    
    &mcasp5 {
    	status = "disabled";
    };
    
    &mcasp6 {
    	status = "disabled";
    };
    
    &mcasp7 {
    	status = "disabled";
    };
    
    &mcasp8 {
    	status = "disabled";
    };
    
    &mcasp9 {
    	status = "disabled";
    };
    
    &mcasp10 {
    	#sound-dai-cells = <0>;
    
    	pinctrl-names = "default";
    	pinctrl-0 = <&mcasp10_pins_default>;
    
    	op-mode = <0>;          /* MCASP_IIS_MODE */
    	tdm-slots = <2>;
    	auxclk-fs-ratio = <256>;
    
    	serial-dir = <	/* 0: INACTIVE, 1: TX, 2: RX */
    		1 1 1 1
    		2 2 2 0
    	>;
    	tx-num-evt = <0>;
    	rx-num-evt = <0>;
    };
    
    &mcasp11 {
    	status = "disabled";
    };
    
    &cmn_refclk1 {
    	clock-frequency = <100000000>;
    };
    
    &wiz0_pll1_refclk {
    	assigned-clocks = <&wiz0_pll1_refclk>;
    	assigned-clock-parents = <&cmn_refclk1>;
    };
    
    &wiz0_refclk_dig {
    	assigned-clocks = <&wiz0_refclk_dig>;
    	assigned-clock-parents = <&cmn_refclk1>;
    };
    
    &wiz1_pll1_refclk {
    	assigned-clocks = <&wiz1_pll1_refclk>;
    	assigned-clock-parents = <&cmn_refclk1>;
    };
    
    &wiz1_refclk_dig {
    	assigned-clocks = <&wiz1_refclk_dig>;
    	assigned-clock-parents = <&cmn_refclk1>;
    };
    
    &wiz2_pll1_refclk {
    	assigned-clocks = <&wiz2_pll1_refclk>;
    	assigned-clock-parents = <&cmn_refclk1>;
    };
    
    &wiz2_refclk_dig {
    	assigned-clocks = <&wiz2_refclk_dig>;
    	assigned-clock-parents = <&cmn_refclk1>;
    };
    
    &serdes0 {
    	assigned-clocks = <&serdes0 CDNS_SIERRA_PLL_CMNLC>, <&serdes0 CDNS_SIERRA_PLL_CMNLC1>;
    	assigned-clock-parents = <&wiz0_pll1_refclk>, <&wiz0_pll1_refclk>;
    
    	serdes0_pcie_link: phy@0 {
    		reg = <0>;
    		cdns,num-lanes = <1>;
    		#phy-cells = <0>;
    		cdns,phy-type = <PHY_TYPE_PCIE>;
    		resets = <&serdes_wiz0 1>;
    	};
    
    	serdes0_qsgmii_link: phy@1 {
    		reg = <1>;
    		cdns,num-lanes = <1>;
    		#phy-cells = <0>;
    		cdns,phy-type = <PHY_TYPE_QSGMII>;
    		resets = <&serdes_wiz0 2>;
    	};
    };
    
    &serdes1 {
    	assigned-clocks = <&serdes1 CDNS_SIERRA_PLL_CMNLC>;
    	assigned-clock-parents = <&wiz1_pll1_refclk>;
    
    	serdes1_pcie_link: phy@0 {
    		reg = <0>;
    		cdns,num-lanes = <2>;
    		#phy-cells = <0>;
    		cdns,phy-type = <PHY_TYPE_PCIE>;
    		resets = <&serdes_wiz1 1>, <&serdes_wiz1 2>;
    	};
    };
    
    &serdes2 {
    	assigned-clocks = <&serdes2 CDNS_SIERRA_PLL_CMNLC>;
    	assigned-clock-parents = <&wiz2_pll1_refclk>;
    
    	serdes2_pcie_link: phy@0 {
    		reg = <0>;
    		cdns,num-lanes = <2>;
    		#phy-cells = <0>;
    		cdns,phy-type = <PHY_TYPE_PCIE>;
    		resets = <&serdes_wiz2 1>, <&serdes_wiz2 2>;
    	};
    };
    
    &dss {
    	status = "disabled";
    };
    
    &main_uart0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_uart0_pins_default>;
    	/* Shared with ATF on this platform */
    	power-domains = <&k3_pds 146 TI_SCI_PD_SHARED>;
    };
    
    &main_uart9 {
    	/* Brought out on M.2 E Key */
    	status = "disabled";
    };
    
    &ospi0 {
    	status = "disabled";
    };
    
    &ospi1 {
    	status = "okay";
    };
    
    &main_i2c2 {
    	/* Unused */
    	status = "disabled";
    };
    
    &main_i2c3 {
    	/* Unused */
    	status = "disabled";
    };
    
    &main_gpio0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&gpio0_pins_default>;
    };
    
    &main_gpio2 {
    	status = "disabled";
    };
    
    &main_gpio3 {
    	status = "disabled";
    };
    
    &main_gpio4 {
    	status = "disabled";
    };
    
    &main_gpio5 {
    	status = "disabled";
    };
    
    &main_gpio6 {
    	status = "disabled";
    };
    
    &main_gpio7 {
    	status = "disabled";
    };
    
    &wkup_gpio1 {
    	status = "disabled";
    };
    
    &main_r5fss0_core0{
    	firmware-name = "pdk-ipc/ipc_echo_test_mcu2_0_release_strip.xer5f";
    };
    
    // &usb_serdes_mux {
    // 	idle-states = <1>, <1>; /* USB0 to SERDES3, USB1 to SERDES2 */
    // };
    
    // &serdes_ln_ctrl {
    // 	idle-states = <J721E_SERDES0_LANE0_PCIE0_LANE0>, <J721E_SERDES0_LANE1_IP4_UNUSED>,
    // 		      <J721E_SERDES1_LANE0_PCIE1_LANE0>, <J721E_SERDES1_LANE1_PCIE1_LANE1>,
    // 		      <J721E_SERDES2_LANE0_IP1_UNUSED>, <J721E_SERDES2_LANE1_USB3_1>,
    // 		      <J721E_SERDES3_LANE0_USB3_0_SWAP>, <J721E_SERDES3_LANE1_USB3_0>,
    // 		      <J721E_SERDES4_LANE0_EDP_LANE0>, <J721E_SERDES4_LANE1_EDP_LANE1>,
    // 		      <J721E_SERDES4_LANE2_EDP_LANE2>, <J721E_SERDES4_LANE3_EDP_LANE3>;
    // };
    
    &serdes4 {
    	torrent_phy_dp: phy@0 {
    		reg = <0>;
    		resets = <&serdes_wiz4 1>;
    		cdns,phy-type = <PHY_TYPE_DP>;
    		cdns,num-lanes = <4>;
    		cdns,max-bit-rate = <5400>;
    		#phy-cells = <0>;
    	};
    };
    
    &mhdp {
    	status = "disabled";
    };
    
    &serdes2 {
    	serdes2_usb_link: phy@1 {
    		reg = <1>;
    		cdns,num-lanes = <1>;
    		#phy-cells = <0>;
    		cdns,phy-type = <PHY_TYPE_USB3>;
    		resets = <&serdes_wiz2 2>;
    	};
    };
    
    &usb1 {
    	dr_mode = "host";
    	maximum-speed = "super-speed";
    	phys = <&serdes2_usb_link>;
    	phy-names = "cdns3,usb3-phy";
    };
    
    &ti_csi2rx0 {
    	status = "okay";
    	/* MIPI-CSI Connector */
    };
    
    &ti_csi2rx1 {
    	status = "okay";
    	/* MIPI-CSI Connector */
    };
    
    &dphy0 {
    	status = "okay";
    };
    
    &dphy1 {
    	status = "okay";
    };
    
    &dss_ports {
    	status = "disabled";
    };
    
    &dp0_ports {
    	status = "disabled";
    };
    
    &pcie3_rc {
    	/* Unused */
    	status = "disabled";
    };
    
    &icssg0_mdio {
    	status = "disabled";
    };
    
    &icssg1_mdio {
    	status = "disabled";
    };
    
    &ufs_wrapper {
    	status = "disabled";
    };
    
    &mailbox0_cluster0 {
    	status = "okay";
    	interrupts = <436>;
    
    	mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    
    	mbox_mcu_r5fss0_core1: mbox-mcu-r5fss0-core1 {
    		ti,mbox-rx = <2 0 0>;
    		ti,mbox-tx = <3 0 0>;
    	};
    };
    
    &mailbox0_cluster1 {
    	status = "okay";
    	interrupts = <432>;
    
    	mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    
    	mbox_main_r5fss0_core1: mbox-main-r5fss0-core1 {
    		ti,mbox-rx = <2 0 0>;
    		ti,mbox-tx = <3 0 0>;
    	};
    };
    
    &mailbox0_cluster2 {
    	status = "okay";
    	interrupts = <428>;
    
    	mbox_main_r5fss1_core0: mbox-main-r5fss1-core0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    
    	mbox_main_r5fss1_core1: mbox-main-r5fss1-core1 {
    		ti,mbox-rx = <2 0 0>;
    		ti,mbox-tx = <3 0 0>;
    	};
    };
    
    &mailbox0_cluster3 {
    	status = "okay";
    	interrupts = <424>;
    
    	mbox_c66_0: mbox-c66-0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    
    	mbox_c66_1: mbox-c66-1 {
    		ti,mbox-rx = <2 0 0>;
    		ti,mbox-tx = <3 0 0>;
    	};
    };
    
    &mailbox0_cluster4 {
    	status = "okay";
    	interrupts = <420>;
    
    	mbox_c71_0: mbox-c71-0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    };
    
    &mcu_r5fss0_core0 {
    	mboxes = <&mailbox0_cluster0 &mbox_mcu_r5fss0_core0>;
    	memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
    			<&mcu_r5fss0_core0_memory_region>;
    };
    
    &mcu_r5fss0_core1 {
    	mboxes = <&mailbox0_cluster0 &mbox_mcu_r5fss0_core1>;
    	memory-region = <&mcu_r5fss0_core1_dma_memory_region>,
    			<&mcu_r5fss0_core1_memory_region>;
    };
    
    &main_r5fss0_core0 {
    	mboxes = <&mailbox0_cluster1 &mbox_main_r5fss0_core0>;
    	memory-region = <&main_r5fss0_core0_dma_memory_region>,
    			<&main_r5fss0_core0_memory_region>;
    };
    
    &main_r5fss0_core1 {
    	mboxes = <&mailbox0_cluster1 &mbox_main_r5fss0_core1>;
    	memory-region = <&main_r5fss0_core1_dma_memory_region>,
    			<&main_r5fss0_core1_memory_region>;
    };
    
    &main_r5fss1_core0 {
    	mboxes = <&mailbox0_cluster2 &mbox_main_r5fss1_core0>;
    	memory-region = <&main_r5fss1_core0_dma_memory_region>,
    			<&main_r5fss1_core0_memory_region>;
    };
    
    &main_r5fss1_core1 {
    	mboxes = <&mailbox0_cluster2 &mbox_main_r5fss1_core1>;
    	memory-region = <&main_r5fss1_core1_dma_memory_region>,
    			<&main_r5fss1_core1_memory_region>;
    };
    
    &c66_0 {
    	status = "disabled";
    };
    
    &c66_1 {
    	status = "disabled";
    };
    
    &c71_0 {
    	status = "disabled";
    };
    
    &main_spi5 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&tpm_spi5_pins_default>;
    	ti,spi-num-cs = <1>;
    	ti,pindir-d0-out-d1-in;
    
    	st33htpm0: st33htpm@0 {
    		status="okay";
    		compatible = "st,st33htpm-spi";
    		reg = <0>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		spi-max-frequency = <25000000>;
    	};
    };
    
    &main_i2c1 {
    	status = "okay";
    	
    	rtc@32 {
    		compatible = "epson,rx8010";
    		reg = <0x32>;
    	};
    };
    
    &main_spi2 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&lon_spi2_pins_default>;
    	ti,spi-num-cs = <1>;
    	ti,pindir-d0-out-d1-in;
    
    	spidev@0 {
    		compatible = "rohm,dh2228fv";
    		reg = <0>;	/* CE0 */
    		#address-cells = <1>;
    		#size-cells = <0>;
    		spi-max-frequency = <1000000>; /* 1MHZ according to spear dts */
    		spi-cpha;
    		spi-cpol;
    		gpio,rst = <&main_gpio0 123 GPIO_ACTIVE_LOW>; /* Pin P9_42 on BeagleBone */
    		gpio,irq = <&main_gpio1 0 GPIO_ACTIVE_LOW>; /* Pin P9_41 on BeagleBone */
    	};
    };
    
    &mcu_uart0 {
    	status = "okay";
    	linux,rs485-enabled-at-boot-time;
    	rts-gpios = <&main_gpio1 4 GPIO_ACTIVE_HIGH>;
    	rs485-rts-delay = <0 0>;
    	rs485-rts-active-high;
    
    	pinctrl-names = "default";
    	pinctrl-0 = <&central_io_pins_default>;
    };
    
    &main_uart7 {
    	status = "okay";
    	linux,rs485-enabled-at-boot-time;
    	rts-gpios = <&main_gpio1 18 GPIO_ACTIVE_HIGH>; /* See k3-j721e-beagleboneai64.dts for gpio numbering */
    	rs485-rts-delay = <0 0>; /* note: some older versions of the driver may require at least <1 1> */
    	rs485-rts-active-high;
    
    	pinctrl-names = "default";
    	pinctrl-0 = <&coma_uart7_pins_default>;
    };
    
    &main_uart6 {
    	status = "okay";
    	linux,rs485-enabled-at-boot-time;
    	rts-gpios = <&main_gpio1 4 GPIO_ACTIVE_HIGH>;
    	rs485-rts-delay = <0 0>;
    	rs485-rts-active-high;
    
    	pinctrl-names = "default";
    	pinctrl-0 = <&comb_uart6_pins_default>;
    };
    
    &main_uart4 {
    	status = "okay";
    	linux,rs485-enabled-at-boot-time;
    	rts-gpios = <&main_gpio0 106 GPIO_ACTIVE_HIGH>;
    	rs485-rts-delay = <0 0>;
    	rs485-rts-active-high;
    
    	pinctrl-names = "default";
    	pinctrl-0 = <&comc_uart4_pins_default>;
    };
    
    &main_uart2 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&stm32_uart2_pins_default>;
    };
    
    &main_uart0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&soc_debug_uart0_pins_default>;
    };
    
    &main_uart1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&m2_uart1_pins_default>;
    };
    
    &main_uart5 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&spare_uart5_pins_default>;
    };
    
    &main_cpsw0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_cpsw0_mdio_pins_default
    		     &rgmii3_pins_default
    		     &rgmii4_pins_default
    		     &rgmii1_pins_default>;
    };
    
    &main_cpsw0_port1 {
    	status = "okay";
    	phy-handle = <&main_cpsw0_phy0>;
    	phy-mode = "rgmii-rxid";
    	mac-address = [00 00 00 00 00 00];
    	phys = <&main_phy_gmii_sel 1>;
    };
    
    &main_cpsw0_port2 {
    	status = "okay";
    	phy-handle = <&main_cpsw0_phy4>;
    	phy-mode = "rmii";
    	mac-address = [00 00 00 00 00 00];
    	phys = <&main_phy_gmii_sel 2>;
    };
    
    &main_cpsw0_port3 {
    	status = "okay";
    	phy-handle = <&main_cpsw0_phy5>;
    	phy-mode = "rmii";
    	mac-address = [00 00 00 00 00 00];
    	phys = <&main_phy_gmii_sel 3>;
    };
    
    &main_cpsw0_mdio {
    	status = "okay";
    	main_cpsw0_phy0: ethernet-phy@0 {
    		reg = <0>;
    		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
    		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    		ti,min-output-impedance;
    		// reset-gpios = <&main_gpio0 8 GPIO_ACTIVE_LOW>;
    	};
    	main_cpsw0_phy4: ethernet-phy@4 {
    		reg = <4>;
    		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
    		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    		ti,min-output-impedance;
    		// reset-gpios = <&main_gpio0 9 GPIO_ACTIVE_LOW>;
    	};
    	main_cpsw0_phy5: ethernet-phy@5 {
    		reg = <5>;
    		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
    		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
    		ti,min-output-impedance;
    		// reset-gpios = <&main_gpio0 10 GPIO_ACTIVE_LOW>;
    	};
    };
    

    k3-j721e-main.dtsi:

    // SPDX-License-Identifier: GPL-2.0
    /*
     * Device Tree Source for J721E SoC Family Main Domain peripherals
     *
     * Copyright (C) 2016-2020 Texas Instruments Incorporated - https://www.ti.com/
     */
    #include <dt-bindings/phy/phy.h>
    #include <dt-bindings/mux/mux.h>
    #include <dt-bindings/mux/ti-serdes.h>
    
    / {
    	cmn_refclk: clock-cmnrefclk {
    		#clock-cells = <0>;
    		compatible = "fixed-clock";
    		clock-frequency = <0>;
    	};
    
    	cmn_refclk1: clock-cmnrefclk1 {
    		#clock-cells = <0>;
    		compatible = "fixed-clock";
    		clock-frequency = <0>;
    	};
    };
    
    &cbass_main {
    	msmc_ram: sram@70000000 {
    		compatible = "mmio-sram";
    		reg = <0x0 0x70000000 0x0 0x800000>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges = <0x0 0x0 0x70000000 0x800000>;
    
    		atf-sram@0 {
    			reg = <0x0 0x20000>;
    		};
    	};
    
    	scm_conf: scm-conf@100000 {
    		compatible = "ti,j721e-system-controller", "syscon", "simple-mfd";
    		reg = <0 0x00100000 0 0x1c000>; /* excludes pinctrl region */
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges = <0x0 0x0 0x00100000 0x1c000>;
    
    		serdes_ln_ctrl: mux@4080 {
    			compatible = "mmio-mux";
    			reg = <0x00004080 0x50>;
    			#mux-control-cells = <1>;
    			mux-reg-masks = <0x4080 0x3>, <0x4084 0x3>, /* SERDES0 lane0/1 select */
    					<0x4090 0x3>, <0x4094 0x3>, /* SERDES1 lane0/1 select */
    					<0x40a0 0x3>, <0x40a4 0x3>, /* SERDES2 lane0/1 select */
    					<0x40b0 0x3>, <0x40b4 0x3>, /* SERDES3 lane0/1 select */
    					<0x40c0 0x3>, <0x40c4 0x3>, <0x40c8 0x3>, <0x40cc 0x3>;
    					/* SERDES4 lane0/1/2/3 select */
    			idle-states = <J721E_SERDES0_LANE0_PCIE0_LANE0>, <J721E_SERDES0_LANE1_PCIE0_LANE1>,
    				      <J721E_SERDES1_LANE0_PCIE1_LANE0>, <J721E_SERDES1_LANE1_PCIE1_LANE1>,
    				      <J721E_SERDES2_LANE0_PCIE2_LANE0>, <J721E_SERDES2_LANE1_PCIE2_LANE1>,
    				      <MUX_IDLE_AS_IS>, <J721E_SERDES3_LANE1_USB3_0>,
    				      <J721E_SERDES4_LANE0_EDP_LANE0>, <J721E_SERDES4_LANE1_EDP_LANE1>,
    				      <J721E_SERDES4_LANE2_EDP_LANE2>, <J721E_SERDES4_LANE3_EDP_LANE3>;
    		};
    
    		usb_serdes_mux: mux-controller@4000 {
    			compatible = "mmio-mux";
    			#mux-control-cells = <1>;
    			mux-reg-masks = <0x4000 0x8000000>, /* USB0 to SERDES0/3 mux */
    					<0x4010 0x8000000>; /* USB1 to SERDES1/2 mux */
    	    };
    
    		main_phy_gmii_sel: phy@4044 {
    			compatible = "ti,am654-phy-gmii-sel";
    			reg = <0x4044 0x20>;
    			#phy-cells = <1>;
    		};
    	};
    
    	gic500: interrupt-controller@1800000 {
    		compatible = "arm,gic-v3";
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    		#interrupt-cells = <3>;
    		interrupt-controller;
    		reg = <0x00 0x01800000 0x00 0x10000>,	/* GICD */
    		      <0x00 0x01900000 0x00 0x100000>;	/* GICR */
    
    		/* vcpumntirq: virtual CPU interface maintenance interrupt */
    		interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
    
    		gic_its: msi-controller@1820000 {
    			compatible = "arm,gic-v3-its";
    			reg = <0x00 0x01820000 0x00 0x10000>;
    			socionext,synquacer-pre-its = <0x1000000 0x400000>;
    			msi-controller;
    			#msi-cells = <1>;
    		};
    	};
    
    	main_gpio_intr: interrupt-controller@a00000 {
    		compatible = "ti,sci-intr";
    		reg = <0x00 0x00a00000 0x00 0x800>;
    		ti,intr-trigger-type = <1>;
    		interrupt-controller;
    		interrupt-parent = <&gic500>;
    		#interrupt-cells = <1>;
    		ti,sci = <&dmsc>;
    		ti,sci-dev-id = <131>;
    		ti,interrupt-ranges = <8 392 56>;
    	};
    
    	main_navss: bus@30000000 {
    		compatible = "simple-mfd";
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges = <0x00 0x30000000 0x00 0x30000000 0x00 0x0c400000>;
    		dma-coherent;
    		dma-ranges;
    
    		ti,sci-dev-id = <199>;
    
    		main_navss_intr: interrupt-controller@310e0000 {
    			compatible = "ti,sci-intr";
    			reg = <0x0 0x310e0000 0x0 0x4000>;
    			ti,intr-trigger-type = <4>;
    			interrupt-controller;
    			interrupt-parent = <&gic500>;
    			#interrupt-cells = <1>;
    			ti,sci = <&dmsc>;
    			ti,sci-dev-id = <213>;
    			ti,interrupt-ranges = <0 64 64>,
    					      <64 448 64>,
    					      <128 672 64>;
    		};
    
    		main_udmass_inta: interrupt-controller@33d00000 {
    			compatible = "ti,sci-inta";
    			reg = <0x0 0x33d00000 0x0 0x100000>;
    			interrupt-controller;
    			interrupt-parent = <&main_navss_intr>;
    			msi-controller;
    			#interrupt-cells = <0>;
    			ti,sci = <&dmsc>;
    			ti,sci-dev-id = <209>;
    			ti,interrupt-ranges = <0 0 256>;
    		};
    
    		secure_proxy_main: mailbox@32c00000 {
    			compatible = "ti,am654-secure-proxy";
    			#mbox-cells = <1>;
    			reg-names = "target_data", "rt", "scfg";
    			reg = <0x00 0x32c00000 0x00 0x100000>,
    			      <0x00 0x32400000 0x00 0x100000>,
    			      <0x00 0x32800000 0x00 0x100000>;
    			interrupt-names = "rx_011";
    			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
    		};
    
    		smmu0: iommu@36600000 {
    			compatible = "arm,smmu-v3";
    			reg = <0x0 0x36600000 0x0 0x100000>;
    			interrupt-parent = <&gic500>;
    			interrupts = <GIC_SPI 772 IRQ_TYPE_EDGE_RISING>,
    				     <GIC_SPI 768 IRQ_TYPE_EDGE_RISING>;
    			interrupt-names = "eventq", "gerror";
    			#iommu-cells = <1>;
    		};
    
    		hwspinlock: spinlock@30e00000 {
    			compatible = "ti,am654-hwspinlock";
    			reg = <0x00 0x30e00000 0x00 0x1000>;
    			#hwlock-cells = <1>;
    		};
    
    		mailbox0_cluster0: mailbox@31f80000 {
    			compatible = "ti,am654-mailbox";
    			reg = <0x00 0x31f80000 0x00 0x200>;
    			#mbox-cells = <1>;
    			ti,mbox-num-users = <4>;
    			ti,mbox-num-fifos = <16>;
    			interrupt-parent = <&main_navss_intr>;
    		};
    
    		mailbox0_cluster1: mailbox@31f81000 {
    			compatible = "ti,am654-mailbox";
    			reg = <0x00 0x31f81000 0x00 0x200>;
    			#mbox-cells = <1>;
    			ti,mbox-num-users = <4>;
    			ti,mbox-num-fifos = <16>;
    			interrupt-parent = <&main_navss_intr>;
    		};
    
    		mailbox0_cluster2: mailbox@31f82000 {
    			compatible = "ti,am654-mailbox";
    			reg = <0x00 0x31f82000 0x00 0x200>;
    			#mbox-cells = <1>;
    			ti,mbox-num-users = <4>;
    			ti,mbox-num-fifos = <16>;
    			interrupt-parent = <&main_navss_intr>;
    		};
    
    		mailbox0_cluster3: mailbox@31f83000 {
    			compatible = "ti,am654-mailbox";
    			reg = <0x00 0x31f83000 0x00 0x200>;
    			#mbox-cells = <1>;
    			ti,mbox-num-users = <4>;
    			ti,mbox-num-fifos = <16>;
    			interrupt-parent = <&main_navss_intr>;
    		};
    
    		mailbox0_cluster4: mailbox@31f84000 {
    			compatible = "ti,am654-mailbox";
    			reg = <0x00 0x31f84000 0x00 0x200>;
    			#mbox-cells = <1>;
    			ti,mbox-num-users = <4>;
    			ti,mbox-num-fifos = <16>;
    			interrupt-parent = <&main_navss_intr>;
    		};
    
    		mailbox0_cluster5: mailbox@31f85000 {
    			compatible = "ti,am654-mailbox";
    			reg = <0x00 0x31f85000 0x00 0x200>;
    			#mbox-cells = <1>;
    			ti,mbox-num-users = <4>;
    			ti,mbox-num-fifos = <16>;
    			interrupt-parent = <&main_navss_intr>;
    		};
    
    		mailbox0_cluster6: mailbox@31f86000 {
    			compatible = "ti,am654-mailbox";
    			reg = <0x00 0x31f86000 0x00 0x200>;
    			#mbox-cells = <1>;
    			ti,mbox-num-users = <4>;
    			ti,mbox-num-fifos = <16>;
    			interrupt-parent = <&main_navss_intr>;
    		};
    
    		mailbox0_cluster7: mailbox@31f87000 {
    			compatible = "ti,am654-mailbox";
    			reg = <0x00 0x31f87000 0x00 0x200>;
    			#mbox-cells = <1>;
    			ti,mbox-num-users = <4>;
    			ti,mbox-num-fifos = <16>;
    			interrupt-parent = <&main_navss_intr>;
    		};
    
    		mailbox0_cluster8: mailbox@31f88000 {
    			compatible = "ti,am654-mailbox";
    			reg = <0x00 0x31f88000 0x00 0x200>;
    			#mbox-cells = <1>;
    			ti,mbox-num-users = <4>;
    			ti,mbox-num-fifos = <16>;
    			interrupt-parent = <&main_navss_intr>;
    		};
    
    		mailbox0_cluster9: mailbox@31f89000 {
    			compatible = "ti,am654-mailbox";
    			reg = <0x00 0x31f89000 0x00 0x200>;
    			#mbox-cells = <1>;
    			ti,mbox-num-users = <4>;
    			ti,mbox-num-fifos = <16>;
    			interrupt-parent = <&main_navss_intr>;
    		};
    
    		mailbox0_cluster10: mailbox@31f8a000 {
    			compatible = "ti,am654-mailbox";
    			reg = <0x00 0x31f8a000 0x00 0x200>;
    			#mbox-cells = <1>;
    			ti,mbox-num-users = <4>;
    			ti,mbox-num-fifos = <16>;
    			interrupt-parent = <&main_navss_intr>;
    		};
    
    		mailbox0_cluster11: mailbox@31f8b000 {
    			compatible = "ti,am654-mailbox";
    			reg = <0x00 0x31f8b000 0x00 0x200>;
    			#mbox-cells = <1>;
    			ti,mbox-num-users = <4>;
    			ti,mbox-num-fifos = <16>;
    			interrupt-parent = <&main_navss_intr>;
    		};
    
    		main_ringacc: ringacc@3c000000 {
    			compatible = "ti,am654-navss-ringacc";
    			reg =	<0x0 0x3c000000 0x0 0x400000>,
    				<0x0 0x38000000 0x0 0x400000>,
    				<0x0 0x31120000 0x0 0x100>,
    				<0x0 0x33000000 0x0 0x40000>;
    			reg-names = "rt", "fifos", "proxy_gcfg", "proxy_target";
    			ti,num-rings = <1024>;
    			ti,sci-rm-range-gp-rings = <0x1>; /* GP ring range */
    			ti,sci = <&dmsc>;
    			ti,sci-dev-id = <211>;
    			msi-parent = <&main_udmass_inta>;
    		};
    
    		main_udmap: dma-controller@31150000 {
    			compatible = "ti,j721e-navss-main-udmap";
    			reg =	<0x0 0x31150000 0x0 0x100>,
    				<0x0 0x34000000 0x0 0x100000>,
    				<0x0 0x35000000 0x0 0x100000>;
    			reg-names = "gcfg", "rchanrt", "tchanrt";
    			msi-parent = <&main_udmass_inta>;
    			#dma-cells = <1>;
    
    			ti,sci = <&dmsc>;
    			ti,sci-dev-id = <212>;
    			ti,ringacc = <&main_ringacc>;
    
    			ti,sci-rm-range-tchan = <0x0d>, /* TX_CHAN */
    						<0x0f>, /* TX_HCHAN */
    						<0x10>; /* TX_UHCHAN */
    			ti,sci-rm-range-rchan = <0x0a>, /* RX_CHAN */
    						<0x0b>, /* RX_HCHAN */
    						<0x0c>; /* RX_UHCHAN */
    			ti,sci-rm-range-rflow = <0x00>; /* GP RFLOW */
    		};
    
    		cpts@310d0000 {
    			compatible = "ti,j721e-cpts";
    			reg = <0x0 0x310d0000 0x0 0x400>;
    			reg-names = "cpts";
    			clocks = <&k3_clks 201 1>;
    			clock-names = "cpts";
    			interrupts-extended = <&main_navss_intr 391>;
    			interrupt-names = "cpts";
    			ti,cpts-periodic-outputs = <6>;
    			ti,cpts-ext-ts-inputs = <8>;
    		};
    	};
    
    	main_cpsw0: ethernet@c000000 {
    		compatible = "ti,j721e-cpsw-nuss";
    		#address-cells = <2>;
    		#size-cells = <2>;
    		reg = <0x0 0xc000000 0x0 0x200000>;
    		reg-names = "cpsw_nuss";
    		ranges = <0x0 0x0 0x0 0x0c000000 0x0 0x200000>;
    		dma-coherent;
    		clocks = <&k3_clks 19 89>;
    		clock-names = "fck";
    		power-domains = <&k3_pds 19 TI_SCI_PD_EXCLUSIVE>;
    
    		dmas = <&main_udmap 0xca00>,
    		       <&main_udmap 0xca01>,
    		       <&main_udmap 0xca02>,
    		       <&main_udmap 0xca03>,
    		       <&main_udmap 0xca04>,
    		       <&main_udmap 0xca05>,
    		       <&main_udmap 0xca06>,
    		       <&main_udmap 0xca07>,
    		       <&main_udmap 0x4a00>;
    		dma-names = "tx0", "tx1", "tx2", "tx3",
    			    "tx4", "tx5", "tx6", "tx7",
    			    "rx";
    
    		ethernet-ports {
    			#address-cells = <1>;
    			#size-cells = <0>;
    
    			main_cpsw0_port1: port@1 {
    				reg = <1>;
    				ti,mac-only;
    				label = "port1";
    			};
    
    			main_cpsw0_port2: port@2 {
    				reg = <2>;
    				ti,mac-only;
    				label = "port2";
    			};
    
    			main_cpsw0_port3: port@3 {
    				reg = <3>;
    				ti,mac-only;
    				label = "port3";
    			};
    
    			main_cpsw0_port4: port@4 {
    				reg = <4>;
    				ti,mac-only;
    				label = "port4";
    				status = "disabled";
    			};
    
    			main_cpsw0_port5: port@5 {
    				reg = <5>;
    				ti,mac-only;
    				label = "port5";
    				status = "disabled";
    			};
    
    			main_cpsw0_port6: port@6 {
    				reg = <6>;
    				ti,mac-only;
    				label = "port6";
    				status = "disabled";
    			};
    
    			main_cpsw0_port7: port@7 {
    				reg = <7>;
    				ti,mac-only;
    				label = "port7";
    				status = "disabled";
    			};
    
    			main_cpsw0_port8: port@8 {
    				reg = <8>;
    				ti,mac-only;
    				label = "port8";
    				status = "disabled";
    			};
    		};
    
    		main_cpsw0_mdio: mdio@f00 {
    			compatible = "ti,cpsw-mdio","ti,davinci_mdio";
    			reg = <0x0 0xf00 0x0 0x100>;
    			#address-cells = <1>;
    			#size-cells = <0>;
    			clocks = <&k3_clks 19 89>;
    			clock-names = "fck";
    			bus_freq = <1000000>;
    };
    
    		cpts@3d000 {
    			compatible = "ti,j721e-cpts";
    			reg = <0x0 0x3d000 0x0 0x400>;
    			clocks = <&k3_clks 19 16>;
    			clock-names = "cpts";
    			interrupts-extended = <&gic500 GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
    			interrupt-names = "cpts";
    			ti,cpts-ext-ts-inputs = <4>;
    			ti,cpts-periodic-outputs = <2>;
    		};
    	};
    
    	main_crypto: crypto@4e00000 {
    		compatible = "ti,j721e-sa2ul";
    		reg = <0x0 0x4e00000 0x0 0x1200>;
    		power-domains = <&k3_pds 264 TI_SCI_PD_EXCLUSIVE>;
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges = <0x0 0x04e00000 0x00 0x04e00000 0x0 0x30000>;
    
    		dmas = <&main_udmap 0xc000>, <&main_udmap 0x4000>,
    				<&main_udmap 0x4001>;
    		dma-names = "tx", "rx1", "rx2";
    		dma-coherent;
    
    		rng: rng@4e10000 {
    			compatible = "inside-secure,safexcel-eip76";
    			reg = <0x0 0x4e10000 0x0 0x7d>;
    			interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
    			clocks = <&k3_clks 264 1>;
    		};
    	};
    
    	main_pmx0: pinctrl@11c000 {
    		compatible = "pinctrl-single";
    		/* Proxy 0 addressing */
    		reg = <0x0 0x11c000 0x0 0x2b4>;
    		#pinctrl-cells = <1>;
    		pinctrl-single,register-width = <32>;
    		pinctrl-single,function-mask = <0xffffffff>;
    	};
    
    	serdes_wiz0: wiz@5000000 {
    		compatible = "ti,j721e-wiz-16g";
    		#address-cells = <1>;
    		#size-cells = <1>;
    		power-domains = <&k3_pds 292 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 292 5>, <&k3_clks 292 11>, <&cmn_refclk>;
    		clock-names = "fck", "core_ref_clk", "ext_ref_clk";
    		assigned-clocks = <&k3_clks 292 11>, <&k3_clks 292 0>;
    		assigned-clock-parents = <&k3_clks 292 15>, <&k3_clks 292 4>;
    		num-lanes = <2>;
    		#reset-cells = <1>;
    		ranges = <0x5000000 0x0 0x5000000 0x10000>;
    
    		wiz0_pll0_refclk: pll0-refclk {
    			clocks = <&k3_clks 292 11>, <&cmn_refclk>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz0_pll0_refclk>;
    			assigned-clock-parents = <&k3_clks 292 11>;
    		};
    
    		wiz0_pll1_refclk: pll1-refclk {
    			clocks = <&k3_clks 292 0>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz0_pll1_refclk>;
    			assigned-clock-parents = <&k3_clks 292 0>;
    		};
    
    		wiz0_refclk_dig: refclk-dig {
    			clocks = <&k3_clks 292 11>, <&k3_clks 292 0>, <&cmn_refclk>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz0_refclk_dig>;
    			assigned-clock-parents = <&k3_clks 292 11>;
    		};
    
    		wiz0_cmn_refclk_dig_div: cmn-refclk-dig-div {
    			clocks = <&wiz0_refclk_dig>;
    			#clock-cells = <0>;
    		};
    
    		wiz0_cmn_refclk1_dig_div: cmn-refclk1-dig-div {
    			clocks = <&wiz0_pll1_refclk>;
    			#clock-cells = <0>;
    		};
    
    		serdes0: serdes@5000000 {
    			compatible = "ti,sierra-phy-t0";
    			reg-names = "serdes";
    			reg = <0x5000000 0x10000>;
    			#address-cells = <1>;
    			#size-cells = <0>;
    			#clock-cells = <1>;
    			resets = <&serdes_wiz0 0>;
    			reset-names = "sierra_reset";
    			clocks = <&wiz0_cmn_refclk_dig_div>, <&wiz0_cmn_refclk1_dig_div>,
    				 <&wiz0_pll0_refclk>, <&wiz0_pll1_refclk>;
    			clock-names = "cmn_refclk_dig_div", "cmn_refclk1_dig_div",
    				      "pll0_refclk", "pll1_refclk";
    		};
    	};
    
    	serdes_wiz1: wiz@5010000 {
    		compatible = "ti,j721e-wiz-16g";
    		#address-cells = <1>;
    		#size-cells = <1>;
    		power-domains = <&k3_pds 293 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 293 5>, <&k3_clks 293 13>, <&cmn_refclk>;
    		clock-names = "fck", "core_ref_clk", "ext_ref_clk";
    		assigned-clocks = <&k3_clks 293 13>, <&k3_clks 293 0>;
    		assigned-clock-parents = <&k3_clks 293 17>, <&k3_clks 293 4>;
    		num-lanes = <2>;
    		#reset-cells = <1>;
    		ranges = <0x5010000 0x0 0x5010000 0x10000>;
    
    		wiz1_pll0_refclk: pll0-refclk {
    			clocks = <&k3_clks 293 13>, <&cmn_refclk>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz1_pll0_refclk>;
    			assigned-clock-parents = <&k3_clks 293 13>;
    		};
    
    		wiz1_pll1_refclk: pll1-refclk {
    			clocks = <&k3_clks 293 0>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz1_pll1_refclk>;
    			assigned-clock-parents = <&k3_clks 293 0>;
    		};
    
    		wiz1_refclk_dig: refclk-dig {
    			clocks = <&k3_clks 293 13>, <&k3_clks 293 0>, <&cmn_refclk>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz1_refclk_dig>;
    			assigned-clock-parents = <&k3_clks 293 13>;
    		};
    
    		wiz1_cmn_refclk_dig_div: cmn-refclk-dig-div{
    			clocks = <&wiz1_refclk_dig>;
    			#clock-cells = <0>;
    		};
    
    		wiz1_cmn_refclk1_dig_div: cmn-refclk1-dig-div {
    			clocks = <&wiz1_pll1_refclk>;
    			#clock-cells = <0>;
    		};
    
    		serdes1: serdes@5010000 {
    			compatible = "ti,sierra-phy-t0";
    			reg-names = "serdes";
    			reg = <0x5010000 0x10000>;
    			#address-cells = <1>;
    			#size-cells = <0>;
    			#clock-cells = <1>;
    			resets = <&serdes_wiz1 0>;
    			reset-names = "sierra_reset";
    			clocks = <&wiz1_cmn_refclk_dig_div>, <&wiz1_cmn_refclk1_dig_div>,
    				 <&wiz1_pll0_refclk>, <&wiz1_pll1_refclk>;
    			clock-names = "cmn_refclk_dig_div", "cmn_refclk1_dig_div",
    				      "pll0_refclk", "pll1_refclk";
    		};
    	};
    
    	serdes_wiz2: wiz@5020000 {
    		compatible = "ti,j721e-wiz-16g";
    		#address-cells = <1>;
    		#size-cells = <1>;
    		power-domains = <&k3_pds 294 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 294 5>, <&k3_clks 294 11>, <&cmn_refclk>;
    		clock-names = "fck", "core_ref_clk", "ext_ref_clk";
    		assigned-clocks = <&k3_clks 294 11>, <&k3_clks 294 0>;
    		assigned-clock-parents = <&k3_clks 294 15>, <&k3_clks 294 4>;
    		num-lanes = <2>;
    		#reset-cells = <1>;
    		ranges = <0x5020000 0x0 0x5020000 0x10000>;
    
    		wiz2_pll0_refclk: pll0-refclk {
    			clocks = <&k3_clks 294 11>, <&cmn_refclk>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz2_pll0_refclk>;
    			assigned-clock-parents = <&k3_clks 294 11>;
    		};
    
    		wiz2_pll1_refclk: pll1-refclk {
    			clocks = <&k3_clks 294 0>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz2_pll1_refclk>;
    			assigned-clock-parents = <&k3_clks 294 0>;
    		};
    
    		wiz2_refclk_dig: refclk-dig {
    			clocks = <&k3_clks 294 11>, <&k3_clks 294 0>, <&cmn_refclk>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz2_refclk_dig>;
    			assigned-clock-parents = <&k3_clks 294 11>;
    		};
    
    		wiz2_cmn_refclk_dig_div: cmn-refclk-dig-div {
    			clocks = <&wiz2_refclk_dig>;
    			#clock-cells = <0>;
    		};
    
    		wiz2_cmn_refclk1_dig_div: cmn-refclk1-dig-div {
    			clocks = <&wiz2_pll1_refclk>;
    			#clock-cells = <0>;
    		};
    
    		serdes2: serdes@5020000 {
    			compatible = "ti,sierra-phy-t0";
    			reg-names = "serdes";
    			reg = <0x5020000 0x10000>;
    			#address-cells = <1>;
    			#size-cells = <0>;
    			#clock-cells = <1>;
    			resets = <&serdes_wiz2 0>;
    			reset-names = "sierra_reset";
    			clocks = <&wiz2_cmn_refclk_dig_div>, <&wiz2_cmn_refclk1_dig_div>,
    				 <&wiz2_pll0_refclk>, <&wiz2_pll1_refclk>;
    			clock-names = "cmn_refclk_dig_div", "cmn_refclk1_dig_div",
    				      "pll0_refclk", "pll1_refclk";
    		};
    	};
    
    	serdes_wiz3: wiz@5030000 {
    		compatible = "ti,j721e-wiz-16g";
    		#address-cells = <1>;
    		#size-cells = <1>;
    		power-domains = <&k3_pds 295 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 295 5>, <&k3_clks 295 9>, <&cmn_refclk>;
    		clock-names = "fck", "core_ref_clk", "ext_ref_clk";
    		assigned-clocks = <&k3_clks 295 9>, <&k3_clks 295 0>;
    		assigned-clock-parents = <&k3_clks 295 13>, <&k3_clks 295 4>;
    		num-lanes = <2>;
    		#reset-cells = <1>;
    		ranges = <0x5030000 0x0 0x5030000 0x10000>;
    
    		wiz3_pll0_refclk: pll0-refclk {
    			clocks = <&k3_clks 295 9>, <&cmn_refclk>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz3_pll0_refclk>;
    			assigned-clock-parents = <&k3_clks 295 9>;
    		};
    
    		wiz3_pll1_refclk: pll1-refclk {
    			clocks = <&k3_clks 295 0>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz3_pll1_refclk>;
    			assigned-clock-parents = <&k3_clks 295 0>;
    		};
    
    		wiz3_refclk_dig: refclk-dig {
    			clocks = <&k3_clks 295 9>, <&k3_clks 295 0>, <&cmn_refclk>, <&cmn_refclk1>;
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz3_refclk_dig>;
    			assigned-clock-parents = <&k3_clks 295 9>;
    		};
    
    		wiz3_cmn_refclk_dig_div: cmn-refclk-dig-div {
    			clocks = <&wiz3_refclk_dig>;
    			#clock-cells = <0>;
    		};
    
    		wiz3_cmn_refclk1_dig_div: cmn-refclk1-dig-div {
    			clocks = <&wiz3_pll1_refclk>;
    			#clock-cells = <0>;
    		};
    
    		serdes3: serdes@5030000 {
    			compatible = "ti,sierra-phy-t0";
    			reg-names = "serdes";
    			reg = <0x5030000 0x10000>;
    			#address-cells = <1>;
    			#size-cells = <0>;
    			#clock-cells = <1>;
    			resets = <&serdes_wiz3 0>;
    			reset-names = "sierra_reset";
    			clocks = <&wiz3_cmn_refclk_dig_div>, <&wiz3_cmn_refclk1_dig_div>,
    				 <&wiz3_pll0_refclk>, <&wiz3_pll1_refclk>;
    			clock-names = "cmn_refclk_dig_div", "cmn_refclk1_dig_div",
    				      "pll0_refclk", "pll1_refclk";
    		};
    	};
    
    	pcie0_rc: pcie@2900000 {
    		compatible = "ti,j721e-pcie-host";
    		reg = <0x00 0x02900000 0x00 0x1000>,
    		      <0x00 0x02907000 0x00 0x400>,
    		      <0x00 0x0d000000 0x00 0x00800000>,
    		      <0x00 0x10000000 0x00 0x00001000>;
    		reg-names = "intd_cfg", "user_cfg", "reg", "cfg";
    		interrupt-names = "link_state";
    		interrupts = <GIC_SPI 318 IRQ_TYPE_EDGE_RISING>;
    		device_type = "pci";
    		ti,syscon-pcie-ctrl = <&scm_conf 0x4070>;
    		max-link-speed = <3>;
    		num-lanes = <2>;
    		power-domains = <&k3_pds 239 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 239 1>;
    		clock-names = "fck";
    		#address-cells = <3>;
    		#size-cells = <2>;
    		bus-range = <0x0 0xf>;
    		vendor-id = <0x104c>;
    		device-id = <0xb00d>;
    		msi-map = <0x0 &gic_its 0x0 0x10000>;
    		dma-coherent;
    		ranges = <0x01000000 0x0 0x10001000 0x0 0x10001000 0x0 0x0010000>,
    			 <0x02000000 0x0 0x10011000 0x0 0x10011000 0x0 0x7fef000>;
    		dma-ranges = <0x02000000 0x0 0x0 0x0 0x0 0x10000 0x0>;
    	};
    
    	pcie0_ep: pcie-ep@2900000 {
    		compatible = "ti,j721e-pcie-ep";
    		reg = <0x00 0x02900000 0x00 0x1000>,
    		      <0x00 0x02907000 0x00 0x400>,
    		      <0x00 0x0d000000 0x00 0x00800000>,
    		      <0x00 0x10000000 0x00 0x08000000>;
    		reg-names = "intd_cfg", "user_cfg", "reg", "mem";
    		interrupt-names = "link_state";
    		interrupts = <GIC_SPI 318 IRQ_TYPE_EDGE_RISING>;
    		ti,syscon-pcie-ctrl = <&scm_conf 0x4070>;
    		max-link-speed = <3>;
    		num-lanes = <2>;
    		power-domains = <&k3_pds 239 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 239 1>;
    		clock-names = "fck";
    		max-functions = /bits/ 8 <6>;
    		max-virtual-functions = /bits/ 16 <4 4 4 4 0 0>;
    		dma-coherent;
    	};
    
    	pcie1_rc: pcie@2910000 {
    		compatible = "ti,j721e-pcie-host";
    		reg = <0x00 0x02910000 0x00 0x1000>,
    		      <0x00 0x02917000 0x00 0x400>,
    		      <0x00 0x0d800000 0x00 0x00800000>,
    		      <0x00 0x18000000 0x00 0x00001000>;
    		reg-names = "intd_cfg", "user_cfg", "reg", "cfg";
    		interrupt-names = "link_state";
    		interrupts = <GIC_SPI 330 IRQ_TYPE_EDGE_RISING>;
    		device_type = "pci";
    		ti,syscon-pcie-ctrl = <&scm_conf 0x4074>;
    		max-link-speed = <3>;
    		num-lanes = <2>;
    		power-domains = <&k3_pds 240 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 240 1>;
    		clock-names = "fck";
    		#address-cells = <3>;
    		#size-cells = <2>;
    		bus-range = <0x0 0xf>;
    		vendor-id = <0x104c>;
    		device-id = <0xb00d>;
    		msi-map = <0x0 &gic_its 0x10000 0x10000>;
    		dma-coherent;
    		ranges = <0x01000000 0x0 0x18001000 0x0 0x18001000 0x0 0x0010000>,
    			 <0x02000000 0x0 0x18011000 0x0 0x18011000 0x0 0x7fef000>;
    		dma-ranges = <0x02000000 0x0 0x0 0x0 0x0 0x10000 0x0>;
    	};
    
    	pcie1_ep: pcie-ep@2910000 {
    		compatible = "ti,j721e-pcie-ep";
    		reg = <0x00 0x02910000 0x00 0x1000>,
    		      <0x00 0x02917000 0x00 0x400>,
    		      <0x00 0x0d800000 0x00 0x00800000>,
    		      <0x00 0x18000000 0x00 0x08000000>;
    		reg-names = "intd_cfg", "user_cfg", "reg", "mem";
    		interrupt-names = "link_state";
    		interrupts = <GIC_SPI 330 IRQ_TYPE_EDGE_RISING>;
    		ti,syscon-pcie-ctrl = <&scm_conf 0x4074>;
    		max-link-speed = <3>;
    		num-lanes = <2>;
    		power-domains = <&k3_pds 240 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 240 1>;
    		clock-names = "fck";
    		max-functions = /bits/ 8 <6>;
    		max-virtual-functions = /bits/ 16 <4 4 4 4 0 0>;
    		dma-coherent;
    	};
    
    	pcie2_rc: pcie@2920000 {
    		compatible = "ti,j721e-pcie-host";
    		reg = <0x00 0x02920000 0x00 0x1000>,
    		      <0x00 0x02927000 0x00 0x400>,
    		      <0x00 0x0e000000 0x00 0x00800000>,
    		      <0x44 0x00000000 0x00 0x00001000>;
    		reg-names = "intd_cfg", "user_cfg", "reg", "cfg";
    		interrupt-names = "link_state";
    		interrupts = <GIC_SPI 342 IRQ_TYPE_EDGE_RISING>;
    		device_type = "pci";
    		ti,syscon-pcie-ctrl = <&scm_conf 0x4078>;
    		max-link-speed = <3>;
    		num-lanes = <2>;
    		power-domains = <&k3_pds 241 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 241 1>;
    		clock-names = "fck";
    		#address-cells = <3>;
    		#size-cells = <2>;
    		bus-range = <0x0 0xf>;
    		vendor-id = <0x104c>;
    		device-id = <0xb00d>;
    		msi-map = <0x0 &gic_its 0x20000 0x10000>;
    		dma-coherent;
    		ranges = <0x01000000 0x0 0x00001000 0x44 0x00001000 0x0 0x0010000>,
    			 <0x02000000 0x0 0x00011000 0x44 0x00011000 0x0 0x7fef000>;
    		dma-ranges = <0x02000000 0x0 0x0 0x0 0x0 0x10000 0x0>;
    	};
    
    	pcie2_ep: pcie-ep@2920000 {
    		compatible = "ti,j721e-pcie-ep";
    		reg = <0x00 0x02920000 0x00 0x1000>,
    		      <0x00 0x02927000 0x00 0x400>,
    		      <0x00 0x0e000000 0x00 0x00800000>,
    		      <0x44 0x00000000 0x00 0x08000000>;
    		reg-names = "intd_cfg", "user_cfg", "reg", "mem";
    		interrupt-names = "link_state";
    		interrupts = <GIC_SPI 342 IRQ_TYPE_EDGE_RISING>;
    		ti,syscon-pcie-ctrl = <&scm_conf 0x4078>;
    		max-link-speed = <3>;
    		num-lanes = <2>;
    		power-domains = <&k3_pds 241 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 241 1>;
    		clock-names = "fck";
    		max-functions = /bits/ 8 <6>;
    		max-virtual-functions = /bits/ 16 <4 4 4 4 0 0>;
    		dma-coherent;
    	};
    
    	pcie3_rc: pcie@2930000 {
    		compatible = "ti,j721e-pcie-host";
    		reg = <0x00 0x02930000 0x00 0x1000>,
    		      <0x00 0x02937000 0x00 0x400>,
    		      <0x00 0x0e800000 0x00 0x00800000>,
    		      <0x44 0x10000000 0x00 0x00001000>;
    		reg-names = "intd_cfg", "user_cfg", "reg", "cfg";
    		interrupt-names = "link_state";
    		interrupts = <GIC_SPI 354 IRQ_TYPE_EDGE_RISING>;
    		device_type = "pci";
    		ti,syscon-pcie-ctrl = <&scm_conf 0x407c>;
    		max-link-speed = <3>;
    		num-lanes = <2>;
    		power-domains = <&k3_pds 242 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 242 1>;
    		clock-names = "fck";
    		#address-cells = <3>;
    		#size-cells = <2>;
    		bus-range = <0x0 0xf>;
    		vendor-id = <0x104c>;
    		device-id = <0xb00d>;
    		msi-map = <0x0 &gic_its 0x30000 0x10000>;
    		dma-coherent;
    		ranges = <0x01000000 0x0 0x00001000 0x44 0x10001000 0x0 0x0010000>,
    			 <0x02000000 0x0 0x00011000 0x44 0x10011000 0x0 0x7fef000>;
    		dma-ranges = <0x02000000 0x0 0x0 0x0 0x0 0x10000 0x0>;
    	};
    
    	pcie3_ep: pcie-ep@2930000 {
    		compatible = "ti,j721e-pcie-ep";
    		reg = <0x00 0x02930000 0x00 0x1000>,
    		      <0x00 0x02937000 0x00 0x400>,
    		      <0x00 0x0e800000 0x00 0x00800000>,
    		      <0x44 0x10000000 0x00 0x08000000>;
    		reg-names = "intd_cfg", "user_cfg", "reg", "mem";
    		interrupt-names = "link_state";
    		interrupts = <GIC_SPI 354 IRQ_TYPE_EDGE_RISING>;
    		ti,syscon-pcie-ctrl = <&scm_conf 0x407c>;
    		max-link-speed = <3>;
    		num-lanes = <2>;
    		power-domains = <&k3_pds 242 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 242 1>;
    		clock-names = "fck";
    		max-functions = /bits/ 8 <6>;
    		max-virtual-functions = /bits/ 16 <4 4 4 4 0 0>;
    		dma-coherent;
    		#address-cells = <2>;
    		#size-cells = <2>;
    	};
    
    	serdes_wiz4: wiz@5050000 {
    		compatible = "ti,j721e-wiz-10g";
    		#address-cells = <1>;
    		#size-cells = <1>;
    		power-domains = <&k3_pds 297 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 297 1>, <&k3_clks 297 9>, <&cmn_refclk>;
    		clock-names = "fck", "core_ref_clk", "ext_ref_clk";
    		assigned-clocks = <&k3_clks 297 9>;
    		assigned-clock-parents = <&k3_clks 297 10>;
    		assigned-clock-rates = <19200000>;
    		num-lanes = <4>;
    		#reset-cells = <1>;
    		ranges = <0x5050000 0x0 0x5050000 0x10000>,
    			<0xa030a00 0x0 0xa030a00 0x40>;
    
    		wiz4_pll0_refclk: pll0-refclk {
    			clocks = <&k3_clks 297 9>, <&cmn_refclk>;
    			clock-output-names = "wiz4_pll0_refclk";
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz4_pll0_refclk>;
    			assigned-clock-parents = <&k3_clks 297 9>;
    		};
    
    		wiz4_pll1_refclk: pll1-refclk {
    			clocks = <&k3_clks 297 9>, <&cmn_refclk>;
    			clock-output-names = "wiz4_pll1_refclk";
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz4_pll1_refclk>;
    			assigned-clock-parents = <&k3_clks 297 9>;
    		};
    
    		wiz4_refclk_dig: refclk-dig {
    			clocks = <&k3_clks 297 9>, <&cmn_refclk>;
    			clock-output-names = "wiz4_refclk_dig";
    			#clock-cells = <0>;
    			assigned-clocks = <&wiz4_refclk_dig>;
    			assigned-clock-parents = <&k3_clks 297 9>;
    		};
    
    		wiz4_cmn_refclk_dig_div: cmn-refclk-dig-div {
    			clocks = <&wiz4_refclk_dig>;
    			#clock-cells = <0>;
    		};
    
    		wiz4_cmn_refclk1_dig_div: cmn-refclk1-dig-div {
    			clocks = <&wiz4_pll1_refclk>;
    			#clock-cells = <0>;
    		};
    
    		serdes4: serdes@5050000 {
    			/*
    			 * Note: we also map DPTX PHY registers as the Torrent
    			 * needs to manage those.
    			 */
    			compatible = "ti,j721e-serdes-10g";
    			reg = <0x5050000 0x10000>,
    			      <0xa030a00 0x40>; /* DPTX PHY */
    			reg-names = "torrent_phy", "dptx_phy";
    
    			resets = <&serdes_wiz4 0>;
    			reset-names = "torrent_reset";
    			clocks = <&wiz4_pll0_refclk>;
    			clock-names = "refclk";
    			#address-cells = <1>;
    			#size-cells = <0>;
    			torrent_phy_dp: phy@0 {
    				reg = <0>;
    				resets = <&serdes_wiz4 1>;
    				cdns,phy-type = <PHY_TYPE_DP>;
    				cdns,num-lanes = <4>;
    				cdns,max-bit-rate = <5400>;
    				#phy-cells = <0>;
    			};
    		};
    	};
    
    	main_uart0: serial@2800000 {
    		compatible = "ti,j721e-uart", "ti,am654-uart";
    		reg = <0x00 0x02800000 0x00 0x100>;
    		interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
    		clock-frequency = <48000000>;
    		current-speed = <115200>;
    		power-domains = <&k3_pds 146 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 146 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart1: serial@2810000 {
    		compatible = "ti,j721e-uart", "ti,am654-uart";
    		reg = <0x00 0x02810000 0x00 0x100>;
    		interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>;
    		clock-frequency = <48000000>;
    		current-speed = <115200>;
    		power-domains = <&k3_pds 278 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 278 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart2: serial@2820000 {
    		compatible = "ti,j721e-uart", "ti,am654-uart";
    		reg = <0x00 0x02820000 0x00 0x100>;
    		interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>;
    		clock-frequency = <48000000>;
    		current-speed = <115200>;
    		power-domains = <&k3_pds 279 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 279 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart3: serial@2830000 {
    		compatible = "ti,j721e-uart", "ti,am654-uart";
    		reg = <0x00 0x02830000 0x00 0x100>;
    		interrupts = <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>;
    		clock-frequency = <48000000>;
    		current-speed = <115200>;
    		power-domains = <&k3_pds 280 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 280 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart4: serial@2840000 {
    		compatible = "ti,j721e-uart", "ti,am654-uart";
    		reg = <0x00 0x02840000 0x00 0x100>;
    		interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>;
    		clock-frequency = <48000000>;
    		current-speed = <115200>;
    		power-domains = <&k3_pds 281 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 281 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart5: serial@2850000 {
    		compatible = "ti,j721e-uart", "ti,am654-uart";
    		reg = <0x00 0x02850000 0x00 0x100>;
    		interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>;
    		clock-frequency = <48000000>;
    		current-speed = <115200>;
    		power-domains = <&k3_pds 282 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 282 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart6: serial@2860000 {
    		compatible = "ti,j721e-uart", "ti,am654-uart";
    		reg = <0x00 0x02860000 0x00 0x100>;
    		interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>;
    		clock-frequency = <48000000>;
    		current-speed = <115200>;
    		power-domains = <&k3_pds 283 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 283 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart7: serial@2870000 {
    		compatible = "ti,j721e-uart", "ti,am654-uart";
    		reg = <0x00 0x02870000 0x00 0x100>;
    		interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>;
    		clock-frequency = <48000000>;
    		current-speed = <115200>;
    		power-domains = <&k3_pds 284 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 284 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart8: serial@2880000 {
    		compatible = "ti,j721e-uart", "ti,am654-uart";
    		reg = <0x00 0x02880000 0x00 0x100>;
    		interrupts = <GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>;
    		clock-frequency = <48000000>;
    		current-speed = <115200>;
    		power-domains = <&k3_pds 285 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 285 0>;
    		clock-names = "fclk";
    	};
    
    	main_uart9: serial@2890000 {
    		compatible = "ti,j721e-uart", "ti,am654-uart";
    		reg = <0x00 0x02890000 0x00 0x100>;
    		interrupts = <GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH>;
    		clock-frequency = <48000000>;
    		current-speed = <115200>;
    		power-domains = <&k3_pds 286 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 286 0>;
    		clock-names = "fclk";
    	};
    
    	main_gpio0: gpio@600000 {
    		compatible = "ti,j721e-gpio", "ti,keystone-gpio";
    		reg = <0x0 0x00600000 0x0 0x100>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		interrupt-parent = <&main_gpio_intr>;
    		interrupts = <256>, <257>, <258>, <259>,
    			     <260>, <261>, <262>, <263>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    		ti,ngpio = <128>;
    		ti,davinci-gpio-unbanked = <0>;
    		power-domains = <&k3_pds 105 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 105 0>;
    		clock-names = "gpio";
    
    		// phy0-reset-hog {
    		// 	gpio-hog;
    		// 	gpios = <8 0>;
    		// 	output-high;
    		// 	line-name = "phy0-reset";
    		// };
    
    		// phy4-reset-hog {
    		// 	gpio-hog;
    		// 	gpios = <9 0>;
    		// 	output-high;
    		// 	line-name = "phy4-reset";
    		// };
    
    		// phy5-reset-hog {
    		// 	gpio-hog;
    		// 	gpios = <10 0>;
    		// 	output-high;
    		// 	line-name = "phy5-reset";
    		// };
    	};
    
    	main_gpio1: gpio@601000 {
    		compatible = "ti,j721e-gpio", "ti,keystone-gpio";
    		reg = <0x0 0x00601000 0x0 0x100>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		interrupt-parent = <&main_gpio_intr>;
    		interrupts = <288>, <289>, <290>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    		ti,ngpio = <36>;
    		ti,davinci-gpio-unbanked = <0>;
    		power-domains = <&k3_pds 106 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 106 0>;
    		clock-names = "gpio";
    	};
    
    	main_gpio2: gpio@610000 {
    		compatible = "ti,j721e-gpio", "ti,keystone-gpio";
    		reg = <0x0 0x00610000 0x0 0x100>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		interrupt-parent = <&main_gpio_intr>;
    		interrupts = <264>, <265>, <266>, <267>,
    			     <268>, <269>, <270>, <271>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    		ti,ngpio = <128>;
    		ti,davinci-gpio-unbanked = <0>;
    		power-domains = <&k3_pds 107 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 107 0>;
    		clock-names = "gpio";
    	};
    
    	main_gpio3: gpio@611000 {
    		compatible = "ti,j721e-gpio", "ti,keystone-gpio";
    		reg = <0x0 0x00611000 0x0 0x100>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		interrupt-parent = <&main_gpio_intr>;
    		interrupts = <292>, <293>, <294>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    		ti,ngpio = <36>;
    		ti,davinci-gpio-unbanked = <0>;
    		power-domains = <&k3_pds 108 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 108 0>;
    		clock-names = "gpio";
    	};
    
    	main_gpio4: gpio@620000 {
    		compatible = "ti,j721e-gpio", "ti,keystone-gpio";
    		reg = <0x0 0x00620000 0x0 0x100>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		interrupt-parent = <&main_gpio_intr>;
    		interrupts = <272>, <273>, <274>, <275>,
    			     <276>, <277>, <278>, <279>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    		ti,ngpio = <128>;
    		ti,davinci-gpio-unbanked = <0>;
    		power-domains = <&k3_pds 109 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 109 0>;
    		clock-names = "gpio";
    	};
    
    	main_gpio5: gpio@621000 {
    		compatible = "ti,j721e-gpio", "ti,keystone-gpio";
    		reg = <0x0 0x00621000 0x0 0x100>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		interrupt-parent = <&main_gpio_intr>;
    		interrupts = <296>, <297>, <298>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    		ti,ngpio = <36>;
    		ti,davinci-gpio-unbanked = <0>;
    		power-domains = <&k3_pds 110 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 110 0>;
    		clock-names = "gpio";
    	};
    
    	main_gpio6: gpio@630000 {
    		compatible = "ti,j721e-gpio", "ti,keystone-gpio";
    		reg = <0x0 0x00630000 0x0 0x100>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		interrupt-parent = <&main_gpio_intr>;
    		interrupts = <280>, <281>, <282>, <283>,
    			     <284>, <285>, <286>, <287>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    		ti,ngpio = <128>;
    		ti,davinci-gpio-unbanked = <0>;
    		power-domains = <&k3_pds 111 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 111 0>;
    		clock-names = "gpio";
    	};
    
    	main_gpio7: gpio@631000 {
    		compatible = "ti,j721e-gpio", "ti,keystone-gpio";
    		reg = <0x0 0x00631000 0x0 0x100>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		interrupt-parent = <&main_gpio_intr>;
    		interrupts = <300>, <301>, <302>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    		ti,ngpio = <36>;
    		ti,davinci-gpio-unbanked = <0>;
    		power-domains = <&k3_pds 112 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 112 0>;
    		clock-names = "gpio";
    	};
    
    	main_sdhci0: mmc@4f80000 {
    		compatible = "ti,j721e-sdhci-8bit";
    		reg = <0x0 0x4f80000 0x0 0x1000>, <0x0 0x4f88000 0x0 0x400>;
    		interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
    		power-domains = <&k3_pds 91 TI_SCI_PD_EXCLUSIVE>;
    		clock-names = "clk_ahb", "clk_xin";
    		clocks = <&k3_clks 91 0>, <&k3_clks 91 1>;
    		assigned-clocks = <&k3_clks 91 1>;
    		assigned-clock-parents = <&k3_clks 91 2>;
    		bus-width = <8>;
    		mmc-hs200-1_8v;
    		mmc-ddr-1_8v;
    		ti,otap-del-sel-legacy = <0xf>;
    		ti,otap-del-sel-mmc-hs = <0xf>;
    		ti,otap-del-sel-ddr52 = <0x5>;
    		ti,otap-del-sel-hs200 = <0x6>;
    		ti,otap-del-sel-hs400 = <0x0>;
    		ti,itap-del-sel-legacy = <0x10>;
    		ti,itap-del-sel-mmc-hs = <0xa>;
    		ti,itap-del-sel-ddr52 = <0x3>;
    		ti,trm-icp = <0x8>;
    		ti,strobe-sel = <0x77>;
    		dma-coherent;
    	};
    
    	main_sdhci1: mmc@4fb0000 {
    		compatible = "ti,j721e-sdhci-4bit";
    		reg = <0x0 0x04fb0000 0x0 0x1000>, <0x0 0x4fb8000 0x0 0x400>;
    		interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
    		power-domains = <&k3_pds 92 TI_SCI_PD_EXCLUSIVE>;
    		clock-names = "clk_ahb", "clk_xin";
    		clocks = <&k3_clks 92 5>, <&k3_clks 92 0>;
    		assigned-clocks = <&k3_clks 92 0>;
    		assigned-clock-parents = <&k3_clks 92 1>;
    		ti,otap-del-sel-legacy = <0x0>;
    		ti,otap-del-sel-sd-hs = <0xf>;
    		ti,otap-del-sel-sdr12 = <0xf>;
    		ti,otap-del-sel-sdr25 = <0xf>;
    		ti,otap-del-sel-sdr50 = <0xc>;
    		ti,otap-del-sel-ddr50 = <0xc>;
    		ti,itap-del-sel-legacy = <0x0>;
    		ti,itap-del-sel-sd-hs = <0x0>;
    		ti,itap-del-sel-sdr12 = <0x0>;
    		ti,itap-del-sel-sdr25 = <0x0>;
    		ti,itap-del-sel-ddr50 = <0x2>;
    		ti,trm-icp = <0x8>;
    		ti,clkbuf-sel = <0x7>;
    		dma-coherent;
    		sdhci-caps-mask = <0x2 0x0>;
    	};
    
    	main_sdhci2: mmc@4f98000 {
    		compatible = "ti,j721e-sdhci-4bit";
    		reg = <0x0 0x4f98000 0x0 0x1000>, <0x0 0x4f90000 0x0 0x400>;
    		interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
    		power-domains = <&k3_pds 93 TI_SCI_PD_EXCLUSIVE>;
    		clock-names = "clk_ahb", "clk_xin";
    		clocks = <&k3_clks 93 5>, <&k3_clks 93 0>;
    		assigned-clocks = <&k3_clks 93 0>;
    		assigned-clock-parents = <&k3_clks 93 1>;
    		ti,otap-del-sel-legacy = <0x0>;
    		ti,otap-del-sel-sd-hs = <0xf>;
    		ti,otap-del-sel-sdr12 = <0xf>;
    		ti,otap-del-sel-sdr25 = <0xf>;
    		ti,otap-del-sel-sdr50 = <0xc>;
    		ti,otap-del-sel-ddr50 = <0xc>;
    		ti,itap-del-sel-legacy = <0x0>;
    		ti,itap-del-sel-sd-hs = <0x0>;
    		ti,itap-del-sel-sdr12 = <0x0>;
    		ti,itap-del-sel-sdr25 = <0x0>;
    		ti,itap-del-sel-ddr50 = <0x2>;
    		ti,trm-icp = <0x8>;
    		ti,clkbuf-sel = <0x7>;
    		dma-coherent;
    		sdhci-caps-mask = <0x2 0x0>;
    	};
    
    	usbss0: cdns-usb@4104000 {
    		compatible = "ti,j721e-usb";
    		reg = <0x00 0x4104000 0x00 0x100>;
    		dma-coherent;
    		power-domains = <&k3_pds 288 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 288 15>, <&k3_clks 288 3>;
    		clock-names = "ref", "lpm";
    		assigned-clocks = <&k3_clks 288 15>;	/* USB2_REFCLK */
    		assigned-clock-parents = <&k3_clks 288 16>; /* HFOSC0 */
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    
    		usb0: usb@6000000 {
    			compatible = "cdns,usb3";
    			reg = <0x00 0x6000000 0x00 0x10000>,
    			      <0x00 0x6010000 0x00 0x10000>,
    			      <0x00 0x6020000 0x00 0x10000>;
    			reg-names = "otg", "xhci", "dev";
    			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,	/* irq.0 */
    				     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,	/* irq.6 */
    				     <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;	/* otgirq.0 */
    			interrupt-names = "host",
    					  "peripheral",
    					  "otg";
    			maximum-speed = "super-speed";
    			dr_mode = "otg";
    		};
    	};
    
    	usbss1: cdns-usb@4114000 {
    		compatible = "ti,j721e-usb";
    		reg = <0x00 0x4114000 0x00 0x100>;
    		dma-coherent;
    		power-domains = <&k3_pds 289 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 289 15>, <&k3_clks 289 3>;
    		clock-names = "ref", "lpm";
    		assigned-clocks = <&k3_clks 289 15>;	/* USB2_REFCLK */
    		assigned-clock-parents = <&k3_clks 289 16>; /* HFOSC0 */
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    
    		usb1: usb@6400000 {
    			compatible = "cdns,usb3";
    			reg = <0x00 0x6400000 0x00 0x10000>,
    			      <0x00 0x6410000 0x00 0x10000>,
    			      <0x00 0x6420000 0x00 0x10000>;
    			reg-names = "otg", "xhci", "dev";
    			interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,	/* irq.0 */
    				     <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,	/* irq.6 */
    				     <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;	/* otgirq.0 */
    			interrupt-names = "host",
    					  "peripheral",
    					  "otg";
    			maximum-speed = "super-speed";
    			dr_mode = "otg";
    		};
    	};
    
    	main_i2c0: i2c@2000000 {
    		compatible = "ti,j721e-i2c", "ti,omap4-i2c";
    		reg = <0x0 0x2000000 0x0 0x100>;
    		interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		clock-names = "fck";
    		clocks = <&k3_clks 187 0>;
    		power-domains = <&k3_pds 187 TI_SCI_PD_SHARED>;
    	};
    
    	main_i2c1: i2c@2010000 {
    		compatible = "ti,j721e-i2c", "ti,omap4-i2c";
    		reg = <0x0 0x2010000 0x0 0x100>;
    		interrupts = <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		clock-names = "fck";
    		clocks = <&k3_clks 188 0>;
    		power-domains = <&k3_pds 188 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	main_i2c2: i2c@2020000 {
    		compatible = "ti,j721e-i2c", "ti,omap4-i2c";
    		reg = <0x0 0x2020000 0x0 0x100>;
    		interrupts = <GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		clock-names = "fck";
    		clocks = <&k3_clks 189 0>;
    		power-domains = <&k3_pds 189 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	main_i2c3: i2c@2030000 {
    		compatible = "ti,j721e-i2c", "ti,omap4-i2c";
    		reg = <0x0 0x2030000 0x0 0x100>;
    		interrupts = <GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		clock-names = "fck";
    		clocks = <&k3_clks 190 0>;
    		power-domains = <&k3_pds 190 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	main_i2c4: i2c@2040000 {
    		compatible = "ti,j721e-i2c", "ti,omap4-i2c";
    		reg = <0x0 0x2040000 0x0 0x100>;
    		interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		clock-names = "fck";
    		clocks = <&k3_clks 191 0>;
    		power-domains = <&k3_pds 191 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	main_i2c5: i2c@2050000 {
    		compatible = "ti,j721e-i2c", "ti,omap4-i2c";
    		reg = <0x0 0x2050000 0x0 0x100>;
    		interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		clock-names = "fck";
    		clocks = <&k3_clks 192 0>;
    		power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	main_i2c6: i2c@2060000 {
    		compatible = "ti,j721e-i2c", "ti,omap4-i2c";
    		reg = <0x0 0x2060000 0x0 0x100>;
    		interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		clock-names = "fck";
    		clocks = <&k3_clks 193 0>;
    		power-domains = <&k3_pds 193 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	ufs_wrapper: ufs-wrapper@4e80000 {
    		compatible = "ti,j721e-ufs";
    		reg = <0x0 0x4e80000 0x0 0x100>;
    		power-domains = <&k3_pds 277 TI_SCI_PD_EXCLUSIVE>;
    		clocks = <&k3_clks 277 1>;
    		assigned-clocks = <&k3_clks 277 1>;
    		assigned-clock-parents = <&k3_clks 277 4>;
    		ranges;
    		#address-cells = <2>;
    		#size-cells = <2>;
    
    		ufs@4e84000 {
    			compatible = "cdns,ufshc-m31-16nm", "jedec,ufs-2.0";
    			reg = <0x0 0x4e84000 0x0 0x10000>;
    			interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
    			freq-table-hz = <250000000 250000000>, <19200000 19200000>, <19200000 19200000>;
    			clocks = <&k3_clks 277 0>, <&k3_clks 277 1>, <&k3_clks 277 1>;
    			clock-names = "core_clk", "phy_clk", "ref_clk";
    			dma-coherent;
    		};
    	};
    
    	mhdp: dp-bridge@a000000 {
    		compatible = "ti,j721e-mhdp8546";
    		/*
    		 * Note: we do not map DPTX PHY area, as that is handled by
    		 * the PHY driver.
    		 */
    		reg = <0x0 0xa000000 0x0 0x30a00>, /* DSS_EDP0_V2A_CORE_VP_REGS_APB */
    		      <0x0 0x4f40000 0x0 0x20>;    /* DSS_EDP0_INTG_CFG_VP */
    		reg-names = "mhdptx", "j721e-intg";
    
    		clocks = <&k3_clks 151 36>;
    
    		phys = <&torrent_phy_dp>;
    		phy-names = "dpphy";
    
    		interrupt-parent = <&gic500>;
    		interrupts = <GIC_SPI 614 IRQ_TYPE_LEVEL_HIGH>;
    
    		power-domains = <&k3_pds 151 TI_SCI_PD_EXCLUSIVE>;
    
    		dp0_ports: ports {
    			#address-cells = <1>;
    			#size-cells = <0>;
    		};
    	};
    
    	dss: dss@4a00000 {
    		compatible = "ti,j721e-dss";
    		reg =
    			<0x00 0x04a00000 0x00 0x10000>, /* common_m */
    			<0x00 0x04a10000 0x00 0x10000>, /* common_s0*/
    			<0x00 0x04b00000 0x00 0x10000>, /* common_s1*/
    			<0x00 0x04b10000 0x00 0x10000>, /* common_s2*/
    
    			<0x00 0x04a20000 0x00 0x10000>, /* vidl1 */
    			<0x00 0x04a30000 0x00 0x10000>, /* vidl2 */
    			<0x00 0x04a50000 0x00 0x10000>, /* vid1 */
    			<0x00 0x04a60000 0x00 0x10000>, /* vid2 */
    
    			<0x00 0x04a70000 0x00 0x10000>, /* ovr1 */
    			<0x00 0x04a90000 0x00 0x10000>, /* ovr2 */
    			<0x00 0x04ab0000 0x00 0x10000>, /* ovr3 */
    			<0x00 0x04ad0000 0x00 0x10000>, /* ovr4 */
    
    			<0x00 0x04a80000 0x00 0x10000>, /* vp1 */
    			<0x00 0x04aa0000 0x00 0x10000>, /* vp2 */
    			<0x00 0x04ac0000 0x00 0x10000>, /* vp3 */
    			<0x00 0x04ae0000 0x00 0x10000>, /* vp4 */
    			<0x00 0x04af0000 0x00 0x10000>; /* wb */
    
    		reg-names = "common_m", "common_s0",
    			"common_s1", "common_s2",
    			"vidl1", "vidl2","vid1","vid2",
    			"ovr1", "ovr2", "ovr3", "ovr4",
    			"vp1", "vp2", "vp3", "vp4",
    			"wb";
    
    		clocks =	<&k3_clks 152 0>,
    				<&k3_clks 152 1>,
    				<&k3_clks 152 4>,
    				<&k3_clks 152 9>,
    				<&k3_clks 152 13>;
    		clock-names = "fck", "vp1", "vp2", "vp3", "vp4";
    
    		power-domains = <&k3_pds 152 TI_SCI_PD_EXCLUSIVE>;
    
    		interrupts = <GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>,
    			     <GIC_SPI 603 IRQ_TYPE_LEVEL_HIGH>,
    			     <GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>,
    			     <GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH>;
    		interrupt-names = "common_m",
    				  "common_s0",
    				  "common_s1",
    				  "common_s2";
    
    		dss_ports: ports {
    			#address-cells = <1>;
    			#size-cells = <0>;
    		};
    	};
    
    	mcasp0: mcasp@2b00000 {
    		compatible = "ti,am33xx-mcasp-audio";
    		reg = <0x0 0x02b00000 0x0 0x2000>,
    			<0x0 0x02b08000 0x0 0x1000>;
    		reg-names = "mpu","dat";
    		interrupts = <GIC_SPI 544 IRQ_TYPE_LEVEL_HIGH>,
    				<GIC_SPI 545 IRQ_TYPE_LEVEL_HIGH>;
    		interrupt-names = "tx", "rx";
    
    		dmas = <&main_udmap 0xc400>, <&main_udmap 0x4400>;
    		dma-names = "tx", "rx";
    
    		clocks = <&k3_clks 174 1>;
    		clock-names = "fck";
    		power-domains = <&k3_pds 174 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	mcasp1: mcasp@2b10000 {
    		compatible = "ti,am33xx-mcasp-audio";
    		reg = <0x0 0x02b10000 0x0 0x2000>,
    			<0x0 0x02b18000 0x0 0x1000>;
    		reg-names = "mpu","dat";
    		interrupts = <GIC_SPI 546 IRQ_TYPE_LEVEL_HIGH>,
    				<GIC_SPI 547 IRQ_TYPE_LEVEL_HIGH>;
    		interrupt-names = "tx", "rx";
    
    		dmas = <&main_udmap 0xc401>, <&main_udmap 0x4401>;
    		dma-names = "tx", "rx";
    
    		clocks = <&k3_clks 175 1>;
    		clock-names = "fck";
    		power-domains = <&k3_pds 175 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	mcasp2: mcasp@2b20000 {
    		compatible = "ti,am33xx-mcasp-audio";
    		reg = <0x0 0x02b20000 0x0 0x2000>,
    			<0x0 0x02b28000 0x0 0x1000>;
    		reg-names = "mpu","dat";
    		interrupts = <GIC_SPI 548 IRQ_TYPE_LEVEL_HIGH>,
    				<GIC_SPI 549 IRQ_TYPE_LEVEL_HIGH>;
    		interrupt-names = "tx", "rx";
    
    		dmas = <&main_udmap 0xc402>, <&main_udmap 0x4402>;
    		dma-names = "tx", "rx";
    
    		clocks = <&k3_clks 176 1>;
    		clock-names = "fck";
    		power-domains = <&k3_pds 176 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	mcasp3: mcasp@2b30000 {
    		compatible = "ti,am33xx-mcasp-audio";
    		reg = <0x0 0x02b30000 0x0 0x2000>,
    			<0x0 0x02b38000 0x0 0x1000>;
    		reg-names = "mpu","dat";
    		interrupts = <GIC_SPI 550 IRQ_TYPE_LEVEL_HIGH>,
    				<GIC_SPI 551 IRQ_TYPE_LEVEL_HIGH>;
    		interrupt-names = "tx", "rx";
    
    		dmas = <&main_udmap 0xc500>, <&main_udmap 0x4500>;
    		dma-names = "tx", "rx";
    
    		clocks = <&k3_clks 177 1>;
    		clock-names = "fck";
    		power-domains = <&k3_pds 177 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	mcasp4: mcasp@2b40000 {
    		compatible = "ti,am33xx-mcasp-audio";
    		reg = <0x0 0x02b40000 0x0 0x2000>,
    			<0x0 0x02b48000 0x0 0x1000>;
    		reg-names = "mpu","dat";
    		interrupts = <GIC_SPI 552 IRQ_TYPE_LEVEL_HIGH>,
    				<GIC_SPI 553 IRQ_TYPE_LEVEL_HIGH>;
    		interrupt-names = "tx", "rx";
    
    		dmas = <&main_udmap 0xc501>, <&main_udmap 0x4501>;
    		dma-names = "tx", "rx";
    
    		clocks = <&k3_clks 178 1>;
    		clock-names = "fck";
    		power-domains = <&k3_pds 178 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	mcasp5: mcasp@2b50000 {
    		compatible = "ti,am33xx-mcasp-audio";
    		reg = <0x0 0x02b50000 0x0 0x2000>,
    			<0x0 0x02b58000 0x0 0x1000>;
    		reg-names = "mpu","dat";
    		interrupts = <GIC_SPI 554 IRQ_TYPE_LEVEL_HIGH>,
    				<GIC_SPI 555 IRQ_TYPE_LEVEL_HIGH>;
    		interrupt-names = "tx", "rx";
    
    		dmas = <&main_udmap 0xc502>, <&main_udmap 0x4502>;
    		dma-names = "tx", "rx";
    
    		clocks = <&k3_clks 179 1>;
    		clock-names = "fck";
    		power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	mcasp6: mcasp@2b60000 {
    		compatible = "ti,am33xx-mcasp-audio";
    		reg = <0x0 0x02b60000 0x0 0x2000>,
    			<0x0 0x02b68000 0x0 0x1000>;
    		reg-names = "mpu","dat";
    		interrupts = <GIC_SPI 556 IRQ_TYPE_LEVEL_HIGH>,
    				<GIC_SPI 557 IRQ_TYPE_LEVEL_HIGH>;
    		interrupt-names = "tx", "rx";
    
    		dmas = <&main_udmap 0xc503>, <&main_udmap 0x4503>;
    		dma-names = "tx", "rx";
    
    		clocks = <&k3_clks 180 1>;
    		clock-names = "fck";
    		power-domains = <&k3_pds 180 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	mcasp7: mcasp@2b70000 {
    		compatible = "ti,am33xx-mcasp-audio";
    		reg = <0x0 0x02b70000 0x0 0x2000>,
    			<0x0 0x02b78000 0x0 0x1000>;
    		reg-names = "mpu","dat";
    		interrupts = <GIC_SPI 558 IRQ_TYPE_LEVEL_HIGH>,
    				<GIC_SPI 559 IRQ_TYPE_LEVEL_HIGH>;
    		interrupt-names = "tx", "rx";
    
    		dmas = <&main_udmap 0xc504>, <&main_udmap 0x4504>;
    		dma-names = "tx", "rx";
    
    		clocks = <&k3_clks 181 1>;
    		clock-names = "fck";
    		power-domains = <&k3_pds 181 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	mcasp8: mcasp@2b80000 {
    		compatible = "ti,am33xx-mcasp-audio";
    		reg = <0x0 0x02b80000 0x0 0x2000>,
    			<0x0 0x02b88000 0x0 0x1000>;
    		reg-names = "mpu","dat";
    		interrupts = <GIC_SPI 560 IRQ_TYPE_LEVEL_HIGH>,
    				<GIC_SPI 561 IRQ_TYPE_LEVEL_HIGH>;
    		interrupt-names = "tx", "rx";
    
    		dmas = <&main_udmap 0xc505>, <&main_udmap 0x4505>;
    		dma-names = "tx", "rx";
    
    		clocks = <&k3_clks 182 1>;
    		clock-names = "fck";
    		power-domains = <&k3_pds 182 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	mcasp9: mcasp@2b90000 {
    		compatible = "ti,am33xx-mcasp-audio";
    		reg = <0x0 0x02b90000 0x0 0x2000>,
    			<0x0 0x02b98000 0x0 0x1000>;
    		reg-names = "mpu","dat";
    		interrupts = <GIC_SPI 562 IRQ_TYPE_LEVEL_HIGH>,
    				<GIC_SPI 563 IRQ_TYPE_LEVEL_HIGH>;
    		interrupt-names = "tx", "rx";
    
    		dmas = <&main_udmap 0xc506>, <&main_udmap 0x4506>;
    		dma-names = "tx", "rx";
    
    		clocks = <&k3_clks 183 1>;
    		clock-names = "fck";
    		power-domains = <&k3_pds 183 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	mcasp10: mcasp@2ba0000 {
    		compatible = "ti,am33xx-mcasp-audio";
    		reg = <0x0 0x02ba0000 0x0 0x2000>,
    			<0x0 0x02ba8000 0x0 0x1000>;
    		reg-names = "mpu","dat";
    		interrupts = <GIC_SPI 564 IRQ_TYPE_LEVEL_HIGH>,
    				<GIC_SPI 565 IRQ_TYPE_LEVEL_HIGH>;
    		interrupt-names = "tx", "rx";
    
    		dmas = <&main_udmap 0xc507>, <&main_udmap 0x4507>;
    		dma-names = "tx", "rx";
    
    		clocks = <&k3_clks 184 1>;
    		clock-names = "fck";
    		power-domains = <&k3_pds 184 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	mcasp11: mcasp@2bb0000 {
    		compatible = "ti,am33xx-mcasp-audio";
    		reg = <0x0 0x02bb0000 0x0 0x2000>,
    			<0x0 0x02bb8000 0x0 0x1000>;
    		reg-names = "mpu","dat";
    		interrupts = <GIC_SPI 566 IRQ_TYPE_LEVEL_HIGH>,
    				<GIC_SPI 567 IRQ_TYPE_LEVEL_HIGH>;
    		interrupt-names = "tx", "rx";
    
    		dmas = <&main_udmap 0xc508>, <&main_udmap 0x4508>;
    		dma-names = "tx", "rx";
    
    		clocks = <&k3_clks 185 1>;
    		clock-names = "fck";
    		power-domains = <&k3_pds 185 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	watchdog0: watchdog@2200000 {
    		compatible = "ti,j7-rti-wdt";
    		reg = <0x0 0x2200000 0x0 0x100>;
    		clocks = <&k3_clks 252 1>;
    		power-domains = <&k3_pds 252 TI_SCI_PD_EXCLUSIVE>;
    		assigned-clocks = <&k3_clks 252 1>;
    		assigned-clock-parents = <&k3_clks 252 5>;
    	};
    
    	watchdog1: watchdog@2210000 {
    		compatible = "ti,j7-rti-wdt";
    		reg = <0x0 0x2210000 0x0 0x100>;
    		clocks = <&k3_clks 253 1>;
    		power-domains = <&k3_pds 253 TI_SCI_PD_EXCLUSIVE>;
    		assigned-clocks = <&k3_clks 253 1>;
    		assigned-clock-parents = <&k3_clks 253 5>;
    	};
    
    	main_r5fss0: r5fss@5c00000 {
    		compatible = "ti,j721e-r5fss";
    		ti,cluster-mode = <1>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges = <0x5c00000 0x00 0x5c00000 0x20000>,
    			 <0x5d00000 0x00 0x5d00000 0x20000>;
    		power-domains = <&k3_pds 243 TI_SCI_PD_EXCLUSIVE>;
    
    		main_r5fss0_core0: r5f@5c00000 {
    			compatible = "ti,j721e-r5f";
    			reg = <0x5c00000 0x00008000>,
    			      <0x5c10000 0x00008000>;
    			reg-names = "atcm", "btcm";
    			ti,sci = <&dmsc>;
    			ti,sci-dev-id = <245>;
    			ti,sci-proc-ids = <0x06 0xff>;
    			resets = <&k3_reset 245 1>;
    			firmware-name = "j7-main-r5f0_0-fw";
    			ti,atcm-enable = <1>;
    			ti,btcm-enable = <1>;
    			ti,loczrama = <1>;
    		};
    
    		main_r5fss0_core1: r5f@5d00000 {
    			compatible = "ti,j721e-r5f";
    			reg = <0x5d00000 0x00008000>,
    			      <0x5d10000 0x00008000>;
    			reg-names = "atcm", "btcm";
    			ti,sci = <&dmsc>;
    			ti,sci-dev-id = <246>;
    			ti,sci-proc-ids = <0x07 0xff>;
    			resets = <&k3_reset 246 1>;
    			firmware-name = "j7-main-r5f0_1-fw";
    			ti,atcm-enable = <1>;
    			ti,btcm-enable = <1>;
    			ti,loczrama = <1>;
    		};
    	};
    
    	main_r5fss1: r5fss@5e00000 {
    		compatible = "ti,j721e-r5fss";
    		ti,cluster-mode = <1>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges = <0x5e00000 0x00 0x5e00000 0x20000>,
    			 <0x5f00000 0x00 0x5f00000 0x20000>;
    		power-domains = <&k3_pds 244 TI_SCI_PD_EXCLUSIVE>;
    
    		main_r5fss1_core0: r5f@5e00000 {
    			compatible = "ti,j721e-r5f";
    			reg = <0x5e00000 0x00008000>,
    			      <0x5e10000 0x00008000>;
    			reg-names = "atcm", "btcm";
    			ti,sci = <&dmsc>;
    			ti,sci-dev-id = <247>;
    			ti,sci-proc-ids = <0x08 0xff>;
    			resets = <&k3_reset 247 1>;
    			firmware-name = "j7-main-r5f1_0-fw";
    			ti,atcm-enable = <1>;
    			ti,btcm-enable = <1>;
    			ti,loczrama = <1>;
    		};
    
    		main_r5fss1_core1: r5f@5f00000 {
    			compatible = "ti,j721e-r5f";
    			reg = <0x5f00000 0x00008000>,
    			      <0x5f10000 0x00008000>;
    			reg-names = "atcm", "btcm";
    			ti,sci = <&dmsc>;
    			ti,sci-dev-id = <248>;
    			ti,sci-proc-ids = <0x09 0xff>;
    			resets = <&k3_reset 248 1>;
    			firmware-name = "j7-main-r5f1_1-fw";
    			ti,atcm-enable = <1>;
    			ti,btcm-enable = <1>;
    			ti,loczrama = <1>;
    		};
    	};
    
    	c66_0: dsp@4d80800000 {
    		compatible = "ti,j721e-c66-dsp";
    		reg = <0x4d 0x80800000 0x00 0x00048000>,
    		      <0x4d 0x80e00000 0x00 0x00008000>,
    		      <0x4d 0x80f00000 0x00 0x00008000>;
    		reg-names = "l2sram", "l1pram", "l1dram";
    		ti,sci = <&dmsc>;
    		ti,sci-dev-id = <142>;
    		ti,sci-proc-ids = <0x03 0xff>;
    		resets = <&k3_reset 142 1>;
    		firmware-name = "j7-c66_0-fw";
    	};
    
    	c66_1: dsp@4d81800000 {
    		compatible = "ti,j721e-c66-dsp";
    		reg = <0x4d 0x81800000 0x00 0x00048000>,
    		      <0x4d 0x81e00000 0x00 0x00008000>,
    		      <0x4d 0x81f00000 0x00 0x00008000>;
    		reg-names = "l2sram", "l1pram", "l1dram";
    		ti,sci = <&dmsc>;
    		ti,sci-dev-id = <143>;
    		ti,sci-proc-ids = <0x04 0xff>;
    		resets = <&k3_reset 143 1>;
    		firmware-name = "j7-c66_1-fw";
    	};
    
    	c71_0: dsp@64800000 {
    		compatible = "ti,j721e-c71-dsp";
    		reg = <0x00 0x64800000 0x00 0x00080000>,
    		      <0x00 0x64e00000 0x00 0x0000c000>;
    		reg-names = "l2sram", "l1dram";
    		ti,sci = <&dmsc>;
    		ti,sci-dev-id = <15>;
    		ti,sci-proc-ids = <0x30 0xff>;
    		resets = <&k3_reset 15 1>;
    		firmware-name = "j7-c71_0-fw";
    	};
    
    	icssg0: icssg@b000000 {
    		compatible = "ti,j721e-icssg";
    		reg = <0x00 0xb000000 0x00 0x80000>;
    		power-domains = <&k3_pds 119 TI_SCI_PD_EXCLUSIVE>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges = <0x0 0x00 0x0b000000 0x100000>;
    
    		icssg0_mem: memories@0 {
    			reg = <0x0 0x2000>,
    			      <0x2000 0x2000>,
    			      <0x10000 0x10000>;
    			reg-names = "dram0", "dram1",
    				    "shrdram2";
    		};
    
    		icssg0_cfg: cfg@26000 {
    			compatible = "ti,pruss-cfg", "syscon";
    			reg = <0x26000 0x200>;
    			#address-cells = <1>;
    			#size-cells = <1>;
    			ranges = <0x0 0x26000 0x2000>;
    
    			clocks {
    				#address-cells = <1>;
    				#size-cells = <0>;
    
    				icssg0_coreclk_mux: coreclk-mux@3c {
    					reg = <0x3c>;
    					#clock-cells = <0>;
    					clocks = <&k3_clks 119 24>, /* icssg0_core_clk */
    						 <&k3_clks 119 1>;  /* icssg0_iclk */
    					assigned-clocks = <&icssg0_coreclk_mux>;
    					assigned-clock-parents = <&k3_clks 119 1>;
    				};
    
    				icssg0_iepclk_mux: iepclk-mux@30 {
    					reg = <0x30>;
    					#clock-cells = <0>;
    					clocks = <&k3_clks 119 3>,	/* icssg0_iep_clk */
    						 <&icssg0_coreclk_mux>;	/* core_clk */
    					assigned-clocks = <&icssg0_iepclk_mux>;
    					assigned-clock-parents = <&icssg0_coreclk_mux>;
    				};
    			};
    		};
    
    		icssg0_mii_rt: mii-rt@32000 {
    			compatible = "ti,pruss-mii", "syscon";
    			reg = <0x32000 0x100>;
    		};
    
    		icssg0_mii_g_rt: mii-g-rt@33000 {
    			compatible = "ti,pruss-mii-g", "syscon";
    			reg = <0x33000 0x1000>;
    		};
    
    		icssg0_intc: interrupt-controller@20000 {
    			compatible = "ti,icssg-intc";
    			reg = <0x20000 0x2000>;
    			interrupt-controller;
    			#interrupt-cells = <3>;
    			interrupts = <GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH>,
    				     <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>,
    				     <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
    				     <GIC_SPI 257 IRQ_TYPE_LEVEL_HIGH>,
    				     <GIC_SPI 258 IRQ_TYPE_LEVEL_HIGH>,
    				     <GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>,
    				     <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>,
    				     <GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>;
    			interrupt-names = "host_intr0", "host_intr1",
    					  "host_intr2", "host_intr3",
    					  "host_intr4", "host_intr5",
    					  "host_intr6", "host_intr7";
    		};
    
    		pru0_0: pru@34000 {
    			compatible = "ti,j721e-pru";
    			reg = <0x34000 0x3000>,
    			      <0x22000 0x100>,
    			      <0x22400 0x100>;
    			reg-names = "iram", "control", "debug";
    			firmware-name = "j7-pru0_0-fw";
    		};
    
    		rtu0_0: rtu@4000 {
    			compatible = "ti,j721e-rtu";
    			reg = <0x4000 0x2000>,
    			      <0x23000 0x100>,
    			      <0x23400 0x100>;
    			reg-names = "iram", "control", "debug";
    			firmware-name = "j7-rtu0_0-fw";
    		};
    
    		tx_pru0_0: txpru@a000 {
    			compatible = "ti,j721e-tx-pru";
    			reg = <0xa000 0x1800>,
    			      <0x25000 0x100>,
    			      <0x25400 0x100>;
    			reg-names = "iram", "control", "debug";
    			firmware-name = "j7-txpru0_0-fw";
    		};
    
    		pru0_1: pru@38000 {
    			compatible = "ti,j721e-pru";
    			reg = <0x38000 0x3000>,
    			      <0x24000 0x100>,
    			      <0x24400 0x100>;
    			reg-names = "iram", "control", "debug";
    			firmware-name = "j7-pru0_1-fw";
    		};
    
    		rtu0_1: rtu@6000 {
    			compatible = "ti,j721e-rtu";
    			reg = <0x6000 0x2000>,
    			      <0x23800 0x100>,
    			      <0x23c00 0x100>;
    			reg-names = "iram", "control", "debug";
    			firmware-name = "j7-rtu0_1-fw";
    		};
    
    		tx_pru0_1: txpru@c000 {
    			compatible = "ti,j721e-tx-pru";
    			reg = <0xc000 0x1800>,
    			      <0x25800 0x100>,
    			      <0x25c00 0x100>;
    			reg-names = "iram", "control", "debug";
    			firmware-name = "j7-txpru0_1-fw";
    		};
    
    		icssg0_mdio: mdio@32400 {
    			compatible = "ti,davinci_mdio";
    			reg = <0x32400 0x100>;
    			clocks = <&k3_clks 119 1>;
    			clock-names = "fck";
    			#address-cells = <1>;
    			#size-cells = <0>;
    			bus_freq = <1000000>;
    		};
    	};
    
    	icssg1: icssg@b100000 {
    		compatible = "ti,j721e-icssg";
    		reg = <0x00 0xb100000 0x00 0x80000>;
    		power-domains = <&k3_pds 120 TI_SCI_PD_EXCLUSIVE>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges = <0x0 0x00 0x0b100000 0x100000>;
    
    		icssg1_mem: memories@b100000 {
    			reg = <0x0 0x2000>,
    			      <0x2000 0x2000>,
    			      <0x10000 0x10000>;
    			reg-names = "dram0", "dram1",
    				    "shrdram2";
    		};
    
    		icssg1_cfg: cfg@26000 {
    			compatible = "ti,pruss-cfg", "syscon";
    			reg = <0x26000 0x200>;
    			#address-cells = <1>;
    			#size-cells = <1>;
    			ranges = <0x0 0x26000 0x2000>;
    
    			clocks {
    				#address-cells = <1>;
    				#size-cells = <0>;
    
    				icssg1_coreclk_mux: coreclk-mux@3c {
    					reg = <0x3c>;
    					#clock-cells = <0>;
    					clocks = <&k3_clks 120 54>, /* icssg1_core_clk */
    						 <&k3_clks 120 4>;  /* icssg1_iclk */
    					assigned-clocks = <&icssg1_coreclk_mux>;
    					assigned-clock-parents = <&k3_clks 120 4>;
    				};
    
    				icssg1_iepclk_mux: iepclk-mux@30 {
    					reg = <0x30>;
    					#clock-cells = <0>;
    					clocks = <&k3_clks 120 9>,	/* icssg1_iep_clk */
    						 <&icssg1_coreclk_mux>;	/* core_clk */
    					assigned-clocks = <&icssg1_iepclk_mux>;
    					assigned-clock-parents = <&icssg1_coreclk_mux>;
    				};
    			};
    		};
    
    		icssg1_mii_rt: mii-rt@32000 {
    			compatible = "ti,pruss-mii", "syscon";
    			reg = <0x32000 0x100>;
    		};
    
    		icssg1_mii_g_rt: mii-g-rt@33000 {
    			compatible = "ti,pruss-mii-g", "syscon";
    			reg = <0x33000 0x1000>;
    		};
    
    		icssg1_intc: interrupt-controller@20000 {
    			compatible = "ti,icssg-intc";
    			reg = <0x20000 0x2000>;
    			interrupt-controller;
    			#interrupt-cells = <3>;
    			interrupts = <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>,
    				     <GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH>,
    				     <GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>,
    				     <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>,
    				     <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>,
    				     <GIC_SPI 267 IRQ_TYPE_LEVEL_HIGH>,
    				     <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
    				     <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>;
    			interrupt-names = "host_intr0", "host_intr1",
    					  "host_intr2", "host_intr3",
    					  "host_intr4", "host_intr5",
    					  "host_intr6", "host_intr7";
    		};
    
    		pru1_0: pru@34000 {
    			compatible = "ti,j721e-pru";
    			reg = <0x34000 0x4000>,
    			      <0x22000 0x100>,
    			      <0x22400 0x100>;
    			reg-names = "iram", "control", "debug";
    			firmware-name = "j7-pru1_0-fw";
    		};
    
    		rtu1_0: rtu@4000 {
    			compatible = "ti,j721e-rtu";
    			reg = <0x4000 0x2000>,
    			      <0x23000 0x100>,
    			      <0x23400 0x100>;
    			reg-names = "iram", "control", "debug";
    			firmware-name = "j7-rtu1_0-fw";
    		};
    
    		tx_pru1_0: txpru@a000 {
    			compatible = "ti,j721e-tx-pru";
    			reg = <0xa000 0x1800>,
    			      <0x25000 0x100>,
    			      <0x25400 0x100>;
    			reg-names = "iram", "control", "debug";
    			firmware-name = "j7-txpru1_0-fw";
    		};
    
    		pru1_1: pru@38000 {
    			compatible = "ti,j721e-pru";
    			reg = <0x38000 0x4000>,
    			      <0x24000 0x100>,
    			      <0x24400 0x100>;
    			reg-names = "iram", "control", "debug";
    			firmware-name = "j7-pru1_1-fw";
    		};
    
    		rtu1_1: rtu@6000 {
    			compatible = "ti,j721e-rtu";
    			reg = <0x6000 0x2000>,
    			      <0x23800 0x100>,
    			      <0x23c00 0x100>;
    			reg-names = "iram", "control", "debug";
    			firmware-name = "j7-rtu1_1-fw";
    		};
    
    		tx_pru1_1: txpru@c000 {
    			compatible = "ti,j721e-tx-pru";
    			reg = <0xc000 0x1800>,
    			      <0x25800 0x100>,
    			      <0x25c00 0x100>;
    			reg-names = "iram", "control", "debug";
    			firmware-name = "j7-txpru1_1-fw";
    		};
    
    		icssg1_mdio: mdio@32400 {
    			compatible = "ti,davinci_mdio";
    			reg = <0x32400 0x100>;
    			clocks = <&k3_clks 120 4>;
    			clock-names = "fck";
    			#address-cells = <1>;
    			#size-cells = <0>;
    			bus_freq = <1000000>;
    		};
    	};
    
    	main_esm: esm@700000 {
    		compatible = "ti,j721e-esm";
    		reg = <0x0 0x700000 0x0 0x1000>;
    		ti,esm-pins = <344>, <345>;
    		bootph-pre-ram;
    	};
    
    	main_spi2: spi@2120000 {
    		compatible = "ti,am654-mcspi","ti,omap4-mcspi";
    		reg = <0x00 0x02120000 0x00 0x400>;
    		interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		clocks = <&k3_clks 268 1>;
    		power-domains = <&k3_pds 268 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	main_spi5: spi@2150000 {
    		compatible = "ti,am654-mcspi","ti,omap4-mcspi";
    		reg = <0x00 0x02150000 0x00 0x400>;
    		interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>;
    		#address-cells = <1>;
    		#size-cells = <0>;
    		clocks = <&k3_clks 271 1>;
    		power-domains = <&k3_pds 271 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	ti_csi2rx0: ticsi2rx@4500000 {
    		compatible = "ti,j721e-csi2rx";
    		dmas = <&main_udmap 0x4940>, <&main_udmap 0x4941>, <&main_udmap 0x4942>,
    			<&main_udmap 0x4943>, <&main_udmap 0x4944>, <&main_udmap 0x4945>,
    			<&main_udmap 0x4946>, <&main_udmap 0x4947>, <&main_udmap 0x4948>,
    			<&main_udmap 0x4949>, <&main_udmap 0x494a>, <&main_udmap 0x494b>,
    			<&main_udmap 0x494c>, <&main_udmap 0x494d>, <&main_udmap 0x494e>,
    			<&main_udmap 0x494f>;
    		dma-names = "rx0", "rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
    			    "rx8", "rx9", "rx10", "rx11", "rx12", "rx13", "rx14", "rx15";
    		reg = <0x0 0x4500000 0x0 0x1000>;
    		power-domains = <&k3_pds 26 TI_SCI_PD_EXCLUSIVE>;
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    
    		cdns_csi2rx0: csi-bridge@4504000 {
    			compatible = "cdns,csi2rx";
    			reg = <0x0 0x4504000 0x0 0x1000>;
    			clocks = <&k3_clks 26 2>, <&k3_clks 26 0>, <&k3_clks 26 2>,
    				<&k3_clks 26 2>, <&k3_clks 26 3>, <&k3_clks 26 3>;
    			clock-names = "sys_clk", "p_clk", "pixel_if0_clk",
    				"pixel_if1_clk", "pixel_if2_clk", "pixel_if3_clk";
    			phys = <&dphy0>;
    			phy-names = "dphy";
    			power-domains = <&k3_pds 26 TI_SCI_PD_EXCLUSIVE>;
    
    			ports {
    				#address-cells = <1>;
    				#size-cells = <0>;
    
    				csi0_port0: port@0 {
    					reg = <0>;
    				};
    
    				csi0_port1: port@1 {
    					reg = <1>;
    				};
    
    				csi0_port2: port@2 {
    					reg = <2>;
    				};
    
    				csi0_port3: port@3 {
    					reg = <3>;
    				};
    
    				csi0_port4: port@4 {
    					reg = <4>;
    				};
    			};
    		};
    	};
    
    	ti_csi2rx1: ticsi2rx@4510000 {
    		compatible = "ti,j721e-csi2rx";
    		dmas = <&main_udmap 0x4960>, <&main_udmap 0x4961>, <&main_udmap 0x4962>,
    			<&main_udmap 0x4963>, <&main_udmap 0x4964>, <&main_udmap 0x4965>,
    			<&main_udmap 0x4966>, <&main_udmap 0x4967>, <&main_udmap 0x4968>,
    			<&main_udmap 0x4969>, <&main_udmap 0x496a>, <&main_udmap 0x496b>,
    			<&main_udmap 0x496c>, <&main_udmap 0x496d>, <&main_udmap 0x496e>,
    			<&main_udmap 0x496f>;
    		dma-names = "rx0", "rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
    			    "rx8", "rx9", "rx10", "rx11", "rx12", "rx13", "rx14", "rx15";
    		reg = <0x0 0x4510000 0x0 0x1000>;
    		power-domains = <&k3_pds 27 TI_SCI_PD_EXCLUSIVE>;
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    
    		cdns_csi2rx1: csi-bridge@4514000 {
    			compatible = "cdns,csi2rx";
    			reg = <0x0 0x4514000 0x0 0x1000>;
    			clocks = <&k3_clks 27 2>, <&k3_clks 27 0>, <&k3_clks 27 2>,
    				<&k3_clks 27 2>, <&k3_clks 27 3>, <&k3_clks 27 3>;
    			clock-names = "sys_clk", "p_clk", "pixel_if0_clk",
    				"pixel_if1_clk", "pixel_if2_clk", "pixel_if3_clk";
    			phys = <&dphy1>;
    			phy-names = "dphy";
    			power-domains = <&k3_pds 27 TI_SCI_PD_EXCLUSIVE>;
    
    			ports {
    				#address-cells = <1>;
    				#size-cells = <0>;
    
    				csi1_port0: port@0 {
    					reg = <0>;
    				};
    
    				csi1_port1: port@1 {
    					reg = <1>;
    				};
    
    				csi1_port2: port@2 {
    					reg = <2>;
    				};
    
    				csi1_port3: port@3 {
    					reg = <3>;
    				};
    
    				csi1_port4: port@4 {
    					reg = <4>;
    				};
    			};
    		};
    	};
    
    	dphy0: phy@4580000 {
    		compatible = "ti,j721e-dphy", "cdns,dphy";
    		reg = <0x0 0x4580000 0x0 0x1100>;
    		#phy-cells = <0>;
    		power-domains = <&k3_pds 147 TI_SCI_PD_EXCLUSIVE>;
    	};
    
    	dphy1: phy@4590000 {
    		compatible = "ti,j721e-dphy", "cdns,dphy";
    		reg = <0x0 0x4590000 0x0 0x1100>;
    		#phy-cells = <0>;
    		power-domains = <&k3_pds 148 TI_SCI_PD_EXCLUSIVE>;
    	};
    };
    

    am65-cpsw-nuss.c:

    // SPDX-License-Identifier: GPL-2.0+
    /*
     * Texas Instruments K3 AM65 Ethernet Switch SubSystem Driver
     *
     * Copyright (C) 2019, Texas Instruments, Incorporated
     *
     */
    
    #include <common.h>
    #include <malloc.h>
    #include <asm/cache.h>
    #include <asm/io.h>
    #include <asm/processor.h>
    #include <asm/gpio.h>
    #include <clk.h>
    #include <dm.h>
    #include <dm/device_compat.h>
    #include <dm/lists.h>
    #include <dma-uclass.h>
    #include <dm/of_access.h>
    #include <miiphy.h>
    #include <net.h>
    #include <phy.h>
    #include <power-domain.h>
    #include <soc.h>
    #include <linux/bitops.h>
    #include <linux/delay.h>
    #include <linux/soc/ti/ti-udma.h>
    
    #include "cpsw_mdio.h"
    
    #define AM65_CPSW_CPSWNU_MAX_PORTS 9
    
    #define AM65_CPSW_SS_BASE		0x0
    #define AM65_CPSW_SGMII_BASE	0x100
    #define AM65_CPSW_MDIO_BASE	0xf00
    #define AM65_CPSW_XGMII_BASE	0x2100
    #define AM65_CPSW_CPSW_NU_BASE	0x20000
    #define AM65_CPSW_CPSW_NU_ALE_BASE 0x1e000
    
    #define AM65_CPSW_CPSW_NU_PORTS_OFFSET	0x1000
    #define AM65_CPSW_CPSW_NU_PORT_MACSL_OFFSET	0x330
    
    #define AM65_CPSW_MDIO_BUS_FREQ_DEF 1000000
    
    #define AM65_CPSW_CTL_REG		0x4
    #define AM65_CPSW_SGMII_CONTROL_REG	0x10
    #define AM65_CPSW_STAT_PORT_EN_REG	0x14
    #define AM65_CPSW_PTYPE_REG		0x18
    
    #define AM65_CPSW_CTL_REG_P0_ENABLE			BIT(2)
    #define AM65_CPSW_CTL_REG_P0_TX_CRC_REMOVE		BIT(13)
    #define AM65_CPSW_CTL_REG_P0_RX_PAD			BIT(14)
    
    #define AM65_CPSW_SGMII_CONTROL_MR_AN_ENABLE	BIT(0)
    
    #define AM65_CPSW_P0_FLOW_ID_REG			0x8
    #define AM65_CPSW_PN_RX_MAXLEN_REG		0x24
    #define AM65_CPSW_PN_REG_SA_L			0x308
    #define AM65_CPSW_PN_REG_SA_H			0x30c
    
    #define AM65_CPSW_ALE_CTL_REG			0x8
    #define AM65_CPSW_ALE_CTL_REG_ENABLE		BIT(31)
    #define AM65_CPSW_ALE_CTL_REG_RESET_TBL		BIT(30)
    #define AM65_CPSW_ALE_CTL_REG_BYPASS		BIT(4)
    #define AM65_CPSW_ALE_PN_CTL_REG(x)		(0x40 + (x) * 4)
    #define AM65_CPSW_ALE_PN_CTL_REG_MODE_FORWARD	0x3
    #define AM65_CPSW_ALE_PN_CTL_REG_MAC_ONLY	BIT(11)
    
    #define AM65_CPSW_ALE_THREADMAPDEF_REG		0x134
    #define AM65_CPSW_ALE_DEFTHREAD_EN		BIT(15)
    
    #define AM65_CPSW_MACSL_CTL_REG			0x0
    #define AM65_CPSW_MACSL_CTL_REG_IFCTL_A		BIT(15)
    #define AM65_CPSW_MACSL_CTL_EXT_EN		BIT(18)
    #define AM65_CPSW_MACSL_CTL_REG_GIG		BIT(7)
    #define AM65_CPSW_MACSL_CTL_REG_GMII_EN		BIT(5)
    #define AM65_CPSW_MACSL_CTL_REG_LOOPBACK	BIT(1)
    #define AM65_CPSW_MACSL_CTL_REG_FULL_DUPLEX	BIT(0)
    #define AM65_CPSW_MACSL_RESET_REG		0x8
    #define AM65_CPSW_MACSL_RESET_REG_RESET		BIT(0)
    #define AM65_CPSW_MACSL_STATUS_REG		0x4
    #define AM65_CPSW_MACSL_RESET_REG_PN_IDLE	BIT(31)
    #define AM65_CPSW_MACSL_RESET_REG_PN_E_IDLE	BIT(30)
    #define AM65_CPSW_MACSL_RESET_REG_PN_P_IDLE	BIT(29)
    #define AM65_CPSW_MACSL_RESET_REG_PN_TX_IDLE	BIT(28)
    #define AM65_CPSW_MACSL_RESET_REG_IDLE_MASK \
    	(AM65_CPSW_MACSL_RESET_REG_PN_IDLE | \
    	 AM65_CPSW_MACSL_RESET_REG_PN_E_IDLE | \
    	 AM65_CPSW_MACSL_RESET_REG_PN_P_IDLE | \
    	 AM65_CPSW_MACSL_RESET_REG_PN_TX_IDLE)
    
    #define AM65_CPSW_CPPI_PKT_TYPE			0x7
    #define DEFAULT_GPIO_RESET_DELAY		10
    
    struct am65_cpsw_port {
    	fdt_addr_t	port_base;
    	fdt_addr_t	sgmii_base;
    	fdt_addr_t	macsl_base;
    	bool		disabled;
    	u32		mac_control;
    };
    
    struct am65_cpsw_common {
    	struct udevice		*dev;
    	fdt_addr_t		ss_base;
    	fdt_addr_t		cpsw_base;
    	fdt_addr_t		mdio_base;
    	fdt_addr_t		ale_base;
    	fdt_addr_t		gmii_sel;
    	fdt_addr_t		mac_efuse;
    
    	struct clk		fclk;
    	struct power_domain	pwrdmn;
    
    	u32			port_num;
    	struct am65_cpsw_port	ports[AM65_CPSW_CPSWNU_MAX_PORTS];
    	u32			qsgmii_main_ports;
    
    	struct mii_dev		*bus;
    	u32			bus_freq;
    	struct gpio_desc	mdio_gpio_reset;
    	u32			reset_delay_us;
    	u32			reset_post_delay_us;
    
    	struct dma		dma_tx;
    	struct dma		dma_rx;
    	u32			rx_next;
    	u32			rx_pend;
    	bool			started;
    };
    
    struct am65_cpsw_priv {
    	struct udevice		*dev;
    	struct am65_cpsw_common	*cpsw_common;
    	u32			port_id;
    
    	struct phy_device	*phydev;
    	bool			has_phy;
    	ofnode			phy_node;
    	u32			phy_addr;
    
    	bool			mdio_manual_mode;
    };
    
    #ifdef PKTSIZE_ALIGN
    #define UDMA_RX_BUF_SIZE PKTSIZE_ALIGN
    #else
    #define UDMA_RX_BUF_SIZE ALIGN(1522, ARCH_DMA_MINALIGN)
    #endif
    
    #ifdef PKTBUFSRX
    #define UDMA_RX_DESC_NUM PKTBUFSRX
    #else
    #define UDMA_RX_DESC_NUM 4
    #endif
    
    #define mac_hi(mac)	(((mac)[0] << 0) | ((mac)[1] << 8) |    \
    			 ((mac)[2] << 16) | ((mac)[3] << 24))
    #define mac_lo(mac)	(((mac)[4] << 0) | ((mac)[5] << 8))
    
    static void am65_cpsw_set_sl_mac(struct am65_cpsw_port *slave,
    				 unsigned char *addr)
    {
    	writel(mac_hi(addr),
    	       slave->port_base + AM65_CPSW_PN_REG_SA_H);
    	writel(mac_lo(addr),
    	       slave->port_base + AM65_CPSW_PN_REG_SA_L);
    }
    
    int am65_cpsw_macsl_reset(struct am65_cpsw_port *slave)
    {
    	u32 i = 100;
    
    	/* Set the soft reset bit */
    	writel(AM65_CPSW_MACSL_RESET_REG_RESET,
    	       slave->macsl_base + AM65_CPSW_MACSL_RESET_REG);
    
    	while ((readl(slave->macsl_base + AM65_CPSW_MACSL_RESET_REG) &
    		AM65_CPSW_MACSL_RESET_REG_RESET) && i--)
    		cpu_relax();
    
    	/* Timeout on the reset */
    	return i;
    }
    
    static int am65_cpsw_macsl_wait_for_idle(struct am65_cpsw_port *slave)
    {
    	u32 i = 100;
    
    	while ((readl(slave->macsl_base + AM65_CPSW_MACSL_STATUS_REG) &
    		AM65_CPSW_MACSL_RESET_REG_IDLE_MASK) && i--)
    		cpu_relax();
    
    	return i;
    }
    
    static int am65_cpsw_update_link(struct am65_cpsw_priv *priv)
    {
    	struct am65_cpsw_common	*common = priv->cpsw_common;
    	struct am65_cpsw_port *port = &common->ports[priv->port_id];
    	struct phy_device *phy = priv->phydev;
    	u32 mac_control = 0;
    
    	if (phy->link) { /* link up */
    		mac_control = /*AM65_CPSW_MACSL_CTL_REG_LOOPBACK |*/
    			      AM65_CPSW_MACSL_CTL_REG_GMII_EN;
    		if (phy->speed == 1000)
    			mac_control |= AM65_CPSW_MACSL_CTL_REG_GIG;
    		if (phy->speed == 10 && phy_interface_is_rgmii(phy))
    			/* Can be used with in band mode only */
    			mac_control |= AM65_CPSW_MACSL_CTL_EXT_EN;
    		if (phy->duplex == DUPLEX_FULL)
    			mac_control |= AM65_CPSW_MACSL_CTL_REG_FULL_DUPLEX;
    		if (phy->speed == 100)
    			mac_control |= AM65_CPSW_MACSL_CTL_REG_IFCTL_A;
    	}
    
    	if (mac_control == port->mac_control)
    		goto out;
    
    	if (mac_control) {
    		printf("link up on port %d, speed %d, %s duplex\n",
    		       priv->port_id, phy->speed,
    		       (phy->duplex == DUPLEX_FULL) ? "full" : "half");
    	} else {
    		printf("link down on port %d\n", priv->port_id);
    	}
    
    	writel(mac_control, port->macsl_base + AM65_CPSW_MACSL_CTL_REG);
    	port->mac_control = mac_control;
    
    out:
    	return phy->link;
    }
    
    #define AM65_GMII_SEL_MODE_MII		0
    #define AM65_GMII_SEL_MODE_RMII		1
    #define AM65_GMII_SEL_MODE_RGMII	2
    #define AM65_GMII_SEL_MODE_SGMII	3
    #define AM65_GMII_SEL_MODE_QSGMII	4
    #define AM65_GMII_SEL_MODE_QSGMII_SUB	6
    
    #define AM65_GMII_SEL_RGMII_IDMODE	BIT(4)
    
    static void am65_cpsw_gmii_sel_k3(struct am65_cpsw_priv *priv,
    				  phy_interface_t phy_mode, int port_id)
    {
    	struct am65_cpsw_common	*common = priv->cpsw_common;
    	u32 reg;
    	u32 mode = 0;
    	bool rgmii_id = false;
    	u32 offs = (port_id - 1) * 4;
    
    	reg = readl(common->gmii_sel + offs);
    
    	dev_dbg(common->dev, "old gmii_sel: %08x\n", reg);
    
    	switch (phy_mode) {
    	case PHY_INTERFACE_MODE_RMII:
    		mode = AM65_GMII_SEL_MODE_RMII;
    		break;
    
    	case PHY_INTERFACE_MODE_RGMII:
    	case PHY_INTERFACE_MODE_RGMII_RXID:
    		mode = AM65_GMII_SEL_MODE_RGMII;
    		break;
    
    	case PHY_INTERFACE_MODE_RGMII_ID:
    	case PHY_INTERFACE_MODE_RGMII_TXID:
    		mode = AM65_GMII_SEL_MODE_RGMII;
    		rgmii_id = true;
    		break;
    
    	case PHY_INTERFACE_MODE_SGMII:
    		mode = AM65_GMII_SEL_MODE_SGMII;
    		break;
    
    	case PHY_INTERFACE_MODE_QSGMII:
    		if (common->qsgmii_main_ports & BIT(port_id - 1))
    			mode = AM65_GMII_SEL_MODE_QSGMII;
    		else
    			mode = AM65_GMII_SEL_MODE_QSGMII_SUB;
    		break;
    
    	default:
    		dev_warn(common->dev,
    			 "Unsupported PHY mode: %u. Defaulting to MII.\n",
    			 phy_mode);
    		/* fallthrough */
    	case PHY_INTERFACE_MODE_MII:
    		mode = AM65_GMII_SEL_MODE_MII;
    		break;
    	};
    
    	if (rgmii_id)
    		mode |= AM65_GMII_SEL_RGMII_IDMODE;
    
    	reg = mode;
    	dev_dbg(common->dev, "gmii_sel PHY mode: %u, new gmii_sel: %08x\n",
    		phy_mode, reg);
    	writel(reg, common->gmii_sel + offs);
    
    	reg = readl(common->gmii_sel + offs);
    	if (reg != mode)
    		dev_err(common->dev,
    			"gmii_sel PHY mode NOT SET!: requested: %08x, gmii_sel: %08x\n",
    			mode, reg);
    }
    
    static int am65_cpsw_start(struct udevice *dev)
    {
    	struct eth_pdata *pdata = dev_get_plat(dev);
    	struct am65_cpsw_priv *priv = dev_get_priv(dev);
    	struct am65_cpsw_common	*common = priv->cpsw_common;
    	struct am65_cpsw_port *port = &common->ports[priv->port_id];
    	struct am65_cpsw_port *port0 = &common->ports[0];
    	struct ti_udma_drv_chan_cfg_data *dma_rx_cfg_data;
    	int ret, i;
    
    	ret = power_domain_on(&common->pwrdmn);
    	if (ret) {
    		dev_err(dev, "power_domain_on() failed %d\n", ret);
    		goto out;
    	}
    
    	ret = clk_enable(&common->fclk);
    	if (ret) {
    		dev_err(dev, "clk enabled failed %d\n", ret);
    		goto err_off_pwrdm;
    	}
    
    	common->rx_next = 0;
    	common->rx_pend = 0;
    	ret = dma_get_by_name(common->dev, "tx0", &common->dma_tx);
    	if (ret) {
    		dev_err(dev, "TX dma get failed %d\n", ret);
    		goto err_off_clk;
    	}
    	ret = dma_get_by_name(common->dev, "rx", &common->dma_rx);
    	if (ret) {
    		dev_err(dev, "RX dma get failed %d\n", ret);
    		goto err_free_tx;
    	}
    
    	for (i = 0; i < UDMA_RX_DESC_NUM; i++) {
    		ret = dma_prepare_rcv_buf(&common->dma_rx,
    					  net_rx_packets[i],
    					  UDMA_RX_BUF_SIZE);
    		if (ret) {
    			dev_err(dev, "RX dma add buf failed %d\n", ret);
    			goto err_free_tx;
    		}
    	}
    
    	ret = dma_enable(&common->dma_tx);
    	if (ret) {
    		dev_err(dev, "TX dma_enable failed %d\n", ret);
    		goto err_free_rx;
    	}
    	ret = dma_enable(&common->dma_rx);
    	if (ret) {
    		dev_err(dev, "RX dma_enable failed %d\n", ret);
    		goto err_dis_tx;
    	}
    
    	/* Control register */
    	writel(AM65_CPSW_CTL_REG_P0_ENABLE |
    	       AM65_CPSW_CTL_REG_P0_TX_CRC_REMOVE |
    	       AM65_CPSW_CTL_REG_P0_RX_PAD,
    	       common->cpsw_base + AM65_CPSW_CTL_REG);
    
    	/* disable priority elevation */
    	writel(0, common->cpsw_base + AM65_CPSW_PTYPE_REG);
    
    	/* enable statistics */
    	writel(BIT(0) | BIT(priv->port_id),
    	       common->cpsw_base + AM65_CPSW_STAT_PORT_EN_REG);
    
    	/* Port 0  length register */
    	writel(PKTSIZE_ALIGN, port0->port_base + AM65_CPSW_PN_RX_MAXLEN_REG);
    
    	/* set base flow_id */
    	dma_get_cfg(&common->dma_rx, 0, (void **)&dma_rx_cfg_data);
    	writel(dma_rx_cfg_data->flow_id_base,
    	       port0->port_base + AM65_CPSW_P0_FLOW_ID_REG);
    	dev_info(dev, "K3 CPSW: rflow_id_base: %u\n",
    		 dma_rx_cfg_data->flow_id_base);
    
    	if (pdata->phy_interface == PHY_INTERFACE_MODE_SGMII ||
    	    pdata->phy_interface == PHY_INTERFACE_MODE_QSGMII)
    		writel(AM65_CPSW_SGMII_CONTROL_MR_AN_ENABLE,
    		       port->sgmii_base + AM65_CPSW_SGMII_CONTROL_REG);
    
    	/* Reset and enable the ALE */
    	writel(AM65_CPSW_ALE_CTL_REG_ENABLE | AM65_CPSW_ALE_CTL_REG_RESET_TBL |
    	       AM65_CPSW_ALE_CTL_REG_BYPASS,
    	       common->ale_base + AM65_CPSW_ALE_CTL_REG);
    
    	/* port 0 put into forward mode */
    	writel(AM65_CPSW_ALE_PN_CTL_REG_MODE_FORWARD,
    	       common->ale_base + AM65_CPSW_ALE_PN_CTL_REG(0));
    
    	writel(AM65_CPSW_ALE_DEFTHREAD_EN,
    	       common->ale_base + AM65_CPSW_ALE_THREADMAPDEF_REG);
    
    	/* PORT x configuration */
    
    	/* Port x Max length register */
    	writel(PKTSIZE_ALIGN, port->port_base + AM65_CPSW_PN_RX_MAXLEN_REG);
    
    	/* Port x set mac */
    	am65_cpsw_set_sl_mac(port, pdata->enetaddr);
    
    	/* Port x ALE: mac_only, Forwarding */
    	writel(AM65_CPSW_ALE_PN_CTL_REG_MAC_ONLY |
    	       AM65_CPSW_ALE_PN_CTL_REG_MODE_FORWARD,
    	       common->ale_base + AM65_CPSW_ALE_PN_CTL_REG(priv->port_id));
    
    	port->mac_control = 0;
    	if (!am65_cpsw_macsl_reset(port)) {
    		dev_err(dev, "mac_sl reset failed\n");
    		ret = -EFAULT;
    		goto err_dis_rx;
    	}
    
    	ret = phy_startup(priv->phydev);
    	if (ret) {
    		dev_err(dev, "phy_startup failed\n");
    		goto err_dis_rx;
    	}
    
    	ret = am65_cpsw_update_link(priv);
    	if (!ret) {
    		ret = -ENODEV;
    		goto err_phy_shutdown;
    	}
    
    	common->started = true;
    
    	return 0;
    
    err_phy_shutdown:
    	phy_shutdown(priv->phydev);
    err_dis_rx:
    	/* disable ports */
    	writel(0, common->ale_base + AM65_CPSW_ALE_PN_CTL_REG(priv->port_id));
    	writel(0, common->ale_base + AM65_CPSW_ALE_PN_CTL_REG(0));
    	if (!am65_cpsw_macsl_wait_for_idle(port))
    		dev_err(dev, "mac_sl idle timeout\n");
    	writel(0, port->macsl_base + AM65_CPSW_MACSL_CTL_REG);
    	writel(0, common->ale_base + AM65_CPSW_ALE_CTL_REG);
    	writel(0, common->cpsw_base + AM65_CPSW_CTL_REG);
    
    	dma_disable(&common->dma_rx);
    err_dis_tx:
    	dma_disable(&common->dma_tx);
    err_free_rx:
    	dma_free(&common->dma_rx);
    err_free_tx:
    	dma_free(&common->dma_tx);
    err_off_clk:
    	clk_disable(&common->fclk);
    err_off_pwrdm:
    	power_domain_off(&common->pwrdmn);
    out:
    	dev_err(dev, "%s end error\n", __func__);
    
    	return ret;
    }
    
    static int am65_cpsw_send(struct udevice *dev, void *packet, int length)
    {
    	struct am65_cpsw_priv *priv = dev_get_priv(dev);
    	struct am65_cpsw_common	*common = priv->cpsw_common;
    	struct ti_udma_drv_packet_data packet_data;
    	int ret;
    
    	packet_data.pkt_type = AM65_CPSW_CPPI_PKT_TYPE;
    	packet_data.dest_tag = priv->port_id;
    	ret = dma_send(&common->dma_tx, packet, length, &packet_data);
    	if (ret) {
    		dev_err(dev, "TX dma_send failed %d\n", ret);
    		return ret;
    	}
    
    	return 0;
    }
    
    static int am65_cpsw_recv(struct udevice *dev, int flags, uchar **packetp)
    {
    	struct am65_cpsw_priv *priv = dev_get_priv(dev);
    	struct am65_cpsw_common	*common = priv->cpsw_common;
    
    	/* try to receive a new packet */
    	return dma_receive(&common->dma_rx, (void **)packetp, NULL);
    }
    
    static int am65_cpsw_free_pkt(struct udevice *dev, uchar *packet, int length)
    {
    	struct am65_cpsw_priv *priv = dev_get_priv(dev);
    	struct am65_cpsw_common	*common = priv->cpsw_common;
    	int ret;
    
    	if (length > 0) {
    		u32 pkt = common->rx_next % UDMA_RX_DESC_NUM;
    
    		ret = dma_prepare_rcv_buf(&common->dma_rx,
    					  net_rx_packets[pkt],
    					  UDMA_RX_BUF_SIZE);
    		if (ret)
    			dev_err(dev, "RX dma free_pkt failed %d\n", ret);
    		common->rx_next++;
    	}
    
    	return 0;
    }
    
    static void am65_cpsw_stop(struct udevice *dev)
    {
    	struct am65_cpsw_priv *priv = dev_get_priv(dev);
    	struct am65_cpsw_common *common = priv->cpsw_common;
    	struct am65_cpsw_port *port = &common->ports[priv->port_id];
    
    	if (!common->started)
    		return;
    
    	phy_shutdown(priv->phydev);
    
    	writel(0, common->ale_base + AM65_CPSW_ALE_PN_CTL_REG(priv->port_id));
    	writel(0, common->ale_base + AM65_CPSW_ALE_PN_CTL_REG(0));
    	if (!am65_cpsw_macsl_wait_for_idle(port))
    		dev_err(dev, "mac_sl idle timeout\n");
    	writel(0, port->macsl_base + AM65_CPSW_MACSL_CTL_REG);
    	writel(0, common->ale_base + AM65_CPSW_ALE_CTL_REG);
    	writel(0, common->cpsw_base + AM65_CPSW_CTL_REG);
    
    	dma_disable(&common->dma_tx);
    	dma_free(&common->dma_tx);
    
    	dma_disable(&common->dma_rx);
    	dma_free(&common->dma_rx);
    
    	common->started = false;
    }
    
    static int am65_cpsw_read_rom_hwaddr(struct udevice *dev)
    {
    	struct am65_cpsw_priv *priv = dev_get_priv(dev);
    	struct am65_cpsw_common *common = priv->cpsw_common;
    	struct eth_pdata *pdata = dev_get_plat(dev);
    	u32 mac_hi, mac_lo;
    
    	if (common->mac_efuse == -1)
    		return -1;
    
    	mac_lo = readl(common->mac_efuse);
    	mac_hi = readl(common->mac_efuse + 4);
    	pdata->enetaddr[0] = (mac_hi >> 8) & 0xff;
    	pdata->enetaddr[1] = mac_hi & 0xff;
    	pdata->enetaddr[2] = (mac_lo >> 24) & 0xff;
    	pdata->enetaddr[3] = (mac_lo >> 16) & 0xff;
    	pdata->enetaddr[4] = (mac_lo >> 8) & 0xff;
    	pdata->enetaddr[5] = mac_lo & 0xff;
    
    	return 0;
    }
    
    static const struct eth_ops am65_cpsw_ops = {
    	.start		= am65_cpsw_start,
    	.send		= am65_cpsw_send,
    	.recv		= am65_cpsw_recv,
    	.free_pkt	= am65_cpsw_free_pkt,
    	.stop		= am65_cpsw_stop,
    	.read_rom_hwaddr = am65_cpsw_read_rom_hwaddr,
    };
    
    static const struct soc_attr k3_mdio_soc_data[] = {
    	{ .family = "AM62X", .revision = "SR1.0" },
    	{ .family = "AM64X", .revision = "SR1.0" },
    	{ .family = "AM64X", .revision = "SR2.0" },
    	{ .family = "AM65X", .revision = "SR1.0" },
    	{ .family = "AM65X", .revision = "SR2.0" },
    	{ .family = "J7200", .revision = "SR1.0" },
    	{ .family = "J7200", .revision = "SR2.0" },
    	{ .family = "J721E", .revision = "SR1.0" },
    	{ .family = "J721E", .revision = "SR1.1" },
    	{ .family = "J721S2", .revision = "SR1.0" },
    	{ /* sentinel */ },
    };
    
    static int am65_cpsw_mdio_init(struct udevice *dev)
    {
    	struct am65_cpsw_priv *priv = dev_get_priv(dev);
    	struct am65_cpsw_common	*cpsw_common = priv->cpsw_common;
    
    	if (!priv->has_phy || cpsw_common->bus)
    		return 0;
    
    	if (dm_gpio_is_valid(&cpsw_common->mdio_gpio_reset)) {
    		dm_gpio_set_value(&cpsw_common->mdio_gpio_reset, 1);
    		udelay(cpsw_common->reset_delay_us);
    		dm_gpio_set_value(&cpsw_common->mdio_gpio_reset, 0);
    		if (cpsw_common->reset_post_delay_us > 0)
    			udelay(cpsw_common->reset_post_delay_us);
    	}
    
    	cpsw_common->bus = cpsw_mdio_init(dev->name,
    					  cpsw_common->mdio_base,
    					  cpsw_common->bus_freq,
    					  clk_get_rate(&cpsw_common->fclk),
    					  priv->mdio_manual_mode);
    	if (!cpsw_common->bus)
    		return -EFAULT;
    
    	return 0;
    }
    
    static int am65_cpsw_phy_init(struct udevice *dev)
    {
    	struct am65_cpsw_priv *priv = dev_get_priv(dev);
    	struct am65_cpsw_common *cpsw_common = priv->cpsw_common;
    	struct eth_pdata *pdata = dev_get_plat(dev);
    	struct phy_device *phydev;
    	u32 supported = PHY_GBIT_FEATURES;
    	int ret;
    
    	phydev = phy_connect(cpsw_common->bus,
    			     priv->phy_addr,
    			     priv->dev,
    			     pdata->phy_interface);
    
    	if (!phydev) {
    		dev_err(dev, "phy_connect() failed\n");
    		return -ENODEV;
    	}
    
    	phydev->supported &= supported;
    	if (pdata->max_speed) {
    		ret = phy_set_supported(phydev, pdata->max_speed);
    		if (ret)
    			return ret;
    	}
    	phydev->advertising = phydev->supported;
    
    	if (ofnode_valid(priv->phy_node))
    		phydev->node = priv->phy_node;
    
    	priv->phydev = phydev;
    	ret = phy_config(phydev);
    	if (ret < 0)
    		pr_err("phy_config() failed: %d", ret);
    
    	return ret;
    }
    
    static int am65_cpsw_ofdata_parse_phy(struct udevice *dev)
    {
    	struct eth_pdata *pdata = dev_get_plat(dev);
    	struct am65_cpsw_priv *priv = dev_get_priv(dev);
    	struct ofnode_phandle_args out_args;
    	int ret = 0;
    
    	dev_read_u32(dev, "reg", &priv->port_id);
    
    	pdata->phy_interface = dev_read_phy_mode(dev);
    	if (pdata->phy_interface == PHY_INTERFACE_MODE_NA) {
    		dev_err(dev, "Invalid PHY mode, port %u\n", priv->port_id);
    		return -EINVAL;
    	}
    
    	dev_read_u32(dev, "max-speed", (u32 *)&pdata->max_speed);
    	if (pdata->max_speed)
    		dev_err(dev, "Port %u speed froced to %uMbit\n",
    			priv->port_id, pdata->max_speed);
    
    	priv->has_phy  = true;
    	ret = ofnode_parse_phandle_with_args(dev_ofnode(dev), "phy-handle",
    					     NULL, 0, 0, &out_args);
    	if (ret) {
    		dev_err(dev, "can't parse phy-handle port %u (%d)\n",
    			priv->port_id, ret);
    		priv->has_phy  = false;
    		ret = 0;
    	}
    
    	priv->phy_node = out_args.node;
    	if (priv->has_phy) {
    		ret = ofnode_read_u32(priv->phy_node, "reg", &priv->phy_addr);
    		if (ret) {
    			dev_err(dev, "failed to get phy_addr port %u (%d)\n",
    				priv->port_id, ret);
    			goto out;
    		}
    	}
    
    out:
    	return ret;
    }
    
    static int am65_cpsw_port_probe(struct udevice *dev)
    {
    	struct am65_cpsw_priv *priv = dev_get_priv(dev);
    	struct eth_pdata *pdata = dev_get_plat(dev);
    	struct am65_cpsw_common *cpsw_common;
    	char portname[15];
    	int ret;
    
    	priv->dev = dev;
    
    	cpsw_common = dev_get_priv(dev->parent);
    	priv->cpsw_common = cpsw_common;
    
    	sprintf(portname, "%s%s", dev->parent->name, dev->name);
    	device_set_name(dev, portname);
    
    	priv->mdio_manual_mode = false;
    	if (soc_device_match(k3_mdio_soc_data))
    		priv->mdio_manual_mode = true;
    
    	ret = am65_cpsw_ofdata_parse_phy(dev);
    	if (ret)
    		goto out;
    
    	am65_cpsw_gmii_sel_k3(priv, pdata->phy_interface, priv->port_id);
    
    	ret = am65_cpsw_mdio_init(dev);
    	if (ret)
    		goto out;
    
    	ret = am65_cpsw_phy_init(dev);
    	if (ret)
    		goto out;
    out:
    	return ret;
    }
    
    static int am65_cpsw_probe_nuss(struct udevice *dev)
    {
    	struct am65_cpsw_common *cpsw_common = dev_get_priv(dev);
    	ofnode ports_np, node, mdio_np;
    	int ret, i;
    	struct udevice *port_dev;
    	int qsgmii_len;
    
    	cpsw_common->dev = dev;
    	cpsw_common->ss_base = dev_read_addr(dev);
    	if (cpsw_common->ss_base == FDT_ADDR_T_NONE)
    		return -EINVAL;
    	cpsw_common->mac_efuse = devfdt_get_addr_name(dev, "mac_efuse");
    	/* no err check - optional */
    
    	ret = power_domain_get_by_index(dev, &cpsw_common->pwrdmn, 0);
    	if (ret) {
    		dev_err(dev, "failed to get pwrdmn: %d\n", ret);
    		return ret;
    	}
    
    	ret = clk_get_by_name(dev, "fck", &cpsw_common->fclk);
    	if (ret) {
    		power_domain_free(&cpsw_common->pwrdmn);
    		dev_err(dev, "failed to get clock %d\n", ret);
    		return ret;
    	}
    
    	cpsw_common->cpsw_base = cpsw_common->ss_base + AM65_CPSW_CPSW_NU_BASE;
    	cpsw_common->ale_base = cpsw_common->cpsw_base +
    				AM65_CPSW_CPSW_NU_ALE_BASE;
    	cpsw_common->mdio_base = cpsw_common->ss_base + AM65_CPSW_MDIO_BASE;
    
    	/* get bus level PHY reset GPIO details */
    	mdio_np = dev_read_subnode(dev, "mdio");
    	if (!ofnode_valid(mdio_np)) {
    		ret = -ENOENT;
    		goto out;
    	}
    
    	cpsw_common->reset_delay_us = ofnode_read_u32_default(mdio_np,
    						"reset-delay-us",
    						DEFAULT_GPIO_RESET_DELAY);
    	cpsw_common->reset_post_delay_us = ofnode_read_u32_default(mdio_np,
    						"reset-post-delay-us", 0);
    	ret = gpio_request_by_name_nodev(mdio_np, "reset-gpios", 0,
    					 &cpsw_common->mdio_gpio_reset,
    					 GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
    
    	ports_np = dev_read_subnode(dev, "ethernet-ports");
    	if (!ofnode_valid(ports_np)) {
    		ret = -ENOENT;
    		goto out;
    	}
    
    	ofnode_for_each_subnode(node, ports_np) {
    		const char *node_name;
    		u32 port_id;
    		bool disabled;
    
    		node_name = ofnode_get_name(node);
    
    		disabled = !ofnode_is_enabled(node);
    
    		ret = ofnode_read_u32(node, "reg", &port_id);
    		if (ret) {
    			dev_err(dev, "%s: failed to get port_id (%d)\n",
    				node_name, ret);
    			goto out;
    		}
    
    		if (port_id >= AM65_CPSW_CPSWNU_MAX_PORTS) {
    			dev_err(dev, "%s: invalid port_id (%d)\n",
    				node_name, port_id);
    			ret = -EINVAL;
    			goto out;
    		}
    		cpsw_common->port_num++;
    
    		if (!port_id)
    			continue;
    
    		cpsw_common->ports[port_id].disabled = disabled;
    		if (disabled)
    			continue;
    
    		ret = device_bind_driver_to_node(dev, "am65_cpsw_nuss_port", ofnode_get_name(node), node, &port_dev);
    		if (ret)
    			dev_err(dev, "Failed to bind to %s node\n", ofnode_get_name(node));
    	}
    
    	for (i = 0; i < AM65_CPSW_CPSWNU_MAX_PORTS; i++) {
    		struct am65_cpsw_port *port = &cpsw_common->ports[i];
    
    		port->sgmii_base = cpsw_common->ss_base +
    					(AM65_CPSW_SGMII_BASE * i);
    		port->port_base = cpsw_common->cpsw_base +
    				  AM65_CPSW_CPSW_NU_PORTS_OFFSET +
    				  (i * AM65_CPSW_CPSW_NU_PORTS_OFFSET);
    		port->macsl_base = port->port_base +
    				   AM65_CPSW_CPSW_NU_PORT_MACSL_OFFSET;
    	}
    
    	node = dev_read_subnode(dev, "cpsw-phy-sel");
    	if (!ofnode_valid(node)) {
    		dev_err(dev, "can't find cpsw-phy-sel\n");
    		ret = -ENOENT;
    		goto out;
    	}
    
    	cpsw_common->gmii_sel = ofnode_get_addr(node);
    	if (cpsw_common->gmii_sel == FDT_ADDR_T_NONE) {
    		dev_err(dev, "failed to get gmii_sel base\n");
    		goto out;
    	}
    
    	cpsw_common->qsgmii_main_ports = 0;
    	qsgmii_len = ofnode_read_size(node, "ti,qsgmii-main-ports");
    	if (qsgmii_len < 0)
    		goto skip_qsgmii_ports;
    
    	for (i = 0; i < qsgmii_len / sizeof(u32); i++) {
    		u32 val;
    
    		ret = ofnode_read_u32_index(node, "ti,qsgmii-main-ports", i, &val);
    		if (ret || (val < 1 && val > AM65_CPSW_CPSWNU_MAX_PORTS)) {
    			ret = -ENOENT;
    			goto out;
    		}
    
    		cpsw_common->qsgmii_main_ports |= BIT(val - 1);
    	}
    
    skip_qsgmii_ports:
    	cpsw_common->bus_freq =
    			dev_read_u32_default(dev, "bus_freq",
    					     AM65_CPSW_MDIO_BUS_FREQ_DEF);
    
    	dev_info(dev, "K3 CPSW: nuss_ver: 0x%08X cpsw_ver: 0x%08X ale_ver: 0x%08X Ports:%u mdio_freq:%u\n",
    		 readl(cpsw_common->ss_base),
    		 readl(cpsw_common->cpsw_base),
    		 readl(cpsw_common->ale_base),
    		 cpsw_common->port_num,
    		 cpsw_common->bus_freq);
    
    out:
    	clk_free(&cpsw_common->fclk);
    	power_domain_free(&cpsw_common->pwrdmn);
    	return ret;
    }
    
    static const struct udevice_id am65_cpsw_nuss_ids[] = {
    	{ .compatible = "ti,am654-cpsw-nuss" },
    	{ .compatible = "ti,j721e-cpsw-nuss" },
    	{ .compatible = "ti,am642-cpsw-nuss" },
    	{ }
    };
    
    U_BOOT_DRIVER(am65_cpsw_nuss) = {
    	.name	= "am65_cpsw_nuss",
    	.id	= UCLASS_MISC,
    	.of_match = am65_cpsw_nuss_ids,
    	.probe	= am65_cpsw_probe_nuss,
    	.priv_auto = sizeof(struct am65_cpsw_common),
    };
    
    U_BOOT_DRIVER(am65_cpsw_nuss_port) = {
    	.name	= "am65_cpsw_nuss_port",
    	.id	= UCLASS_ETH,
    	.probe	= am65_cpsw_port_probe,
    	.ops	= &am65_cpsw_ops,
    	.priv_auto	= sizeof(struct am65_cpsw_priv),
    	.plat_auto	= sizeof(struct eth_pdata),
    	.flags = DM_FLAG_ALLOC_PRIV_DMA | DM_FLAG_OS_PREPARE,
    };
    

    In my opinion, everything is set up correctly for my first port. It is brought up properly at boot and can auto-negotiate 100 and 1000 Mbit depending on the other connection. I set it up using:

    setenv ipaddr 10.110.210.20
    setenv netmask 255.255.255.0
    setenv serverip 10.110.210.1 <- This is a private gateway that I connect to
    setenv gatewayip 10.110.210.1

    The result of RX_GOOD_FRAMES (0x0c03a000) and TX_GOOD_FRAMES (0x0c030030) are increasing when I issue a ping-command, but there is no traffic on the port/cable:

    => md 0x0c03a000 0x10
    0c03a000: 00000010 00000010 00000000 00000000 ................
    0c03a010: 00000000 00000000 00000000 00000000 ................
    0c03a020: 00000000 00000000 00000000 00000000 ................
    0c03a030: 00000400 00000000 00000000 00000000 ................
    => ping 10.110.210.1
    am65_cpsw_nuss_port ethernet@c000000port@1: K3 CPSW: rflow_id_base: 16
    link up on port 1, speed 100, full duplex
    Using ethernet@c000000port@1 device

    Abort
    ping failed; host 10.110.210.1 is not alive
    => md 0x0c03a000 0x10
    0c03a000: 00000012 00000012 00000000 00000000 ................
    0c03a010: 00000000 00000000 00000000 00000000 ................
    0c03a020: 00000000 00000000 00000000 00000000 ................
    0c03a030: 00000480 00000000 00000000 00000000 ................

     EDIT. Correction, I have misstaken the TX_GOOD_FRAMES. It is supposed to be 0x0c030034. That register is NOT increasing as I issue ping commands.

    => md 0x0c03a000 0x10
    0c03a000: 00000012 00000012 00000000 00000000 ................
    0c03a010: 00000000 00000000 00000000 00000000 ................
    0c03a020: 00000000 00000000 00000000 00000000 ................
    0c03a030: 00000480 00000000 00000000 00000000 ................

  • Hello Bo,

    Could you share the values of the following registers?
    1. CTRLMMR_ENET1_CTRL 0x00104044
    2. CTRLMMR_ENET2_CTRL 0x00104048
    3. CTRLMMR_ENET3_CTRL 0x0010404C

    Additionally, can you confirm whether the config:
    CONFIG_PHY_TI_DP83867
    is enabled?

    Regards,
    Siddharth.

  • => md 0x00104044 3
    00104044: 00000002 00000001 00000001 ............

    Yes, CONFIG_PHY_TI_DP83867 is enabled.

    => mdio list
    ethernet@c000000port@1:
    0 - TI DP83867 <--> ethernet@c000000port@1

  • Pinging from the server to the DRA829 doesn't increase anything.

    U-Boot doesn't listen to network transactions except when it initiates a transaction. Therefore, this is the expected behavior.

    Regards,
    Siddharth.

  • Could you also provide an example of how to define the reset-gpios for the different phys? All three are on the same mdio bus, addresses 0, 4 and 5, and the reset-gpios are connected to gpio0_8, 9 and 10.

    Example of gpio-hog:
    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-j721e-gesi-exp-board.dts?h=ti-linux-5.10.y#n122
    Example of reset-gpios and reset-post-delay-us:
    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-j721e-quad-port-eth-exp.dts?h=ti-linux-5.10.y#n81

    Regards,
    Siddharth.

  • Bo,

    Assuming that eth0 corresponds to CPSW Port 1 configured for RGMII-RXID mode, could you share the value of the following register?
    CPSW_SS_RGMII1_STATUS_REG 0x0C000030

  • Assuming that eth0 corresponds to CPSW Port 1 configured for RGMII-RXID mode, could you share the value of the following register?
    CPSW_SS_RGMII1_STATUS_REG 0x0C000030

    => md 0x0c000030 1
    0c000030: 00000000 ....

  • The CPSW_SS_RGMII1_STATUS_REG register is defined as follows:
    BIT(0) => 0h (Link is down), 1h (Link is up).
    BITS(2-1) => 0h (10 Mbps), 1h (100 Mbps), 2h (1000Mbps).
    BIT(3) => 0h (Half-Duplex), 1h (Full-duplex).

    A value of all zeros indicates that link is not detected.

    If there are any errors in the logs, could you please share them?

  • There are no errors that I can see upon boot:

    U-Boot 2023.04-g999 (Aug 31 2023 - 10:31:29 +0000)

    SoC: J721E SR1.1 GP
    Model: Texas Instruments K3 J721E SoC
    DRAM: 4 GiB
    Core: 139 devices, 32 uclasses, devicetree: separate
    Warning: Device tree includes old 'u-boot,dm-' tags: please fix by 2023.07!
    Flash: 0 Bytes
    MMC: mmc@4f80000: 0
    Loading Environment from nowhere... OK
    In: serial@2800000
    Out: serial@2800000
    Err: serial@2800000
    am65_cpsw_nuss ethernet@c000000: K3 CPSW: nuss_ver: 0x6BA01901 cpsw_ver: 0x6BA80101 ale_ver: 0x00294104 Ports:8 mdio_freq:1000000
    Net:
    Warning: ethernet@c000000port@1 (eth0) using random MAC address - 86:a3:47:45:b4:8b
    eth0: ethernet@c000000port@1
    Could not get PHY for ethernet@c000000port@1: addr 4

    am65_cpsw_nuss_port ethernet@c000000port@2: phy_connect() failed
    Could not get PHY for ethernet@c000000port@1: addr 5
    am65_cpsw_nuss_port ethernet@c000000port@3: phy_connect() failed

    Never mind the last two. I need to hog the reset_n for those. I concentrate on eth 0 now.

    But maybe my tree is setup wrong? This is how it has been connected:

    eth0: RGMII3 - phy0 in RGMII mode
    eth1: RGMII4 - phy4 in RMII mode
    eth2: RGMII1 - phy5 in RMII mode

    &main_cpsw0 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&main_cpsw0_mdio_pins_default
                 &rgmii3_pins_default
                 &rgmii4_pins_default
                 &rgmii1_pins_default>;
    };

    &main_cpsw0_port1 {
        status = "okay";
        phy-handle = <&main_cpsw0_phy0>;
        phy-mode = "rgmii-rxid";
        mac-address = [00 00 00 00 00 00];
        phys = <&main_phy_gmii_sel 1>;
    };

    &main_cpsw0_port2 {
        status = "okay";
        phy-handle = <&main_cpsw0_phy4>;
        phy-mode = "rmii";
        mac-address = [00 00 00 00 00 00];
        phys = <&main_phy_gmii_sel 2>;
    };

    &main_cpsw0_port3 {
        status = "okay";
        phy-handle = <&main_cpsw0_phy5>;
        phy-mode = "rmii";
        mac-address = [00 00 00 00 00 00];
        phys = <&main_phy_gmii_sel 3>;
    };
  • Bo,

    The following are errors and shouldn't be seen if everything works correctly:

    Could not get PHY for ethernet@c000000port@1: addr 4
    Could not get PHY for ethernet@c000000port@1: addr 5

    Also, if the desired configuration is:

    eth0: RGMII3 - phy0 in RGMII mode
    eth1: RGMII4 - phy4 in RMII mode
    eth2: RGMII1 - phy5 in RMII mode

    as specified by you, ignoring the interface names, it actually means that CPSW Port3 should be mapped to phy0,
    CPSW Port4 should be mapped to phy4 and CPSW Port1 should be mapped to phy5.
    So the device-tree nodes for such a configuration will be:
    &main_cpsw0_port1 {
        status = "okay";
        phy-handle = <&main_cpsw0_phy5>;
        phy-mode = "rmii";
        mac-address = [00 00 00 00 00 00];
        phys = <&main_phy_gmii_sel 1>;
    };
    
    &main_cpsw0_port3 {
        status = "okay";
        phy-handle = <&main_cpsw0_phy0>;
        phy-mode = "rgmii-rxid";
        mac-address = [00 00 00 00 00 00];
        phys = <&main_phy_gmii_sel 3>;
    };
    
    &main_cpsw0_port4 {
        status = "okay";
        phy-handle = <&main_cpsw0_phy4>;
        phy-mode = "rmii";
        mac-address = [00 00 00 00 00 00];
        phys = <&main_phy_gmii_sel 4>;
    };


    Regards,
    Siddharth.

  • Thank you, Siddharth!

    I was confused by the numbering in the k3-j721e-evm-gesi-exp-board.dtsi, as they are 1, 2, 3 and 4. I see now that they are hard wired to RGMII1, 2, 3, and 4 respectively. It all makes sense now.

    With your corrections, I was able to ping my server.

    A big thanks to you and Doredla Sudheer Kumar for helping out.

  • Hi,

    I was confused by the numbering in the k3-j721e-evm-gesi-exp-board.dtsi, as they are 1, 2, 3 and 4. I see now that they are hard wired to RGMII1, 2, 3, and 4 respectively. It all makes sense now.

    Yes, numbers are hard wired with actual port numbers.

    With your corrections, I was able to ping my server.

    Thanks for the confirmation that ping to server is working at your end.

    Best Regards,
    Sudheer

  • Hello again.

    Unfortunately, there are still issues with the second and third interfaces. Only the first interface work properly. The other two don't respond to cable inserting, nor can they perform any communication over ethernet.

    Log from boot:

    U-Boot 2023.04-g999 (Aug 31 2023 - 10:31:29 +0000)

    SoC: J721E SR1.1 GP
    Model: Texas Instruments K3 J721E SoC
    DRAM: 4 GiB
    Core: 142 devices, 32 uclasses, devicetree: separate
    Warning: Device tree includes old 'u-boot,dm-' tags: please fix by 2023.07!
    Flash: 0 Bytes
    MMC: mmc@4f80000: 0
    Loading Environment from nowhere... OK
    In: serial@2800000
    Out: serial@2800000
    Err: serial@2800000
    am65_cpsw_nuss ethernet@c000000: K3 CPSW: nuss_ver: 0x6BA01901 cpsw_ver: 0x6BA80101 ale_ver: 0x00294104 Ports:8 mdio_freq:1000000
    Net:
    Warning: ethernet@c000000port@1 (eth2) using random MAC address - 96:af:29:bc:7e:11
    eth2: ethernet@c000000port@1
    Warning: ethernet@c000000port@3 (eth0) using random MAC address - c2:b2:b6:7c:b3:c3
    , eth0: ethernet@c000000port@3
    Warning: ethernet@c000000port@4 (eth1) using random MAC address - 72:16:3f:1a:19:a4
    , eth1: ethernet@c000000port@4
    Hit any key to stop autoboot: 0
    =>

    Cable in first port:

    => setenv ipaddr 10.110.210.20; setenv netmask 255.255.255.0; setenv serverip 10.110.210.1; setenv gatewayip 10.110.210.1
    => ping 10.110.210.1
    k3-navss-ringacc ringacc@3c000000: Ring Accelerator probed rings:1024, gp-rings[440,150] sci-dev-id:211
    k3-navss-ringacc ringacc@3c000000: dma-ring-reset-quirk: disabled
    am65_cpsw_nuss_port ethernet@c000000port@3: K3 CPSW: rflow_id_base: 16
    link up on port 3, speed 100, full duplex
    Using ethernet@c000000port@3 device
    host 10.110.210.1 is alive

    Cable in second port (no link, mii dump 4 0 shows autoneg has not been successful):

    => mii dump 4 1
    1. (7849) -- PHY status register --
    (8000:0000) 1.15 = 0 100BASE-T4 able
    (4000:4000) 1.14 = 1 100BASE-X full duplex able
    (2000:2000) 1.13 = 1 100BASE-X half duplex able
    (1000:1000) 1.12 = 1 10 Mbps full duplex able
    (0800:0800) 1.11 = 1 10 Mbps half duplex able
    (0400:0000) 1.10 = 0 100BASE-T2 full duplex able
    (0200:0000) 1. 9 = 0 100BASE-T2 half duplex able
    (0100:0000) 1. 8 = 0 extended status
    (0080:0000) 1. 7 = 0 (reserved)
    (0040:0040) 1. 6 = 1 MF preamble suppression
    (0020:0000) 1. 5 = 0 A/N complete
    (0010:0000) 1. 4 = 0 remote fault
    (0008:0008) 1. 3 = 1 A/N able
    (0004:0000) 1. 2 = 0 link status
    (0002:0000) 1. 1 = 0 jabber detect
    (0001:0001) 1. 0 = 1 extended capabilities

    Ping is not successful:

    => ping 10.110.210.1
    am65_cpsw_nuss_port ethernet@c000000port@3: K3 CPSW: rflow_id_base: 16
    ethernet@c000000port@3 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@c000000port@3: phy_startup failed
    am65_cpsw_nuss_port ethernet@c000000port@3: am65_cpsw_start end error
    am65_cpsw_nuss_port ethernet@c000000port@4: K3 CPSW: rflow_id_base: 16
    ethernet@c000000port@4 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@c000000port@4: phy_startup failed
    am65_cpsw_nuss_port ethernet@c000000port@4: am65_cpsw_start end error
    am65_cpsw_nuss_port ethernet@c000000port@1: K3 CPSW: rflow_id_base: 16
    ethernet@c000000port@1 Waiting for PHY auto negotiation to complete......... TIMEOUT !
    am65_cpsw_nuss_port ethernet@c000000port@1: phy_startup failed
    am65_cpsw_nuss_port ethernet@c000000port@1: am65_cpsw_start end error
    ping failed; host 10.110.210.1 is not alive

  • Hello Bo,

    Could you please share the output of:
    mdio list
    command for the above non-working setup. Also, could you let me know which Ethernet PHY is being used for RMII interfaces?

    Regards,
    Siddharth.

  • Hi,

    Can you also share the following register dump.
    1. CTRLMMR_ENET1_CTRL 0x00104044
    2. CTRLMMR_ENET3_CTRL 0x0010404C
    3. CTRLMMR_ENET4_CTRL 0x00104050

    CPSW_PN_MAC_CONTROL_REG_k Register (Offset = 00022330h + (k * 1000h) where k = 0h to 8h for Port-1, Port-3, and Port-4.

    Also, I have observed from your Device tree configuration, Port-3 and Port-4 are configured in RGMII in Pin-Mux selection as below.

    rgmii4_pins_default: rgmii4-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x100, PIN_INPUT, 4) /* (AE29) PRG0_PRU1_GPO0.RGMII4_RD0 */
    			J721E_IOPAD(0x104, PIN_INPUT, 4) /* (AD28) PRG0_PRU1_GPO1.RGMII4_RD1 */
    			J721E_IOPAD(0x108, PIN_INPUT, 4) /* (AD27) PRG0_PRU1_GPO2.RGMII4_RD2 */
    			J721E_IOPAD(0x10c, PIN_INPUT, 4) /* (AC25) PRG0_PRU1_GPO3.RGMII4_RD3 */
    			J721E_IOPAD(0x118, PIN_INPUT, 4) /* (AC26) PRG0_PRU1_GPO6.RGMII4_RXC */
    			J721E_IOPAD(0x110, PIN_INPUT, 4) /* (AD29) PRG0_PRU1_GPO4.RGMII4_RX_CTL */
    			J721E_IOPAD(0x12c, PIN_OUTPUT, 4) /* (AG26) PRG0_PRU1_GPO11.RGMII4_TD0 */
    			J721E_IOPAD(0x130, PIN_OUTPUT, 4) /* (AF27) PRG0_PRU1_GPO12.RGMII4_TD1 */
    			J721E_IOPAD(0x134, PIN_OUTPUT, 4) /* (AF26) PRG0_PRU1_GPO13.RGMII4_TD2 */
    			J721E_IOPAD(0x138, PIN_OUTPUT, 4) /* (AE25) PRG0_PRU1_GPO14.RGMII4_TD3 */
    			J721E_IOPAD(0x140, PIN_OUTPUT, 4) /* (AG29) PRG0_PRU1_GPO16.RGMII4_TXC */
    			J721E_IOPAD(0x13c, PIN_OUTPUT, 4) /* (AF29) PRG0_PRU1_GPO15.RGMII4_TX_CTL */
    		>;
    	};
    
    	rgmii1_pins_default: rgmii1-pins-default {
    		pinctrl-single,pins = <
    			J721E_IOPAD(0x4, PIN_INPUT, 4) /* (AC23) PRG1_PRU0_GPO0.RGMII1_RD0 */
    			J721E_IOPAD(0x8, PIN_INPUT, 4) /* (AG22) PRG1_PRU0_GPO1.RGMII1_RD1 */
    			J721E_IOPAD(0xc, PIN_INPUT, 4) /* (AF22) PRG1_PRU0_GPO2.RGMII1_RD2 */
    			J721E_IOPAD(0x10, PIN_INPUT, 4) /* (AJ23) PRG1_PRU0_GPO3.RGMII1_RD3 */
    			J721E_IOPAD(0x1c, PIN_INPUT, 4) /* (AD22) PRG1_PRU0_GPO6.RGMII1_RXC */
    			J721E_IOPAD(0x14, PIN_INPUT, 4) /* (AH23) PRG1_PRU0_GPO4.RGMII1_RX_CTL */
    			J721E_IOPAD(0x30, PIN_OUTPUT, 4) /* (AF24) PRG1_PRU0_GPO11.RGMII1_TD0 */
    			J721E_IOPAD(0x34, PIN_OUTPUT, 4) /* (AJ24) PRG1_PRU0_GPO12.RGMII1_TD1 */
    			J721E_IOPAD(0x38, PIN_OUTPUT, 4) /* (AG24) PRG1_PRU0_GPO13.RGMII1_TD2 */
    			J721E_IOPAD(0x3c, PIN_OUTPUT, 4) /* (AD24) PRG1_PRU0_GPO14.RGMII1_TD3 */
    			J721E_IOPAD(0x44, PIN_OUTPUT, 4) /* (AE24) PRG1_PRU0_GPO16.RGMII1_TXC */
    			J721E_IOPAD(0x40, PIN_OUTPUT, 4) /* (AC24) PRG1_PRU0_GPO15.RGMII1_TX_CTL */
    		>;
    	};
    



    You have to select Pin-Mux for RMII instead of RGMII for Port-1 and Port-4 as per above your configuration. Please refer to TD and your H/W schematic and map the Pin-Mux accordingly.

    Best Regards,
    Sudheer

  • => md 0x00104044 8
    00104044: 00000002 00000002 00000002 00000002 ................
    00104054: 00000002 00000002 00000002 00000002 ................

    => md 0x0c022330 1
    0c022330: 00000000 ....

    => md 0x0c024330 1
    0c024330: 00000000 ....

    => md 0x0c025330 1
    0c025330: 00000000 ....

    Regarding the rgmii vs rmii, all three phys are connected via rgmii, even though phy 4 and 5 are 100 Mbit. This is to ensure easy future update to three GBit ports, if necessary.

    Best regards,

    /Bo

  • Could you please share the output of:
    mdio list

    => mdio list
    ethernet@c000000port@1:
    0 - TI DP83867 <--> ethernet@c000000port@3
    4 - TI DP83822 <--> ethernet@c000000port@4
    5 - TI DP83822 <--> ethernet@c000000port@1

    You can see what phys we are using above. Also, the naming of the mdio bus is a bit ugly. It should not refer to port1 in my opinion.

    Best regards,

    /Bo

  • Hello Bo,

    Thank you for sharing the output of MDIO List. That confirms my suspicion that the Ethernet PHY you are using is not supported in U-Boot.
    Please see drivers/net/phy/ directory in U-Boot source tree.
    While it has the dp83867.c driver corresponding to the DP83867 PHY, there isn't a dp83822.c driver for the DP83822 PHY.
    You might have to port the Linux dp83822.c driver at:
    https://github.com/torvalds/linux/blob/master/drivers/net/phy/dp83822.c
    to U-Boot.

    Regards,
    Siddharth.

  • Hmm, I was expecting the general driver to kick in if there wasn't a specific one available.

    I have defined the CONFIG_PHY_TI_GENERIC in the u-boot config, and after doing so, the mdio list changed from showing a generic driver to showing the TI DP83822.

  • Bo,

    You could try triggering the Auto-Negotiation by directly writing to the PHY registers,
    followed by confirming if that approach works. If it does, then the fix will be to port the
    dp83822.c driver to U-Boot.

  • Thanks,

    I saw this post:

    https://e2e.ti.com/support/interface-group/interface/f/interface-forum/969671/dp83822h-enable-support-for-dp83822-eth-phy-in-u-boot

    and expected it to work as a generic interface with the correct name.

    Could you enlighten me what registers need to be set for retriggering the AN? If I write to BMCR, nothing changes:

    => mii dump 4 0
    0. (3100) -- PHY control register --
    (8000:0000) 0.15 = 0 reset
    (4000:0000) 0.14 = 0 loopback
    (2040:2000) 0. 6,13 = b01 speed selection = 100 Mbps
    (1000:1000) 0.12 = 1 A/N enable
    (0800:0000) 0.11 = 0 power-down
    (0400:0000) 0.10 = 0 isolate
    (0200:0000) 0. 9 = 0 restart A/N
    (0100:0100) 0. 8 = 1 duplex = full
    (0080:0000) 0. 7 = 0 collision test enable
    (003f:0000) 0. 5- 0 = 0 (reserved)


    => mii dump 4 1
    1. (7849) -- PHY status register --
    (8000:0000) 1.15 = 0 100BASE-T4 able
    (4000:4000) 1.14 = 1 100BASE-X full duplex able
    (2000:2000) 1.13 = 1 100BASE-X half duplex able
    (1000:1000) 1.12 = 1 10 Mbps full duplex able
    (0800:0800) 1.11 = 1 10 Mbps half duplex able
    (0400:0000) 1.10 = 0 100BASE-T2 full duplex able
    (0200:0000) 1. 9 = 0 100BASE-T2 half duplex able
    (0100:0000) 1. 8 = 0 extended status
    (0080:0000) 1. 7 = 0 (reserved)
    (0040:0040) 1. 6 = 1 MF preamble suppression
    (0020:0000) 1. 5 = 0 A/N complete
    (0010:0000) 1. 4 = 0 remote fault
    (0008:0008) 1. 3 = 1 A/N able
    (0004:0000) 1. 2 = 0 link status
    (0002:0000) 1. 1 = 0 jabber detect
    (0001:0001) 1. 0 = 1 extended capabilities


    => mii write 4 0 0x3300
    => mii dump 4 1
    1. (7849) -- PHY status register --
    (8000:0000) 1.15 = 0 100BASE-T4 able
    (4000:4000) 1.14 = 1 100BASE-X full duplex able
    (2000:2000) 1.13 = 1 100BASE-X half duplex able
    (1000:1000) 1.12 = 1 10 Mbps full duplex able
    (0800:0800) 1.11 = 1 10 Mbps half duplex able
    (0400:0000) 1.10 = 0 100BASE-T2 full duplex able
    (0200:0000) 1. 9 = 0 100BASE-T2 half duplex able
    (0100:0000) 1. 8 = 0 extended status
    (0080:0000) 1. 7 = 0 (reserved)
    (0040:0040) 1. 6 = 1 MF preamble suppression
    (0020:0000) 1. 5 = 0 A/N complete
    (0010:0000) 1. 4 = 0 remote fault
    (0008:0008) 1. 3 = 1 A/N able
    (0004:0000) 1. 2 = 0 link status
    (0002:0000) 1. 1 = 0 jabber detect
    (0001:0001) 1. 0 = 1 extended capabilities

    Regards,

    /Bo

  • Bo,

    In the BMSR register, link status is 0. I hope that the PHY register you are writing to is for the PHY whose Ethernet port has the cable connected.
    Could you please confirm if that's the case?

  • Could you please confirm if that's the case?

    Yes. Actually I am trying both ports off course. The link doesn't come up, the LEDs are not lit up as they do with the GBit port that works. There is no sign of activity at all when I connect the cable in any of the two 100Mbit ports.

  • Could you try resetting the PHY by writing to BIT(15) of the BMCR register and share the BMSR register's value after that?

  • Could you try resetting the PHY by writing to BIT(15) of the BMCR register and share the BMSR register's value after that?

    => mii dump 4 1
    1. (7849) -- PHY status register --
    (8000:0000) 1.15 = 0 100BASE-T4 able
    (4000:4000) 1.14 = 1 100BASE-X full duplex able
    (2000:2000) 1.13 = 1 100BASE-X half duplex able
    (1000:1000) 1.12 = 1 10 Mbps full duplex able
    (0800:0800) 1.11 = 1 10 Mbps half duplex able
    (0400:0000) 1.10 = 0 100BASE-T2 full duplex able
    (0200:0000) 1. 9 = 0 100BASE-T2 half duplex able
    (0100:0000) 1. 8 = 0 extended status
    (0080:0000) 1. 7 = 0 (reserved)
    (0040:0040) 1. 6 = 1 MF preamble suppression
    (0020:0000) 1. 5 = 0 A/N complete
    (0010:0000) 1. 4 = 0 remote fault
    (0008:0008) 1. 3 = 1 A/N able
    (0004:0000) 1. 2 = 0 link status
    (0002:0000) 1. 1 = 0 jabber detect
    (0001:0001) 1. 0 = 1 extended capabilities


    => mii dump 4 0
    0. (3100) -- PHY control register --
    (8000:0000) 0.15 = 0 reset
    (4000:0000) 0.14 = 0 loopback
    (2040:2000) 0. 6,13 = b01 speed selection = 100 Mbps
    (1000:1000) 0.12 = 1 A/N enable
    (0800:0000) 0.11 = 0 power-down
    (0400:0000) 0.10 = 0 isolate
    (0200:0000) 0. 9 = 0 restart A/N
    (0100:0100) 0. 8 = 1 duplex = full
    (0080:0000) 0. 7 = 0 collision test enable
    (003f:0000) 0. 5- 0 = 0 (reserved)


    => mii write 4 0 0xb100
    => mii dump 4 1
    1. (7849) -- PHY status register --
    (8000:0000) 1.15 = 0 100BASE-T4 able
    (4000:4000) 1.14 = 1 100BASE-X full duplex able
    (2000:2000) 1.13 = 1 100BASE-X half duplex able
    (1000:1000) 1.12 = 1 10 Mbps full duplex able
    (0800:0800) 1.11 = 1 10 Mbps half duplex able
    (0400:0000) 1.10 = 0 100BASE-T2 full duplex able
    (0200:0000) 1. 9 = 0 100BASE-T2 half duplex able
    (0100:0000) 1. 8 = 0 extended status
    (0080:0000) 1. 7 = 0 (reserved)
    (0040:0040) 1. 6 = 1 MF preamble suppression
    (0020:0000) 1. 5 = 0 A/N complete
    (0010:0000) 1. 4 = 0 remote fault
    (0008:0008) 1. 3 = 1 A/N able
    (0004:0000) 1. 2 = 0 link status
    (0002:0000) 1. 1 = 0 jabber detect
    (0001:0001) 1. 0 = 1 extended capabilities

  • There is something fishy about the setup. Sometimes eth0 is not working either, and mdio list reports:

    => mdio list
    ethernet@c000000port@1:
    0 - Generic PHY <--> ethernet@c000000port@3
    4 - TI DP83822 <--> ethernet@c000000port@4
    5 - TI DP83822 <--> ethernet@c000000port@1

    Could there be something about the mdio communication that needs trimming?

  • Hi,

    Regarding the rgmii vs rmii, all three phys are connected via rgmii, even though phy 4 and 5 are 100 Mbit.

    As per above we understood, all 3 ports (Port-1,3,4) are connected to PHYs via RGMII interface so, you have to configure the device tree node of CPSW Ports with "rgmii-rxid" in "phy-mode" as shown in below.

    &main_cpsw0_port1 {
        status = "okay";
        phy-handle = <&main_cpsw0_phy5>;
        phy-mode = "gmii-rxid";
        mac-address = [00 00 00 00 00 00];
        phys = <&main_phy_gmii_sel 1>;
    };
    
    &main_cpsw0_port3 {
        status = "okay";
        phy-handle = <&main_cpsw0_phy0>;
        phy-mode = "rgmii-rxid";
        mac-address = [00 00 00 00 00 00];
        phys = <&main_phy_gmii_sel 3>;
    };
    
    &main_cpsw0_port4 {
        status = "okay";
        phy-handle = <&main_cpsw0_phy4>;
        phy-mode = "gmii-rxid";
        mac-address = [00 00 00 00 00 00];
        phys = <&main_phy_gmii_sel 4>;
    };
    


    Can you update CPSW MAC Port nodes as per above and check once.

    Best Regards,
    Sudheer

  • Can you update CPSW MAC Port nodes as per above and check once.

    I did that, but it had no effect.

  • Could there be something about the mdio communication that needs trimming

    Could you please share the contents of the "main_cpsw0_mdio" node in the device-tree?

    Regards,
    Siddharth.

  • Could you please share the contents of the "main_cpsw0_mdio" node in the device-tree?

    This is the complete main_cpsw0-node:

        main_cpsw0: ethernet@c000000 {
            compatible = "ti,j721e-cpsw-nuss";
            #address-cells = <2>;
            #size-cells = <2>;
            reg = <0x0 0xc000000 0x0 0x200000>;
            reg-names = "cpsw_nuss";
            ranges = <0x0 0x0 0x0 0x0c000000 0x0 0x200000>;
            dma-coherent;
            clocks = <&k3_clks 19 89>;
            clock-names = "fck";
            power-domains = <&k3_pds 19 TI_SCI_PD_EXCLUSIVE>;

            dmas = <&main_udmap 0xca00>,
                   <&main_udmap 0xca01>,
                   <&main_udmap 0xca02>,
                   <&main_udmap 0xca03>,
                   <&main_udmap 0xca04>,
                   <&main_udmap 0xca05>,
                   <&main_udmap 0xca06>,
                   <&main_udmap 0xca07>,
                   <&main_udmap 0x4a00>;
            dma-names = "tx0", "tx1", "tx2", "tx3",
                    "tx4", "tx5", "tx6", "tx7",
                    "rx";

            ethernet-ports {
                #address-cells = <1>;
                #size-cells = <0>;

                main_cpsw0_port1: port@1 {
                    reg = <1>;
                    ti,mac-only;
                    label = "port1";
                    status = "disabled";
                };

                main_cpsw0_port2: port@2 {
                    reg = <2>;
                    ti,mac-only;
                    label = "port2";
                    status = "disabled";
                };

                main_cpsw0_port3: port@3 {
                    reg = <3>;
                    ti,mac-only;
                    label = "port3";
                    status = "disabled";
                };

                main_cpsw0_port4: port@4 {
                    reg = <4>;
                    ti,mac-only;
                    label = "port4";
                    status = "disabled";
                };

                main_cpsw0_port5: port@5 {
                    reg = <5>;
                    ti,mac-only;
                    label = "port5";
                    status = "disabled";
                };

                main_cpsw0_port6: port@6 {
                    reg = <6>;
                    ti,mac-only;
                    label = "port6";
                    status = "disabled";
                };

                main_cpsw0_port7: port@7 {
                    reg = <7>;
                    ti,mac-only;
                    label = "port7";
                    status = "disabled";
                };

                main_cpsw0_port8: port@8 {
                    reg = <8>;
                    ti,mac-only;
                    label = "port8";
                    status = "disabled";
                };
            };

            main_cpsw0_mdio: mdio@f00 {
                compatible = "ti,cpsw-mdio","ti,davinci_mdio";
                reg = <0x0 0xf00 0x0 0x100>;
                #address-cells = <1>;
                #size-cells = <0>;
                clocks = <&k3_clks 19 89>;
                clock-names = "fck";
                bus_freq = <1000000>;
    };

            cpts@3d000 {
                compatible = "ti,j721e-cpts";
                reg = <0x0 0x3d000 0x0 0x400>;
                clocks = <&k3_clks 19 16>;
                clock-names = "cpts";
                interrupts-extended = <&gic500 GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
                interrupt-names = "cpts";
                ti,cpts-ext-ts-inputs = <4>;
                ti,cpts-periodic-outputs = <2>;
            };
        };
  • Bo,

    I am referring to the "main_cpsw0_mdio" node with the contents of the phys:
    main_cpsw0_phy0, main_cpsw0_phy4 and main_cpsw0_phy5.

    Regards,
    Siddharth.

  • I am referring to the "main_cpsw0_mdio" node with the contents of the phys:
    main_cpsw0_phy0, main_cpsw0_phy4 and main_cpsw0_phy5

    Sorry, misunderstood. Coming here:

    &main_cpsw0_mdio {
        status = "okay";
        reset-gpios = <&main_gpio0 8 GPIO_ACTIVE_LOW
            &main_gpio0 9 GPIO_ACTIVE_LOW
            &main_gpio0 10 GPIO_ACTIVE_LOW>;
        reset-delay-us = <20>;

        main_cpsw0_phy0: ethernet-phy@0 {
            reg = <0>;
            ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
            ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
            ti,min-output-impedance;
        };
        main_cpsw0_phy4: ethernet-phy@4 {
            reg = <4>;
            ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
            ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
            ti,min-output-impedance;
        };
        main_cpsw0_phy5: ethernet-phy@5 {
            reg = <5>;
            ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
            ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
            ti,min-output-impedance;
        };
  • Bo,

    Is the DP83822 PHY configured for RMII Master Mode of operation or RMII Slave Mode of operation?
    Please refer to the section 8.4.1.2 Reduced Media Independent Interface (RMII) on page 30 of the datasheet at:
    https://www.ti.com/lit/ds/symlink/dp83822i.pdf

    Regards,
    Siddharth.

  • There are 25MHz crystals connected to all three phys XI-XO pins, so I guess it is RMII Master Mode then.

  • There are 25MHz crystals connected to all three phys XI-XO pins, so I guess it is RMII Master Mode then.

    Is the 50 MHz reference clock generated by the PHY connected to the RMII reference clock inputs to the respective CPSW MAC Ports being configured in RMII mode?

  • Hi,

    If PHY is configured in RMII Mode, You need to configure CPSW Port also in RMII Mode not RGMII mode.

    Please recheck the PHY configuration and make CPSW Port pin-muxing also in same configuration.

    Best Regards,
    Sudheer

  • You are confusing me now.

    As I have already stated, all three PHYs are connected using 4 RX data-lines and 4 TX data-lines in a RGMII configuration. This cannot be changed. This is for us to be future-proof if we need to move to three pcs of GBit interfaces.

    All three phys have 25 MHz crystals connected to Xin-Xout. From page 33 in the phy datasheet, under "8.4.1.3 Reduced Gigabit Media Independent Interface (RGMII)"

    Best regards,

    /Bo