aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ath79/dts/ar7240_ruckus_zf7025.dts196
-rw-r--r--target/linux/ath79/generic/base-files/etc/board.d/01_leds7
-rw-r--r--target/linux/ath79/generic/base-files/etc/board.d/02_network6
-rw-r--r--target/linux/ath79/image/generic.mk19
4 files changed, 225 insertions, 3 deletions
diff --git a/target/linux/ath79/dts/ar7240_ruckus_zf7025.dts b/target/linux/ath79/dts/ar7240_ruckus_zf7025.dts
new file mode 100644
index 0000000000..9e0671d638
--- /dev/null
+++ b/target/linux/ath79/dts/ar7240_ruckus_zf7025.dts
@@ -0,0 +1,196 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ar7240.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+
+/ {
+ model = "Ruckus ZoneFlex 7025";
+ compatible = "ruckus,zf7025", "qca,ar7240";
+
+ aliases {
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_red;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_red;
+ label-mac-device = &eth0;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ hard-reset {
+ label = "hard-reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+
+ leds: leds {
+ compatible = "gpio-leds";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>;
+
+ dir {
+ label = "green:dir";
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+ };
+
+ lan1 {
+ label = "green:lan1";
+ gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+ };
+
+ lan2 {
+ label = "green:lan2";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+
+ lan3 {
+ label = "green:lan3";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ };
+
+ lan4 {
+ label = "green:lan4";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ lan5 {
+ label = "green:lan5";
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ };
+
+ opt {
+ label = "green:opt";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power_red: power-red {
+ label = "red:power";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ panic-indicator;
+ };
+
+ led_power_green: power-green {
+ label = "green:power";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+
+ wlan-green {
+ label = "green:wlan";
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0assoc";
+ };
+
+ wlan-yellow {
+ label = "yellow:wlan";
+ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ ruckus-himem@3ff0000 {
+ /* Ruckus Himem area used to control
+ * redundant boot image selection
+ */
+ compatible = "nvmem-rmem";
+ reg = <0x3ff0000 0x10000>;
+ no-map;
+ };
+ };
+};
+
+&spi {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <104000000>;
+ m25p,fast-read;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ reg = <0x0 0x40000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ /* On stock FW this encompasses rcks_wlan.main,
+ * rcks_wlan.bkup and datafs partitions
+ */
+ partition@40000 {
+ compatible = "openwrt,uimage", "denx,uimage";
+ reg = <0x40000 0xf40000>;
+ label = "firmware";
+ };
+
+ partition@f80000 {
+ compatible = "u-boot,env";
+ reg = <0xf80000 0x40000>;
+ label = "u-boot-env";
+ };
+
+ board_data: partition@fc0000 {
+ reg = <0xfc0000 0x40000>;
+ label = "board-data";
+ read-only;
+ };
+ };
+ };
+};
+
+&eth0 {
+ nvmem-cells = <&macaddr_board_data_66>;
+ nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+ status = "okay";
+ nvmem-cells = <&macaddr_board_data_6c>;
+ nvmem-cell-names = "mac-address";
+};
+
+&pcie {
+ status = "okay";
+
+ ath9k: wifi@0,0 {
+ compatible = "pci168c,002b";
+ reg = <0x0000 0 0 0 0>;
+ nvmem-cells = <&macaddr_board_data_60>;
+ nvmem-cell-names = "mac-address";
+ };
+};
+
+&board_data {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_board_data_60: macaddr@60 {
+ reg = <0x60 0x6>;
+ };
+
+ macaddr_board_data_66: macaddr@66 {
+ reg = <0x66 0x6>;
+ };
+
+ macaddr_board_data_6c: macaddr@6c {
+ reg = <0x6c 0x6>;
+ };
+};
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
index 7fe9343876..cfcd2dfeda 100644
--- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
@@ -327,6 +327,13 @@ qca,ap143-16m)
qihoo,c301)
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
;;
+ruckus,zf7025)
+ ucidef_set_led_netdev "lan" "LAN5" "green:lan5" "eth0"
+ ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x10"
+ ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x08"
+ ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x04"
+ ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x02"
+ ;;
ruckus,zf7372)
ucidef_set_led_switch "lan" "LAN" "green:eth1" "switch0" "0x02"
;;
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index 339005f051..50576be9c5 100644
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -434,6 +434,11 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:wan"
;;
+ ruckus,zf7025)
+ ucidef_set_interface_lan "eth0 eth1"
+ ucidef_add_switch "switch0" \
+ "0u@eth1" "4:lan:1" "3:lan:2" "2:lan:3" "1:lan:4"
+ ;;
teltonika,rut955|\
teltonika,rut955-h7v3c0)
ucidef_set_interface_wan "eth1"
@@ -716,6 +721,7 @@ ath79_setup_macs()
wan_mac=$(mtd_get_mac_binary factory 0x0)
lan_mac=$(macaddr_setbit_la "$wan_mac")
;;
+ ruckus,zf7025|\
ruckus,zf7321|\
ruckus,zf7372)
lan_mac=$(mtd_get_mac_binary board-data 0x807E)
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index e5bc73e5a6..c9bbb412b6 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -2402,15 +2402,28 @@ define Device/rosinson_wr818
endef
TARGET_DEVICES += rosinson_wr818
-define Device/ruckus_zf73xx_common
+define Device/ruckus_common
DEVICE_VENDOR := Ruckus
- DEVICE_PACKAGES := -swconfig kmod-usb2 kmod-usb-chipidea2
- IMAGE_SIZE := 31744k
LOADER_TYPE := bin
KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
endef
+define Device/ruckus_zf7025
+ $(Device/ruckus_common)
+ SOC := ar7240
+ DEVICE_MODEL := ZoneFlex 7025
+ IMAGE_SIZE := 15616k
+ BLOCKSIZE := 256k
+endef
+TARGET_DEVICES += ruckus_zf7025
+
+define Device/ruckus_zf73xx_common
+ $(Device/ruckus_common)
+ DEVICE_PACKAGES := -swconfig kmod-usb2 kmod-usb-chipidea2
+ IMAGE_SIZE := 31744k
+endef
+
define Device/ruckus_zf7321
$(Device/ruckus_zf73xx_common)
SOC := ar9342