aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/linux/ipq40xx/base-files/etc/board.d/02_network1
-rw-r--r--target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata8
-rwxr-xr-xtarget/linux/ipq40xx/base-files/etc/init.d/bootcount3
-rw-r--r--target/linux/ipq40xx/base-files/lib/upgrade/platform.sh1
-rw-r--r--target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts371
-rw-r--r--target/linux/ipq40xx/image/generic.mk25
-rw-r--r--target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch3
7 files changed, 411 insertions, 1 deletions
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index 6a94fe3ff4..ecdbac8f86 100644
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -17,6 +17,7 @@ ipq40xx_setup_interfaces()
engenius,emr3500|\
engenius,ens620ext|\
luma,wrtq-329acn|\
+ netgear,wac510|\
plasmacloud,pa1200|\
plasmacloud,pa2200)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index b12c9af9a7..42cb295496 100644
--- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -150,6 +150,10 @@ case "$FIRMWARE" in
caldata_extract "ART" 0x1000 0x2f20
ath10k_patch_mac $(mtd_get_mac_binary dnidata 0x0)
;;
+ netgear,wac510)
+ caldata_extract "0:ART" 0x1000 0x2f20
+ ath10k_patch_mac $(mtd_get_mac_binary "0:MANUDATA" 0x6)
+ ;;
zyxel,nbg6617 |\
zyxel,wre6606)
caldata_extract "ART" 0x1000 0x2f20
@@ -260,6 +264,10 @@ case "$FIRMWARE" in
caldata_extract "ART" 0x5000 0x2f20
ath10k_patch_mac $(mtd_get_mac_binary dnidata 0xc)
;;
+ netgear,wac510)
+ caldata_extract "0:ART" 0x5000 0x2f20
+ ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:MANUDATA" 0x6) +16)
+ ;;
zyxel,nbg6617 |\
zyxel,wre6606)
caldata_extract "ART" 0x5000 0x2f20
diff --git a/target/linux/ipq40xx/base-files/etc/init.d/bootcount b/target/linux/ipq40xx/base-files/etc/init.d/bootcount
index d2a4abcadd..9abfbddc43 100755
--- a/target/linux/ipq40xx/base-files/etc/init.d/bootcount
+++ b/target/linux/ipq40xx/base-files/etc/init.d/bootcount
@@ -13,5 +13,8 @@ boot() {
linksys,mr8300)
mtd resetbc s_env || true
;;
+ netgear,wac510)
+ fw_setenv boot_cnt=0
+ ;;
esac
}
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
index 54683977cd..68027be666 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -72,6 +72,7 @@ platform_do_upgrade() {
glinet,gl-ap1300 |\
luma,wrtq-329acn |\
mobipromo,cm520-79f |\
+ netgear,wac510 |\
qxwlan,e2600ac-c2)
nand_do_upgrade "$1"
;;
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts
new file mode 100644
index 0000000000..20e12855f4
--- /dev/null
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts
@@ -0,0 +1,371 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/* Copyright (c) 2020, Robert Marko <robimarko@gmail.com> */
+
+#include "qcom-ipq4019.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/soc/qcom,tcsr.h>
+
+/ {
+ model = "Netgear WAC510";
+ compatible = "netgear,wac510";
+
+ aliases {
+ led-boot = &led_power_amber;
+ led-failsafe = &led_power_amber;
+ led-running = &led_power_green;
+ led-upgrade = &led_power_amber;
+ label-mac-device = &gmac0;
+ };
+
+ chosen {
+ bootargs-append = " root=/dev/ubiblock0_1";
+ };
+
+ soc {
+ rng@22000 {
+ status = "okay";
+ };
+
+ ess-psgmii@98000 {
+ status = "okay";
+ };
+
+ counter@4a1000 {
+ compatible = "qcom,qca-gcnt";
+ reg = <0x4a1000 0x4>;
+ };
+
+ tcsr@1949000 {
+ compatible = "qcom,tcsr";
+ reg = <0x1949000 0x100>;
+ qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
+ };
+
+ tcsr@194b000 {
+ status = "okay";
+
+ compatible = "qcom,tcsr";
+ reg = <0x194b000 0x100>;
+ qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
+ };
+
+ ess_tcsr@1953000 {
+ compatible = "qcom,tcsr";
+ reg = <0x1953000 0x1000>;
+ qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
+ };
+
+ tcsr@1957000 {
+ compatible = "qcom,tcsr";
+ reg = <0x1957000 0x100>;
+ qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
+ };
+
+ usb2: usb2@60f8800 {
+ status = "okay";
+ };
+
+ usb3: usb3@8af8800 {
+ status = "okay";
+ };
+
+ crypto@8e3a000 {
+ status = "okay";
+ };
+
+ watchdog@b017000 {
+ status = "okay";
+ };
+
+ ess-switch@c000000 {
+ status = "okay";
+ };
+
+ edma@c080000 {
+ status = "okay";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ led_spi {
+ compatible = "spi-gpio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sck-gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
+ mosi-gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
+ num-chipselects = <0>;
+
+ ssr: ssr@0 {
+ compatible = "fairchild,74hc595";
+ reg = <0>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ registers-number = <1>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_power_amber: power_amber {
+ label = "amber:power";
+ gpios = <&ssr 6 GPIO_ACTIVE_LOW>;
+ panic-indicator;
+ };
+
+ led_power_green: power_green {
+ label = "green:power";
+ gpios = <&ssr 5 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan2g_blue {
+ label = "blue:wlan2g";
+ gpios = <&ssr 4 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ wlan2g_green {
+ label = "green:wlan2g";
+ gpios = <&ssr 3 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0radio";
+ };
+
+ wlan5g_blue {
+ label = "blue:wlan5g";
+ gpios = <&ssr 2 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1tpt";
+ };
+
+ wlan5g_green {
+ label = "green:wlan5g";
+ gpios = <&ssr 1 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy1radio";
+ };
+
+ act_green {
+ label = "green:act";
+ gpios = <&ssr 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&qpic_bam {
+ status = "okay";
+};
+
+&tlmm {
+ mdio_pins: mdio_pinmux {
+ mux_1 {
+ pins = "gpio53";
+ function = "mdio";
+ bias-pull-up;
+ };
+
+ mux_2 {
+ pins = "gpio52";
+ function = "mdc";
+ bias-pull-up;
+ };
+ };
+
+ serial_pins: serial_pinmux {
+ mux {
+ pins = "gpio60", "gpio61";
+ function = "blsp_uart0";
+ bias-disable;
+ };
+ };
+
+ spi_0_pins: spi_0_pinmux {
+ pinmux {
+ function = "blsp_spi0";
+ pins = "gpio55", "gpio56", "gpio57";
+ drive-strength = <12>;
+ bias-disable;
+ };
+
+ pinmux_cs {
+ function = "gpio";
+ pins = "gpio54", "gpio59";
+ drive-strength = <2>;
+ bias-disable;
+ output-high;
+ };
+ };
+};
+
+&blsp_dma {
+ status = "okay";
+};
+
+&blsp1_spi1 {
+ status = "okay";
+
+ pinctrl-0 = <&spi_0_pins>;
+ pinctrl-names = "default";
+ cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>,
+ <&tlmm 59 GPIO_ACTIVE_HIGH>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ spi-max-frequency = <50000000>;
+ reg = <0>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "0:SBL1";
+ reg = <0x00000000 0x00040000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "0:MIBIB";
+ reg = <0x00040000 0x00020000>;
+ read-only;
+ };
+
+ partition@60000 {
+ label = "0:QSEE";
+ reg = <0x00060000 0x00060000>;
+ read-only;
+ };
+
+ partition@c0000 {
+ label = "0:CDT";
+ reg = <0x000c0000 0x00010000>;
+ read-only;
+ };
+
+ partition@d0000 {
+ label = "0:DDRPARAMS";
+ reg = <0x000d0000 0x00010000>;
+ read-only;
+ };
+
+ partition@e0000 {
+ label = "0:APPSBLENV";
+ reg = <0x000e0000 0x00010000>;
+ };
+
+ partition@f0000 {
+ label = "0:APPSBL";
+ reg = <0x000f0000 0x000f0000>;
+ read-only;
+ };
+
+ partition@1e0000 {
+ label = "0:MANUDATA";
+ reg = <0x001e0000 0x00010000>;
+ read-only;
+ };
+
+ partition@1f0000 {
+ label = "0:ART";
+ reg = <0x001f0000 0x00010000>;
+ read-only;
+ };
+ };
+ };
+
+ nand@1 {
+ compatible = "spi-nand";
+ reg = <1>;
+ spi-max-frequency = <48000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "rootfs";
+ reg = <0x00000000 0x03800000>;
+ };
+
+ partition@3800000 {
+ label = "rootfs_1";
+ reg = <0x03800000 0x03800000>;
+ };
+
+ partition@7000000 {
+ label = "var_config";
+ reg = <0x07000000 0x00f00000>;
+ read-only;
+ };
+
+ partition@7f00000 {
+ label = "Oops_log";
+ reg = <0x07f00000 0x000c0000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&blsp1_uart1 {
+ status = "okay";
+
+ pinctrl-0 = <&serial_pins>;
+ pinctrl-names = "default";
+};
+
+&cryptobam {
+ status = "okay";
+};
+
+&mdio {
+ status = "okay";
+
+ pinctrl-0 = <&mdio_pins>;
+ pinctrl-names = "default";
+ reset-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
+ reset-delay-us = <2000>;
+};
+
+&gmac0 {
+ qcom,forced_duplex = <1>;
+ qcom,forced_speed = <1000>;
+ qcom,phy_mdio_addr = <3>;
+ qcom,poll_required = <1>;
+ vlan_tag = <1 0x10>;
+};
+
+&wifi0 {
+ status = "okay";
+
+ qcom,ath10k-calibration-variant = "Netgear-WAC510";
+};
+
+&wifi1 {
+ status = "okay";
+
+ qcom,ath10k-calibration-variant = "Netgear-WAC510";
+};
+
+&usb3_ss_phy {
+ status = "okay";
+};
+
+&usb3_hs_phy {
+ status = "okay";
+};
+
+&usb2_hs_phy {
+ status = "okay";
+};
diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 4e40b8be50..2d6186ed99 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -62,6 +62,16 @@ define Build/mkmylofw_32m
@mv $@.new $@
endef
+define Build/wac5xx-netgear-tar
+ mkdir $@.tmp
+ mv $@ $@.tmp/wac5xx-ubifs-root.img
+ md5sum $@.tmp/wac5xx-ubifs-root.img > $@.tmp/wac5xx-ubifs-root.md5sum
+ echo "WAC505 WAC510" > $@.tmp/metadata.txt
+ echo "WAC505_V9.9.9.9" > $@.tmp/version
+ tar -C $@.tmp/ -cf $@ .
+ rm -rf $@.tmp
+endef
+
define Build/qsdk-ipq-factory-nand-askey
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh $@.its\
askey_kernel $(IMAGE_KERNEL) \
@@ -636,6 +646,21 @@ define Device/netgear_ex6150v2
endef
TARGET_DEVICES += netgear_ex6150v2
+define Device/netgear_wac510
+ $(call Device/FitImage)
+ $(call Device/UbiFit)
+ DEVICE_VENDOR := Netgear
+ DEVICE_MODEL := WAC510
+ SOC := qcom-ipq4018
+ DEVICE_DTS_CONFIG := config@5
+ BLOCKSIZE := 128k
+ PAGESIZE := 2048
+ IMAGES += nand-factory.tar
+ IMAGE/nand-factory.tar := append-ubi | wac5xx-netgear-tar
+ DEVICE_PACKAGES := uboot-envtools
+endef
+TARGET_DEVICES += netgear_wac510
+
define Device/openmesh_a42
$(call Device/FitImageLzma)
DEVICE_VENDOR := OpenMesh
diff --git a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch
index 6b7c68bf63..0447fb6012 100644
--- a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch
+++ b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
-@@ -837,11 +837,60 @@ dtb-$(CONFIG_ARCH_QCOM) += \
+@@ -837,11 +837,61 @@ dtb-$(CONFIG_ARCH_QCOM) += \
qcom-apq8074-dragonboard.dtb \
qcom-apq8084-ifc6540.dtb \
qcom-apq8084-mtp.dtb \
@@ -37,6 +37,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
+ qcom-ipq4019-oap100.dtb \
+ qcom-ipq4018-pa1200.dtb \
+ qcom-ipq4018-rt-ac58u.dtb \
++ qcom-ipq4018-wac510.dtb \
+ qcom-ipq4018-wre6606.dtb \
+ qcom-ipq4018-wrtq-329acn.dtb \
qcom-ipq4019-ap.dk01.1-c1.dtb \