aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target/linux/ath79/dts/ar9344_netgear_r6100.dts231
-rw-r--r--target/linux/ath79/image/nand.mk11
-rw-r--r--target/linux/ath79/nand/base-files/etc/board.d/01_leds3
-rw-r--r--target/linux/ath79/nand/base-files/etc/board.d/02_network5
-rw-r--r--target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata3
5 files changed, 253 insertions, 0 deletions
diff --git a/target/linux/ath79/dts/ar9344_netgear_r6100.dts b/target/linux/ath79/dts/ar9344_netgear_r6100.dts
new file mode 100644
index 0000000000..80951d6249
--- /dev/null
+++ b/target/linux/ath79/dts/ar9344_netgear_r6100.dts
@@ -0,0 +1,231 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ar9344.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ model = "Netgear R6100";
+ compatible = "netgear,r6100", "qca,ar9344";
+
+ aliases {
+ label-mac-device = &eth0;
+ led-boot = &led_power_green;
+ led-failsafe = &led_power_amber;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_green;
+ };
+
+ gpio-export {
+ compatible = "gpio-export";
+ #size-cells = <0>;
+
+ usb-power {
+ gpio-export,name = "usb-power";
+ gpio-export,output = <1>;
+ gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+
+ rfkill {
+ label = "rfkill";
+ linux,code = <KEY_RFKILL>;
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+
+ wps {
+ label = "wps";
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power_amber: power_amber {
+ label = "amber:power";
+ gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power_green: power_green {
+ label = "green:power";
+ gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+ };
+
+ usb {
+ label = "blue:usb";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ trigger-sources = <&hub_port>;
+ linux,default-trigger = "usbport";
+ };
+
+ wan_amber {
+ label = "amber:wan";
+ gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+ };
+
+ wan_green {
+ label = "green:wan";
+ gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan {
+ label = "blue:wlan";
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+ };
+};
+
+&eth0 {
+ status = "okay";
+
+ phy-handle = <&swphy0>;
+
+ nvmem-cells = <&macaddr_caldata_6>;
+ nvmem-cell-names = "mac-address";
+
+ gmac-config {
+ device = <&gmac>;
+ switch-phy-swap = <1>;
+ };
+};
+
+&eth1 {
+ status = "okay";
+
+ nvmem-cells = <&macaddr_caldata_0>;
+ nvmem-cell-names = "mac-address";
+};
+
+&nand {
+ status = "okay";
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0000000 0x0020000>;
+ read-only;
+ };
+
+ caldata: partition@20000 {
+ label = "caldata";
+ reg = <0x0020000 0x0040000>;
+ read-only;
+ };
+
+ partition@60000 {
+ label = "caldata-backup";
+ reg = <0x0060000 0x0040000>;
+ read-only;
+ };
+
+ partition@a0000 {
+ label = "config";
+ reg = <0x00a0000 0x0080000>;
+ read-only;
+ };
+
+ partition@120000 {
+ label = "pot";
+ reg = <0x0120000 0x0080000>;
+ read-only;
+ };
+
+ partition@1a0000 {
+ label = "kernel";
+ reg = <0x01a0000 0x0400000>;
+ };
+
+ partition@5a0000 {
+ label = "ubi";
+ reg = <0x05a0000 0x7560000>;
+ };
+
+ partition@7b00000 {
+ label = "language";
+ reg = <0x7b00000 0x0200000>;
+ read-only;
+ };
+
+ partition@7d00000 {
+ label = "traffic_meter";
+ reg = <0x7d00000 0x0300000>;
+ read-only;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+
+ wifi@0,0,0 {
+ compatible = "qcom,ath10k";
+ reg = <0x0000 0 0 0 0>;
+
+ nvmem-cells = <&macaddr_caldata_c>;
+ nvmem-cell-names = "mac-address";
+ };
+};
+
+&ref {
+ clock-frequency = <40000000>;
+};
+
+&usb {
+ status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hub_port: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <0>;
+ };
+};
+
+&usb_phy {
+ status = "okay";
+};
+
+&wmac {
+ status = "okay";
+
+ mtd-cal-data = <&caldata 0x1000>;
+};
+
+&caldata {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_caldata_0: macaddr@0 {
+ reg = <0x0 0x6>;
+ };
+
+ macaddr_caldata_6: macaddr@6 {
+ reg = <0x6 0x6>;
+ };
+
+ macaddr_caldata_c: macaddr@c {
+ reg = <0xc 0x6>;
+ };
+};
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index b34e796ac3..91fd7ec301 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -215,6 +215,17 @@ define Device/netgear_ath79_nand
UBINIZE_OPTS := -E 5
endef
+define Device/netgear_r6100
+ SOC := ar9344
+ DEVICE_MODEL := R6100
+ UIMAGE_MAGIC := 0x36303030
+ NETGEAR_BOARD_ID := R6100
+ NETGEAR_HW_ID := 29764434+0+128+128+2x2+2x2
+ $(Device/netgear_ath79_nand)
+ DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
+endef
+TARGET_DEVICES += netgear_r6100
+
define Device/netgear_wndr3700-v4
SOC := ar9344
DEVICE_MODEL := WNDR3700
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/01_leds b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
index f694d07e9c..dc7d84df95 100644
--- a/target/linux/ath79/nand/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
@@ -14,6 +14,9 @@ glinet,gl-ar300m-nand|\
glinet,gl-ar300m-nor)
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
;;
+netgear,r6100)
+ ucidef_set_led_netdev "wan-green" "WAN (green)" "green:wan" "eth1"
+ ;;
netgear,wndr3700-v4|\
netgear,wndr4300|\
netgear,wndr4300sw|\
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network
index dbb9e68150..76cdab18f8 100644
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -25,6 +25,11 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "2:lan:2" "3:lan:1" "1:wan"
;;
+ netgear,r6100)
+ ucidef_set_interface_wan "eth1"
+ ucidef_add_switch "switch0" \
+ "0@eth0" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
+ ;;
netgear,wndr3700-v4|\
netgear,wndr4300|\
netgear,wndr4300sw|\
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 71dfb161e4..03e225ddde 100644
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -23,6 +23,9 @@ case "$FIRMWARE" in
caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 1)
;;
+ netgear,r6100)
+ caldata_extract "caldata" 0x5000 0x844
+ ;;
zyxel,nbg6716)
caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1)