All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards
@ 2021-04-09 13:41 Camelia Groza
  2021-04-09 13:41 ` [PATCH 01/11] powerpc: dts: t2080: add QorIQ DPAA 1 FMan v3 nodes Camelia Groza
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Camelia Groza @ 2021-04-09 13:41 UTC (permalink / raw)
  To: u-boot

This patch series enables DM_ETH and DM_MDIO on the T2080RDB, T4240RDB and
T1042D4RDB DPAA1 PowerPC boards. The necessary FMan v3 Ethernet and MDIO
nodes are added to each platform's SoC and board device tree.

On T2080RDB, fdt fixups are performed before booting into the OS using a
simplified new routine in order to avoid the legacy code path.

Camelia Groza (11):
  powerpc: dts: t2080: add QorIQ DPAA 1 FMan v3 nodes
  powerpc: dts: t2080rdb: add FMan v3 nodes
  board: freescale: t208xrdb: fdt fixups under DM_ETH
  configs: T2080RDB: enable DM_ETH
  powerpc: dts: t4240: add QorIQ DPAA 1 FMan v3 nodes
  powerpc: dts: t4240rdb: add FMan v3 nodes
  powerpc: dts: qoriq: update the mdio offsets under the second FMan v3
  configs: T4240RDB: enable DM_ETH
  powerpc: dts: t1042: add QorIQ DPAA 1 FMan v3 nodes
  powerpc: dts: t1042d4rdb: add FMan v3 nodes
  configs: T1042D4RDB: enable DM_ETH

 arch/powerpc/dts/qoriq-fman3-1-10g-0.dtsi |   2 +-
 arch/powerpc/dts/qoriq-fman3-1-10g-1.dtsi |   2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-0.dtsi  |   2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-1.dtsi  |   2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-2.dtsi  |   2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-3.dtsi  |   2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-4.dtsi  |   2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-5.dtsi  |   2 +-
 arch/powerpc/dts/qoriq-fman3-1.dtsi       |   4 +-
 arch/powerpc/dts/t1042d4rdb.dts           |  55 ++++++++-
 arch/powerpc/dts/t1042si-post.dtsi        |  46 +++++++
 arch/powerpc/dts/t2080rdb.dts             |  69 ++++++++++-
 arch/powerpc/dts/t2080si-post.dtsi        |  51 ++++++++
 arch/powerpc/dts/t4240rdb.dts             | 142 +++++++++++++++++++++-
 arch/powerpc/dts/t4240si-post.dtsi        | 101 +++++++++++++++
 board/freescale/t208xrdb/eth_t208xrdb.c   |  35 ++++++
 board/freescale/t208xrdb/t208xrdb.c       |   3 +
 board/freescale/t208xrdb/t208xrdb.h       |   2 +
 configs/T1042D4RDB_NAND_defconfig         |   3 +
 configs/T1042D4RDB_SDCARD_defconfig       |   3 +
 configs/T1042D4RDB_SECURE_BOOT_defconfig  |   4 +-
 configs/T1042D4RDB_SPIFLASH_defconfig     |   3 +
 configs/T1042D4RDB_defconfig              |   3 +
 configs/T2080RDB_NAND_defconfig           |   3 +
 configs/T2080RDB_SDCARD_defconfig         |   3 +
 configs/T2080RDB_SPIFLASH_defconfig       |   3 +
 configs/T2080RDB_defconfig                |   3 +
 configs/T4240RDB_SDCARD_defconfig         |   3 +
 configs/T4240RDB_defconfig                |   3 +
 29 files changed, 544 insertions(+), 14 deletions(-)
 create mode 100644 arch/powerpc/dts/t1042si-post.dtsi
 create mode 100644 arch/powerpc/dts/t2080si-post.dtsi
 create mode 100644 arch/powerpc/dts/t4240si-post.dtsi

--
2.17.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 01/11] powerpc: dts: t2080: add QorIQ DPAA 1 FMan v3 nodes
  2021-04-09 13:41 [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards Camelia Groza
@ 2021-04-09 13:41 ` Camelia Groza
  2021-04-09 13:41 ` [PATCH 02/11] powerpc: dts: t2080rdb: add " Camelia Groza
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Camelia Groza @ 2021-04-09 13:41 UTC (permalink / raw)
  To: u-boot

Add the QorIQ DPAA 1 FMan v3 device tree nodes for the T2080 SoC.
The device tree nodes are copied over with little modification from
the Linux kernel source code.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 arch/powerpc/dts/t2080si-post.dtsi | 51 ++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 arch/powerpc/dts/t2080si-post.dtsi

diff --git a/arch/powerpc/dts/t2080si-post.dtsi b/arch/powerpc/dts/t2080si-post.dtsi
new file mode 100644
index 000000000000..d8ef579cb7c0
--- /dev/null
+++ b/arch/powerpc/dts/t2080si-post.dtsi
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * T2080 Silicon/SoC Device Tree Source (post include)
+ *
+ * Copyright 2013 Freescale Semiconductor Inc.
+ * Copyright 2021 NXP
+ *
+ */
+&soc {
+
+/include/ "qoriq-clockgen2.dtsi"
+/include/ "qoriq-gpio-0.dtsi"
+/include/ "qoriq-gpio-1.dtsi"
+/include/ "qoriq-gpio-2.dtsi"
+/include/ "qoriq-gpio-3.dtsi"
+
+/include/ "qoriq-fman3-0.dtsi"
+/include/ "qoriq-fman3-0-10g-0-best-effort.dtsi"
+/include/ "qoriq-fman3-0-10g-1-best-effort.dtsi"
+/include/ "qoriq-fman3-0-1g-2.dtsi"
+/include/ "qoriq-fman3-0-1g-3.dtsi"
+/include/ "qoriq-fman3-0-10g-0.dtsi"
+/include/ "qoriq-fman3-0-10g-1.dtsi"
+	fman at 400000 {
+		enet0: ethernet at e0000 {
+		};
+
+		enet1: ethernet at e2000 {
+		};
+
+		enet2: ethernet at e4000 {
+		};
+
+		enet3: ethernet at e6000 {
+		};
+
+		enet6: ethernet at f0000 {
+		};
+
+		enet7: ethernet at f2000 {
+		};
+
+		mdio at fc000 {
+			interrupts = <100 1 0 0>;
+		};
+
+		mdio at fd000 {
+			interrupts = <101 1 0 0>;
+		};
+	};
+};
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 02/11] powerpc: dts: t2080rdb: add FMan v3 nodes
  2021-04-09 13:41 [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards Camelia Groza
  2021-04-09 13:41 ` [PATCH 01/11] powerpc: dts: t2080: add QorIQ DPAA 1 FMan v3 nodes Camelia Groza
@ 2021-04-09 13:41 ` Camelia Groza
  2021-04-09 13:41 ` [PATCH 03/11] board: freescale: t208xrdb: fdt fixups under DM_ETH Camelia Groza
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Camelia Groza @ 2021-04-09 13:41 UTC (permalink / raw)
  To: u-boot

