summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2021-09-06 13:19:59 +0200
committerPraneeth Bajjuri <praneeth@ti.com>2021-09-17 16:42:51 -0500
commitbb17c015dcd6bcf89fc45deb50d5085631db5a98 (patch)
tree54ad800e4371977e9e48dbdd5ce60e37c2ae0d16 /include
parentd7313c434fc673488bf9975579796f5d5e351a72 (diff)
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: Fix compile and checkpatch warnings] Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com> Tested-by: Adrien Ricciardi <aricciardi@baylibre.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/am335x_evm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 5af90d932d5..14c73c388e7 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -160,8 +160,10 @@
"setenv fdtfile am335x-evm.dtb; fi; " \
"if test $board_name = A335X_SK; then " \
"setenv fdtfile am335x-evmsk.dtb; fi; " \
- "if test $board_name = A335_ICE; then " \
+ "if test $board_name = A335_ICE && test $ice_mii = rmii; then " \
"setenv fdtfile am335x-icev2.dtb; fi; " \
+ "if test $board_name = A335_ICE && test $ice_mii = mii; then " \
+ "setenv fdtfile am335x-icev2-prueth.dtb; fi; " \
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; fi; \0" \
"init_console=" \