aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Wolf <git-NTEO@vplace.de>2016-12-01 15:08:22 +0100
committerMathias Kresin <dev@kresin.me>2016-12-04 07:03:17 +0100
commitc2ed721e89156d3b37d2bcbc9155f31bb1aa97b2 (patch)
treeea5b97d3d4456d4782eafd7975bedbc7ccddd570
parent62e4c915ee867b5c3610fcc150d3a6bf90cbb130 (diff)
downloadupstream-c2ed721e89156d3b37d2bcbc9155f31bb1aa97b2.tar.gz
upstream-c2ed721e89156d3b37d2bcbc9155f31bb1aa97b2.tar.bz2
upstream-c2ed721e89156d3b37d2bcbc9155f31bb1aa97b2.zip
ramips: improve F5D8235 V1 support
This fixes the partition name for the firmware splitter, the cfi address and adds the mtd-eeprom address for wmac. It adds additional LEDs and make use of them in diag.sh and 01_leds. Please note that the ":blue:wired" LED is used because the ":blue:router" behaviour is unpredictable for failsafe indication. The issue with the router LED is that you have two states only. "off" is steady on and "on" blinks. Therefore the wired LED is more suitable. Furthermore it reuses the correct switch configuration definition to reflect the device ports and numbering. Additionally fixes the issue that the default configuration is not applied as no port 6 exists on this device. Signed-off-by: Tobias Wolf <github-NTEO@vplace.de>
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/01_leds6
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network2
-rw-r--r--target/linux/ramips/base-files/etc/diag.sh3
-rw-r--r--target/linux/ramips/dts/F5D8235_V1.dts85
4 files changed, 78 insertions, 18 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index f6dbf30a58..ab077bff13 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -158,7 +158,11 @@ ex2700)
ucidef_set_led_default "power_r" "POWER (red)" "$board:red:power" "0"
set_wifi_led "$board:green:router"
;;
-f5d8235-v1|\
+f5d8235-v1)
+ ucidef_set_led_default "lan" "lan" "$board:blue:wired" "0"
+ set_usb_led "$board:blue:storage"
+ set_wifi_led "$board:blue:wireless"
+ ;;
f5d8235-v2)
set_usb_led "$board:blue:storage"
;;
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index e3e65506a9..0eaa440eb2 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -130,7 +130,6 @@ ramips_setup_interfaces()
c50|\
dir-645|\
dir-860l-b1|\
- f5d8235-v1|\
f5d8235-v2|\
gl-mt300a|\
gl-mt300n|\
@@ -236,6 +235,7 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0"
;;
+ f5d8235-v1|\
tew-714tru|\
v11st-fe|\
wzr-agl300nh)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 6bcdc0f5bc..abbe147d84 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -126,6 +126,9 @@ get_status_led() {
pbr-d1)
status_led="$board:orange:power"
;;
+ f5d8235-v1)
+ status_led="$board:blue:wired"
+ ;;
f5d8235-v2)
status_led="$board:blue:router"
;;
diff --git a/target/linux/ramips/dts/F5D8235_V1.dts b/target/linux/ramips/dts/F5D8235_V1.dts
index 74e423c265..4d95860aa2 100644
--- a/target/linux/ramips/dts/F5D8235_V1.dts
+++ b/target/linux/ramips/dts/F5D8235_V1.dts
@@ -2,6 +2,7 @@
#include "rt2880.dtsi"
+#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
@@ -12,7 +13,7 @@
cfi@1f000000 {
compatible = "cfi-flash";
- reg = <0x1f000000 0x800000>;
+ reg = <0xbc400000 0x800000>;
bank-width = <2>;
device-width = <2>;
#address-cells = <1>;
@@ -37,15 +38,15 @@
};
partition@50000 {
- label = "linux";
- reg = <0x50000 0x3b0000>;
+ label = "firmware";
+ reg = <0x50000 0x7b0000>;
};
};
rtl8366s {
compatible = "realtek,rtl8366s";
- gpio-sda = <&gpio0 1 0>;
- gpio-sck = <&gpio0 2 0>;
+ gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
};
gpio-keys-polled {
@@ -56,13 +57,13 @@
wps {
label = "wps";
- gpios = <&gpio0 0 1>;
+ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset {
label = "reset";
- gpios = <&gpio0 9 1>;
+ gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
};
@@ -70,14 +71,69 @@
gpio-leds {
compatible = "gpio-leds";
+ internet {
+ label = "f5d8235-v1:blue:internet";
+ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ };
+
+ internet2 {
+ label = "f5d8235-v1:amber:internet";
+ gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+ };
+
+ modem {
+ label = "f5d8235-v1:blue:modem";
+ gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ };
+
+ modem2 {
+ label = "f5d8235-v1:amber:modem";
+ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
+ };
+
+ router {
+ label = "f5d8235-v1:blue:router";
+ gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+ };
+
storage {
label = "f5d8235-v1:blue:storage";
- gpios = <&gpio0 7 1>;
+ gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
};
storage2 {
- label = "f5d8235-v1:orange:storage";
- gpios = <&gpio0 8 1>;
+ label = "f5d8235-v1:amber:storage";
+ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+ };
+
+ security {
+ label = "f5d8235-v1:blue:security";
+ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
+ };
+
+ security2 {
+ label = "f5d8235-v1:amber:security";
+ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+ };
+
+ wired {
+ label = "f5d8235-v1:blue:wired";
+ gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
+ };
+
+ wired2 {
+ label = "f5d8235-v1:amber:wired";
+ gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+ };
+
+ wireless {
+ label = "f5d8235-v1:blue:wireless";
+ gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+ };
+
+ wireless2 {
+ label = "f5d8235-v1:amber:wireless";
+ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
};
};
};
@@ -89,7 +145,7 @@
&pinctrl {
state_default: pinctrl0 {
gpio {
- ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
+ ralink,group = "spi", "i2c", "jtag", "mdio", "uartlite";
ralink,function = "gpio";
};
};
@@ -104,10 +160,7 @@
};
};
-/* FIXME: no u-boot partition and 0x40000@uboot is out of boundaries */
-/*&wmac {
+&wmac {
status = "okay";
- ralink,mtd-eeprom = <&u-boot 0x40000>;
+ ralink,mtd-eeprom = <&factory 0x0>;
};
-*/
-