ipq40xx: Add support for Linksys MR8300 (Dallas)
authorHans Geiblinger <cybrnook2002@yahoo.com>
Wed, 9 Sep 2020 22:45:02 +0000 (18:45 -0400)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 25 Sep 2020 17:31:51 +0000 (19:31 +0200)
The Linksys MR8300 is based on QCA4019 and QCA9888
and provides three, independent radios.
NAND provides two, alternate kernel/firmware images
with fail-over provided by the OEM U-Boot.

Hardware Highlights:

SoC: IPQ4019 at 717 MHz (4 CPUs)
RAM: 512MB RAM

SoC: Qualcomm IPQ4019 at 717 MHz (4 CPUs)
RAM: 512M DDR3
FLASH: 256 MB NAND (Winbond W29N02GV, 8-bit parallel)
ETH: Qualcomm QCA8075 (4x GigE LAN, 1x GigE Internet Ethernet Jacks)
BTN: Reset and WPS
USB: USB3.0, single port on rear with LED
SERIAL: Serial pads internal (unpopulated)
LED: Four status lights on top + USB LED
WIFI1: 2x2:2 QCA4019 2.4 GHz radio on ch. 1-14
WIFI2:  2x2:2 QCA4019 5 GHz radio on ch. 36-64
WIFI3:  2x2:2 QCA9888 5 GHz radio on ch. 100-165

Support is based on the already supported EA8300.
Key differences:
EA8300 has 256MB RAM where MR8300 has 512MB RAM.
MR8300 has a revised top panel LED setup.

Installation:
"Factory" images may be installed directly through the OEM GUI using
URL: https://ip-of-router/fwupdate.html (Typically 192.168.1.1)

Signed-off-by: Hans Geiblinger <cybrnook2002@yahoo.com>
[copied Hardware-highlights from EA8300. Fixed alphabetical order.
fixed commit subject, removed bogus unit-address of keys,
fixed author (used Signed-off-By to From:) ]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
16 files changed:
package/boot/uboot-envtools/files/ipq40xx
package/firmware/ipq-wifi/Makefile
package/firmware/ipq-wifi/board-linksys_mr8300-v0.qca4019 [new file with mode: 0644]
package/firmware/ipq-wifi/board-linksys_mr8300-v0.qca9888 [new file with mode: 0644]
target/linux/ipq40xx/base-files/etc/board.d/02_network
target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ipq40xx/base-files/etc/init.d/bootcount
target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh
target/linux/ipq40xx/base-files/lib/upgrade/linksys.sh
target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-ea8300.dts
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mr8300.dts [new file with mode: 0644]
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi [new file with mode: 0644]
target/linux/ipq40xx/image/Makefile
target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch

index b1d9b18088a1a551ddc4385611f10f079e5d921d..27aab6b2865e148a9e1e2c7b34bd4a6903130170 100644 (file)
@@ -45,7 +45,8 @@ buffalo,wtr-m2133hp)
 linksys,ea6350v3)
        ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x20000" "0x20000"
        ;;
-linksys,ea8300)
+linksys,ea8300 |\
+linksys,mr8300)
        ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x40000" "0x20000"
        ;;
 zyxel,nbg6617)
index 7f3e3cf14deba9cc818a05d1652118d33d4a8781..39e22b50d31e1c86fc785ff0e50d9b5ce2d5c967 100644 (file)
@@ -40,6 +40,7 @@ ALLWIFIBOARDS:= \
        ezviz_cs-w3-wd1200g-eup \
        glinet_gl-s1300 \
        linksys_ea8300 \
+       linksys_mr8300-v0 \
        luma_wrtq-329acn \
        mobipromo_cm520-79f \
        qxwlan_e2600ac
@@ -118,6 +119,7 @@ $(eval $(call generate-ipq-wifi-package,engenius_emr3500,EnGenius EMR3500))
 $(eval $(call generate-ipq-wifi-package,ezviz_cs-w3-wd1200g-eup,EZVIZ CS-W3-WD1200G EUP))
 $(eval $(call generate-ipq-wifi-package,glinet_gl-s1300,GL.iNet GL-S1300))
 $(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300))
