aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/base-files/etc/board.d
diff options
context:
space:
mode:
authorMathew McBride <matt@traverse.com.au>2018-04-30 22:42:39 +1000
committerJohn Crispin <john@phrozen.org>2018-07-30 10:53:57 +0200
commit08714738d2c8d7710f8fd2b7deac795f49e7d7c2 (patch)
treeda058038a138d0ab98d7928d9806f4f77ddbef65 /target/linux/layerscape/base-files/etc/board.d
parent481f870a02a29974eca943f3b926434d5e517679 (diff)
downloadupstream-08714738d2c8d7710f8fd2b7deac795f49e7d7c2.tar.gz
upstream-08714738d2c8d7710f8fd2b7deac795f49e7d7c2.tar.bz2
upstream-08714738d2c8d7710f8fd2b7deac795f49e7d7c2.zip
layerscape: add Traverse LS1043-S support
The Traverse LS1043-S board is a router board based on NXP/Freescale's LS1043 SoC, with 4x1GBase-T, 1 SFP and 1 SFP+, as well as miniPCIe and M.2 LTE. Unlike the Layerscape reference boards, the LS1043-S board has NAND flash and uses the mainline U-Boot. This patch implements support for the LS1043-S board, as well as the earlier LS1043-V board. It is our intention that all boards in this family (LS1043-S and later, Five64) will boot the same binary. Not included in this patchset are the hwmon drivers not in the kernel (emc1704,pac1934) or the bootloader. Signed-off-by: Mathew McBride <matt@traverse.com.au>
Diffstat (limited to 'target/linux/layerscape/base-files/etc/board.d')
-rwxr-xr-xtarget/linux/layerscape/base-files/etc/board.d/01_led25
-rwxr-xr-xtarget/linux/layerscape/base-files/etc/board.d/02_network21
-rwxr-xr-xtarget/linux/layerscape/base-files/etc/board.d/03_gpio_switches28
3 files changed, 74 insertions, 0 deletions
diff --git a/target/linux/layerscape/base-files/etc/board.d/01_led b/target/linux/layerscape/base-files/etc/board.d/01_led
new file mode 100755
index 0000000000..b9b62a07e0
--- /dev/null
+++ b/target/linux/layerscape/base-files/etc/board.d/01_led
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+board=$(board_name)
+
+case "$board" in
+traverse,ls1043v)
+ ucidef_set_led_netdev "wan" "WAN LED" "ls1043v:yellow:wan" "eth4"
+ ;;
+traverse,ls1043s)
+ ucidef_set_led_netdev "wan" "WAN LED" "ls1043s:yellow:wan" "eth4"
+ ucidef_set_led_netdev "xgact" "10G Activity" "ls1043s:yellow:10gact" "eth6"
+ ucidef_set_led_netdev "xglink" "10G Link" "ls1043s:green:10glink" "eth6"
+ ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/layerscape/base-files/etc/board.d/02_network b/target/linux/layerscape/base-files/etc/board.d/02_network
new file mode 100755
index 0000000000..c50b4a346a
--- /dev/null
+++ b/target/linux/layerscape/base-files/etc/board.d/02_network
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+. /lib/functions/system.sh
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+case "$(board_name)" in
+ traverse,ls1043v)
+ ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
+ ucidef_set_interface_wan "eth4"
+ ;;
+ traverse,ls1043s)
+ ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth6"
+ ucidef_set_interface_wan "eth4"
+ ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches b/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches
new file mode 100755
index 0000000000..7f9da08668
--- /dev/null
+++ b/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+board=$(board_name)
+
+case "$board" in
+traverse,ls1043v)
+ ucidef_add_gpio_switch "lte_reset" "LTE Reset" "377"
+ ucidef_add_gpio_switch "lte_disable" "LTE Airplane mode" "378"
+ ;;
+traverse,ls1043s)
+ ucidef_add_gpio_switch "tensfp_txdisable" "SFP+ TX Disable" "378"
+ ucidef_add_gpio_switch "gigsfp_txdisable" "SFP TX Disable" "381"
+ ucidef_add_gpio_switch "lte_reset" "LTE Reset" "502"
+ ucidef_add_gpio_switch "lte_disable" "LTE Airplane Mode" "394"
+ ucidef_add_gpio_switch "lte_power" "LTE Power" "395"
+ ;;
+esac
+
+board_config_flush
+
+exit 0