board: fsl: lx2160ardb: add dts fixup function for RevC and newer
Since the new RevC LX2160A-RDB board has its 10G Aquantia PHYs at
different MDIO bus addresses, we must update both the kernel DTS and
u-boot's DTS (in case of DM_ETH) in case the board is indeed RevC or
newer. Use the newly introduced get_board_rev() function to trigger a
fixup of the kernel DTS to properly match the actual PHY addresses.
All this is encapsulated in the fdt_fixup_board_phy_revc() function
which will be used in the next patch.
Use the newly fdt_fixup_board_phy_revc() function introduced to
update both kernel's DTS and u-boot's DTS.
Signed-off-by: Florin Chiculita <florinlaurentiu.chiculita@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c
index 4d406ac8..d631a11 100644
--- a/board/freescale/lx2160a/lx2160a.c
+++ b/board/freescale/lx2160a/lx2160a.c
@@ -133,6 +133,11 @@
fdt_setprop(fdt, off, "reg-names", reg_names, names_len);
}
+ /* Fixup u-boot's DTS in case this is a revC board and
+ * we're using DM_ETH.
+ */
+ if (IS_ENABLED(CONFIG_TARGET_LX2160ARDB) && IS_ENABLED(CONFIG_DM_ETH))
+ fdt_fixup_board_phy_revc(fdt);
return 0;
}
#endif
@@ -636,6 +641,8 @@
if (get_mc_boot_status() == 0 &&
(is_lazy_dpl_addr_valid() || get_dpl_apply_status() == 0)) {
fdt_status_okay(fdt, offset);
+ if (IS_ENABLED(CONFIG_TARGET_LX2160ARDB))
+ fdt_fixup_board_phy_revc(fdt);
} else {
fdt_status_fail(fdt, offset);
}