aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorLuka Perkov <luka@openwrt.org>2014-05-28 21:43:39 +0000
committerLuka Perkov <luka@openwrt.org>2014-05-28 21:43:39 +0000
commit4122af10f9567ffbd72b1a4ebdcd1f6c221f0bae (patch)
treeeaa9d8ba5b20847649e617910525ea2270777449 /target
parent95c615262c6931dac4bd58f37d15db2907403dfb (diff)
downloadupstream-4122af10f9567ffbd72b1a4ebdcd1f6c221f0bae.tar.gz
upstream-4122af10f9567ffbd72b1a4ebdcd1f6c221f0bae.tar.bz2
upstream-4122af10f9567ffbd72b1a4ebdcd1f6c221f0bae.zip
kirkwood: add support for Linksys EA4500
Support is added only for kernel 3.14 - do not show it until the switch is made. Following uboot env changes are needed to make it work on stock uboot:
Diffstat (limited to 'target')
-rw-r--r--target/linux/kirkwood/base-files/etc/uci-defaults/01_leds6
-rw-r--r--target/linux/kirkwood/base-files/etc/uci-defaults/02_network5
-rw-r--r--target/linux/kirkwood/image/Makefile3
-rw-r--r--target/linux/kirkwood/patches-3.14/160-ea4500.patch169
-rw-r--r--target/linux/kirkwood/profiles/115-router.mk22
5 files changed, 203 insertions, 2 deletions
diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
index 1600464da4..1e7e064085 100644
--- a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2012-2013 OpenWrt.org
+# Copyright (C) 2012-2014 OpenWrt.org
#
. /lib/functions/uci-defaults.sh
@@ -14,6 +14,10 @@ case "`cat /proc/device-tree/model`" in
ucidef_set_led_default "health" "status:green:health" "1"
ucidef_set_led_default "fault" "status:orange:fault" "1"
;;
+"Linksys EA4500")
+ ucidef_set_led_default "health" "ea4500:white:health" "1"
+ ucidef_set_led_default "pulse" "ea4500:white:pulse" "1"
+ ;;
*)
;;
esac
diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
index c6ceff78c9..0c55cbfd28 100644
--- a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
+++ b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2012-2013 OpenWrt.org
+# Copyright (C) 2012-2014 OpenWrt.org
#
[ -e /etc/config/network ] && exit 0
@@ -37,6 +37,9 @@ case "`cat /proc/device-tree/model`" in
"Cloud Engines Pogoplug E02")
set_lan_dhcp "eth0"
;;
+"Linksys EA4500")
+ ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ;;
*)
ucidef_set_interface_lan "eth0"
;;
diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile
index 00a6f3f81a..a3971d47af 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -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/EA4500=$(call Image/BuildKernel/Template,ea4500)
+Image/InstallKernel/Template/EA4500=$(call Image/InstallKernel/Template,ea4500)
+
Image/BuildKernel/Template/GOFLEXNET=$(call Image/BuildKernel/Template,goflexnet)
Image/InstallKernel/Template/GOFLEXNET=$(call Image/InstallKernel/Template,goflexnet)
diff --git a/target/linux/kirkwood/patches-3.14/160-ea4500.patch b/target/linux/kirkwood/patches-3.14/160-ea4500.patch
new file mode 100644
index 0000000000..a304e859ca
--- /dev/null
+++ b/target/linux/kirkwood/patches-3.14/160-ea4500.patch
@@ -0,0 +1,169 @@
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -90,6 +90,7 @@
+ kirkwood-dns325.dtb \
+ kirkwood-dockstar.dtb \
+ kirkwood-dreamplug.dtb \
++ kirkwood-ea4500.dtb \
+ kirkwood-goflexnet.dtb \
+ kirkwood-guruplug-server-plus.dtb \
+ kirkwood-ib62x0.dtb \
+--- /dev/null
++++ b/arch/arm/boot/dts/kirkwood-ea4500.dts
+@@ -0,0 +1,156 @@
++/*
++ * kirkwood-ea4500.dts - Device Tree file for Linksys EA4500
++ *
++ * (c) 2013 Jonas Gorski <jogo@openwrt.org>
++ * (c) 2013 Deutsche Telekom Innovation Laboratories
++ * (c) 2014 Luka Perkov <luka@openwrt.org>
++ *
++ * 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 EA4500";
++ compatible = "linksys,ea4500", "marvell,kirkwood-88f6282", "marvell,kirkwood";
++
++ memory {
++ device_type = "memory";
++ reg = <0x00000000 0x8000000>;
++ };
++
++ 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_white_health: pmx-led-white-health {
++ marvell,pins = "mpp7";
++ marvell,function = "gpo";
++ };
++ pmx_led_white_pulse: pmx-led-white-pulse {
++ marvell,pins = "mpp14";
++ marvell,function = "gpio";
++ };
++ 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_white_health &pmx_led_white_pulse >;
++ pinctrl-names = "default";
++
++ white-health {
++ label = "ea4500:white:health";
++ gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
++ };
++
++ white-pulse {
++ label = "ea4500:white:pulse";
++ gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
++ };
++ };
++};
++
++&nand {
++ status = "okay";
++ pinctrl-0 = <&pmx_nand>;
++ pinctrl-names = "default";
++
++ partition@0 {
++ label = "u-boot";
++ reg = <0x0000000 0x80000>;
++ };
++
++ partition@80000 {
++ label = "u-boot environment";
++ reg = <0x80000 0x20000>;
++ };
++
++ partition@200000 {
++ label = "kernel";
++ reg = <0x200000 0x200000>;
++ };
++
++ partition@400000 {
++ label = "root";
++ reg = <0x400000 0x1c00000>;
++ };
++};
++
++&mdio {
++ status = "okay";
++};
++
++&eth0 {
++ status = "okay";
++ ethernet0-port@0 {
++ speed = <1000>;
++ duplex = <1>;
++ };
++};
++
++&eth1 {
++ status = "okay";
++ ethernet1-port@0 {
++ speed = <1000>;
++ duplex = <1>;
++ };
++};
diff --git a/target/linux/kirkwood/profiles/115-router.mk b/target/linux/kirkwood/profiles/115-router.mk
new file mode 100644
index 0000000000..89a5bd435a
--- /dev/null
+++ b/target/linux/kirkwood/profiles/115-router.mk
@@ -0,0 +1,22 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/EA4500
+ NAME:=Linksys EA4500
+ PACKAGES:= \
+ kmod-mwl8k kmod-usb2 kmod-usb-storage \
+ uboot-envtools
+endef
+
+define Profile/EA4500/Description
+ Package set compatible with Linksys EA4500 board.
+endef
+
+EA4500_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
+EA4500_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
+
+# $(eval $(call Profile,EA4500))