Add the FMan v3 nodes for the T2080RDB. The nodes are copied over with
little modification from the Linux kernel source code.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 arch/powerpc/dts/t2080rdb.dts | 69 ++++++++++++++++++++++++++++++++++-
 1 file changed, 68 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/dts/t2080rdb.dts b/arch/powerpc/dts/t2080rdb.dts
index 74bbb20e2a1e..25f8c978c6d1 100644
--- a/arch/powerpc/dts/t2080rdb.dts
+++ b/arch/powerpc/dts/t2080rdb.dts
@@ -3,7 +3,7 @@
  * T2080RDB Device Tree Source
  *
  * Copyright 2013 - 2015 Freescale Semiconductor Inc.
- * Copyright 2019 NXP
+ * Copyright 2019-2021 NXP
  */
 
 /include/ "t2080.dtsi"
@@ -20,6 +20,71 @@
 	};
 };
 
+&soc {
+	fman at 400000 {
+		ethernet at e0000 {
+			phy-handle = <&xg_aq1202_phy3>;
+			phy-connection-type = "xgmii";
+		};
+
+		ethernet at e2000 {
+			phy-handle = <&xg_aq1202_phy4>;
+			phy-connection-type = "xgmii";
+		};
+
+		ethernet at e4000 {
+			phy-handle = <&rgmii_phy1>;
+			phy-connection-type = "rgmii";
+		};
+
+		ethernet at e6000 {
+			phy-handle = <&rgmii_phy2>;
+			phy-connection-type = "rgmii";
+		};
+
+		ethernet at f0000 {
+			phy-handle = <&xg_cs4315_phy2>;
+			phy-connection-type = "xgmii";
+		};
+
+		ethernet at f2000 {
+			phy-handle = <&xg_cs4315_phy1>;
+			phy-connection-type = "xgmii";
+		};
+
+		mdio at fc000 {
+			rgmii_phy1: ethernet-phy at 1 {
+				reg = <0x1>;
+			};
+			rgmii_phy2: ethernet-phy at 2 {
+				reg = <0x2>;
+			};
+		};
+
+		mdio at fd000 {
+			xg_cs4315_phy1: ethernet-phy at c {
+				compatible = "ethernet-phy-id13e5.1002";
+				reg = <0xc>;
+			};
+
+			xg_cs4315_phy2: ethernet-phy at d {
+				compatible = "ethernet-phy-id13e5.1002";
+				reg = <0xd>;
+			};
+
+			xg_aq1202_phy3: ethernet-phy at 0 {
+				compatible = "ethernet-phy-ieee802.3-c45";
+				reg = <0x0>;
+			};
+
+			xg_aq1202_phy4: ethernet-phy at 1 {
+				compatible = "ethernet-phy-ieee802.3-c45";
+				reg = <0x1>;
+			};
+		};
+	};
+};
+
 &espi0 {
 	status = "okay";
 	flash at 0 {
@@ -38,3 +103,5 @@
 		reg = <0x68>;
 	};
 };
+
+/include/ "t2080si-post.dtsi"
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 03/11] board: freescale: t208xrdb: fdt fixups under DM_ETH
  2021-04-09 13:41 [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards Camelia Groza
  2021-04-09 13:41 ` [PATCH 01/11] powerpc: dts: t2080: add QorIQ DPAA 1 FMan v3 nodes Camelia Groza
  2021-04-09 13:41 ` [PATCH 02/11] powerpc: dts: t2080rdb: add " Camelia Groza
@ 2021-04-09 13:41 ` Camelia Groza
  2021-04-09 13:41 ` [PATCH 04/11] configs: T2080RDB: enable DM_ETH Camelia Groza
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Camelia Groza @ 2021-04-09 13:41 UTC (permalink / raw)
  To: u-boot

Disable the FMan mEMAC 5 and 6 nodes from the fdt since they are not
available under the supported RCW. Also disable the associated
"fsl,dpa-ethernet" nodes that reference them.

This is a simplified version of the fdt_fixup_fman_ethernet call for
use under DM_ETH.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 board/freescale/t208xrdb/eth_t208xrdb.c | 35 +++++++++++++++++++++++++
 board/freescale/t208xrdb/t208xrdb.c     |  3 +++
 board/freescale/t208xrdb/t208xrdb.h     |  2 ++
 3 files changed, 40 insertions(+)

diff --git a/board/freescale/t208xrdb/eth_t208xrdb.c b/board/freescale/t208xrdb/eth_t208xrdb.c
index e77f3f7146f7..b0ff4b1f375a 100644
--- a/board/freescale/t208xrdb/eth_t208xrdb.c
+++ b/board/freescale/t208xrdb/eth_t208xrdb.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright 2014 Freescale Semiconductor, Inc.
+ * Copyright 2021 NXP
  *
  * Shengzhou Liu <Shengzhou.Liu@freescale.com>
  */
@@ -104,6 +105,40 @@ int board_eth_init(struct bd_info *bis)
 	return pci_eth_init(bis);
 }
 
