From ad77be28b804d59b4568d5075b66abde905db8ce Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 16 Jan 2019 12:26:10 +0800 Subject: [PATCH] ipq40xx: add support for Linksys EA6350v3 --- package/firmware/ipq-wifi/Makefile | 3 +- .../ipq-wifi/board-linksys_ea6350v3.bin | Bin 0 -> 24324 bytes .../ipq40xx/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 2 + .../base-files/lib/upgrade/platform.sh | 5 + .../arm/boot/dts/qcom-ipq4018-ea6350v3.dts | 279 ++++++++++++++++++ target/linux/ipq40xx/image/Makefile | 14 + .../901-arm-boot-add-dts-files.patch | 3 +- 8 files changed, 305 insertions(+), 2 deletions(-) create mode 100644 package/firmware/ipq-wifi/board-linksys_ea6350v3.bin create mode 100644 target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 66b1e3af1..df629e565 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -17,7 +17,7 @@ endef # Please send a mail with your device-specific board files upstream. # You can find instructions and examples on the linux-wireless wiki: # -ALLWIFIBOARDS:=rt-acrh17 engenius_eap1300 +ALLWIFIBOARDS:=linksys_ea6350v3 rt-acrh17 engenius_eap1300 ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD)) define Package/ipq-wifi-default @@ -51,6 +51,7 @@ Don't install it for any other device! PREV_BOARD+=ipq-wifi-$(1) endef +$(eval $(call generate-ipq-wifi-package,linksys_ea6350v3,board-linksys_ea6350v3.bin,Linksys EA6350v3)) $(eval $(call generate-ipq-wifi-package,rt-acrh17,board-rt-acrh17.bin,ASUS RT-ACRH17/RT-AC82U/RT-AC42U)) #$(eval $(call generate-ipq-wifi-package,,,)) $(eval $(call generate-ipq-wifi-package,engenius_eap1300,board-engenius_eap1300.bin,EnGenius EAP1300)) diff --git a/package/firmware/ipq-wifi/board-linksys_ea6350v3.bin b/package/firmware/ipq-wifi/board-linksys_ea6350v3.bin new file mode 100644 index 0000000000000000000000000000000000000000..dbc85bfe1dca9c87539f6129054f848eae3d4468 GIT binary patch literal 24324 zcmeHPdsGuw9=^d~e9H_06>ta%j|3q=LN!7x0V(AX(XxsJT?$k!iAEj~5JOk(`k)vQ z(OM7!s1$i-BlWn_RR}Vd+hGkbM`FmolGVVn5hY3#V}vE zbAR)@_jey(hA^4?ao<><9G$#5JuWsYI%Q*WPAbr9wE&_l20sGuDon+dx^+b*#Zkpt zb@W>$>au9{j&-q?v*OaCiXHfA-0G;Rq6&4<-hJ!#sQ2#H)###k7Oj@P5?dwJYFV%i z9&C>n^W8xf3(Pr)#^)yd8i2@7SWpPS0*((f0D#93Da_}=7ZpSzDc%$SQmOP`j~)Rz zcP@DRms3e(n!}}vdb*DXSYJ%6)kyRNouFMA(^#YG)G)cxLYqhEYxj>#9E<0;6RVCEJUE?lz2tpJM3dw2<>$y^tpO3v<9o_k4a8HbI2SVk&U{dxc>+t+ zGn=Y+jtx_7VJdNVJ9od6sfpd{pES^}t6Q@pY)e4ajlS}hwBy2x<%KQ%+gjEh=jnWl zhTGJ&S-S-r{1w9&OOGX%h*W{fFM4Y}*mzv5Tlv<<{nafSPDED+?Yi4uR-3kypW&Nu zr>pcxW@-2q|J2Lf>gM$NRn>td!-G{FF$aUod<&;CRwm}fGvLjczi{zV#Mf`xiolh@ z)(aQ5XmJPuB5!ig$!G-}m;XOq;BT^V{b<8k}iWLMykT@(3S&OYj z$|?^WJn~+{nTw<`KpM>;)(W!?!B%wGVDs1vl#in5JroJR0>lAIAIt|?j!94nUvf`^ zBwz{R1Z6B1i^wnuCJ{^SCD?p2=(F{0w2i0P$pn3U0|O?r$u!UhVKXBmqoTyIVsTU? zjn|=qqlrgJ@VEg>TSIum1D3W3Z#yM08yt&mPOP2U47H()8q{G^^x8TL?V>h)`MzVm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UE6K7EBH;BzcY^z%PD7K>H;f=%)5-4r&s+du=G@CZbRGwo@QzG7rlF$6oTpHsXmszA5g=~JIcIwaV$yr8y!OM7%(K-H3>K6CXY zMT4+*S&5-F`)J%gzpaa38}2P`N;t^d?YHgju)c3&Ys6uHt?5eT#l(7k75Zj<%f@5z zRm)Y2(m(2d^L^R7!CJq9Zj-tr^%SoXDeUdn8RbX$eTnn^=f)8_Dq0HyYcQ#3|u&_}019#xy2|_~nA-Qm)vKg|lJXsS@%I@b)+nW94 zK1kX9{Aufhf_}!uFhI$`50fyVnybH?(_L@EFlO5+qr0Eo|5GsYulG0*4)yclP({-P zx9kjE1QXnSQUP`H3%W#yEa|R2FPw`2FE93j?J)Q80jyN0$B$eaTJFP+gZlafJm_^w#AI&b$2fZ04m z4fhK^bQ{mQh~!E5@{nKyOZfP;V#+&xW$@eBH*56 z5(#YqZBw)bv`x_#w7HESw?W&5+bwy10Nkq$C3W|3uQrs_+B@#mMyIuR^!LMSgan +#include +#include + +/ { + model = "Linksys EA6350v3"; + compatible = "linksys,ea6350v3", "qcom,ipq4019"; + + memory { + device_type = "memory"; + reg = <0x80000000 0x10000000>; + }; + + aliases { + led-boot = &power; + led-failsafe = &power; + led-running = &power; + led-upgrade = &power; + }; + + soc { + 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"; + }; + + serial@78af000 { + pinctrl-0 = <&serial_pins>; + pinctrl-names = "default"; + status = "okay"; + }; + + usb3@8af8800 { + status = "okay"; + }; + + crypto@8e3a000 { + status = "okay"; + }; + + wifi@a000000 { + status = "okay"; + qcom,ath10k-calibration-variant = "linksys-ea6350v3"; + }; + + wifi@a800000 { + status = "okay"; + qcom,ath10k-calibration-variant = "linksys-ea6350v3"; + }; + + watchdog@b017000 { + status = "okay"; + }; + + ess-switch@c000000 { + status = "okay"; + }; + + edma@c080000 { + status = "okay"; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&tlmm 63 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&tlmm 0 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + power: status { + label = "rt-ac58u:blue:status"; + gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&cryptobam { + status = "okay"; +}; + +&blsp_dma { + status = "okay"; +}; + +&tlmm { + serial_pins: serial_pinmux { + mux { + pins = "gpio60", "gpio61"; + function = "blsp_uart0"; + bias-disable; + }; + }; + + spi_0_pins: spi_0_pinmux { + mux { + function = "blsp_spi0"; + pins = "gpio55", "gpio56", "gpio57"; + drive-strength = <12>; + bias-disable; + }; + + mux_cs { + function = "gpio"; + pins = "gpio54", "gpio59"; + drive-strength = <2>; + bias-disable; + output-high; + }; + }; +}; + +&blsp1_spi1 { /* BLSP1 QUP1 */ + pinctrl-0 = <&spi_0_pins>; + pinctrl-names = "default"; + status = "okay"; + cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, + <&tlmm 59 GPIO_ACTIVE_HIGH>; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <0>; + /* + * U-boot looks for "n25q128a11" node, + * if we don't have it, it will spit out the following warning: + * "ipq: fdt fixup unable to find compatible node". + */ + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l1606e", "n25q128a11"; + spi-max-frequency = <24000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition0@0 { + label = "SBL1"; + reg = <0x00000000 0x00040000>; + read-only; + }; + partition1@40000 { + label = "MIBIB"; + reg = <0x00040000 0x00020000>; + read-only; + }; + partition2@60000 { + label = "QSEE"; + reg = <0x00060000 0x00060000>; + read-only; + }; + partition3@c0000 { + label = "CDT"; + reg = <0x000c0000 0x00010000>; + read-only; + }; + partition4@d0000 { + label = "APPSBLENV"; + reg = <0x000d0000 0x00010000>; + read-only; + }; + partition5@e0000 { + label = "APPSBL"; /* uboot */ + reg = <0x000e0000 0x00080000>; + read-only; + }; + partition6@160000 { + label = "ART"; + reg = <0x00160000 0x00010000>; + read-only; + }; + partition7@170000 { + label = "u_env"; + reg = <0x00170000 0x00020000>; + }; + partition8@190000 { + label = "s_env"; + reg = <0x00190000 0x00020000>; + }; + partition9@1b0000 { + label = "devinfo"; + reg = <0x001b0000 0x00010000>; + }; + /* 0x001c0000 - 0x00200000 unused */ + }; + }; + mt29f@1 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + compatible = "spinand,mt29f", "w25n01gv"; + reg = <1>; + spi-max-frequency = <24000000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + partition0@0 { + label = "ubi"; + reg = <0x00000000 0x08000000>; + }; + + }; + }; + +}; + +&usb3_ss_phy { + status = "okay"; +}; + +&usb3_hs_phy { + status = "okay"; +}; + +&usb2_hs_phy { + status = "okay"; +}; diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 685eb3901..13ad98a8a 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -230,6 +230,20 @@ define Device/qcom_ap-dk01.1-c1 endef TARGET_DEVICES += qcom_ap-dk01.1-c1 +define Device/linksys_ea6350v3 + DEVICE_TITLE := Linksys EA6350v3 + BOARD_NAME := ea6350v3 + DEVICE_DTS := qcom-ipq4018-ea6350v3 + DTB_SIZE := 65536 + BLOCKSIZE := 128k + IMAGE_SIZE := 20439364 + FILESYSTEMS := squashfs + IMAGES := sysupgrade.bin + $(call Device/FitImage) + DEVICE_PACKAGES := ath10k-firmware-qca4019 ipq-wifi-linksys_ea6350v3 +endef +TARGET_DEVICES += linksys_ea6350v3 + define Device/qcom_ap-dk04.1-c1 $(call Device/FitImage) $(call Device/UbiFit) diff --git a/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch index 53f686f1e..4dc4ea14a 100644 --- a/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch +++ b/target/linux/ipq40xx/patches-4.14/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 -@@ -697,7 +697,22 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -697,7 +697,23 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-apq8074-dragonboard.dtb \ qcom-apq8084-ifc6540.dtb \ qcom-apq8084-mtp.dtb \ @@ -30,6 +30,7 @@ Signed-off-by: John Crispin + qcom-ipq4028-wpj428.dtb \ + qcom-ipq4029-gl-b1300.dtb \ + qcom-ipq4029-mr33.dtb \ ++ qcom-ipq4018-ea6350v3.dtb \ qcom-ipq8064-ap148.dtb \ qcom-msm8660-surf.dtb \ qcom-msm8960-cdp.dtb \