Message ID | 1618545924-8643-1-git-send-email-li.zhang@gl-inet.com |
---|---|
State | Changes Requested |
Headers | show |
Series | ipq40xx: add support for GL.iNet GL-B2200-EMMC | expand |
Hi, just some selective feedback below: > diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq- > wifi/Makefile > index 7703604..7d592d9 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-ap1300 \ > glinet_gl-s1300 \ > + glinet_gl-b2200-emmc \ Wrong sorting ... > linksys_ea8300 \ > linksys_mr8300-v0 \ > luma_wrtq-329acn \ [...] > diff --git a/target/linux/ipq40xx/Makefile b/target/linux/ipq40xx/Makefile > index 43b1fcb..c32515d 100644 > --- a/target/linux/ipq40xx/Makefile > +++ b/target/linux/ipq40xx/Makefile > @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=ipq40xx > BOARDNAME:=Qualcomm Atheros IPQ40XX -FEATURES:=squashfs fpu > ramdisk nand > +FEATURES:=squashfs fpu ramdisk nand boot-part rootfs-part > CPU_TYPE:=cortex-a7 > CPU_SUBTYPE:=neon-vfpv4 > SUBTARGETS:=generic mikrotik > 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 3f0209d..cd3d41a 100644 > --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network > +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network > @@ -99,6 +99,11 @@ ipq40xx_setup_interfaces() > ucidef_add_switch "switch0" \ > "0u@eth0" "3:lan" "4:lan" > ;; > + glinet,gl-b2200-emmc) > + ucidef_set_interfaces_lan_wan "eth0" "eth1" > + ucidef_add_switch "switch0" \ > + "0u@eth0" "1:lan" "2:lan" "3:lan" "5:lan" "0u@eth1" > "4:wan" > + ;; > mobipromo,cm520-79f) > ucidef_add_switch "switch0" \ > "0u@eth0" "3:lan:2" "4:lan:1" > 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 0e027dd..b854dde 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-c > +++ aldata > @@ -41,6 +41,7 @@ case "$FIRMWARE" in > caldata_extract "0:ART" 0x9000 0x2f20 > ;; > linksys,ea8300 |\ > + glinet,gl-b2200-emmc |\ > linksys,mr8300) Sorting ... Maybe the block need to be moved as well ... > caldata_extract "ART" 0x9000 0x2f20 > # OEM assigns 4 sequential MACs > @@ -58,6 +59,7 @@ case "$FIRMWARE" in > glinet,gl-ap1300 |\ > glinet,gl-b1300 |\ > glinet,gl-s1300 |\ > + glinet,gl-b2200-emmc |\ Sorting ... > linksys,ea6350v3 |\ > mobipromo,cm520-79f |\ > qcom,ap-dk01.1-c1) > @@ -167,6 +169,7 @@ case "$FIRMWARE" in > glinet,gl-ap1300 |\ > glinet,gl-b1300 |\ > glinet,gl-s1300 |\ > + glinet,gl-b2200-emmc |\ Sorting ... > linksys,ea6350v3 |\ > mobipromo,cm520-79f |\ > qcom,ap-dk01.1-c1) > diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl- > b2200-emmc.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom- > ipq4019-gl-b2200-emmc.dts > new file mode 100644 > index 0000000..c479859 > --- /dev/null > +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200 > +++ -emmc.dts > @@ -0,0 +1,374 @@ > +// SPDX-License-Identifier: GPL-2.0-only OR MIT > + > +#include "qcom-ipq4019.dtsi" > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/soc/qcom,tcsr.h> > + > +/ { > + model = "GL.iNet GL-B2200-EMMC"; > + compatible = "glinet,gl-b2200-emmc"; > + > + aliases { > + led-boot = &led_power_blue; > + led-failsafe = &led_power_blue; > + led-running = &led_power_white; > + led-upgrade = &led_power_blue; > + }; > + > + memory { > + device_type = "memory"; > + reg = <0x80000000 0x10000000>; > + }; > + > + chosen { > + bootargs-append = " root=/dev/mmcblk0p2 rw rootwait > clk_ignore_unused"; > + }; > + > + 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 { > + /* select hostmode */ > + compatible = "qcom,tcsr"; > + reg = <0x194b000 0x100>; > + qcom,usb-hsphy-mode-select = > <TCSR_USB_HSPHY_HOST_MODE>; > + status = "okay"; > + }; > + > + 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>; > + }; > + > + crypto@8e3a000 { > + status = "okay"; > + }; > + > + ess-switch@c000000 { > + status = "okay"; > + switch_lan_bmp = <0x2e>; > + switch_wan_bmp = <0x10>; > + }; > + > + edma@c080000 { > + status = "okay"; > + }; > + }; > + > + gpio-keys { > + compatible = "gpio-keys"; > + > + wps { > + label = "wps"; > + gpios = <&tlmm 18 GPIO_ACTIVE_LOW>; > + linux,code = <KEY_WPS_BUTTON>; > + linux,input-type = <1>; Please use the proper name named symbol instead. > + }; > + > + reset { > + label = "reset"; > + gpios = <&tlmm 43 GPIO_ACTIVE_LOW>; > + linux,code = <KEY_RESTART>; > + linux,input-type = <1>; See above. > + }; > + }; > + > + gpio-leds { > + compatible = "gpio-leds"; > + > + led_power_blue: power_blue { > + label = "power_blue_led"; Please use the proper color:function syntax for the label, i.e. blue:power in this case. > + gpios = <&tlmm 57 GPIO_ACTIVE_HIGH>; > + default-state = "on"; > + }; > + internet_blue { > + label = "internet_blue_led"; > + gpios = <&tlmm 60 GPIO_ACTIVE_HIGH>; > + default-state = "off"; "off" is default and can be removed here. > + }; > + led_power_white: power_white { > + label = "power_white_led"; > + gpios = <&tlmm 61 GPIO_ACTIVE_LOW>; > + default-state = "off"; > + }; > + internet_white { > + label = "nternet_white_led"; > + gpios = <&tlmm 66 GPIO_ACTIVE_LOW>; > + default-state = "off"; > + }; > + }; > +}; > + > +&gmac1 { > + qcom,phy_mdio_addr = <3>; > + qcom,poll_required = <1>; > + qcom,forced_speed = <1000>; > + qcom,forced_duplex = <1>; > + vlan_tag = <2 0x10>; > +}; > + > +&gmac0 { > + vlan_tag = <1 0x2e>; > +}; > + > +&vqmmc { > + status = "okay"; > +}; > + > +&sdhci { > + status = "okay"; > + pinctrl-0 = <&sd_pins>; > + pinctrl-names = "default"; > + cd-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>; > + vqmmc-supply = <&vqmmc>; > +}; > + > +&blsp_dma { > + status = "okay"; > +}; > + > +&cryptobam { > + status = "okay"; > +}; > + > +&blsp1_spi1 { > + pinctrl-0 = <&spi_0_pins>; > + pinctrl-names = "default"; > + status = "okay"; > + cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>; > + > + flash@0 { > + compatible = "jedec,spi-nor"; > + reg = <0>; > + spi-max-frequency = <24000000>; > + > + partitions { > + compatible = "fixed-partitions"; > + #address-cells = <1>; > + #size-cells = <1>; > + > + SBL1@0 { Please use more generic "partition@0" etc. > + label = "SBL1"; > + reg = <0x0 0x40000>; > + read-only; > + }; > + > + MIBIB@40000 { > + label = "MIBIB"; > + reg = <0x40000 0x20000>; > + read-only; > + }; > + > + QSEE@60000 { > + label = "QSEE"; > + reg = <0x60000 0x60000>; > + read-only; > + }; > + > + CDT@c0000 { > + label = "CDT"; > + reg = <0xc0000 0x10000>; > + read-only; > + }; > + > + DDRPARAMS@d0000 { > + label = "DDRPARAMS"; > + reg = <0xd0000 0x10000>; > + read-only; > + }; > + > + APPSBLENV@e0000 { > + label = "APPSBLENV"; > + reg = <0xe0000 0x10000>; > + read-only; > + }; > + > + APPSBL@f0000 { > + label = "APPSBL"; > + reg = <0xf0000 0x80000>; > + read-only; > + }; > + > + ART@170000 { > + label = "ART"; > + reg = <0x170000 0x10000>; > + read-only; > + }; > + }; > + }; > +}; > + > +&blsp1_spi2 { > + pinctrl-0 = <&spi_1_pins>; > + pinctrl-names = "default"; > + status = "okay"; > + > + spidev1: spi@0 { > + compatible = "siliconlabs,si3210"; > + reg = <0>; > + spi-max-frequency = <24000000>; > + }; > +}; > + > +&blsp1_uart1 { > + pinctrl-0 = <&serial_pins>; > + pinctrl-names = "default"; > + status = "okay"; > +}; > + > +&blsp1_uart2 { > + pinctrl-0 = <&serial_1_pins>; > + pinctrl-names = "default"; > + status = "okay"; > +}; > + > +&tlmm { > + serial_pins: serial_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 { > + pinmux { > + function = "blsp_spi0"; > + pins = "gpio13", "gpio14", "gpio15"; > + }; > + pinmux_cs { > + function = "gpio"; > + pins = "gpio12"; > + }; > + pinconf { > + pins = "gpio13", "gpio14", "gpio15"; > + drive-strength = <12>; > + bias-disable; > + }; > + pinconf_cs { > + pins = "gpio12"; > + drive-strength = <2>; > + bias-disable; > + output-high; > + }; > + }; > + > + spi_1_pins: spi_1_pinmux { > + mux { > + pins = "gpio44", "gpio46", "gpio47"; > + function = "blsp_spi1"; > + bias-disable; > + }; > + cs { > + pins = "gpio45"; > + function = "gpio"; > + bias-pull-up; > + }; > + reset { > + pins = "gpio43"; > + function = "gpio"; > + output-high; > + }; > + mux_2 { > + pins = "gpio35"; > + function = "gpio"; > + output-high; > + }; > + host_int { > + pins = "gpio2"; > + function = "gpio"; > + input; > + }; > + wake { > + pins = "gpio48"; > + function = "gpio"; > + output-high; > + }; > + }; > + > + sd_pins: sd_pins { > + pinmux { > + function = "sdio"; > + pins = "gpio23", "gpio24", "gpio25", "gpio26", > + "gpio29", "gpio30", "gpio31", "gpio32"; > + drive-strength = <10>; > + }; > + > + pinmux_sd_clk { > + function = "sdio"; > + pins = "gpio27"; > + drive-strength = <16>; > + }; > + > + pinmux_sd7 { > + function = "sdio"; > + pins = "gpio28"; > + drive-strength = <10>; > + bias-disable; > + }; > + }; > + > +}; > + > +&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 { > + status = "okay"; > + compatible = "qcom,ath10k"; > + reg = <0x00010000 0 0 0 0>; > + qcom,ath10k-calibration-variant = "GL-B2200-EMMC"; > + }; > + }; > +}; > + > +&wifi0 { > + status = "okay"; > + qcom,ath10k-calibration-variant = "GL-B2200-EMMC"; }; > + > +&wifi1 { > + status = "okay"; > + qcom,ath10k-calibration-variant = "GL-B2200-EMMC"; }; > diff --git a/target/linux/ipq40xx/image/gen_sdcard_img.sh > b/target/linux/ipq40xx/image/gen_sdcard_img.sh > new file mode 100755 > index 0000000..628ba24 > --- /dev/null > +++ b/target/linux/ipq40xx/image/gen_sdcard_img.sh > @@ -0,0 +1,95 @@ > +#!/bin/sh > +# > +# Copyright (C) 2016 Josua Mayer > +# > +# This program is free software; you can redistribute it and/or # > +modify it under the terms of the GNU General Public License # as > +published by the Free Software Foundation; either version 2 # of the > +License, or (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, # but > +WITHOUT ANY WARRANTY; without even the implied warranty of # > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # > GNU > +General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License # > +along with this program; if not, write to the Free Software # > +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, > USA. > +# Please use the corresponding SPDX license identifier instead. > + > +usage() { > + echo "$0 <outfile> [<bootloader> <type_partitionN> > <size_partitionN> <img_partitionN>]?" > +} > + > +# always require first 2 or 3 arguments # then in pairs up to 8 more > +for a total of up to 4 partitions if [ $# -lt 1 ] || [ $# -gt 14 ] || [ > +$((($# - 1) % 3)) -ne 0 ]; then > + if [ $# -lt 2 ] || [ $# -gt 15 ] || [ $((($# - 2) % 3)) -ne 0 ]; then > + usage > + exit 1 > + else > + BOOTLOADER="$2" > + fi > +fi > + > +set -e > + > +# parameters > +OUTFILE="$1"; shift > +if [ -n "$BOOTLOADER" ]; then > + shift > +fi > + > +# generate image file > +printf "Creating %s from /dev/zero: " "$OUTFILE" > +dd if=/dev/zero of="$OUTFILE" bs=512 count=1 >/dev/null printf "Done\n" > + > +while [ "$#" -ge 3 ]; do > + ptgen_args="$ptgen_args -t $1 -p $(($2 * 1024 + 256))" > + parts="$parts$3 " > + shift; shift; shift > +done > + > +model='' > +model=$(echo $OUTFILE | grep "gl-b2200-emmc") > + > +# total emmc size = 7634944 KB > +# partition interval = 1536 KB > +# mbr = 1024 KB > +# p1/p2 extra = 256KB > +[ "$model" != "" ] && { > + ptgen_args="$ptgen_args -t 83 -p $((7634944- > ${TARGET_KERNEL_PARTSIZE}*1024-${TARGET_ROOTFS_PARTSIZE}*1024- > 1536-256-256-1024))" > +} > + > +head=16 > +sect=63 > + > +# create real partition table using fdisk printf "Creating partition > +table: " > +set $(ptgen -o "$OUTFILE" -h $head -s $sect -l 1024 -S 0x$SIGNATURE > +$ptgen_args) printf "Done\n" > + > +# install bootloader > +if [ -n "$BOOTLOADER" ]; then > + printf "Writing bootloader: " > + dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc > 2>/dev/null > + printf "Done\n" > +fi > + > +i=1 > +while [ "$#" -ge 2 ]; do > + img="${parts%% *}" > + parts="${parts#* }" > + > + printf "Writing %s to partition %i: " "$img" $i > + ( > + cat "$img" > + # add padding to avoid leaving behind old overlay fs data > + dd if=/dev/zero bs=128k count=1 2>/dev/null > + ) | dd of="$OUTFILE" bs=512 seek=$(($1 / 512)) conv=notrunc > 2>/dev/null > + printf "Done\n" > + > + i=$((i+1)) > + shift; shift > +done > diff --git a/target/linux/ipq40xx/image/generic.mk > b/target/linux/ipq40xx/image/generic.mk > index 4e40b8b..859903e 100644 > --- a/target/linux/ipq40xx/image/generic.mk > +++ b/target/linux/ipq40xx/image/generic.mk > @@ -508,6 +508,28 @@ define Device/glinet_gl-s1300 endef > TARGET_DEVICES += glinet_gl-s1300 > > +define Build/sdcard-img-ext4 > + SIGNATURE="$(IMG_PART_SIGNATURE)" \ > + > TARGET_KERNEL_PARTSIZE="$(CONFIG_TARGET_KERNEL_PARTSIZE) > " \ > + > TARGET_ROOTFS_PARTSIZE="$(CONFIG_TARGET_ROOTFS_PARTSIZE > )" \ > + ./gen_sdcard_img.sh $@ \ > + 83 $(CONFIG_TARGET_KERNEL_PARTSIZE) $(IMAGE_KERNEL) > \ > + 83 $(CONFIG_TARGET_ROOTFS_PARTSIZE) > $(IMAGE_ROOTFS) endef Please move the build recipe to the top of the file like it's common for build recipes. Best Adrian > + > +define Device/glinet_gl-b2200-emmc > + $(call Device/FitImage) > + DEVICE_VENDOR := GL.iNet > + DEVICE_MODEL := GL-B2200-EMMC > + SOC := qcom-ipq4019 > + DEVICE_DTS_CONFIG := config@ap.dk04.1-c3 > + IMAGES := sdcard.img.gz > + IMAGE/sdcard.img.gz := sdcard-img-ext4 | gzip | append-metadata > + KERNEL_NAME := Image > + DEVICE_PACKAGES := ipq-wifi-glinet_gl-b2200-emmc kmod-fs-ext4 > kmod-mmc > +kmod-spi-dev mkf2fs e2fsprogs kmod-fs-f2fs endef TARGET_DEVICES += > +glinet_gl-b2200-emmc > + > define Device/linksys_ea6350v3 > # The Linksys EA6350v3 has a uboot bootloader that does not > # support either booting lzma kernel images nor booting UBI 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 6a421b9..4c9171c 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,59 @@ dtb-$(CONFIG_ARCH_QCOM) += \ > +@@ -837,11 +837,60 @@ dtb-$(CONFIG_ARCH_QCOM) += \ > qcom-apq8074-dragonboard.dtb \ > qcom-apq8084-ifc6540.dtb \ > qcom-apq8084-mtp.dtb \ > @@ -50,6 +50,7 @@ Signed-off-by: John Crispin <john@phrozen.org> > + qcom-ipq4019-fritzbox-7530.dtb \ > + qcom-ipq4019-fritzrepeater-1200.dtb \ > + qcom-ipq4019-fritzrepeater-3000.dtb \ > ++ qcom-ipq4019-gl-b2200-emmc.dtb \ > + qcom-ipq4019-map-ac2200.dtb \ > + qcom-ipq4019-mr8300.dtb \ > + qcom-ipq4019-e2600ac-c1.dtb \ > -- > 2.7.4 > > > > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Hi Li, On Fri, Apr 16, 2021 at 12:05:24PM +0800, Li Zhang wrote: > This patch adds supports for GL-B2200-EMMC. > > ... > diff --git a/target/linux/ipq40xx/image/gen_sdcard_img.sh b/target/linux/ipq40xx/image/gen_sdcard_img.sh > new file mode 100755 > index 0000000..628ba24 > --- /dev/null > +++ b/target/linux/ipq40xx/image/gen_sdcard_img.sh > @@ -0,0 +1,95 @@ > +#!/bin/sh > +# > +# Copyright (C) 2016 Josua Mayer > +# Please do not duplicate this script and use build commands instead to generate the image for MMC block device. See https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/mediatek/image/mt7622.mk You can use Build/mt7622-gpt as start and modify that to generate the partition table you need for that ipq40xx board. Take a look at the ARTIFACT/sdcard.img.gz defined for the bananapi_bpi-r64 for an example of an over-engineered sdcard image ;) Cheers Daniel
diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 7703604..7d592d9 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-ap1300 \ glinet_gl-s1300 \ + glinet_gl-b2200-emmc \ linksys_ea8300 \ linksys_mr8300-v0 \ luma_wrtq-329acn \ @@ -124,6 +125,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-ap1300,GL.iNet GL-AP1300)) $(eval $(call generate-ipq-wifi-package,glinet_gl-s1300,GL.iNet GL-S1300)) +$(eval $(call generate-ipq-wifi-package,glinet_gl-b2200-emmc,GL.iNet GL-B2200-EMMC)) $(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)) diff --git a/package/firmware/ipq-wifi/board-glinet_gl-b2200-emmc.qca4019 b/package/firmware/ipq-wifi/board-glinet_gl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y-Jp@M%h8Q1yl)r@ehc2fLG6ILDYp z?fr)@#5DL-F$*qtNb95Jfd`#ad#@ZhA9dWPjG1@7ub?BY(Yu_H*VZdNFFff}?wotN zY45uc7(0g%JKSI1nRYs$((S;CT{zUlDFl`Q0&{%=2Ye3Jw3xtSs6JodL_C4R*OvqT z;L|r)KHlDJ?@X|0p1?7i4^L9=SI^si{p>MF%Ke&o8^Z+rR1<}ONd#t5?w=W%SxWer zZ#$zfR$BFCoO|LqGx%@RY)Ydr`2Vj1l56h=Su{P6I>d2+39?{fAqRhL54R3aDdW>6 z!JDVs>Ur~kmIyiffsvfjmG-_~4)eu1@wSi?pVfZl{z7o#7aAjTTzj(p*W}ydV^f@a qVz28}Gm3Nns>o4(ixvS(_KeN(><!x&?F8o-7{$3?=x@yz_y0fSzd?Qg literal 0 HcmV?d00001 diff --git a/package/firmware/ipq-wifi/board-glinet_gl-b2200-emmc.qca9888 b/package/firmware/ipq-wifi/board-glinet_gl-b2200-emmc.qca9888 new file mode 100644 index 0000000000000000000000000000000000000000..f5a05d4cbc760fc44326fad52ae4f86ad231b7d3 GIT binary patch literal 12168 zcmeHNTTl~M7(R(OqC#bt0CI8VCRq?dSgfvG1OiG*maBmh1m&iNl}i+)V7zv!CeD(i zAc{&9BQR7UWf-PIZ9CRstT>}iANt@-U;5BzAFSi}Qqr@D%T3XwNb6<)&Drz+|M|cF zob&AlcKOLqPm4)Y%HyPp7+G#wK?bO+s{>GKW7#tRiLg~3Y)sZv)kIg;)x=b(Ycw%6 z)yY!3RoPH+pqe$~HbysB9H^<NZ%WRjVq^p%mBwt%&Q7lrKzuOF6&(BLF9HF&p{T`# zvUz>}076g>z`-wstO>jT5XQ5LaOo1Zn=4gSfK3HJe0==VCr<<lkq5BZY$;q@BASbE z+WviRq{%*$fX#24J2t<)%04uH-vjQ&ad5Hh8d=?cCFf!Ll%+zu2n2#9oB%LvpYhF` z8JSwy3VTv^-ryI<%vo4{cD9t+=G<UsY>`L=*v5&kuP<O5C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O>aLbspkRvA)GtW}Ft{hf{aP4%HWeW`Iv znLef=Xcv+_G2Cj-F~lBOrR?shHYOewYf$Cgu0|cz60*ZbarUB0mwX7u<&F>Kw8d%z z)o95jOGQV*v55VM@~|QQXxJ{_Y|kwhE>$zB+V%B5h2M{~UW+}6HF;H<FYh)b9TC@~ zd5pfS6)*M6TDAFfXYncWAYS90_ru^9X6X^E7Ts~Xzsk7fc;o@Ju(z$@sI+2D4w5)} zp;@1!C2G-3W9L47+My`gU-cSl`5~SGo`H9qfu+lquk>7nc>DPI2hM&kb65*q{;;l` z^qM%5M_}vLg~Lx+Xh?8aNJwZ%5pZWKqrte8OqJ&qm#Z}`$91Nzo`K=9pC=|JxV0>F zerNE0gdegN%_K6BTyzt$2}wcSIROQg?Us@8nP=|R-?jebIhJ$s*5+_#uY3&80L#F$ zXV0EKefrl7nZt`yf3Jp^w;eZU86TTTm8zN12LQmnh3Of6Ft^8{L_~y#hlcVR&%u9x zAAD@zM}EK44A_P}L~g=rP~0_eM*#o*?L3sLP`HROC=2m%c^0duis28}p3!^r_2P(i z;s0lIRPG$LI!ASm%2O7XmRGA8)7h@>p5B4M;nA_5Zr{20!1aL{bv)OeT;H2$V6THx zsE(_I+H0VcOvhD0?e$NJ&~X(|*GZfg@!_-k-rNQs)<T`B8Rr!3++#R*x!?NTt-JH- z9~LXqyAe%_kRU8b5=4nW#$*OUVU&cTGQft(4M-A}BuSz+ytVi1=~-RTd<kC!L$?vz ZkQ{U)u@TvVmRw|ymvb!E@4dy$`ws~Q%FO@( literal 0 HcmV?d00001 diff --git a/target/linux/ipq40xx/Makefile b/target/linux/ipq40xx/Makefile index 43b1fcb..c32515d 100644 --- a/target/linux/ipq40xx/Makefile +++ b/target/linux/ipq40xx/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=ipq40xx BOARDNAME:=Qualcomm Atheros IPQ40XX -FEATURES:=squashfs fpu ramdisk nand +FEATURES:=squashfs fpu ramdisk nand boot-part rootfs-part CPU_TYPE:=cortex-a7 CPU_SUBTYPE:=neon-vfpv4 SUBTARGETS:=generic mikrotik 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 3f0209d..cd3d41a 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -99,6 +99,11 @@ ipq40xx_setup_interfaces() ucidef_add_switch "switch0" \ "0u@eth0" "3:lan" "4:lan" ;; + glinet,gl-b2200-emmc) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0u@eth0" "1:lan" "2:lan" "3:lan" "5:lan" "0u@eth1" "4:wan" + ;; mobipromo,cm520-79f) ucidef_add_switch "switch0" \ "0u@eth0" "3:lan:2" "4:lan:1" 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 0e027dd..b854dde 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 @@ -41,6 +41,7 @@ case "$FIRMWARE" in caldata_extract "0:ART" 0x9000 0x2f20 ;; linksys,ea8300 |\ + glinet,gl-b2200-emmc |\ linksys,mr8300) caldata_extract "ART" 0x9000 0x2f20 # OEM assigns 4 sequential MACs @@ -58,6 +59,7 @@ case "$FIRMWARE" in glinet,gl-ap1300 |\ glinet,gl-b1300 |\ glinet,gl-s1300 |\ + glinet,gl-b2200-emmc |\ linksys,ea6350v3 |\ mobipromo,cm520-79f |\ qcom,ap-dk01.1-c1) @@ -167,6 +169,7 @@ case "$FIRMWARE" in glinet,gl-ap1300 |\ glinet,gl-b1300 |\ glinet,gl-s1300 |\ + glinet,gl-b2200-emmc |\ linksys,ea6350v3 |\ mobipromo,cm520-79f |\ qcom,ap-dk01.1-c1) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200-emmc.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200-emmc.dts new file mode 100644 index 0000000..c479859 --- /dev/null +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200-emmc.dts @@ -0,0 +1,374 @@ +// SPDX-License-Identifier: GPL-2.0-only OR MIT + +#include "qcom-ipq4019.dtsi" +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/soc/qcom,tcsr.h> + +/ { + model = "GL.iNet GL-B2200-EMMC"; + compatible = "glinet,gl-b2200-emmc"; + + aliases { + led-boot = &led_power_blue; + led-failsafe = &led_power_blue; + led-running = &led_power_white; + led-upgrade = &led_power_blue; + }; + + memory { + device_type = "memory"; + reg = <0x80000000 0x10000000>; + }; + + chosen { + bootargs-append = " root=/dev/mmcblk0p2 rw rootwait clk_ignore_unused"; + }; + + 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 { + /* select hostmode */ + compatible = "qcom,tcsr"; + reg = <0x194b000 0x100>; + qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>; + status = "okay"; + }; + + 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>; + }; + + crypto@8e3a000 { + status = "okay"; + }; + + ess-switch@c000000 { + status = "okay"; + switch_lan_bmp = <0x2e>; + switch_wan_bmp = <0x10>; + }; + + edma@c080000 { + status = "okay"; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + wps { + label = "wps"; + gpios = <&tlmm 18 GPIO_ACTIVE_LOW>; + linux,code = <KEY_WPS_BUTTON>; + linux,input-type = <1>; + }; + + reset { + label = "reset"; + gpios = <&tlmm 43 GPIO_ACTIVE_LOW>; + linux,code = <KEY_RESTART>; + linux,input-type = <1>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + led_power_blue: power_blue { + label = "power_blue_led"; + gpios = <&tlmm 57 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + internet_blue { + label = "internet_blue_led"; + gpios = <&tlmm 60 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + led_power_white: power_white { + label = "power_white_led"; + gpios = <&tlmm 61 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + internet_white { + label = "nternet_white_led"; + gpios = <&tlmm 66 GPIO_ACTIVE_LOW>; + default-state = "off"; + }; + }; +}; + +&gmac1 { + qcom,phy_mdio_addr = <3>; + qcom,poll_required = <1>; + qcom,forced_speed = <1000>; + qcom,forced_duplex = <1>; + vlan_tag = <2 0x10>; +}; + +&gmac0 { + vlan_tag = <1 0x2e>; +}; + +&vqmmc { + status = "okay"; +}; + +&sdhci { + status = "okay"; + pinctrl-0 = <&sd_pins>; + pinctrl-names = "default"; + cd-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>; + vqmmc-supply = <&vqmmc>; +}; + +&blsp_dma { + status = "okay"; +}; + +&cryptobam { + status = "okay"; +}; + +&blsp1_spi1 { + pinctrl-0 = <&spi_0_pins>; + pinctrl-names = "default"; + status = "okay"; + cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <24000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + SBL1@0 { + label = "SBL1"; + reg = <0x0 0x40000>; + read-only; + }; + + MIBIB@40000 { + label = "MIBIB"; + reg = <0x40000 0x20000>; + read-only; + }; + + QSEE@60000 { + label = "QSEE"; + reg = <0x60000 0x60000>; + read-only; + }; + + CDT@c0000 { + label = "CDT"; + reg = <0xc0000 0x10000>; + read-only; + }; + + DDRPARAMS@d0000 { + label = "DDRPARAMS"; + reg = <0xd0000 0x10000>; + read-only; + }; + + APPSBLENV@e0000 { + label = "APPSBLENV"; + reg = <0xe0000 0x10000>; + read-only; + }; + + APPSBL@f0000 { + label = "APPSBL"; + reg = <0xf0000 0x80000>; + read-only; + }; + + ART@170000 { + label = "ART"; + reg = <0x170000 0x10000>; + read-only; + }; + }; + }; +}; + +&blsp1_spi2 { + pinctrl-0 = <&spi_1_pins>; + pinctrl-names = "default"; + status = "okay"; + + spidev1: spi@0 { + compatible = "siliconlabs,si3210"; + reg = <0>; + spi-max-frequency = <24000000>; + }; +}; + +&blsp1_uart1 { + pinctrl-0 = <&serial_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&blsp1_uart2 { + pinctrl-0 = <&serial_1_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&tlmm { + serial_pins: serial_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 { + pinmux { + function = "blsp_spi0"; + pins = "gpio13", "gpio14", "gpio15"; + }; + pinmux_cs { + function = "gpio"; + pins = "gpio12"; + }; + pinconf { + pins = "gpio13", "gpio14", "gpio15"; + drive-strength = <12>; + bias-disable; + }; + pinconf_cs { + pins = "gpio12"; + drive-strength = <2>; + bias-disable; + output-high; + }; + }; + + spi_1_pins: spi_1_pinmux { + mux { + pins = "gpio44", "gpio46", "gpio47"; + function = "blsp_spi1"; + bias-disable; + }; + cs { + pins = "gpio45"; + function = "gpio"; + bias-pull-up; + }; + reset { + pins = "gpio43"; + function = "gpio"; + output-high; + }; + mux_2 { + pins = "gpio35"; + function = "gpio"; + output-high; + }; + host_int { + pins = "gpio2"; + function = "gpio"; + input; + }; + wake { + pins = "gpio48"; + function = "gpio"; + output-high; + }; + }; + + sd_pins: sd_pins { + pinmux { + function = "sdio"; + pins = "gpio23", "gpio24", "gpio25", "gpio26", + "gpio29", "gpio30", "gpio31", "gpio32"; + drive-strength = <10>; + }; + + pinmux_sd_clk { + function = "sdio"; + pins = "gpio27"; + drive-strength = <16>; + }; + + pinmux_sd7 { + function = "sdio"; + pins = "gpio28"; + drive-strength = <10>; + bias-disable; + }; + }; + +}; + +&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 { + status = "okay"; + compatible = "qcom,ath10k"; + reg = <0x00010000 0 0 0 0>; + qcom,ath10k-calibration-variant = "GL-B2200-EMMC"; + }; + }; +}; + +&wifi0 { + status = "okay"; + qcom,ath10k-calibration-variant = "GL-B2200-EMMC"; +}; + +&wifi1 { + status = "okay"; + qcom,ath10k-calibration-variant = "GL-B2200-EMMC"; +}; diff --git a/target/linux/ipq40xx/image/gen_sdcard_img.sh b/target/linux/ipq40xx/image/gen_sdcard_img.sh new file mode 100755 index 0000000..628ba24 --- /dev/null +++ b/target/linux/ipq40xx/image/gen_sdcard_img.sh @@ -0,0 +1,95 @@ +#!/bin/sh +# +# Copyright (C) 2016 Josua Mayer +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# + +usage() { + echo "$0 <outfile> [<bootloader> <type_partitionN> <size_partitionN> <img_partitionN>]?" +} + +# always require first 2 or 3 arguments +# then in pairs up to 8 more for a total of up to 4 partitions +if [ $# -lt 1 ] || [ $# -gt 14 ] || [ $((($# - 1) % 3)) -ne 0 ]; then + if [ $# -lt 2 ] || [ $# -gt 15 ] || [ $((($# - 2) % 3)) -ne 0 ]; then + usage + exit 1 + else + BOOTLOADER="$2" + fi +fi + +set -e + +# parameters +OUTFILE="$1"; shift +if [ -n "$BOOTLOADER" ]; then + shift +fi + +# generate image file +printf "Creating %s from /dev/zero: " "$OUTFILE" +dd if=/dev/zero of="$OUTFILE" bs=512 count=1 >/dev/null +printf "Done\n" + +while [ "$#" -ge 3 ]; do + ptgen_args="$ptgen_args -t $1 -p $(($2 * 1024 + 256))" + parts="$parts$3 " + shift; shift; shift +done + +model='' +model=$(echo $OUTFILE | grep "gl-b2200-emmc") + +# total emmc size = 7634944 KB +# partition interval = 1536 KB +# mbr = 1024 KB +# p1/p2 extra = 256KB +[ "$model" != "" ] && { + ptgen_args="$ptgen_args -t 83 -p $((7634944-${TARGET_KERNEL_PARTSIZE}*1024-${TARGET_ROOTFS_PARTSIZE}*1024-1536-256-256-1024))" +} + +head=16 +sect=63 + +# create real partition table using fdisk +printf "Creating partition table: " +set $(ptgen -o "$OUTFILE" -h $head -s $sect -l 1024 -S 0x$SIGNATURE $ptgen_args) +printf "Done\n" + +# install bootloader +if [ -n "$BOOTLOADER" ]; then + printf "Writing bootloader: " + dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc 2>/dev/null + printf "Done\n" +fi + +i=1 +while [ "$#" -ge 2 ]; do + img="${parts%% *}" + parts="${parts#* }" + + printf "Writing %s to partition %i: " "$img" $i + ( + cat "$img" + # add padding to avoid leaving behind old overlay fs data + dd if=/dev/zero bs=128k count=1 2>/dev/null + ) | dd of="$OUTFILE" bs=512 seek=$(($1 / 512)) conv=notrunc 2>/dev/null + printf "Done\n" + + i=$((i+1)) + shift; shift +done diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index 4e40b8b..859903e 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -508,6 +508,28 @@ define Device/glinet_gl-s1300 endef TARGET_DEVICES += glinet_gl-s1300 +define Build/sdcard-img-ext4 + SIGNATURE="$(IMG_PART_SIGNATURE)" \ + TARGET_KERNEL_PARTSIZE="$(CONFIG_TARGET_KERNEL_PARTSIZE)" \ + TARGET_ROOTFS_PARTSIZE="$(CONFIG_TARGET_ROOTFS_PARTSIZE)" \ + ./gen_sdcard_img.sh $@ \ + 83 $(CONFIG_TARGET_KERNEL_PARTSIZE) $(IMAGE_KERNEL) \ + 83 $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) +endef + +define Device/glinet_gl-b2200-emmc + $(call Device/FitImage) + DEVICE_VENDOR := GL.iNet + DEVICE_MODEL := GL-B2200-EMMC + SOC := qcom-ipq4019 + DEVICE_DTS_CONFIG := config@ap.dk04.1-c3 + IMAGES := sdcard.img.gz + IMAGE/sdcard.img.gz := sdcard-img-ext4 | gzip | append-metadata + KERNEL_NAME := Image + DEVICE_PACKAGES := ipq-wifi-glinet_gl-b2200-emmc kmod-fs-ext4 kmod-mmc kmod-spi-dev mkf2fs e2fsprogs kmod-fs-f2fs +endef +TARGET_DEVICES += glinet_gl-b2200-emmc + define Device/linksys_ea6350v3 # The Linksys EA6350v3 has a uboot bootloader that does not # support either booting lzma kernel images nor booting UBI 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 6a421b9..4c9171c 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,59 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -837,11 +837,60 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-apq8074-dragonboard.dtb \ qcom-apq8084-ifc6540.dtb \ qcom-apq8084-mtp.dtb \ @@ -50,6 +50,7 @@ Signed-off-by: John Crispin <john@phrozen.org> + qcom-ipq4019-fritzbox-7530.dtb \ + qcom-ipq4019-fritzrepeater-1200.dtb \ + qcom-ipq4019-fritzrepeater-3000.dtb \ ++ qcom-ipq4019-gl-b2200-emmc.dtb \ + qcom-ipq4019-map-ac2200.dtb \ + qcom-ipq4019-mr8300.dtb \ + qcom-ipq4019-e2600ac-c1.dtb \
This patch adds supports for GL-B2200-EMMC. Specifications: - SOC: Qualcomm IPQ4019 ARM Quad-Core - RAM: 512 MiB - Flash: 16 MiB NOR - SPI0 - EMMC: 8GB EMMC - ETH: Qualcomm QCA8075 - WLAN1: Qualcomm Atheros QCA4019 2.4GHz 802.11b/g/n 2x2 - WLAN2: Qualcomm Atheros QCA4019 5GHz 802.11n/ac W2 2x2 - WLAN3: Qualcomm Atheros QCA9886 5GHz 802.11n/ac W2 2x2 - INPUT: Reset, WPS - LED: Power, Internet - UART1: On board pin header near to LED (3.3V, TX, RX, GND), 3.3V without pin - 115200 8N1 - UART2: On board with BLE module - SPI1: On board socket for Zigbee module Update firmware instructions ============================ Pleae update firmware on uboot web(default 192.168.1.1). Signed-off-by: Li Zhang <li.zhang@gl-inet.com> --- package/firmware/ipq-wifi/Makefile | 2 + .../ipq-wifi/board-glinet_gl-b2200-emmc.qca4019 | Bin 0 -> 24316 bytes .../ipq-wifi/board-glinet_gl-b2200-emmc.qca9888 | Bin 0 -> 12168 bytes target/linux/ipq40xx/Makefile | 2 +- .../ipq40xx/base-files/etc/board.d/02_network | 5 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 3 + .../arm/boot/dts/qcom-ipq4019-gl-b2200-emmc.dts | 374 +++++++++++++++++++++ target/linux/ipq40xx/image/gen_sdcard_img.sh | 95 ++++++ target/linux/ipq40xx/image/generic.mk | 22 ++ .../patches-5.4/901-arm-boot-add-dts-files.patch | 3 +- 10 files changed, 504 insertions(+), 2 deletions(-) create mode 100644 package/firmware/ipq-wifi/board-glinet_gl-b2200-emmc.qca4019 create mode 100644 package/firmware/ipq-wifi/board-glinet_gl-b2200-emmc.qca9888 create mode 100644 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200-emmc.dts create mode 100755 target/linux/ipq40xx/image/gen_sdcard_img.sh