+/* Disable the MAC5 and MAC6 "fsl,fman-memac" nodes and the two
+ * "fsl,dpa-ethernet" nodes that reference them.
+ */
+void fdt_fixup_board_fman_ethernet(void *fdt)
+{
+	int mac_off, eth_off, i;
+	char mac_path[2][42] = {
+		"/soc at ffe000000/fman at 400000/ethernet at e8000",
+		"/soc at ffe000000/fman at 400000/ethernet at ea000",
+	};
+	u32 eth_ph;
+
+	for (i = 0; i < 2; i++) {
+		/* Disable the MAC node */
+		mac_off = fdt_path_offset(fdt, mac_path[i]);
+		if (mac_off < 0)
+			continue;
+		fdt_status_disabled(fdt, mac_off);
+
+		/* Disable the fsl,dpa-ethernet node that points to the MAC.
+		 * The fsl,fman-mac property refers to the MAC's phandle.
+		 */
+		eth_ph = fdt_get_phandle(fdt, mac_off);
+		if (eth_ph <= 0)
+			continue;
+
+		eth_off = fdt_node_offset_by_prop_value(fdt, -1, "fsl,fman-mac",
+							&eth_ph,
+							sizeof(eth_ph));
+		if (eth_off >= 0)
+			fdt_status_disabled(fdt, eth_off);
+	}
+}
+
 void fdt_fixup_board_enet(void *fdt)
 {
 	return;
diff --git a/board/freescale/t208xrdb/t208xrdb.c b/board/freescale/t208xrdb/t208xrdb.c
index a18459841c62..7ccb205c6473 100644
--- a/board/freescale/t208xrdb/t208xrdb.c
+++ b/board/freescale/t208xrdb/t208xrdb.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright 2009-2013 Freescale Semiconductor, Inc.
+ * Copyright 2021 NXP
  */
 
 #include <common.h>
@@ -137,6 +138,8 @@ int ft_board_setup(void *blob, struct bd_info *bd)
 #ifdef CONFIG_SYS_DPAA_FMAN
 #ifndef CONFIG_DM_ETH
 	fdt_fixup_fman_ethernet(blob);
+#else
+	fdt_fixup_board_fman_ethernet(blob);
 #endif
 	fdt_fixup_board_enet(blob);
 #endif
diff --git a/board/freescale/t208xrdb/t208xrdb.h b/board/freescale/t208xrdb/t208xrdb.h
index 22a496fb8cf2..cd0a9f44da79 100644
--- a/board/freescale/t208xrdb/t208xrdb.h
+++ b/board/freescale/t208xrdb/t208xrdb.h
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright 2014 Freescale Semiconductor, Inc.
+ * Copyright 2021 NXP
  */
 
 #ifndef __CORENET_DS_H__
@@ -8,5 +9,6 @@
 
 void fdt_fixup_board_enet(void *blob);
 void pci_of_setup(void *blob, struct bd_info *bd);
+void fdt_fixup_board_fman_ethernet(void *blob);
 
 #endif
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 04/11] configs: T2080RDB: enable DM_ETH
  2021-04-09 13:41 [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards Camelia Groza
                   ` (2 preceding siblings ...)
  2021-04-09 13:41 ` [PATCH 03/11] board: freescale: t208xrdb: fdt fixups under DM_ETH Camelia Groza
@ 2021-04-09 13:41 ` Camelia Groza
  2021-04-09 13:41 ` [PATCH 05/11] powerpc: dts: t4240: add QorIQ DPAA 1 FMan v3 nodes Camelia Groza
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Camelia Groza @ 2021-04-09 13:41 UTC (permalink / raw)
  To: u-boot

Enable DM_ETH and DM_MDIO for the T2080RDB.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 configs/T2080RDB_NAND_defconfig     | 3 +++
 configs/T2080RDB_SDCARD_defconfig   | 3 +++
 configs/T2080RDB_SPIFLASH_defconfig | 3 +++
 configs/T2080RDB_defconfig          | 3 +++
 4 files changed, 12 insertions(+)

diff --git a/configs/T2080RDB_NAND_defconfig b/configs/T2080RDB_NAND_defconfig
index 543d34e24988..3bb74335bb47 100644
--- a/configs/T2080RDB_NAND_defconfig
+++ b/configs/T2080RDB_NAND_defconfig
@@ -33,6 +33,7 @@ CONFIG_HUSH_PARSER=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_SYS_ALT_MEMTEST=y
+CONFIG_CMD_DM=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
@@ -70,6 +71,8 @@ CONFIG_PHY_AQUANTIA=y
 CONFIG_PHY_CORTINA=y
 CONFIG_SYS_CORTINA_FW_IN_NAND=y
 CONFIG_PHY_REALTEK=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
 CONFIG_MII=y
diff --git a/configs/T2080RDB_SDCARD_defconfig b/configs/T2080RDB_SDCARD_defconfig
index d947846e6458..bcd67a05764e 100644
--- a/configs/T2080RDB_SDCARD_defconfig
+++ b/configs/T2080RDB_SDCARD_defconfig
@@ -31,6 +31,7 @@ CONFIG_HUSH_PARSER=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_SYS_ALT_MEMTEST=y
+CONFIG_CMD_DM=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
@@ -67,6 +68,8 @@ CONFIG_PHY_AQUANTIA=y
 CONFIG_PHY_CORTINA=y
 CONFIG_SYS_CORTINA_FW_IN_MMC=y
 CONFIG_PHY_REALTEK=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
 CONFIG_MII=y
diff --git a/configs/T2080RDB_SPIFLASH_defconfig b/configs/T2080RDB_SPIFLASH_defconfig
index 6f7b083bc623..198e926c32f6 100644
--- a/configs/T2080RDB_SPIFLASH_defconfig
+++ b/configs/T2080RDB_SPIFLASH_defconfig
@@ -33,6 +33,7 @@ CONFIG_HUSH_PARSER=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_SYS_ALT_MEMTEST=y
+CONFIG_CMD_DM=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
@@ -69,6 +70,8 @@ CONFIG_PHY_AQUANTIA=y
 CONFIG_PHY_CORTINA=y
 CONFIG_SYS_CORTINA_FW_IN_SPIFLASH=y
 CONFIG_PHY_REALTEK=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
 CONFIG_MII=y
diff --git a/configs/T2080RDB_defconfig b/configs/T2080RDB_defconfig
index 9dd01bbe50a5..12aaccd1d509 100644
--- a/configs/T2080RDB_defconfig
+++ b/configs/T2080RDB_defconfig
@@ -18,6 +18,7 @@ CONFIG_HUSH_PARSER=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_SYS_ALT_MEMTEST=y
+CONFIG_CMD_DM=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
@@ -54,6 +55,8 @@ CONFIG_PHYLIB=y
 CONFIG_PHY_AQUANTIA=y
 CONFIG_PHY_CORTINA=y
 CONFIG_PHY_REALTEK=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
 CONFIG_MII=y
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 05/11] powerpc: dts: t4240: add QorIQ DPAA 1 FMan v3 nodes
  2021-04-09 13:41 [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards Camelia Groza
                   ` (3 preceding siblings ...)
  2021-04-09 13:41 ` [PATCH 04/11] configs: T2080RDB: enable DM_ETH Camelia Groza
@ 2021-04-09 13:41 ` Camelia Groza
  2021-04-09 13:41 ` [PATCH 06/11] powerpc: dts: t4240rdb: add " Camelia Groza
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Camelia Groza @ 2021-04-09 13:41 UTC (permalink / raw)
  To: u-boot

Add the QorIQ DPAA 1 FMan v3 device tree nodes for the T4240 SoC.
The device tree nodes are copied over with little modification
from the Linux kernel source code.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 arch/powerpc/dts/t4240si-post.dtsi | 101 +++++++++++++++++++++++++++++
 1 file changed, 101 insertions(+)
 create mode 100644 arch/powerpc/dts/t4240si-post.dtsi

diff --git a/arch/powerpc/dts/t4240si-post.dtsi b/arch/powerpc/dts/t4240si-post.dtsi
new file mode 100644
index 000000000000..f614d19965d3
--- /dev/null
+++ b/arch/powerpc/dts/t4240si-post.dtsi
@@ -0,0 +1,101 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * T4240 Silicon/SoC Device Tree Source (post include)
+ *
+ * Copyright 2012 - 2015 Freescale Semiconductor Inc.
+ * Copyright 2021 NXP
+ *
+ */
+&soc {
+/include/ "qoriq-clockgen2.dtsi"
+/include/ "qoriq-gpio-0.dtsi"
+/include/ "qoriq-gpio-1.dtsi"
+/include/ "qoriq-gpio-2.dtsi"
+/include/ "qoriq-gpio-3.dtsi"
+
+/include/ "qoriq-fman3-0.dtsi"
+/include/ "qoriq-fman3-0-1g-0.dtsi"
+/include/ "qoriq-fman3-0-1g-1.dtsi"
+/include/ "qoriq-fman3-0-1g-2.dtsi"
+/include/ "qoriq-fman3-0-1g-3.dtsi"
+/include/ "qoriq-fman3-0-1g-4.dtsi"
+/include/ "qoriq-fman3-0-1g-5.dtsi"
+/include/ "qoriq-fman3-0-10g-0.dtsi"
+/include/ "qoriq-fman3-0-10g-1.dtsi"
+	fman at 400000 {
+		enet0: ethernet at e0000 {
+		};
+
+		enet1: ethernet at e2000 {
+		};
+
+		enet2: ethernet at e4000 {
+		};
+
+		enet3: ethernet at e6000 {
+		};
+
+		enet4: ethernet at e8000 {
+		};
+
+		enet5: ethernet at ea000 {
+		};
+
+		enet6: ethernet at f0000 {
+		};
+
+		enet7: ethernet at f2000 {
+		};
+
+		mdio at fc000 {
+			status = "disabled";
+		};
+
+		mdio at fd000 {
+			status = "disabled";
+		};
+	};
+
+/include/ "qoriq-fman3-1.dtsi"
+/include/ "qoriq-fman3-1-1g-0.dtsi"
+/include/ "qoriq-fman3-1-1g-1.dtsi"
+/include/ "qoriq-fman3-1-1g-2.dtsi"
+/include/ "qoriq-fman3-1-1g-3.dtsi"
+/include/ "qoriq-fman3-1-1g-4.dtsi"
+/include/ "qoriq-fman3-1-1g-5.dtsi"
+/include/ "qoriq-fman3-1-10g-0.dtsi"
+/include/ "qoriq-fman3-1-10g-1.dtsi"
+	fman at 500000 {
+		enet8: ethernet at e0000 {
+		};
+
+		enet9: ethernet at e2000 {
+		};
+
+		enet10: ethernet at e4000 {
+		};
+
+		enet11: ethernet at e6000 {
+		};
+
+		enet12: ethernet at e8000 {
+		};
+
+		enet13: ethernet at ea000 {
+		};
+
+		enet14: ethernet at f0000 {
+		};
+
+		enet15: ethernet at f2000 {
+		};
+
+		mdio at fc000 {
+			interrupts = <100 1 0 0>;
+		};
+
+		mdio at fd000 {
+			interrupts = <101 1 0 0>;
+		};
+	};
+};
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 06/11] powerpc: dts: t4240rdb: add FMan v3 nodes
  2021-04-09 13:41 [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards Camelia Groza
                   ` (4 preceding siblings ...)
  2021-04-09 13:41 ` [PATCH 05/11] powerpc: dts: t4240: add QorIQ DPAA 1 FMan v3 nodes Camelia Groza
@ 2021-04-09 13:41 ` Camelia Groza
  2021-04-09 13:41 ` [PATCH 07/11] powerpc: dts: qoriq: update the mdio offsets under the second FMan v3 Camelia Groza
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Camelia Groza @ 2021-04-09 13:41 UTC (permalink / raw)
  To: u-boot

Add the FMan v3 nodes for the T4240RDB. The nodes are copied over with
little modification from the Linux kernel source code.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 arch/powerpc/dts/t4240rdb.dts | 142 +++++++++++++++++++++++++++++++++-
 1 file changed, 141 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/dts/t4240rdb.dts b/arch/powerpc/dts/t4240rdb.dts
index 635065a03685..6d31675c5ead 100644
--- a/arch/powerpc/dts/t4240rdb.dts
+++ b/arch/powerpc/dts/t4240rdb.dts
@@ -3,7 +3,7 @@
  * T4240RDB Device Tree Source
  *
  * Copyright 2013 - 2015 Freescale Semiconductor Inc.
- * Copyright 2019 NXP
+ * Copyright 2019-2021 NXP
  */
 
 /include/ "t4240.dtsi"
@@ -20,6 +20,144 @@
 	};
 };
 
