kirkwood: add support for Linksys EA3500
authorLuka Perkov <luka@openwrt.org>
Mon, 10 Nov 2014 23:55:10 +0000 (23:55 +0000)
committerLuka Perkov <luka@openwrt.org>
Mon, 10 Nov 2014 23:55:10 +0000 (23:55 +0000)
http://wiki.openwrt.org/toh/linksys/ea3500

Signed-off-by: Dan Walters <dan@walters.io>
SVN-Revision: 43230

package/boot/uboot-envtools/files/kirkwood
target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
target/linux/kirkwood/base-files/etc/uci-defaults/02_network
target/linux/kirkwood/base-files/lib/kirkwood.sh
target/linux/kirkwood/image/Makefile
target/linux/kirkwood/patches-3.14/170-ea3500.patch [new file with mode: 0644]
target/linux/kirkwood/profiles/115-router.mk

index ef6c1131a7b97d30e90d1eb5ae82cb9d9c1664b2..b15b8f98f9f4da03f3048b695a07ed61c5f931f1 100644 (file)
@@ -14,6 +14,7 @@ touch /etc/config/ubootenv
 board=$(kirkwood_board_name)
 
 case "$board" in
+"ea3500" | \
 "ea4500" | \
 "ib62x0" | \
 "pogo_e02")
index 07c1a0ec0096e3fc0a3de3becb0c9b9c3cde2c20..41191f753588048c34af611f9b227264f48a258f 100644 (file)
@@ -13,6 +13,9 @@ case "$board" in
        ucidef_set_led_default "health" "status:green:health" "1"
        ucidef_set_led_default "fault" "status:orange:fault" "1"
        ;;
+"ea3500")
+       ucidef_set_led_default "power" "ea3500:green:power" "1"
+       ;;
 "ea4500")
        ucidef_set_led_default "health" "ea4500:white:health" "1"
        ucidef_set_led_default "pulse" "ea4500:white:pulse" "1"
index e795d65dc19bbb67cea793ff77787976e176fab7..bc7e793db59d27bfba2717ff7022c70502a2c09a 100644 (file)
@@ -40,6 +40,9 @@ case "$board" in
 "pogo_e02")
        set_lan_dhcp "eth0"
        ;;
+"ea3500")
+       ucidef_set_interfaces_lan_wan "eth0" "eth1"
+       ;;
 "ea4500")
        ucidef_set_interfaces_lan_wan "eth0" "eth1"
        ;;
index ba080f4a7a8b5d1c5a97a6cb40dc2c80064ebd0e..323a997db4897edbfdad9225413e7378d2dc1366 100755 (executable)
@@ -29,6 +29,10 @@ kirkwood_board_detect() {
                name="pogo_e02"
                ;;
 
+       "Linksys EA3500")
+               name="ea3500"
+               ;;
+
        "Linksys EA4500")
                name="ea4500"
                ;;
index e3c6f0b73999281e802ca8da6d1e621aa241ebcd..3852cacd3a1497b8d52990dc75029ba7ef5255cd 100644 (file)
@@ -117,6 +117,9 @@ Image/InstallKernel/Template/Generic=$(call Image/InstallKernel/Template)
 Image/BuildKernel/Template/DOCKSTAR=$(call Image/BuildKernel/Template,dockstar)
 Image/InstallKernel/Template/DOCKSTAR=$(call Image/InstallKernel/Template,dockstar)
 
+Image/BuildKernel/Template/EA3500=$(call Image/BuildKernel/Template,ea3500)
+Image/InstallKernel/Template/EA3500=$(call Image/InstallKernel/Template,ea3500)
+
 Image/BuildKernel/Template/EA4500=$(call Image/BuildKernel/Template,ea4500)
 Image/InstallKernel/Template/EA4500=$(call Image/InstallKernel/Template,ea4500)
 