+$(eval $(call generate-ipq-wifi-package,linksys_mr8300-v0,Linksys MR8300))
 $(eval $(call generate-ipq-wifi-package,luma_wrtq-329acn,Luma WRTQ-329ACN))
 $(eval $(call generate-ipq-wifi-package,mobipromo_cm520-79f,MobiPromo CM520-79F))
 $(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac,Qxwlan E2600AC))
diff --git a/package/firmware/ipq-wifi/board-linksys_mr8300-v0.qca4019 b/package/firmware/ipq-wifi/board-linksys_mr8300-v0.qca4019
new file mode 100644 (file)
index 0000000..689d9c4
Binary files /dev/null and b/package/firmware/ipq-wifi/board-linksys_mr8300-v0.qca4019 differ
diff --git a/package/firmware/ipq-wifi/board-linksys_mr8300-v0.qca9888 b/package/firmware/ipq-wifi/board-linksys_mr8300-v0.qca9888
new file mode 100644 (file)
index 0000000..90b6bac
Binary files /dev/null and b/package/firmware/ipq-wifi/board-linksys_mr8300-v0.qca9888 differ
index d744e9b7e2b2dfdeecb72314abaa4d0c5ac6473f..86787eeffd9cc34fa57904c1f4bbf48a5ece5231 100755 (executable)
@@ -53,7 +53,8 @@ ipq40xx_setup_interfaces()
                ;;
        avm,fritzbox-4040|\
        linksys,ea6350v3|\
-       linksys,ea8300)
+       linksys,ea8300|\
+       linksys,mr8300)
                ucidef_set_interfaces_lan_wan "eth0" "eth1"
                ucidef_add_switch "switch0" \
                        "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
index 7a7464cf9a8b9873a4d6d072a0ae0bc2833ee5a4..f33d3f331c14ddf4c7e99d731e583d79bd7d2d43 100644 (file)
@@ -39,7 +39,8 @@ case "$FIRMWARE" in
        openmesh,a62)
                caldata_extract "0:ART" 0x9000 0x2f20
                ;;
-       linksys,ea8300)
+       linksys,ea8300 |\
+       linksys,mr8300)
                caldata_extract "ART" 0x9000 0x2f20
                # OEM assigns 4 sequential MACs
                ath10k_patch_mac $(macaddr_setbit_la $(macaddr_add "$(cat /sys/class/net/eth0/address)" 4))
@@ -121,7 +122,8 @@ case "$FIRMWARE" in
                caldata_extract "ART" 0x1000 0x2f20
                ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +2)
                ;;
-       linksys,ea8300)
+       linksys,ea8300 |\
+       linksys,mr8300)
                caldata_extract "ART" 0x1000 0x2f20
                ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
                ;;
@@ -217,7 +219,8 @@ case "$FIRMWARE" in
                caldata_extract "ART" 0x5000 0x2f20
                ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +3)
                ;;
-       linksys,ea8300)
+       linksys,ea8300 |\
+       linksys,mr8300)
                caldata_extract "ART" 0x5000 0x2f20
                ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3)
                ;;
index b9d625e29680fe32bad30dd2ae524001698b9d5e..d2a4abcadd697c7a68a8682a1feac6cb885f796d 100755 (executable)
@@ -9,7 +9,8 @@ boot() {
                        echo -e "bootcount\nchanged\n" | /usr/sbin/fw_setenv -s -
                ;;
        linksys,ea6350v3|\
-       linksys,ea8300)
+       linksys,ea8300|\
+       linksys,mr8300)
                mtd resetbc s_env || true
                ;;
        esac