+&soc {
+	fman at 400000 {
+		ethernet at e0000 {
+			phy-handle = <&sgmiiphy21>;
+			phy-connection-type = "sgmii";
+		};
+
+		ethernet at e2000 {
+			phy-handle = <&sgmiiphy22>;
+			phy-connection-type = "sgmii";
+		};
+
+		ethernet at e4000 {
+			phy-handle = <&sgmiiphy23>;
+			phy-connection-type = "sgmii";
+		};
+
+		ethernet at e6000 {
+			phy-handle = <&sgmiiphy24>;
+			phy-connection-type = "sgmii";
+		};
+
+		ethernet at e8000 {
+			status = "disabled";
+		};
+
+		ethernet at ea000 {
+			status = "disabled";
+		};
+
+		ethernet at f0000 {
+			phy-handle = <&xfiphy1>;
+			phy-connection-type = "xgmii";
+		};
+
+		ethernet at f2000 {
+			phy-handle = <&xfiphy2>;
+			phy-connection-type = "xgmii";
+		};
+	};
+
+	fman at 500000 {
+		ethernet at e0000 {
+			phy-handle = <&sgmiiphy41>;
+			phy-connection-type = "sgmii";
+		};
+
+		ethernet at e2000 {
+			phy-handle = <&sgmiiphy42>;
+			phy-connection-type = "sgmii";
+		};
+
+		ethernet at e4000 {
+			phy-handle = <&sgmiiphy43>;
+			phy-connection-type = "sgmii";
+		};
+
+		ethernet at e6000 {
+			phy-handle = <&sgmiiphy44>;
+			phy-connection-type = "sgmii";
+		};
+
+		ethernet at e8000 {
+			status = "disabled";
+		};
+
+		ethernet at ea000 {
+			status = "disabled";
+		};
+
+		ethernet at f0000 {
+			phy-handle = <&xfiphy3>;
+			phy-connection-type = "xgmii";
+		};
+
+		ethernet at f2000 {
+			phy-handle = <&xfiphy4>;
+			phy-connection-type = "xgmii";
+		};
+
+		mdio at fc000 {
+			sgmiiphy21: ethernet-phy at 0 {
+				reg = <0x0>;
+			};
+
+			sgmiiphy22: ethernet-phy at 1 {
+				reg = <0x1>;
+			};
+
+			sgmiiphy23: ethernet-phy at 2 {
+				reg = <0x2>;
+			};
+
+			sgmiiphy24: ethernet-phy at 3 {
+				reg = <0x3>;
+			};
+
+			sgmiiphy41: ethernet-phy at 4 {
+				reg = <0x4>;
+			};
+
+			sgmiiphy42: ethernet-phy at 5 {
+				reg = <0x5>;
+			};
+
+			sgmiiphy43: ethernet-phy at 6 {
+				reg = <0x6>;
+			};
+
+			sgmiiphy44: ethernet-phy at 7 {
+				reg = <0x7>;
+			};
+		};
+
+		mdio at fd000 {
+			xfiphy1: ethernet-phy at 10 {
+				compatible = "ethernet-phy-id13e5.1002";
+				reg = <0x10>;
+			};
+
+			xfiphy2: ethernet-phy at 11 {
+				compatible = "ethernet-phy-id13e5.1002";
+				reg = <0x11>;
+			};
+
+			xfiphy3: ethernet-phy at 13 {
+				compatible = "ethernet-phy-id13e5.1002";
+				reg = <0x13>;
+			};
+
+			xfiphy4: ethernet-phy at 12 {
+				compatible = "ethernet-phy-id13e5.1002";
+				reg = <0x12>;
+			};
+		};
+	};
+};
+
 &espi0 {
 	status = "okay";
 	flash at 0 {
@@ -30,3 +168,5 @@
 		spi-max-frequency = <10000000>; /* input clock */
 	};
 };
