From 3a8dd27f5a216dbb5f435c51367360380f0e6ab6 Mon Sep 17 00:00:00 2001 From: Ioana Ciornei Date: Wed, 21 Apr 2021 12:53:10 +0300 Subject: [PATCH] board: fsl: lx2160ardb: add dts fixup for RevC Use the newly fdt_fixup_board_phy_revc() function introduced to updated both kernel's DTS and u-boot's DTS in case we are running with DM_ETH. Signed-off-by: Ioana Ciornei Signed-off-by: Florin Chiculita --- board/freescale/lx2160a/eth_lx2160ardb.c | 2 +- board/freescale/lx2160a/lx2160a.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/board/freescale/lx2160a/eth_lx2160ardb.c b/board/freescale/lx2160a/eth_lx2160ardb.c index c693ad9a0a..30a3af9f47 100644 --- a/board/freescale/lx2160a/eth_lx2160ardb.c +++ b/board/freescale/lx2160a/eth_lx2160ardb.c @@ -366,5 +366,5 @@ int fdt_fixup_board_phy(void *fdt) } } - return ret; + return fdt_fixup_board_phy_revc(fdt); } diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c index af6d96eb16..8b9fb8bdf0 100644 --- a/board/freescale/lx2160a/lx2160a.c +++ b/board/freescale/lx2160a/lx2160a.c @@ -211,6 +211,11 @@ int board_fix_fdt(void *fdt) "fsl,lx2160a-pcie"); } + /* 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 @@ -775,6 +780,9 @@ void fdt_fixup_board_enet(void *fdt) fdt_status_okay(fdt, offset); #ifndef CONFIG_DM_ETH fdt_fixup_board_phy(fdt); +#else + if (IS_ENABLED(CONFIG_TARGET_LX2160ARDB)) + fdt_fixup_board_phy_revc(fdt); #endif } else { fdt_status_fail(fdt, offset); -- 2.17.1