index 4d8113698efcefb72cf348030355874b4a902ecb..0d606c75b5be85d39d7ef7e1c5fd795683fb8611 100644 (file)
@@ -15,7 +15,8 @@ preinit_set_mac_address() {
                base_mac=$(cat /sys/class/net/eth0/address)
                ip link set dev eth1 address $(macaddr_add "${base_mac}" +1)
                ;;
-       linksys,ea8300)
+       linksys,ea8300|\
+       linksys,mr8300)
                base_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
                ip link set dev eth0 address "${base_mac}"
                ip link set dev eth1 address $(macaddr_add "${base_mac}" 1)
index f94116de6ebff803f93dd4e5628c5cf79a91de3e..0311922f08834d03ebf8448bcc73715e423cfecb 100644 (file)
@@ -8,6 +8,7 @@ set_preinit_iface() {
        ezviz,cs-w3-wd1200g-eup| \
        glinet,gl-b1300| \
        linksys,ea8300| \
+       linksys,mr8300| \
        meraki,mr33| \
        zyxel,nbg6617)
                ifname=eth0
index 9d9b47eeaaa5f7d5ab1f331ea406b0d3405147b3..de09d34aef46445151b97d5b198eafb421395c39 100755 (executable)
@@ -16,7 +16,7 @@ linksys_get_target_firmware() {
                        "${cur_boot_part}" "${mtd_ubi0}"
        fi
 
-       # OEM U-Boot for EA6350v3 and EA8300; bootcmd=
+       # OEM U-Boot for EA6350v3, EA8300 and MR8300; bootcmd=
        #  if test $auto_recovery = no;
        #      then bootipq;
        #  elif test $boot_part = 1;
index e09ab0344b0cbc4e8d15c39d3aaa655242392c73..09ea3964690a9041a37f34c7cdbc5e7f44be2ee3 100644 (file)
@@ -102,7 +102,8 @@ platform_do_upgrade() {
                nand_do_upgrade "$1"
                ;;
        linksys,ea6350v3 |\
-       linksys,ea8300)
+       linksys,ea8300 |\
+       linksys,mr8300)
                platform_do_upgrade_linksys "$1"
                ;;
        meraki,mr33)
index cfc3037fb2aa0d20beef092383fe0d1b35ade799..9c1e0f04bbea500d506e64aa1be14bf2f96802e7 100644 (file)
@@ -1,18 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-/*
- * Device Tree Source for Linksys EA8300 (Dallas)
- *
- * Copyright (C) 2019 Jeff Kletsky
- *
- */
-
 /dts-v1/;
 
-#include "qcom-ipq4019.dtsi"
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/soc/qcom,tcsr.h>
+#include "qcom-ipq4019-xx8300.dtsi"
 
 / {
        model = "Linksys EA8300 (Dallas)";
                };
        };
 
