[PATCH v1 03/23] board: nbxv3: enable RTL8211FD PHY for 1G DPAA2

Vincent Jardin <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <20260817153144.1951036-4-vjardin__6838.22968728549$1786980794$gmane$org@free.fr>
The on module 1G management port uses a Realtek RTL8211FD-CG.

With the DTS, enable the management complex/DPAA2 stack and describe
the on module management port: DPMAC17 wired through RGMII1 to the
RTL8211FD-CG.

The MC firmware itself is started by ${mcinitcmd}, which comes with
the boot environment: until then mc_env_boot() is a no-op.

Signed-off-by: Vincent Jardin <[email protected]>
---

 arch/arm/dts/fsl-lx2160a-nbxv3.dts | 26 ++++++++++++++++++++++++++
 configs/nbxv3_tfa_defconfig        |  5 ++++-
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/fsl-lx2160a-nbxv3.dts b/arch/arm/dts/fsl-lx2160a-nbxv3.dts
index 32f0c207a59..8caea051bed 100644
--- a/arch/arm/dts/fsl-lx2160a-nbxv3.dts
+++ b/arch/arm/dts/fsl-lx2160a-nbxv3.dts
@@ -14,3 +14,29 @@
 	model = "Free Mobile Nodebox v3 CPU Module (LX2160A)";
 	compatible = "freemobile,nbxv3", "fsl,lx2160a";
 };
+
+/*
+ * E-MDIO buses.
+ * SMI1 (&emdio1) carries the on module RTL8211FD-CG,
+ * SMI2 (&emdio2) is wired to the carrier.
+ */
+&emdio1 {
+	status = "okay";
+
+	rtl8211fd: ethernet-phy@6 {
+		compatible = "ethernet-phy-id001c.c916",
+			     "ethernet-phy-ieee802.3-c22";
+		reg = <6>;
+	};
+};
+
+&emdio2 {
+	status = "okay";
+};
+
+&dpmac17 { /* DPMAC17 to RGMII1 to RTL8211FD-CG. */
+	status = "okay";
+	phy-handle = <&rtl8211fd>;
+	phy-connection-type = "rgmii-id";
+	u-boot,nickname = "lanconsole0";
+};
diff --git a/configs/nbxv3_tfa_defconfig b/configs/nbxv3_tfa_defconfig
index 86b5b44ec09..cb6043f3278 100644
--- a/configs/nbxv3_tfa_defconfig
+++ b/configs/nbxv3_tfa_defconfig
@@ -22,6 +22,7 @@ CONFIG_DYNAMIC_SYS_CLK_FREQ=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_PBSIZE=532
 # CONFIG_ID_EEPROM is not set
+CONFIG_RESET_PHY_R=y
 CONFIG_CMDLINE_PS_SUPPORT=y
 CONFIG_CMD_HISTORY=y
 CONFIG_CMD_LOG=y
@@ -31,7 +32,9 @@ CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
 CONFIG_SYS_FSL_DDR_INTLV_256B=y
 CONFIG_DM_I2C=y
-# CONFIG_FSL_MC_ENET is not set
+CONFIG_PHYLIB=y
+CONFIG_PHY_REALTEK=y
+CONFIG_SYS_MEMAC_LITTLE_ENDIAN=y
 CONFIG_DM_SERIAL=y
 CONFIG_PL01X_SERIAL=y
 CONFIG_WDT=y
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.