+
+/include/ "t4240si-post.dtsi"
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 07/11] powerpc: dts: qoriq: update the mdio offsets under the second FMan v3
  2021-04-09 13:41 [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards Camelia Groza
                   ` (5 preceding siblings ...)
  2021-04-09 13:41 ` [PATCH 06/11] powerpc: dts: t4240rdb: add " Camelia Groza
@ 2021-04-09 13:41 ` Camelia Groza
  2021-04-09 13:41 ` [PATCH 08/11] configs: T4240RDB: enable DM_ETH Camelia Groza
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Camelia Groza @ 2021-04-09 13:41 UTC (permalink / raw)
  To: u-boot

When two FMan's are present on a board, the MDIO nodes are found at the
same offsets inside each FMan. This causes "non unique device name"
errors when registering the MDIO nodes under the second FMan. Fix this
by updating the offsets of the MDIO nodes to include the parent FMan's
offset.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 arch/powerpc/dts/qoriq-fman3-1-10g-0.dtsi | 2 +-
 arch/powerpc/dts/qoriq-fman3-1-10g-1.dtsi | 2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-0.dtsi  | 2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-1.dtsi  | 2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-2.dtsi  | 2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-3.dtsi  | 2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-4.dtsi  | 2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-5.dtsi  | 2 +-
 arch/powerpc/dts/qoriq-fman3-1.dtsi       | 4 ++--
 arch/powerpc/dts/t4240rdb.dts             | 4 ++--
 arch/powerpc/dts/t4240si-post.dtsi        | 4 ++--
 11 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/arch/powerpc/dts/qoriq-fman3-1-10g-0.dtsi b/arch/powerpc/dts/qoriq-fman3-1-10g-0.dtsi
index 889c8d450e09..65bb8a4b0b63 100644
--- a/arch/powerpc/dts/qoriq-fman3-1-10g-0.dtsi
+++ b/arch/powerpc/dts/qoriq-fman3-1-10g-0.dtsi
@@ -30,7 +30,7 @@ fman at 500000 {
 		pcsphy-handle = <&pcsphy14>;
 	};
 
-	mdio at f1000 {
+	mdio at 5f1000 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 		compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
diff --git a/arch/powerpc/dts/qoriq-fman3-1-10g-1.dtsi b/arch/powerpc/dts/qoriq-fman3-1-10g-1.dtsi
index 2e456983372c..eb39d29b39fa 100644
--- a/arch/powerpc/dts/qoriq-fman3-1-10g-1.dtsi
+++ b/arch/powerpc/dts/qoriq-fman3-1-10g-1.dtsi
@@ -30,7 +30,7 @@ fman at 500000 {
 		pcsphy-handle = <&pcsphy15>;
 	};
 
-	mdio at f3000 {
+	mdio at 5f3000 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 		compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
diff --git a/arch/powerpc/dts/qoriq-fman3-1-1g-0.dtsi b/arch/powerpc/dts/qoriq-fman3-1-1g-0.dtsi
index b4ff19bf495a..2f2209dbc9bb 100644
--- a/arch/powerpc/dts/qoriq-fman3-1-1g-0.dtsi
+++ b/arch/powerpc/dts/qoriq-fman3-1-1g-0.dtsi
@@ -29,7 +29,7 @@ fman at 500000 {
 		pcsphy-handle = <&pcsphy8>;
 	};
 
-	mdio at e1000 {
+	mdio at 5e1000 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 		compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
diff --git a/arch/powerpc/dts/qoriq-fman3-1-1g-1.dtsi b/arch/powerpc/dts/qoriq-fman3-1-1g-1.dtsi
index 239c56ad1f62..11653c58b5f0 100644
--- a/arch/powerpc/dts/qoriq-fman3-1-1g-1.dtsi
+++ b/arch/powerpc/dts/qoriq-fman3-1-1g-1.dtsi
@@ -29,7 +29,7 @@ fman at 500000 {
 		pcsphy-handle = <&pcsphy9>;
 	};
 
-	mdio at e3000 {
+	mdio at 5e3000 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 		compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
diff --git a/arch/powerpc/dts/qoriq-fman3-1-1g-2.dtsi b/arch/powerpc/dts/qoriq-fman3-1-1g-2.dtsi
index 6e2bb009d9aa..ae27c7bc6df2 100644
--- a/arch/powerpc/dts/qoriq-fman3-1-1g-2.dtsi
+++ b/arch/powerpc/dts/qoriq-fman3-1-1g-2.dtsi
@@ -29,7 +29,7 @@ fman at 500000 {
 		pcsphy-handle = <&pcsphy10>;
 	};
 
-	mdio at e5000 {
+	mdio at 5e5000 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 		compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
diff --git a/arch/powerpc/dts/qoriq-fman3-1-1g-3.dtsi b/arch/powerpc/dts/qoriq-fman3-1-1g-3.dtsi
index 29dd94ba7498..55ae5499176e 100644
--- a/arch/powerpc/dts/qoriq-fman3-1-1g-3.dtsi
+++ b/arch/powerpc/dts/qoriq-fman3-1-1g-3.dtsi
@@ -29,7 +29,7 @@ fman at 500000 {
 		pcsphy-handle = <&pcsphy11>;
 	};
 
-	mdio at e7000 {
+	mdio at 5e7000 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 		compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
diff --git a/arch/powerpc/dts/qoriq-fman3-1-1g-4.dtsi b/arch/powerpc/dts/qoriq-fman3-1-1g-4.dtsi
index a5b493582703..833cf3e23d8e 100644
--- a/arch/powerpc/dts/qoriq-fman3-1-1g-4.dtsi
+++ b/arch/powerpc/dts/qoriq-fman3-1-1g-4.dtsi
@@ -29,7 +29,7 @@ fman at 500000 {
 		pcsphy-handle = <&pcsphy12>;
 	};
 
-	mdio at e9000 {
+	mdio at 5e9000 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 		compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
diff --git a/arch/powerpc/dts/qoriq-fman3-1-1g-5.dtsi b/arch/powerpc/dts/qoriq-fman3-1-1g-5.dtsi
index 486c84bf9810..81da55dfbe26 100644
--- a/arch/powerpc/dts/qoriq-fman3-1-1g-5.dtsi
+++ b/arch/powerpc/dts/qoriq-fman3-1-1g-5.dtsi
@@ -29,7 +29,7 @@ fman at 500000 {
 		pcsphy-handle = <&pcsphy13>;
 	};
 
-	mdio at eb000 {
+	mdio at 5eb000 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 		compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
diff --git a/arch/powerpc/dts/qoriq-fman3-1.dtsi b/arch/powerpc/dts/qoriq-fman3-1.dtsi
index d8609c3ecfdb..9efcf26c4abc 100644
--- a/arch/powerpc/dts/qoriq-fman3-1.dtsi
+++ b/arch/powerpc/dts/qoriq-fman3-1.dtsi
@@ -61,14 +61,14 @@ fman1: fman at 500000 {
 		reg = <0x87000 0x1000>;
 	};
 
-	mdio1: mdio at fc000 {
+	mdio1: mdio at 5fc000 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 		compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
 		reg = <0xfc000 0x1000>;
 	};
 
-	mdio at fd000 {
+	mdio at 5fd000 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 		compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
diff --git a/arch/powerpc/dts/t4240rdb.dts b/arch/powerpc/dts/t4240rdb.dts
index 6d31675c5ead..b3251e330de9 100644
--- a/arch/powerpc/dts/t4240rdb.dts
+++ b/arch/powerpc/dts/t4240rdb.dts
@@ -100,7 +100,7 @@
 			phy-connection-type = "xgmii";
 		};
 
-		mdio at fc000 {
+		mdio at 5fc000 {
 			sgmiiphy21: ethernet-phy at 0 {
 				reg = <0x0>;
 			};
@@ -134,7 +134,7 @@
 			};
 		};
 
-		mdio at fd000 {
+		mdio at 5fd000 {
 			xfiphy1: ethernet-phy at 10 {
 				compatible = "ethernet-phy-id13e5.1002";
 				reg = <0x10>;
diff --git a/arch/powerpc/dts/t4240si-post.dtsi b/arch/powerpc/dts/t4240si-post.dtsi
index f614d19965d3..a596f48b54fe 100644
--- a/arch/powerpc/dts/t4240si-post.dtsi
+++ b/arch/powerpc/dts/t4240si-post.dtsi
@@ -90,11 +90,11 @@
 		enet15: ethernet at f2000 {
 		};
 
-		mdio at fc000 {
+		mdio at 5fc000 {
 			interrupts = <100 1 0 0>;
 		};
 
-		mdio at fd000 {
+		mdio at 5fd000 {
 			interrupts = <101 1 0 0>;
 		};
 	};
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 08/11] configs: T4240RDB: enable DM_ETH
  2021-04-09 13:41 [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards Camelia Groza
                   ` (6 preceding siblings ...)
  2021-04-09 13:41 ` [PATCH 07/11] powerpc: dts: qoriq: update the mdio offsets under the second FMan v3 Camelia Groza
@ 2021-04-09 13:41 ` Camelia Groza
  2021-04-09 13:41 ` [PATCH 09/11] powerpc: dts: t1042: add QorIQ DPAA 1 FMan v3 nodes Camelia Groza
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Camelia Groza @ 2021-04-09 13:41 UTC (permalink / raw)
  To: u-boot

Enable DM_ETH and DM_MDIO for the T4240RDB.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 configs/T4240RDB_SDCARD_defconfig | 3 +++
 configs/T4240RDB_defconfig        | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/configs/T4240RDB_SDCARD_defconfig b/configs/T4240RDB_SDCARD_defconfig
index 61670fa3d14d..2def90140f2e 100644
--- a/configs/T4240RDB_SDCARD_defconfig
+++ b/configs/T4240RDB_SDCARD_defconfig
@@ -28,6 +28,7 @@ CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_GREPENV=y
+CONFIG_CMD_DM=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
@@ -59,6 +60,8 @@ CONFIG_PHYLIB_10G=y
 CONFIG_PHY_CORTINA=y
 CONFIG_PHY_TERANETICS=y
 CONFIG_PHY_VITESSE=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_PHY_GIGE=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
diff --git a/configs/T4240RDB_defconfig b/configs/T4240RDB_defconfig
index 2c8a2f0ef271..8a0c122833f5 100644
--- a/configs/T4240RDB_defconfig
+++ b/configs/T4240RDB_defconfig
@@ -15,6 +15,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_GREPENV=y
+CONFIG_CMD_DM=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
@@ -47,6 +48,8 @@ CONFIG_PHYLIB_10G=y
 CONFIG_PHY_CORTINA=y
 CONFIG_PHY_TERANETICS=y
 CONFIG_PHY_VITESSE=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_PHY_GIGE=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 09/11] powerpc: dts: t1042: add QorIQ DPAA 1 FMan v3 nodes
  2021-04-09 13:41 [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards Camelia Groza
                   ` (7 preceding siblings ...)
  2021-04-09 13:41 ` [PATCH 08/11] configs: T4240RDB: enable DM_ETH Camelia Groza
@ 2021-04-09 13:41 ` Camelia Groza
  2021-04-09 13:41 ` [PATCH 10/11] powerpc: dts: t1042d4rdb: add " Camelia Groza
  2021-04-09 13:41 ` [PATCH 11/11] configs: T1042D4RDB: enable DM_ETH Camelia Groza
  10 siblings, 0 replies; 13+ messages in thread
From: Camelia Groza @ 2021-04-09 13:41 UTC (permalink / raw)
  To: u-boot

Add the QorIQ DPAA 1 FMan v3 device tree nodes for the T1042 SoC.
The device tree nodes are copied over with little modification
from the Linux kernel source code.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 arch/powerpc/dts/t1042si-post.dtsi | 46 ++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 arch/powerpc/dts/t1042si-post.dtsi

diff --git a/arch/powerpc/dts/t1042si-post.dtsi b/arch/powerpc/dts/t1042si-post.dtsi
new file mode 100644
index 000000000000..5c60944e607b
--- /dev/null
+++ b/arch/powerpc/dts/t1042si-post.dtsi
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
+/*
+ * T1042 Silicon/SoC Device Tree Source (post include)
+ *
+ * Copyright 2013 - 2014 Freescale Semiconductor Inc.
+ * Copyright 2021 NXP
+ *
+ */
+&soc {
+/include/ "qoriq-clockgen2.dtsi"
+/include/ "qoriq-gpio-0.dtsi"
+/include/ "qoriq-gpio-1.dtsi"
+/include/ "qoriq-gpio-2.dtsi"
+/include/ "qoriq-gpio-3.dtsi"
+
+/include/ "qoriq-fman3l-0.dtsi"
+/include/ "qoriq-fman3-0-1g-0.dtsi"
+/include/ "qoriq-fman3-0-1g-1.dtsi"
+/include/ "qoriq-fman3-0-1g-2.dtsi"
+/include/ "qoriq-fman3-0-1g-3.dtsi"
+/include/ "qoriq-fman3-0-1g-4.dtsi"
+	fman at 400000 {
+		enet0: ethernet at e0000 {
+		};
+
+		enet1: ethernet at e2000 {
+		};
+
+		enet2: ethernet at e4000 {
+		};
+
+		enet3: ethernet at e6000 {
+		};
+
+		enet4: ethernet at e8000 {
+		};
+
+		mdio at fc000 {
+			interrupts = <100 1 0 0>;
+		};
+
+		mdio at fd000 {
+			status = "disabled";
+		};
+	};
+};
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 10/11] powerpc: dts: t1042d4rdb: add FMan v3 nodes
  2021-04-09 13:41 [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards Camelia Groza
                   ` (8 preceding siblings ...)
  2021-04-09 13:41 ` [PATCH 09/11] powerpc: dts: t1042: add QorIQ DPAA 1 FMan v3 nodes Camelia Groza
@ 2021-04-09 13:41 ` Camelia Groza
  2021-04-09 13:41 ` [PATCH 11/11] configs: T1042D4RDB: enable DM_ETH Camelia Groza
  10 siblings, 0 replies; 13+ messages in thread
From: Camelia Groza @ 2021-04-09 13:41 UTC (permalink / raw)
  To: u-boot

Add the FMan v3 nodes for the T1042D4RDB. The nodes are copied over with
little modification from the Linux kernel source code.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 arch/powerpc/dts/t1042d4rdb.dts | 55 ++++++++++++++++++++++++++++++++-
 1 file changed, 54 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/dts/t1042d4rdb.dts b/arch/powerpc/dts/t1042d4rdb.dts
index 3584c06aa8d6..5e9fab7a1057 100644
--- a/arch/powerpc/dts/t1042d4rdb.dts
+++ b/arch/powerpc/dts/t1042d4rdb.dts
@@ -3,7 +3,7 @@
  * T1042D4RDB Device Tree Source
  *
  * Copyright 2013 - 2015 Freescale Semiconductor Inc.
- * Copyright 2019 NXP
+ * Copyright 2019-2021 NXP
  */
 
 /include/ "t104x.dtsi"
@@ -20,6 +20,57 @@
 	};
 };
 
+&soc {
+	fman0: fman at 400000 {
+		ethernet at e0000 {
+			phy-handle = <&phy_sgmii_0>;
+			phy-connection-type = "sgmii";
+		};
+
+		ethernet at e2000 {
+			phy-handle = <&phy_sgmii_1>;
+			phy-connection-type = "sgmii";
+		};
+
+		ethernet at e4000 {
+			phy-handle = <&phy_sgmii_2>;
+			phy-connection-type = "sgmii";
+		};
+
+		ethernet at e6000 {
+			phy-handle = <&phy_rgmii_0>;
+			phy-connection-type = "rgmii";
+		};
+
+		ethernet at e8000 {
+			phy-handle = <&phy_rgmii_1>;
+			phy-connection-type = "rgmii";
+		};
+
+		mdio0: mdio at fc000 {
+			phy_sgmii_0: ethernet-phy at 2 {
+				reg = <0x02>;
+			};
+
+			phy_sgmii_1: ethernet-phy at 3 {
+				reg = <0x03>;
+			};
+
+			phy_sgmii_2: ethernet-phy at 1 {
+				reg = <0x01>;
+			};
+
+			phy_rgmii_0: ethernet-phy at 4 {
+				reg = <0x04>;
+			};
+
+			phy_rgmii_1: ethernet-phy at 5 {
+				reg = <0x05>;
+			};
+		};
+	};
+};
+
 &espi0 {
 	status = "okay";
 	flash at 0 {
@@ -30,3 +81,5 @@
 		spi-max-frequency = <10000000>; /* input clock */
 	};
 };
+
+/include/ "t1042si-post.dtsi"
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 11/11] configs: T1042D4RDB: enable DM_ETH
  2021-04-09 13:41 [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards Camelia Groza
                   ` (9 preceding siblings ...)
  2021-04-09 13:41 ` [PATCH 10/11] powerpc: dts: t1042d4rdb: add " Camelia Groza
@ 2021-04-09 13:41 ` Camelia Groza
  10 siblings, 0 replies; 13+ messages in thread
From: Camelia Groza @ 2021-04-09 13:41 UTC (permalink / raw)
  To: u-boot

Enable DM_ETH and DM_MDIO for the T1042D4RDB.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 configs/T1042D4RDB_NAND_defconfig        | 3 +++
 configs/T1042D4RDB_SDCARD_defconfig      | 3 +++
 configs/T1042D4RDB_SECURE_BOOT_defconfig | 4 +++-
 configs/T1042D4RDB_SPIFLASH_defconfig    | 3 +++
 configs/T1042D4RDB_defconfig             | 3 +++
 5 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/configs/T1042D4RDB_NAND_defconfig b/configs/T1042D4RDB_NAND_defconfig
index bdfd0ef71b71..54bcc2f0821c 100644
--- a/configs/T1042D4RDB_NAND_defconfig
+++ b/configs/T1042D4RDB_NAND_defconfig
@@ -33,6 +33,7 @@ CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_GREPENV=y
+CONFIG_CMD_DM=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
@@ -66,6 +67,8 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_REALTEK=y
 CONFIG_PHY_VITESSE=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_PHY_GIGE=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
diff --git a/configs/T1042D4RDB_SDCARD_defconfig b/configs/T1042D4RDB_SDCARD_defconfig
index 9094327edeaa..853a3d65ae1c 100644
--- a/configs/T1042D4RDB_SDCARD_defconfig
+++ b/configs/T1042D4RDB_SDCARD_defconfig
@@ -31,6 +31,7 @@ CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_GREPENV=y
+CONFIG_CMD_DM=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
@@ -63,6 +64,8 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_REALTEK=y
 CONFIG_PHY_VITESSE=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_PHY_GIGE=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
diff --git a/configs/T1042D4RDB_SECURE_BOOT_defconfig b/configs/T1042D4RDB_SECURE_BOOT_defconfig
index ef097bab8979..a59082c49a16 100644
--- a/configs/T1042D4RDB_SECURE_BOOT_defconfig
+++ b/configs/T1042D4RDB_SECURE_BOOT_defconfig
@@ -17,6 +17,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_GREPENV=y
+CONFIG_CMD_DM=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
@@ -45,8 +46,9 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_REALTEK=y
 CONFIG_PHY_VITESSE=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_PHY_GIGE=y
-CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
 CONFIG_MII=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
diff --git a/configs/T1042D4RDB_SPIFLASH_defconfig b/configs/T1042D4RDB_SPIFLASH_defconfig
index bc59866b551e..cef5295748a1 100644
--- a/configs/T1042D4RDB_SPIFLASH_defconfig
+++ b/configs/T1042D4RDB_SPIFLASH_defconfig
@@ -33,6 +33,7 @@ CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_GREPENV=y
+CONFIG_CMD_DM=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
@@ -65,6 +66,8 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_REALTEK=y
 CONFIG_PHY_VITESSE=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_PHY_GIGE=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
diff --git a/configs/T1042D4RDB_defconfig b/configs/T1042D4RDB_defconfig
index f968a448e927..85e2beab0200 100644
--- a/configs/T1042D4RDB_defconfig
+++ b/configs/T1042D4RDB_defconfig
@@ -18,6 +18,7 @@ CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_IMLS=y
 CONFIG_CMD_GREPENV=y
+CONFIG_CMD_DM=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
@@ -51,6 +52,8 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_REALTEK=y
 CONFIG_PHY_VITESSE=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_PHY_GIGE=y
 CONFIG_E1000=y
 CONFIG_FMAN_ENET=y
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards
@ 2021-04-09 14:23 Camelia Groza
  0 siblings, 0 replies; 13+ messages in thread
From: Camelia Groza @ 2021-04-09 14:23 UTC (permalink / raw)
  To: u-boot

Apologies to those who received this series twice off list due to an
e-mail misconfiguration.

This patch series enables DM_ETH and DM_MDIO on the T2080RDB, T4240RDB and
T1042D4RDB DPAA1 PowerPC boards. The necessary FMan v3 Ethernet and MDIO
nodes are added to each platform's SoC and board device tree.

On T2080RDB, fdt fixups are performed before booting into the OS using a
simplified new routine in order to avoid the legacy code path.

Camelia Groza (11):
  powerpc: dts: t2080: add QorIQ DPAA 1 FMan v3 nodes
  powerpc: dts: t2080rdb: add FMan v3 nodes
  board: freescale: t208xrdb: fdt fixups under DM_ETH
  configs: T2080RDB: enable DM_ETH
  powerpc: dts: t4240: add QorIQ DPAA 1 FMan v3 nodes
  powerpc: dts: t4240rdb: add FMan v3 nodes
  powerpc: dts: qoriq: update the mdio offsets under the second FMan v3
  configs: T4240RDB: enable DM_ETH
  powerpc: dts: t1042: add QorIQ DPAA 1 FMan v3 nodes
  powerpc: dts: t1042d4rdb: add FMan v3 nodes
  configs: T1042D4RDB: enable DM_ETH

 arch/powerpc/dts/qoriq-fman3-1-10g-0.dtsi |   2 +-
 arch/powerpc/dts/qoriq-fman3-1-10g-1.dtsi |   2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-0.dtsi  |   2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-1.dtsi  |   2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-2.dtsi  |   2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-3.dtsi  |   2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-4.dtsi  |   2 +-
 arch/powerpc/dts/qoriq-fman3-1-1g-5.dtsi  |   2 +-
 arch/powerpc/dts/qoriq-fman3-1.dtsi       |   4 +-
 arch/powerpc/dts/t1042d4rdb.dts           |  55 ++++++++-
 arch/powerpc/dts/t1042si-post.dtsi        |  46 +++++++
 arch/powerpc/dts/t2080rdb.dts             |  69 ++++++++++-
 arch/powerpc/dts/t2080si-post.dtsi        |  51 ++++++++
 arch/powerpc/dts/t4240rdb.dts             | 142 +++++++++++++++++++++-
 arch/powerpc/dts/t4240si-post.dtsi        | 101 +++++++++++++++
 board/freescale/t208xrdb/eth_t208xrdb.c   |  35 ++++++
 board/freescale/t208xrdb/t208xrdb.c       |   3 +
 board/freescale/t208xrdb/t208xrdb.h       |   2 +
 configs/T1042D4RDB_NAND_defconfig         |   3 +
 configs/T1042D4RDB_SDCARD_defconfig       |   3 +
 configs/T1042D4RDB_SECURE_BOOT_defconfig  |   4 +-
 configs/T1042D4RDB_SPIFLASH_defconfig     |   3 +
 configs/T1042D4RDB_defconfig              |   3 +
 configs/T2080RDB_NAND_defconfig           |   3 +
 configs/T2080RDB_SDCARD_defconfig         |   3 +
 configs/T2080RDB_SPIFLASH_defconfig       |   3 +
 configs/T2080RDB_defconfig                |   3 +
 configs/T4240RDB_SDCARD_defconfig         |   3 +
 configs/T4240RDB_defconfig                |   3 +
 29 files changed, 544 insertions(+), 14 deletions(-)
 create mode 100644 arch/powerpc/dts/t1042si-post.dtsi
 create mode 100644 arch/powerpc/dts/t2080si-post.dtsi
 create mode 100644 arch/powerpc/dts/t4240si-post.dtsi

--
2.17.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-04-09 14:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 13:41 [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards Camelia Groza
2021-04-09 13:41 ` [PATCH 01/11] powerpc: dts: t2080: add QorIQ DPAA 1 FMan v3 nodes Camelia Groza
2021-04-09 13:41 ` [PATCH 02/11] powerpc: dts: t2080rdb: add " Camelia Groza
2021-04-09 13:41 ` [PATCH 03/11] board: freescale: t208xrdb: fdt fixups under DM_ETH Camelia Groza
2021-04-09 13:41 ` [PATCH 04/11] configs: T2080RDB: enable DM_ETH Camelia Groza
2021-04-09 13:41 ` [PATCH 05/11] powerpc: dts: t4240: add QorIQ DPAA 1 FMan v3 nodes Camelia Groza
2021-04-09 13:41 ` [PATCH 06/11] powerpc: dts: t4240rdb: add " Camelia Groza
2021-04-09 13:41 ` [PATCH 07/11] powerpc: dts: qoriq: update the mdio offsets under the second FMan v3 Camelia Groza
2021-04-09 13:41 ` [PATCH 08/11] configs: T4240RDB: enable DM_ETH Camelia Groza
2021-04-09 13:41 ` [PATCH 09/11] powerpc: dts: t1042: add QorIQ DPAA 1 FMan v3 nodes Camelia Groza
2021-04-09 13:41 ` [PATCH 10/11] powerpc: dts: t1042d4rdb: add " Camelia Groza
2021-04-09 13:41 ` [PATCH 11/11] configs: T1042D4RDB: enable DM_ETH Camelia Groza
2021-04-09 14:23 [PATCH 00/11] Enable DM_ETH for DPAA1 PowerPC T-series boards Camelia Groza

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.