-
        keys {
                compatible = "gpio-keys";
 
-               button@0 {
+               reset {
                        label = "reset";
                        linux,code = <KEY_RESTART>;
                        gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
                };
 
-               button@1 {
+               wps {
                        label = "wps";
                        linux,code = <KEY_WPS_BUTTON>;
                        gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
                };
        };
-
-
-       //
-       // OEM U-Boot provides either
-       // init=/sbin/init rootfstype=ubifs ubi.mtd=11,2048 \
-       //                 root=ubi0:ubifs rootwait rw
-       // or the same with ubi.mtd=13,2048
-       //
-
-       chosen {
-               bootargs-append = " root=/dev/ubiblock0_0 rootfstype=squashfs ro";
-       };
-
-
-       memory {
-               device_type = "memory";
-               reg = <0x80000000 0x10000000>;
-       };
-
-
-       soc {
-               rng@22000 {
-                       status = "okay";
-               };
-
-               mdio@90000 {
-                       status = "okay";
-               };
-
-               ess-psgmii@98000 {
-                       status = "okay";
-               };
-
-               tcsr@1949000 {
-                       compatible = "qcom,tcsr";
-                       reg = <0x1949000 0x100>;
-                       qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
-               };
-
-               tcsr@194b000 {
-                       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@60f8800 {
-                       status = "okay";
-
-                       dwc3@6000000 {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-
-                               usb2_port1: port@1 {
-                                       reg = <1>;
-                                       #trigger-source-cells = <0>;
-                               };
-                       };
-               };
-
-               usb3@8af8800 {
-                       status = "okay";
-
-                       dwc3@8a00000 {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-
-                               usb3_port1: port@1 {
-                                       reg = <1>;
-                                       #trigger-source-cells = <0>;
-                               };
-
-                               usb3_port2: port@2 {
-                                       reg = <2>;
-                                       #trigger-source-cells = <0>;
-                               };
-                       };
-               };
-
-               crypto@8e3a000 {
-                       status = "okay";
-               };
-
-               watchdog@b017000 {
-                       status = "okay";
-               };
-
-               ess-switch@c000000 {
-                       status = "okay";
-               };
-
-               edma@c080000 {
-                       status = "okay";
-               };
-       };
-};
-
-
-&blsp_dma {
-       status = "okay";
-};
-
-&blsp1_uart1 {
-       status = "okay";
-       pinctrl-0 = <&serial_0_pins>;
-       pinctrl-names = "default";
-
-};
-
-&cryptobam {
-       status = "okay";
-};
-
-&nand {
-       status = "okay";
-
-       pinctrl-0 = <&nand_pins>;
-       pinctrl-names = "default";
-
-       nand@0 {
-               partitions {
-                       compatible = "fixed-partitions";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-
-                       partition@0 {
-                               label = "sbl1";
-                               reg = <0x0 0x100000>;
-                               read-only;
-                       };
-
-                       partition@100000 {
-                               label = "mibib";
-                               reg = <0x100000 0x100000>;
-                               read-only;
-                       };
-
-                       partition@200000 {
-                               label = "qsee";
-                               reg = <0x200000 0x100000>;
-                               read-only;
-                       };
-
-                       partition@300000 {
-                               label = "cdt";
-                               reg = <0x300000 0x80000>;
-                               read-only;
-                       };
-
-                       partition@380000 {
-                               label = "appsblenv";
-                               reg = <0x380000 0x80000>;
-                               read-only;
-                       };
-
-                       partition@400000 {
-                               label = "ART";
-                               reg = <0x400000 0x80000>;
-                               read-only;
-                       };
-
-                       partition@480000 {
-                               label = "appsbl";
-                               reg = <0x480000 0x200000>;
-                               read-only;
-                       };
-
-                       partition@680000 {
-                               label = "u_env";
-                               reg = <0x680000 0x80000>;
-                               // writable -- U-Boot environment
-                       };
-
-                       partition@700000 {
-                               label = "s_env";
-                               reg = <0x700000 0x40000>;
-                               // writable -- Boot counter records
-                       };
-
-                       partition@740000 {
-                               label = "devinfo";
-                               reg = <0x740000 0x40000>;
-                               read-only;
-                       };
-
-                       partition@780000 {
-                               label = "kernel";
-                               reg = <0x780000 0x5800000>;
-                       };
-
-                       partition@a80000 {
-                               label = "rootfs";
-                               reg = <0xa80000 0x5500000>;
-                       };
-
-                       partition@5f80000 {
-                               label = "alt_kernel";
-                               reg = <0x5f80000 0x5800000>;
-                       };
-
-                       partition@6280000 {
-                               label = "alt_rootfs";
-                               reg = <0x6280000 0x5500000>;
-                       };
-
-                       partition@b780000 {
-                               label = "sysdiag";
-                               reg = <0xb780000 0x100000>;
-                               read-only;
-                       };
-
-                       partition@b880000 {
-                               label = "syscfg";
-                               reg = <0xb880000 0x4680000>;
-                               read-only;
-                       };
-               };
-       };
-};
-
-&pcie0 {
-       status = "okay";
-
-       perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
-       wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
-
-       bridge@0,0 {
-               reg = <0x00000000 0 0 0 0>;
-               #address-cells = <3>;
-               #size-cells = <2>;
-               ranges;
-
-               wifi2: wifi@1,0 {
-                       compatible = "qcom,ath10k";
-                       reg = <0x00010000 0 0 0 0>;
-               };
-       };
-};
-
-&qpic_bam {
-       status = "okay";
-};
-
-&tlmm {
-       serial_0_pins: serial0-pinmux {
-               pins = "gpio16", "gpio17";
-               function = "blsp_uart0";
-               bias-disable;
-       };
-
-       nand_pins: nand_pins {
-               pullups {
-                       pins = "gpio53", "gpio58", "gpio59";
-                       function = "qpic";
-                       bias-pull-up;
-               };
-
-               // gpio61 controls led_usb
-
-               pulldowns {
-                       pins =  "gpio55", "gpio56", "gpio57",
-                               "gpio60", "gpio62", "gpio63",
-                               "gpio64", "gpio65", "gpio66",
-                               "gpio67", "gpio68", "gpio69";
-                       function = "qpic";
-                       bias-pull-down;
-               };
-       };
-};
-
-&usb2_hs_phy {
-       status = "okay";
-};
-
-&usb3_hs_phy {
-       status = "okay";
-};
-
-&usb3_ss_phy {
-       status = "okay";
 };
 
 &wifi0 {
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mr8300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mr8300.dts
new file mode 100644 (file)
index 0000000..4818a2d
--- /dev/null
@@ -0,0 +1,82 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+
+#include "qcom-ipq4019-xx8300.dtsi"
+
+/ {
+       model = "Linksys MR8300 (Dallas)";
+       compatible = "linksys,mr8300", "qcom,ipq4019";
+
+       aliases {
+               led-boot = &led_blue;
+               led-failsafe = &led_red;
+               led-running = &led_blue;
+               led-upgrade = &led_amber;
+               serial0 = &blsp1_uart1;
+       };
+
+       // Top panel LEDs, above Linksys logo
+       leds {
+               compatible = "gpio-leds";
+
+               led_red: red {
+                       label = "mr8300:red:alarm";
+                       gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>;
+               };
+
+               led_amber: amber {
+                       label = "mr8300:amber:programming";
+                       gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
+                       panic-indicator;
+               };
+
+               led_blue: blue {
+                       label = "mr8300:blue:power";
+                       gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
+               };
+
+               // On back panel, above USB socket
+
+               led_usb: usb {
+                       label = "mr8300:green:usb";
+                       gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
+                       trigger-sources = <&usb3_port1>, <&usb3_port2>,
+                                         <&usb2_port1>;
+                       linux,default-trigger = "usbport";
+               };
+       };
+
+       keys {
+               compatible = "gpio-keys";
+
+               reset {
+                       label = "reset";
+                       linux,code = <KEY_RESTART>;
+                       gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
+               };
+
+               wps {
+                       label = "wps";
+                       linux,code = <KEY_WPS_BUTTON>;
+                       gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
+
+&wifi0 {
+       status = "okay";
+       qcom,ath10k-calibration-variant = "linksys-mr8300-v0-fcc";
+};
+
+&wifi1 {
+       status = "okay";
+       ieee80211-freq-limit = <5170000 5330000>;
+       qcom,ath10k-calibration-variant = "linksys-mr8300-v0-fcc";
+};
+
+&wifi2 {
+       status = "okay";
+       ieee80211-freq-limit = <5490000 5835000>;
+       qcom,ath10k-calibration-variant = "linksys-mr8300-v0-fcc";
+};
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi
new file mode 100644 (file)
index 0000000..77d495e
--- /dev/null
@@ -0,0 +1,302 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/*
+ * Device Tree Source for Linksys xx8300 (Dallas)
+ *
+ * Copyright (C) 2019 Jeff Kletsky
+ * Updated 2020 Hans Geiblinger
+ *
+ */
+
+/dts-v1/;
+
+#include "qcom-ipq4019.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/soc/qcom,tcsr.h>
+
+       //
+       // OEM U-Boot provides either
+       // init=/sbin/init rootfstype=ubifs ubi.mtd=11,2048 \
+       //                 root=ubi0:ubifs rootwait rw
+       // or the same with ubi.mtd=13,2048
+       //
+
+/ {
+       chosen {
+               bootargs-append = " root=/dev/ubiblock0_0 rootfstype=squashfs ro";
+       };
+
+
+       soc {
+               rng@22000 {
+                       status = "okay";
+               };
+
+               mdio@90000 {
+                       status = "okay";
+               };
+
+               ess-psgmii@98000 {
+                       status = "okay";
+               };
+
+               tcsr@1949000 {
+                       compatible = "qcom,tcsr";
+                       reg = <0x1949000 0x100>;
+                       qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
+               };
+
+               tcsr@194b000 {
+                       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@60f8800 {
+                       status = "okay";
+
+                       dwc3@6000000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               usb2_port1: port@1 {
+                                       reg = <1>;
+                                       #trigger-source-cells = <0>;
+                               };
+                       };
+               };
+
+               usb3@8af8800 {
+                       status = "okay";
+
+                       dwc3@8a00000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               usb3_port1: port@1 {
+                                       reg = <1>;
+                                       #trigger-source-cells = <0>;
+                               };
+
+                               usb3_port2: port@2 {
+                                       reg = <2>;
+                                       #trigger-source-cells = <0>;
+                               };
+                       };
+               };
+
+               crypto@8e3a000 {
+                       status = "okay";
+               };
+
+               watchdog@b017000 {
+                       status = "okay";
+               };
+
+               ess-switch@c000000 {
+                       status = "okay";
+               };
+
+               edma@c080000 {
+                       status = "okay";
+               };
+       };
+};
+
+
+&blsp_dma {
+       status = "okay";
+};
+
+&blsp1_uart1 {
+       status = "okay";
+       pinctrl-0 = <&serial_0_pins>;
+       pinctrl-names = "default";
+
+};
+
+&cryptobam {
+       status = "okay";
+};
+
+&nand {
+       status = "okay";
+
+       pinctrl-0 = <&nand_pins>;
+       pinctrl-names = "default";
+
+       nand@0 {
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "sbl1";
+                               reg = <0x0 0x100000>;
+                               read-only;
+                       };
+
+                       partition@100000 {
+                               label = "mibib";
+                               reg = <0x100000 0x100000>;
+                               read-only;
+                       };
+
+                       partition@200000 {
+                               label = "qsee";
+                               reg = <0x200000 0x100000>;
+                               read-only;
+                       };
+
+                       partition@300000 {
+                               label = "cdt";
+                               reg = <0x300000 0x80000>;
+                               read-only;
+                       };
+
+                       partition@380000 {
+                               label = "appsblenv";
+                               reg = <0x380000 0x80000>;
+                               read-only;
+                       };
+
+                       partition@400000 {
+                               label = "ART";
+                               reg = <0x400000 0x80000>;
+                               read-only;
+                       };
+
+                       partition@480000 {
+                               label = "appsbl";
+                               reg = <0x480000 0x200000>;
+                               read-only;
+                       };
+
+                       partition@680000 {
+                               label = "u_env";
+                               reg = <0x680000 0x80000>;
+                               // writable -- U-Boot environment
+                       };
+
+                       partition@700000 {
+                               label = "s_env";
+                               reg = <0x700000 0x40000>;
+                               // writable -- Boot counter records
+                       };
+
+                       partition@740000 {
+                               label = "devinfo";
+                               reg = <0x740000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@780000 {
+                               label = "kernel";
+                               reg = <0x780000 0x5800000>;
+                       };
+
+                       partition@a80000 {
+                               label = "rootfs";
+                               reg = <0xa80000 0x5500000>;
+                       };
+
+                       partition@5f80000 {
+                               label = "alt_kernel";
+                               reg = <0x5f80000 0x5800000>;
+                       };
+
+                       partition@6280000 {
+                               label = "alt_rootfs";
+                               reg = <0x6280000 0x5500000>;
+                       };
+
+                       partition@b780000 {
+                               label = "sysdiag";
+                               reg = <0xb780000 0x100000>;
+                               read-only;
+                       };
+
+                       partition@b880000 {
+                               label = "syscfg";
+                               reg = <0xb880000 0x4680000>;
+                               read-only;
+                       };
+               };
+       };
+};
+
+&pcie0 {
+       status = "okay";
+
+       perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
+       wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
+
+       bridge@0,0 {
+               reg = <0x00000000 0 0 0 0>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               ranges;
+
+               wifi2: wifi@1,0 {
+                       compatible = "qcom,ath10k";
+                       reg = <0x00010000 0 0 0 0>;
+               };
+       };
+};
+
+&qpic_bam {
+       status = "okay";
+};
+
+&tlmm {
+       serial_0_pins: serial0-pinmux {
+               pins = "gpio16", "gpio17";
+               function = "blsp_uart0";
+               bias-disable;
+       };
+
+       nand_pins: nand_pins {
+               pullups {
+                       pins = "gpio53", "gpio58", "gpio59";
+                       function = "qpic";
+                       bias-pull-up;
+               };
+
+               // gpio61 controls led_usb
+
+               pulldowns {
+                       pins =  "gpio55", "gpio56", "gpio57",
+                               "gpio60", "gpio62", "gpio63",
+                               "gpio64", "gpio65", "gpio66",
+                               "gpio67", "gpio68", "gpio69";
+                       function = "qpic";
+                       bias-pull-down;
+               };
+       };
+};
+
+&usb2_hs_phy {
+       status = "okay";
+};
+
+&usb3_hs_phy {
+       status = "okay";
+};
+
+&usb3_ss_phy {
+       status = "okay";
+};
index 5c76bc39b7eb4d377ed21964f31ad95315270b00..77d4d52ec09c352f462600bc0af0fe6a9d62ff5b 100644 (file)
@@ -540,6 +540,22 @@ define Device/linksys_ea8300
 endef
 TARGET_DEVICES += linksys_ea8300
 
+define Device/linksys_mr8300
+       $(call Device/FitzImage)
+       DEVICE_VENDOR := Linksys
+       DEVICE_MODEL := MR8300
+       SOC := qcom-ipq4019
+       KERNEL_SIZE := 3072k
+       IMAGE_SIZE := 87040k
+       BLOCKSIZE := 128k
+       PAGESIZE := 2048
+       UBINIZE_OPTS := -E 5    # EOD marks to "hide" factory sig at EOF
+       IMAGES += factory.bin
+       IMAGE/factory.bin  := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MR8300
+       DEVICE_PACKAGES := uboot-envtools ath10k-firmware-qca9888-ct ipq-wifi-linksys_mr8300-v0 kmod-usb-ledtrig-usbport
+endef
+TARGET_DEVICES += linksys_mr8300
+
 define Device/luma_wrtq-329acn
        $(call Device/FitImage)
        DEVICE_VENDOR := Luma Home
index 0fc50217c4f7a5d3bbe3dceef94d86cdebb35f3f..06dd135a59a6dac185cb5b56a7caad035ea70de2 100644 (file)
@@ -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,53 @@ dtb-$(CONFIG_ARCH_QCOM) += \
+@@ -837,11 +837,54 @@ dtb-$(CONFIG_ARCH_QCOM) += \
        qcom-apq8074-dragonboard.dtb \
        qcom-apq8084-ifc6540.dtb \
        qcom-apq8084-mtp.dtb \
@@ -47,6 +47,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
 +      qcom-ipq4019-fritzrepeater-1200.dtb \
 +      qcom-ipq4019-fritzrepeater-3000.dtb \
 +      qcom-ipq4019-map-ac2200.dtb \
++      qcom-ipq4019-mr8300.dtb \
 +      qcom-ipq4019-e2600ac-c1.dtb \
 +      qcom-ipq4019-e2600ac-c2.dtb \
 +      qcom-ipq4019-habanero-dvk.dtb \