From a9071d02b5ab11fbd73ea42076a09f2fd8136517 Mon Sep 17 00:00:00 2001 From: Hans Geiblinger Date: Wed, 9 Sep 2020 18:45:02 -0400 Subject: [PATCH] ipq40xx: Add support for Linksys MR8300 (Dallas) 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 [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 --- package/boot/uboot-envtools/files/ipq40xx | 3 +- package/firmware/ipq-wifi/Makefile | 2 + .../ipq-wifi/board-linksys_mr8300-v0.qca4019 | Bin 0 -> 97268 bytes .../ipq-wifi/board-linksys_mr8300-v0.qca9888 | Bin 0 -> 48644 bytes .../ipq40xx/base-files/etc/board.d/02_network | 3 +- .../etc/hotplug.d/firmware/11-ath10k-caldata | 9 +- .../ipq40xx/base-files/etc/init.d/bootcount | 3 +- .../lib/preinit/05_set_iface_mac_ipq40xx.sh | 3 +- .../preinit/06_set_preinit_iface_ipq40xx.sh | 1 + .../ipq40xx/base-files/lib/upgrade/linksys.sh | 2 +- .../base-files/lib/upgrade/platform.sh | 3 +- .../arch/arm/boot/dts/qcom-ipq4019-ea8300.dts | 308 +----------------- .../arch/arm/boot/dts/qcom-ipq4019-mr8300.dts | 82 +++++ .../arm/boot/dts/qcom-ipq4019-xx8300.dtsi | 302 +++++++++++++++++ target/linux/ipq40xx/image/Makefile | 16 + .../901-arm-boot-add-dts-files.patch | 3 +- 16 files changed, 425 insertions(+), 315 deletions(-) create mode 100644 package/firmware/ipq-wifi/board-linksys_mr8300-v0.qca4019 create mode 100644 package/firmware/ipq-wifi/board-linksys_mr8300-v0.qca9888 create mode 100644 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mr8300.dts create mode 100644 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi diff --git a/package/boot/uboot-envtools/files/ipq40xx b/package/boot/uboot-envtools/files/ipq40xx index b1d9b18088a..27aab6b2865 100644 --- a/package/boot/uboot-envtools/files/ipq40xx +++ b/package/boot/uboot-envtools/files/ipq40xx @@ -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) diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 7f3e3cf14de..39e22b50d31 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -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 index 0000000000000000000000000000000000000000..689d9c481dbe84def37a9d9a22c4bae4ef59e452 GIT binary patch literal 97268 zcmeHQYg8N8oxccd9M@SGA@Bn-#(YKxj+5*Nl`&&!7HWNs`AXjZ3UIZ$Ye4h><(p7TZ9U+ zZ)k1Ft8Z*jG?)yTyBZBmnTFkYDmvD1puTxG6;-PgZS~ED`u&IU_8IoS+0x#UX=>Kw zs8pG4s?7RElPLn%lZ@+3&KmzZA_7Go6X#Zy{~V!=VU&;R5LzA`i!Bh6AQYQJhob1M z^F}V0QdJ?8laurK(W3~hWGVXFf1KXJ`bb>C9Nk^#a=lDT=zHvNo-JnEjW}Dg@fh@W zasetRjzY1v51T{vkqz7TTjt(ldnGuue74(7V>_--z;Uh@Sk0_i40f}TMILDC8KtI;%{dNcYIN{q`=09ZGR@S@!M=7=^($qC zQ`ZOI>uxsuq-?{~4IFAQRF?hlZ`j@cT%Lxeem&UT-cVhJGsgyd+YQy*%QjD4qs(xc z1{XNleYjdzwuvtAMOp@$`f%_RZsEse8>fDQ3mEAFmvJSH)#aLWT-}-Wrs_(K%2puF zv437-?bvxSam}`af(JgAbU!{CD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UVi1JX_4R z8*#Q~<1y&%^y$A07J12Ua2=~CfXP)>c?GOHb2nu2mk_rKv*N-%8Lix z`>>u6VK8{F-1~*Xz(!Z_+PqLZuN4KC0dVhwmv_#t6oBr%yp!hOWA4&g>}8k=CB>fF z_lmQTRGO3|b#iBMx@)RbTGJ;(T1^Ccd;p=kr34bii-+w4?pJD%-E$uCtre;l!N|o8B%5>!3gYG@( z-rJ@i=-zuh7kyq1g#unN#Rh;!S?2!u2O^Ht&i-Fy2h0#6}Ven05mhxCaRWX+h5Z_iEVC>*e$koPE|$G!I;c~56~ym(%(4=|7n2zWpMbnij; z-ox~OEI=Tn5ty$M2k71lTcda7_k-?zNS|0iJ~*%3d!gKRf7=B)Zh`I|aPNV8AI#i) zgtAep7@<@NLL)H<$yQ+hEJFD>effyIlk!{d+4prz2_zClEw91**jN-%jJf+68)XLr zeI7ym{zm|G??Lw-bnk2Gb~l=P&-M=uk6axco49r7)B9gOK+j`fq}cg^{?1!fHh$Dd z$1a28=%)|f624~$dzt~Or-cA;?>!?ec_JZ_$RuTwPJ)V`6caj9r_||+QSOsmLQ86u RT3s&UvhIO<@8A1^{|8J-1^oa3 literal 0 HcmV?d00001 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 index 0000000000000000000000000000000000000000..90b6bac08ca6b2f05d4a6ba60b7c09422bbad2eb GIT binary patch literal 48644 zcmeHQ>r)e17QaDU(UFl30Tr=DL`Y%?Az{ZBqC8|ZOIk!HxP3(IE~pN-;CYP%gFQ&SJTiWsO#ewY9Y$rfR?JU*HGVvgXT@y`8opq!URbV1}F% zy8GPI=iJBd-VS~H{%Ce>%}vcU8PYYz)V!U!yYo?PZ7srbEREYEl!v#9Z;8eXR4yU{Ad-I)aq1CyB-%sjfTH*wUC<2Y0EgL|j$~ z>2$hRFJB^~Y$l8U@K0Ai&-&eonk|ti!WN@z*A}B93IB1Amn;&Zbh6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mtLO_DEZP(@Bst>0YJcC1b}<*FJhDa zz`f@u?xVu|U9152egYHV-aCg0kH?JmlUHEiG`6dE -#include -#include +#include "qcom-ipq4019-xx8300.dtsi" / { model = "Linksys EA8300 (Dallas)"; @@ -72,313 +62,21 @@ }; }; - keys { compatible = "gpio-keys"; - button@0 { + reset { label = "reset"; linux,code = ; gpios = <&tlmm 50 GPIO_ACTIVE_LOW>; }; - button@1 { + wps { label = "wps"; linux,code = ; 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@194b000 { - compatible = "qcom,tcsr"; - reg = <0x194b000 0x100>; - qcom,usb-hsphy-mode-select = ; - }; - - ess_tcsr@1953000 { - compatible = "qcom,tcsr"; - reg = <0x1953000 0x1000>; - qcom,ess-interface-select = ; - }; - - tcsr@1957000 { - compatible = "qcom,tcsr"; - reg = <0x1957000 0x100>; - qcom,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 index 00000000000..4818a2df598 --- /dev/null +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mr8300.dts @@ -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 = ; + gpios = <&tlmm 50 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "wps"; + linux,code = ; + 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 index 00000000000..77d495e670f --- /dev/null +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi @@ -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 +#include +#include + + // + // 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@194b000 { + compatible = "qcom,tcsr"; + reg = <0x194b000 0x100>; + qcom,usb-hsphy-mode-select = ; + }; + + ess_tcsr@1953000 { + compatible = "qcom,tcsr"; + reg = <0x1953000 0x1000>; + qcom,ess-interface-select = ; + }; + + tcsr@1957000 { + compatible = "qcom,tcsr"; + reg = <0x1957000 0x100>; + qcom,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"; +}; diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 5c76bc39b7e..77d4d52ec09 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -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 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 0fc50217c4f..06dd135a59a 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 --- 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 + 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 \