From 9e4ede8344d60d4837e047e9275c21fd2a8f130b Mon Sep 17 00:00:00 2001 From: Vincent Tremblay Date: Fri, 23 Dec 2022 12:30:36 -0500 Subject: [PATCH] ipq40xx: add support for Linksys WHW03 V2 SOC: Qualcomm IPQ4019 WiFi 1: QCA4019 IEEE 802.11b/g/n WiFi 2: QCA4019 IEEE 802.11a/n/ac WiFi 3: QCA8888 IEEE 802.11a/n/ac Bluetooth: Qualcomm CSR8811 (A12U) Zigbee: Silicon Labs EM3581 NCP + Skyworks SE2432L Ethernet: Qualcomm Atheros QCA8072 (2-port) Flash 1: Mactronix MX30LF4G18AC-XKI RAM (NAND): SK hynix H5TC4G63CFR-PBA (512MB) LED Controller: NXP PCA9633 (I2C) Buttons: Single reset button (GPIO). - The three WiFis were fully tested and are configured with the same settings as in the vendor firmware. - The specific board files were submitted to the ATH10k mailing list but I'm still waiting for a reply. They can be removed once they are approved upstream. - Two ethernet ports are accessible on the device. By default one is configured as WAN and the other one is LAN. They are fully working. Bluetooth: ======== - Fully working with the following caveats: - RFKILL need to be enabled in the kernel. - An older version of bluez is needed as bccmd is needed to configure the chip. Zigbee: ====== - The spidev device is available in the /dev directory. - GPIOs are configured the same way as in the vendor firmware. - Tests are on-going. I am working on getting access to the Silicon Labs stack to validate that it is fully working. Installation: ========= The squash-factory image can be installed via the Linksys Web UI: 1. Open "http://192.168.1.1/ca" (Change the IP with the IP of your device). 2. Login with your admin password. 3. To enter into the support mode, click on the "CA" link and the bottom of the page. 4. Open the "Connectivity" menu and upload the squash-factory image with the "Choose file" button. 5. Click start. Ignore all the prompts and warnings by click "yes" in all the popups. The device uses a dual partition mechanism. The device automatically revert to the previous partition after 3 failed boot attempts. If you want to force the previous firmware to load, you can turn off and then turn on the device for 2 seconds, 3 times in a row. It can also be done via TFTP: 1. Setup a local TFTP server and configure its IP to 192.168.1.100. 2. Rename your image to "nodes_v2.img" and put it to the TFTP root of your server. 3. Connect to the device through the serial console. 4. Power on device and press enter when prompted to drop into U-Boot. 5. Flash the partition of your choice by typing "run flashimg" or "run flashimg2". 6. Once flashed, enter "reset" to reboot the device. Reviewed-by: Robert Marko Signed-off-by: Vincent Tremblay --- package/boot/uboot-envtools/files/ipq40xx | 3 +- package/firmware/ipq-wifi/Makefile | 2 + .../ipq-wifi/board-linksys_whw03v2.qca4019 | Bin 0 -> 24324 bytes .../ipq-wifi/board-linksys_whw03v2.qca9888 | Bin 0 -> 12172 bytes ...k-read-qcom-coexist-support-as-a-u32.patch | 60 ++ .../ipq40xx/base-files/etc/board.d/02_network | 1 + .../ipq40xx/base-files/etc/init.d/bootcount | 3 +- .../base-files/lib/upgrade/platform.sh | 3 +- .../arm/boot/dts/qcom-ipq4019-whw03v2.dts | 519 ++++++++++++++++++ target/linux/ipq40xx/image/generic.mk | 17 + 10 files changed, 605 insertions(+), 3 deletions(-) create mode 100644 package/firmware/ipq-wifi/board-linksys_whw03v2.qca4019 create mode 100644 package/firmware/ipq-wifi/board-linksys_whw03v2.qca9888 create mode 100644 package/kernel/ath10k-ct/patches/130-ath10k-read-qcom-coexist-support-as-a-u32.patch create mode 100644 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts diff --git a/package/boot/uboot-envtools/files/ipq40xx b/package/boot/uboot-envtools/files/ipq40xx index 6c65ed752d..ff61488833 100644 --- a/package/boot/uboot-envtools/files/ipq40xx +++ b/package/boot/uboot-envtools/files/ipq40xx @@ -60,7 +60,8 @@ linksys,ea6350v3) ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x20000" "0x20000" ;; linksys,ea8300|\ -linksys,mr8300) +linksys,mr8300|\ +linksys,whw03v2) ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x40000" "0x20000" ;; linksys,whw01) diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 8db2185f61..56c799302e 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -34,6 +34,7 @@ ALLWIFIBOARDS:= \ glinet_gl-ap1300 \ glinet_gl-s1300 \ linksys_ea8300 \ + linksys_whw03v2 \ p2w_r619ac \ pakedge_wr-1 \ qxwlan_e2600ac-c1 \ @@ -113,6 +114,7 @@ $(eval $(call generate-ipq-wifi-package,glinet_gl-a1300,GL.iNet GL-A1300)) $(eval $(call generate-ipq-wifi-package,glinet_gl-ap1300,GL.iNet GL-AP1300)) $(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_whw03v2,Linksys WHW03 V2)) $(eval $(call generate-ipq-wifi-package,p2w_r619ac,P&W R619AC)) $(eval $(call generate-ipq-wifi-package,pakedge_wr-1,Pakedge WR-1)) $(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac-c1,Qxwlan E2600AC C1)) diff --git a/package/firmware/ipq-wifi/board-linksys_whw03v2.qca4019 b/package/firmware/ipq-wifi/board-linksys_whw03v2.qca4019 new file mode 100644 index 0000000000000000000000000000000000000000..69ec31985adecfa4dfce8abcd869c11144397e78 GIT binary patch literal 24324 zcmeHPYfw{37H+~*7Z+|w5CJbC30hD4tEC(PArhHjhSYBbiPrg*_ z`(dHD*jKzi%wJv0Kay9vAFJ~HeaiDn#d$?X!w!p!4wY4v`BoHG_y?Br;dmBs3>qAd z=C?D@!U9;sk)~@xA?wy6D7Ln?*4EaRIs(95Y^5d&724@0XIR%wCJv)D zbAY0)tZ=2caS+=!Gortk@xk_nssoux34-w(?JZT(%-spmPy8RBy1fYfLfV2 zE#bXip*;AO%Le0LwAWYVXC}bTq4uUKab{{l_;?>?2HOPCp`pGaQ{vfzBy zuFVN!O-0o^#6DTn@NfF6K1(^nE8G0x?SYE6oejPf?gb-f3oFA9aMO|CJJ2px!pm|B zzuGHqjj!KQ;Z}I-i}Fst8joV9+?9nA5iO2@we7m!Y;ZuFs2exAZN}g5bxQ0#b|Hb| zz#AegBaui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TorB literal 0 HcmV?d00001 diff --git a/package/firmware/ipq-wifi/board-linksys_whw03v2.qca9888 b/package/firmware/ipq-wifi/board-linksys_whw03v2.qca9888 new file mode 100644 index 0000000000000000000000000000000000000000..646f52c1b00f0866e19ce2b7b211ac49fecc1fb6 GIT binary patch literal 12172 zcmeHNYfuwe7QTtNq61^P2>}6HUP*Tln$Tg#mWM!eHA5Ni@b<70Gp z#>8rptcapR9Ly-i%wRS(MQypWJLOJUQ^QoLwY9ZBrfUD}|E=*l+_kOp5?i?C6*A&&5^d%ZYk#2jfXINzK)ejx za7#dkWM-Ve40SAi)o1}{NY zfk5ygEKSgMJa~TA-s9ABL@IwK6X^cOC4=S3Le{W+oMC;W2)2ZPE&9 zLc)LG*b4aY3h}LBd~&k%34Y(cmZtDnMn+0X*yqcvZId?FBy?yy<(lLR@0<9U$YMMo z7=qMbHAo3og4m86JM~+qYiMMl0xF)!pW{+c3?#6 zt0ilhYOEU3V-!Y_)LjZG!^+4qMuTY(8k=2&*SEMjyQYeY*;R?^g7b-mk`yfEK?;(I zWs;f9W^D6=&4>XrkOoGJX&-2ja;%&zXTpaNS%*S}sbBJXv3vJL$GDNPsc-H*eYcpe zJ^Im;<^c#O;BK;m<{sKWXgHtU&7RhqXk7?E@Bkls)@-Hg2#WiHbwj8reLd7Tb1!Wq ze(AkwKgS-|zxM>7#tGn^u)E9_y_qQF##twXGDHb<;)D^P6Muknu{~xJt({$xcZ_qh zHh#$ax!u9`>kV`nbmCx->9^CB{%hVryM=AhlOcc_F92R2H^hFx1GsB;7kg4)M{n|f z!EvnB+(=WmKl6UX9cE2>BD@D22mVRU11F8N21anQ1NvHeqyGl?G26wD-JkUTj_YRY z%v2aqKmh+ZT+$)vt;BoXJ_sY!)8)5)UZ=gA-J_@P-|#y*mNl3)AwU74e%>+7nHOJI z=FkzPBeE2Qm^s5DOLORm(h*sTLX0>pGVlxrE`7THd~x5}y-368@UQv{Eo&N+D$ZQ| zwS(whv+M2JE2BG|I{VtT)E!@b+B-z`VI640%}a&>a(`B1^2Y0<2L{QWtlcuh*FLNJ z-P757<)&*s_JZMTzBO&vuv_0(yg$p7To$-;oGa_iZ%;K2Uu`*8bv&yBeec|;*;RFV zokeaQAMSN-u;%VoFn4^roJBoZdyu;6z<{^jReWN#X>_d9U49a`p{DOgdL2xE&iko` z3s=mJ%45)O`<?Nm3q%{_d;S#zv_U1NR*wc?b>fXKjW&VY1T!t!6N zNL;z!#U$2k1swg&)zc@86sA<>!%tprPIg{SPHs*U zNaQo4*@T9!)*G8!Ew=s-9iEY~iNLMDOixb>@neniB6ew18nO=EMr}j3qZ_CVNEMnW z2-wkn-uKm=$Xa;ykFQ-AW2GQ3Eyjy*AY$Jv1|C0t{OHl6e@Do?{m1luHN?DZyLroa z)4I$~3paHS0ND0(V^jC$x9iud)i|z%U*EsxTF&hHL`|6&GY2rqp;G1N=VoKCr}n1( zJc|2$%0MuXBu|ib0&ZmDI|=;vw@Xm2K@lu&L3xoe!Ov2)Of&rDIyUt~v=&z>^Z%bE zoVg3<>cZJM#%OBZ+1hF0JQqer$F5II2BvO(^X+#(+>3t#6j2ljvmH1-n@7d*QeK`t z0RamT@jd#!Dr*qRgEFW?$b^P+pp4ETWI;puPlj>`8PNDijEY!)P$^aLc2QB3l3ZMm zZPl;NNNi;*K+X0{*<#*hrN1u2~=MJligvVti^BH!M_x{AnGs|%mhcs`C7 psv_&q?91ANf>IzDx|Q0B)T8fE?;xAdmMi?V(En2X-CIh({{{b3#6 +Date: Sat, 31 Dec 2022 09:24:00 -0500 +Subject: [PATCH] ath10k: read qcom,coexist-support as a u32 + +Read qcom,coexist-support as a u32 instead of a u8 + +When we set the property to <1> in the DT (as specified in the doc), +"of_property_read_u8" read 0 instead of 1. This is because of the data format. + +By default <1> is written with 32 bits. +The problem is that the driver is trying to read a u8. + +The difference can be visualized using hexdump in a running device: +Default 32 bits output: +======================= +0000000 0000 0100 +0000004 + +8 bits output: +============== +0000000 0001 +0000001 + +By changing "of_property_read_u8" by "of_property_read_u32", the driver +is aligned with the documentation and is able to read the value without +modifying the DT. + +The other solution would be to force the value in the DT to be saved as +an 8 bits value (qcom,coexist-support = /bits/ 8 <1>), +which is against the doc and less intuitive. + +Validation: +=========== +The patch was tested on a real device and we can see in the debug logs +that the feature is properly initialized: + +[ 109.102097] ath10k_ahb a000000.wifi: boot coex_support 1 coex_gpio_pin 52 + +Signed-off-by: Vincent Tremblay + +--- a/ath10k-5.15/core.c ++++ b/ath10k-5.15/core.c +@@ -2798,14 +2798,14 @@ done: + static void ath10k_core_fetch_btcoex_dt(struct ath10k *ar) + { + struct device_node *node; +- u8 coex_support = 0; ++ u32 coex_support = 0; + int ret; + + node = ar->dev->of_node; + if (!node) + goto out; + +- ret = of_property_read_u8(node, "qcom,coexist-support", &coex_support); ++ ret = of_property_read_u32(node, "qcom,coexist-support", &coex_support); + if (ret) { + ar->coex_support = true; + goto out; 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 00e78d0526..ced26b9dd3 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -34,6 +34,7 @@ ipq40xx_setup_interfaces() edgecore,ecw5211|\ glinet,gl-b2200|\ google,wifi|\ + linksys,whw03v2|\ luma,wrtq-329acn|\ mikrotik,cap-ac|\ netgear,wac510|\ diff --git a/target/linux/ipq40xx/base-files/etc/init.d/bootcount b/target/linux/ipq40xx/base-files/etc/init.d/bootcount index 6acebcef6e..df656c9b85 100755 --- a/target/linux/ipq40xx/base-files/etc/init.d/bootcount +++ b/target/linux/ipq40xx/base-files/etc/init.d/bootcount @@ -11,7 +11,8 @@ boot() { linksys,ea6350v3|\ linksys,ea8300|\ linksys,mr8300|\ - linksys,whw01) + linksys,whw01|\ + linksys,whw03v2) mtd resetbc s_env || true ;; netgear,wac510) diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index 96071959d4..2012213a56 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -165,7 +165,8 @@ platform_do_upgrade() { linksys,ea6350v3 |\ linksys,ea8300 |\ linksys,mr8300 |\ - linksys,whw01) + linksys,whw01 |\ + linksys,whw03v2) platform_do_upgrade_linksys "$1" ;; meraki,mr33 |\ diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts new file mode 100644 index 0000000000..e1e8cf2588 --- /dev/null +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts @@ -0,0 +1,519 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qcom-ipq4019.dtsi" +#include +#include +#include +#include + +/ { + model = "Linksys WHW03 V2 (Velop)"; + compatible = "linksys,whw03v2", "qcom,ipq4019"; + + aliases { + led-boot = &led_blue; + led-failsafe = &led_red; + led-running = &led_green; + led-upgrade = &led_red; + }; + + // The arguments rootfstype and ro are needed + // to override the default bootargs + chosen { + bootargs-append = " root=/dev/ubiblock0_0 rootfstype=squashfs ro"; + stdout-path = &blsp1_uart1; + }; + + soc { + ess-tcsr@1953000 { + compatible = "qcom,tcsr"; + reg = <0x1953000 0x1000>; + qcom,ess-interface-select = ; + }; + + + 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 = ; + }; + + tcsr@1957000 { + compatible = "qcom,tcsr"; + reg = <0x1957000 0x100>; + qcom,wifi_noc_memtype_m0_m2 = ; + }; + }; + + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&tlmm 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + + +&tlmm { + mdio_pins: mdio-pinmux { + mux-1 { + pins = "gpio6"; + function = "mdio"; + bias-pull-up; + }; + + mux-2 { + pins = "gpio7"; + function = "mdc"; + bias-pull-up; + }; + }; + + i2c_0_pins: i2c-0-pinmux { + mux { + function = "blsp_i2c0"; + pins = "gpio20", "gpio21"; + bias-disable; + }; + }; + + serial_0_pins: serial0-pinmux { + mux { + pins = "gpio16", "gpio17"; + function = "blsp_uart0"; + bias-disable; + }; + }; + + serial_1_pins: serial1-pinmux { + mux { + pins = "gpio8", "gpio9", "gpio10", "gpio11"; + function = "blsp_uart1"; + bias-disable; + }; + }; + + spi_0_pins: spi-0-pinmux { + mux { + function = "blsp_spi0"; + pins = "gpio13", "gpio14", "gpio15"; + drive-strength = <12>; + bias-disable; + }; + + mux-cs { + pins = "gpio12"; + drive-strength = <2>; + bias-disable; + output-high; + }; + }; + + spi_1_pins: spi-1-pinmux { + mux-1 { + function = "blsp_spi1"; + pins = "gpio44", "gpio46","gpio47"; + bias-disable; + }; + + mux-2 { + pins = "gpio31", "gpio45", "gpio49"; + function = "gpio"; + bias-pull-up; + output-high; + }; + + host-interrupt { + pins = "gpio42"; + function = "gpio"; + input; + }; + }; + + wifi_0_pins: wifi0-pinmux { + btcoexist { + bias-pull-up; + drive-strength = <6>; + function = "gpio"; + output-high; + pins = "gpio52"; + }; + }; + + zigbee-0 { + gpio-hog; + gpios = <29 GPIO_ACTIVE_HIGH>; + bias-disable; + output-low; + }; + + zigbee-1 { + gpio-hog; + gpios = <50 GPIO_ACTIVE_HIGH>; + bias-disable; + input; + }; + + bluetooth-enable { + gpio-hog; + gpios = <32 GPIO_ACTIVE_HIGH>; + output-high; + }; +}; + +&mdio { + status = "okay"; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + phy-reset-gpios = <&tlmm 19 GPIO_ACTIVE_LOW>; +}; + +ðphy0 { + status = "disabled"; +}; + +ðphy1 { + status = "disabled"; +}; + +ðphy2 { + status = "disabled"; +}; + +ðphy3 { + reg = <0x1b>; +}; + +ðphy4 { + reg = <0x1c>; +}; + +&psgmiiphy { + reg = <0x1d>; +}; + +&watchdog { + status = "okay"; +}; + +&prng { + status = "okay"; +}; + +&blsp_dma { + status = "okay"; +}; + +&cryptobam { + num-channels = <4>; + qcom,num-ees = <2>; + + status = "okay"; +}; + +&crypto { + status = "okay"; +}; + +&blsp1_uart1 { + status = "okay"; + pinctrl-0 = <&serial_0_pins>; + pinctrl-names = "default"; +}; + +&blsp1_uart2 { + status = "okay"; + pinctrl-0 = <&serial_1_pins>; + pinctrl-names = "default"; + + bluetooth { + compatible = "csr,8811"; + + enable-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>; + }; +}; + +&blsp1_spi2 { + pinctrl-0 = <&spi_1_pins>; + pinctrl-names = "default"; + status = "okay"; + + cs-gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>; + + zigbee@0 { + #address-cells = <1>; + #size-cells = <0>; + + compatible = "silabs,em3581"; + reg = <0>; + spi-max-frequency = <12000000>; + }; +}; + +&blsp1_i2c3 { + pinctrl-0 = <&i2c_0_pins>; + pinctrl-names = "default"; + + status = "okay"; + + // RGB LEDs + pca9633: led-controller { + compatible = "nxp,pca9633"; + nxp,hw-blink; + reg = <0x62>; + #address-cells = <1>; + #size-cells = <0>; + + led_red: red@0 { + label = "red"; + color = ; + function = LED_FUNCTION_INDICATOR; + linux,default-trigger = "none"; + reg = <0>; + }; + + led_green: green@1 { + label = "green"; + color = ; + function = LED_FUNCTION_INDICATOR; + linux,default-trigger = "none"; + reg = <1>; + }; + + led_blue: blue@2 { + label = "blue"; + color = ; + function = LED_FUNCTION_INDICATOR; + linux,default-trigger = "default-on"; + reg = <2>; + }; + }; +}; + +&usb3_ss_phy { + status = "okay"; +}; + +&usb3_hs_phy { + status = "okay"; +}; + +&usb2_hs_phy { + status = "okay"; +}; + +&nand { + status = "okay"; + + 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 = "APPSBL"; + reg = <0x380000 0x200000>; + read-only; + }; + + partition@580000 { + label = "ART"; + reg = <0x580000 0x80000>; + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + read-only; + + precal_art_1000: precal@1000 { + reg = <0x1000 0x2f20>; + }; + + precal_art_5000: precal@5000 { + reg = <0x5000 0x2f20>; + }; + + precal_art_9000: precal@9000 { + reg = <0x9000 0x2f20>; + }; + + macaddr_gmac0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_gmac1: macaddr@6 { + reg = <0x6 0x6>; + }; + }; + + partition@600000 { + label = "u_env"; + reg = <0x600000 0x80000>; + }; + + partition@680000 { + label = "s_env"; + reg = <0x680000 0x40000>; + }; + + partition@6c0000 { + label = "devinfo"; + reg = <0x6c0000 0x40000>; + read-only; + }; + + partition@700000 { + label = "kernel"; + reg = <0x700000 0xa100000>; + }; + + partition@d00000 { + label = "rootfs"; + reg = <0xd00000 0x9b00000>; + }; + + partition@a800000 { + label = "alt_kernel"; + reg = <0xa800000 0xa100000>; + }; + + partition@ae00000 { + label = "alt_rootfs"; + reg = <0xae00000 0x9b00000>; + }; + + partition@14900000 { + label = "sysdiag"; + reg = <0x14900000 0x200000>; + read-only; + }; + + partition@14b00000 { + label = "syscfg"; + reg = <0x14b00000 0xb500000>; + read-only; + }; + }; + }; +}; + +&pcie0 { + status = "okay"; + + perst-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 40 GPIO_ACTIVE_LOW>; + clkreq-gpios = <&tlmm 39 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"; +}; + +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport4 { + status = "okay"; + label = "lan"; + + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_gmac1>; +}; + +&swport5 { + status = "okay"; + label = "wan"; + + nvmem-cell-names = "mac-address"; + nvmem-cells = <&macaddr_gmac0>; +}; + +&wifi0 { + pinctrl-0 = <&wifi_0_pins>; + pinctrl-names = "default"; + + status = "okay"; + + qcom,coexist-support = <1>; + qcom,coexist-gpio-pin = <0x34>; + + ieee80211-freq-limit = <2401000 2473000>; + qcom,ath10k-calibration-variant = "linksys-whw03v2"; + + nvmem-cell-names = "pre-calibration", "mac-address"; + nvmem-cells = <&precal_art_1000>, <&macaddr_gmac0>; + mac-address-increment = <1>; +}; + +&wifi1 { + status = "okay"; + + ieee80211-freq-limit = <5170000 5250000>; + qcom,ath10k-calibration-variant = "linksys-whw03v2"; + + nvmem-cell-names = "pre-calibration", "mac-address"; + nvmem-cells = <&precal_art_5000>, <&macaddr_gmac0>; + mac-address-increment = <2>; +}; + +&wifi2 { + status = "okay"; + + ieee80211-freq-limit = <5735000 5835000>; + qcom,ath10k-calibration-variant = "linksys-whw03v2"; + + nvmem-cell-names = "pre-calibration", "mac-address"; + nvmem-cells = <&precal_art_9000>, <&macaddr_gmac0>; + mac-address-increment = <3>; +}; diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index aa013e8e61..dcf0cb20aa 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -720,6 +720,23 @@ define Device/linksys_mr8300 endef TARGET_DEVICES += linksys_mr8300 +define Device/linksys_whw03v2 + $(call Device/FitzImage) + DEVICE_VENDOR := Linksys + DEVICE_MODEL := WHW03 + DEVICE_VARIANT := V2 + SOC := qcom-ipq4019 + KERNEL_SIZE := 6144k + IMAGE_SIZE := 158720k + 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=WHW03v2 + DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-linksys_whw03v2 kmod-leds-pca963x kmod-spi-dev kmod-bluetooth +endef +TARGET_DEVICES += linksys_whw03v2 + define Device/linksys_whw01 $(call Device/FitzImage) DEVICE_VENDOR := Linksys -- 2.30.2