summaryrefslogtreecommitdiff
path: root/include/configs
diff options
context:
space:
mode:
authorAmjad Ouled-Ameur <aouledameur@baylibre.com>2021-10-29 17:08:17 +0300
committerTom Rini <trini@konsulko.com>2022-01-16 16:31:03 +0300
commit609983e981a0a7f053ee6f9f6cd2772226a33000 (patch)
tree747941ffda575cae26db20d7fa043c118a45d5bd /include/configs
parentf44bcb9f0d73c13738b8f3e437bda75fda642ad7 (diff)
downloadu-boot-609983e981a0a7f053ee6f9f6cd2772226a33000.tar.xz
board: ti: am335x: Choose CPSW or PRUSS configuration based on jumper setting
The am335x-ice-v2 board's Ethernet ports can be configured in 'MII' or 'RMII' mode to be connected to 'PRUSS' or 'CPSW' Ethernet subsystems. This patch sets the environment variable 'ice_mii' to 'mii' or 'rmii' accordingly. Based on that we choose the appropriate board devicetree i.e. 'am335x-ice-v2.dtb' or 'am335x-ice-v2-prueth.dtb'. Since there are 2 Ethernet ports with 2 modes, there can be 4 configurations but for now we consider both ports in different modes to be an invalid configuration and prevent boot in that case. Signed-off-by: Roger Quadros <rogerq@ti.com> [Amjad: use overlay instead of using new am335x-ice-v2-prueth.dtb] Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Make prueth_is_mii be marked __maybe_unused] Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/configs')
-rw-r--r--include/configs/am335x_evm.h5
-rw-r--r--include/configs/ti_armv7_common.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 7fb1b3a3e3..0f340806ef 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -143,7 +143,10 @@
"if test $board_name = A335X_SK; then " \
"setenv fdtfile am335x-evmsk.dtb; fi; " \
"if test $board_name = A335_ICE; then " \
- "setenv fdtfile am335x-icev2.dtb; fi; " \
+ "setenv fdtfile am335x-icev2.dtb; " \
+ "if test $ice_mii = mii; then " \
+ "setenv pxe_label_override Pruss; fi;" \
+ "fi; " \
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; fi; \0" \
"init_console=" \
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index fa48cd2818..797e121198 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -37,6 +37,7 @@
"fdtaddr=0x88000000\0" \
"dtboaddr=0x89000000\0" \
"fdt_addr_r=0x88000000\0" \
+ "fdtoverlay_addr_r=0x89000000\0" \
"rdaddr=0x88080000\0" \
"ramdisk_addr_r=0x88080000\0" \
"scriptaddr=0x80000000\0" \