diff --git a/target/linux/kirkwood/patches-3.14/170-ea3500.patch b/target/linux/kirkwood/patches-3.14/170-ea3500.patch
new file mode 100644 (file)
index 0000000..ac4f45c
--- /dev/null
@@ -0,0 +1,162 @@
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -90,6 +90,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-
+       kirkwood-dns325.dtb \
+       kirkwood-dockstar.dtb \
+       kirkwood-dreamplug.dtb \
++      kirkwood-ea3500.dtb \
+       kirkwood-ea4500.dtb \
+       kirkwood-goflexnet.dtb \
+       kirkwood-guruplug-server-plus.dtb \
+--- /dev/null
++++ b/arch/arm/boot/dts/kirkwood-ea3500.dts
+@@ -0,0 +1,149 @@
++/*
++ * kirkwood-ea3500.dts - Device Tree file for Linksys EA3500
++ *
++ * (c) 2013 Jonas Gorski <jogo@openwrt.org>
++ * (c) 2013 Deutsche Telekom Innovation Laboratories
++ * (c) 2014 Luka Perkov <luka@openwrt.org>
++ * (c) 2014 Dan Walters <dan@walters.io>
++ *
++ * This file is licensed under the terms of the GNU General Public
++ * License version 2.  This program is licensed "as is" without any
++ * warranty of any kind, whether express or implied.
++ */
++
++/dts-v1/;
++
++#include "kirkwood.dtsi"
++#include "kirkwood-6282.dtsi"
++
++/ {
++      model = "Linksys EA3500";
++      compatible = "linksys,ea3500", "marvell,kirkwood-88f6282", "marvell,kirkwood";
++
++      memory {
++              device_type = "memory";
++              reg = <0x00000000 0x4000000>;
++      };
++
++      chosen {
++              bootargs = "console=ttyS0,115200n8 earlyprintk";
++      };
++
++      mbus {
++              pcie-controller {
++                      status = "okay";
++
++                      pcie@1,0 {
++                              status = "okay";
++                      };
++
++                      pcie@2,0 {
++                              status = "okay";
++                      };
++              };
++      };
++
++      ocp@f1000000 {
++              pinctrl: pinctrl@10000 {
++                      pmx_led_green_power: pmx-led-green-power {
++                              marvell,pins = "mpp7";
++                              marvell,function = "gpo";
++                      };
++                      pmx_btn_wps: pmx-btn-wps {
++                              marvell,pins = "mpp47";
++                              marvell,function = "gpio";
++                      };
++                      pmx_btn_reset: pmx-btn-reset {
++                              marvell,pins = "mpp48";
++                              marvell,function = "gpio";
++                      };
++              };
++
++              rtc@10300 {
++                      status = "disabled";
++              };
++
++              serial@12000 {
++                      status = "okay";
++              };
++
++      };
++
++      gpio_keys {
++              compatible = "gpio-keys";
++              #address-cells = <1>;
++              #size-cells = <0>;
++              pinctrl-0 = < &pmx_btn_wps &pmx_btn_reset >;
++              pinctrl-names = "default";
++
++              button@15 {
++                      label = "WPS Button";
++                      linux,code = <KEY_WPS_BUTTON>;
++                      gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
++              };
++
++              button@16 {
++                      label = "Reset Button";
++                      linux,code = <KEY_RESTART>;
++                      gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
++              };
++      };
++
++      gpio-leds {
++              compatible = "gpio-leds";
++              pinctrl-0 = < &pmx_led_green_power >;
++              pinctrl-names = "default";
++
++              green-power {
++                      label = "ea3500:green:power";
++                      gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
++              };
++      };
++};
++
++&nand {
++      status = "okay";
++      pinctrl-0 = <&pmx_nand>;
++      pinctrl-names = "default";
++
++      partition@0 {
++              label = "u-boot";
++              reg = <0x0000000 0x80000>;
++              read-only;
++      };
++
++      partition@80000 {
++              label = "u-boot environment";
++              reg = <0x80000 0x20000>;
++      };
++
++      partition@200000 {
++              label = "kernel";
++              reg = <0x200000 0x200000>;
++      };
++
++      partition@400000 {
++              label = "root";
++              reg = <0x400000 0x1200000>;
++      };
++};
++
++&mdio {
++      status = "okay";
++};
++
++&eth0 {
++      status = "okay";
++      ethernet0-port@0 {
++              speed = <1000>;
++              duplex = <1>;
++      };
++};
++
++&eth1 {
++      status = "okay";
++      ethernet1-port@0 {
++              speed = <1000>;
++              duplex = <1>;
++      };
++};
index 000aa7418f62efac81bdd88a20e0e04e751a1234..ef7f228d2c4d8d80cff4b61e06899f8114826c4a 100644 (file)
@@ -5,6 +5,22 @@
 # See /LICENSE for more information.
 #
 
+define Profile/EA3500
+  NAME:=Linksys EA3500
+  PACKAGES:= \
+       kmod-mwl8k kmod-usb2 kmod-usb-storage \
+       uboot-envtools
+endef
+
+define Profile/EA3500/Description
+ Package set compatible with Linksys EA3500 board.
+endef
+
+EA3500_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
+EA3500_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
+
+$(eval $(call Profile,EA3500))
+
 define Profile/EA4500
   NAME:=Linksys EA4500
   PACKAGES:= \