From abd52a80294b6752cc66432041e91ca11944366e Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 4 Sep 2021 05:56:53 +0200
Subject: [PATCH 01/33] ipq4019: add CIG wf610d

Signed-off-by: John Crispin <john@phrozen.org>
---
 package/firmware/ipq-wifi/Makefile            |   4 +-
 .../ipq-wifi/board-cig_wf610d.qca4019         | Bin 0 -> 24316 bytes
 .../ipq40xx/base-files/etc/board.d/01_leds    |   3 +
 .../ipq40xx/base-files/etc/board.d/02_network |   1 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata  |   8 +
 .../lib/preinit/05_set_iface_mac_ipq40xx.sh   |   4 +
 .../boot/dts/qcom-ipq4029-ap-cig-wf610d.dts   | 414 ++++++++++++++++++
 target/linux/ipq40xx/image/generic.mk         |  14 +
 .../901-arm-boot-add-dts-files.patch          |   3 +-
 9 files changed, 449 insertions(+), 2 deletions(-)
 create mode 100644 package/firmware/ipq-wifi/board-cig_wf610d.qca4019
 create mode 100755 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-cig-wf610d.dts

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index e3b25bb556..b996ee311f 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -49,7 +49,8 @@ ALLWIFIBOARDS:= \
 	nec_wg2600hp3 \
 	plasmacloud_pa1200 \
 	plasmacloud_pa2200 \
-	qxwlan_e2600ac
+	qxwlan_e2600ac \
+	cig_wf610d
 
 ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
 
@@ -135,5 +136,6 @@ $(eval $(call generate-ipq-wifi-package,nec_wg2600hp3,NEC Platforms WG2600HP3))
 $(eval $(call generate-ipq-wifi-package,plasmacloud_pa1200,Plasma Cloud PA1200))
 $(eval $(call generate-ipq-wifi-package,plasmacloud_pa2200,Plasma Cloud PA2200))
 $(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac,Qxwlan E2600AC))
+$(eval $(call generate-ipq-wifi-package,cig_wf610d,CIG WF_610D))
 
 $(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))
diff --git a/package/firmware/ipq-wifi/board-cig_wf610d.qca4019 b/package/firmware/ipq-wifi/board-cig_wf610d.qca4019
new file mode 100644
index 0000000000000000000000000000000000000000..3ba97ff0b9dc46519dc3767cac3931872a8cc5f1
GIT binary patch
literal 24316
zcmeHPdr(tX8b9G7>e|8$2_oPngg}Ue0D)?d2mvDUNWoG?0xSYmB)3L+7!X4j?D(J%
z5rJATM$j@SkEV!>i!WkvZS9Qm_s;&&cJ|SoS$AzmyVK6>F7COx+$4}h6CNYN{la;D
z_k8Dk-|wCz_vZY#?<OULCG1Fvj7Sel%uL9V0EI#UpzIIFa{yvsDppo*DJm@vEmp|G
z-Y=Dxg~|79i7>Q^4;EGI!JC4J(5j*edC`GGTar?@v34cz-WVAnfn(92JqwP-3NQaB
zjRu_S=+W8uxEs1*RtUgqHxF0=fC0dpQHGlJjK^c+Lje#K74`Ger!)~`1^D$Zr{l@w
z3<sE{+?{FHLd*o7LxIPpS~GjiY`cS_tOSrCaRDAvFR};jBUv|<@w4~XGzhG%HqOfe
z#B17N*kI7jHSr8LH#b*TS7$Q;;0_+Cox+6u%##;vn<qPmF?Mr@Vr;zTm9pkReA!IN
z^kBvYHBB{pbJJ6WW7jloHHzFFsflC#nv;zc@^@1=jt#(Cr93P3?O&nX|C+}IW1njp
zYl?GI;lUwION~5tdurTRAKne>gwUX=u{u|p8f!3kz}*1Gu4+!f8Qw{a8T$enU<QL;
zI7n%3x-bL|*IHASn<b2xGT=`4?<K7oC@<+U{V-)P9S`fRrGS$4$X+jPPg7BK%wBG`
zU;21kMP0IjznhtOr@y>2`D93icVXv1UT4fnR;6cAZ)1@%ra1V$^{Ka84%BXyhvqTk
zzUr&_H1j0Ca{c=^2dX>YX$q_MD;YUedN^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VDZK+z5aXj)6bJrVNZ}b(nZmwf}z|8x@4OM@p
zhI`aYp}VTQ6x+zIqVI0(%sdfY<t<y2a&2JuC&G{X70iNOoxDqOnx#Yv`vxktqT}px
z57|gpMRQVZsKP7j!53*wp*8DDJa+XB?dwi%<s4y@bo3v%5Z@Slm{D}OQ{E7#+_29x
zz4yw&bFs$)D;Ndm`ieRengS~61?|1^bD|T0m7e*hns<E|jj{9S;^F?v^BJc?s=fCv
z+l4~~P9d-a5TH4`t~5S^!*o+-tdZn%TP1uBmPxGOG1O8jHavmDBPfUi|KQU%Sb+fn
z?0{^rXr91f$%i*aJ8%2-mUEDl`&IKchZXoK6@`FR1S}}`&t`P9m+&#){bsna+?p@r
z+%L}O%urs<*Asvi|9Us$+Is@f^CnF2$&+Hp!C&3OtH)E?xT!So=AB%oc=LcJft>vf
zF`RM_mq_4NznVoP7g!Q$@yEY>J;XWjE|3$S({bhgLU7_28d+Ohds6=@`S$qS6zATs
p*EQRW;@r;`Im&L)B4E#+u`Qmxxqi_GI7i1Q&iz7vYrc5={{xZF3n~Br

literal 0
HcmV?d00001

diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds
index ac11655904..c1d4e693f2 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds
@@ -30,6 +30,7 @@ edgecore,oap100)
 	ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt"
 	ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wlan5g" "phy1tpt"
 	;;
+
 engenius,eap1300)
 	ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
 	ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt"
@@ -69,6 +70,8 @@ qxwlan,e2600ac-c2)
 	ucidef_set_led_wlan "wlan2g" "WLAN0" "green:wlan0" "phy0tpt"
 	ucidef_set_led_wlan "wlan5g" "WLAN1" "green:wlan1" "phy1tpt"
 	;;
+edgecore,ecw5211 |\
+cig,wf610d |\
 zyxel,nbg6617 |\
 zyxel,wre6606)
 	ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy0tpt"
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 1d4c78833a..d62a2e5061 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -42,6 +42,7 @@ ipq40xx_setup_interfaces()
 		;;
 	asus,map-ac2200|\
 	cilab,meshpoint-one|\
+	cig,wf610d|\
 	edgecore,ecw5211|\
 	edgecore,oap100|\
 	openmesh,a42|\
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 b12c9af9a7..4a3f18579c 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
@@ -93,6 +93,10 @@ case "$FIRMWARE" in
 		caldata_extract "ART" 0x1000 0x2f20
 		ath10k_patch_mac $(mtd_get_mac_binary ORGDATA 0x26)
 		;;
+	cig,wf610d)
+		caldata_extract "0:ART" 0x1000 0x2f20
+		ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) +2)
+		;;
 	cellc,rtl30vw |\
 	compex,wpj419 |\
 	compex,wpj428 |\
@@ -202,6 +206,10 @@ case "$FIRMWARE" in
 		caldata_extract "ART" 0x5000 0x2f20
 		ath10k_patch_mac $(mtd_get_mac_binary ORGDATA 0x2c)
 		;;
+	cig,wf610d)
+		caldata_extract "0:ART" 0x5000 0x2f20
+		ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) +3)
+		;;
 	cellc,rtl30vw |\
 	compex,wpj419 |\
 	compex,wpj428 |\
diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
index 0d606c75b5..4d3b1df219 100644
--- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
+++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
@@ -7,6 +7,10 @@ preinit_set_mac_address() {
 		ip link set dev eth0 address $(macaddr_add "$base_mac" +1)
 		ip link set dev eth1 address $(macaddr_add "$base_mac" +3)
 		;;
+	cig,wf610d)
+		base_mac=$(mtd_get_mac_ascii 0:APPSBLENV ethaddr)
+		ip link set eth0 address "${base_mac}"
+		;;
 	ezviz,cs-w3-wd1200g-eup)
 		ip link set dev eth0 address $(mtd_get_mac_binary "ART" 0x6)
 		ip link set dev eth1 address $(mtd_get_mac_binary "ART" 0x0)
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-cig-wf610d.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-cig-wf610d.dts
new file mode 100755
index 0000000000..3f24369f19
--- /dev/null
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-cig-wf610d.dts
@@ -0,0 +1,414 @@
+/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+#include "qcom-ipq4019.dtsi"
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/soc/qcom,tcsr.h>
+
+/ {
+	model = "Cambridge Industries Group, Ltd. WF-610D";
+	compatible = "cig,wf610d", "qcom,ipq4019";
+	qcom,board-id = <8 0>;
+	qcom,msm-id = <0x111 0>;
+	qcom,pmic-id = <0 0 0 0>;
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x10000000>; /* 256MB */
+	};
+
+	chosen {
+		bootargs-append = " clk_ignore_unused";
+	};
+
+	soc {
+		pinctrl@1000000 {
+			serial_0_pins: serial0_pinmux {
+				mux {
+					pins = "gpio16", "gpio17";
+					function = "blsp_uart0";
+					bias-disable;
+				};
+			};
+	
+			serial_1_pins: serial1_pinmux {
+				mux {
+					pins = "gpio8", "gpio9";
+					function = "blsp_uart1";
+					bias-disable;
+				};
+			};
+
+			nand_pins: nand_pins {
+
+				pullups {
+					pins = "gpio53", "gpio58",
+						"gpio59";
+					function = "qpic";
+					bias-pull-up;
+				};
+
+				pulldowns {
+					pins = "gpio54", "gpio55", "gpio56",
+						"gpio57", "gpio60", "gpio61",
+						"gpio62", "gpio63", "gpio64",
+						"gpio65", "gpio66", "gpio67",
+						"gpio68", "gpio69";
+					function = "qpic";
+					bias-pull-down;
+				};
+			};
+			led_0_pins: led0_pinmux {
+				mux {
+					pins = "gpio52", "gpio42", "gpio43", "gpio45", "gpio46", "gpio47", "gpio48", "gpio40", "gpio39", "gpio49";
+					function = "gpio";
+					drive-strength = <16>;
+					bias-pull-down;
+					output-low;
+				};
+			};
+
+			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;
+				};
+			};
+
+			i2c_0_pins: i2c_0_pinmux {
+				pinmux {
+					function = "blsp_i2c0";
+					pins = "gpio10", "gpio11";
+				};
+				pinconf {
+					pins = "gpio10", "gpio11";
+					drive-strength = <16>;
+					bias-disable;
+				};
+			};
+			mdio_pins: mdio_pinmux {
+				mux_1 {
+					pins = "gpio6";
+					function = "mdio";
+					bias-pull-up;
+				};
+				mux_2 {
+					pins = "gpio7";
+					function = "mdc";
+					bias-pull-up;
+				};
+			};
+
+		};
+
+		serial@78af000 {
+			pinctrl-0 = <&serial_0_pins>;
+			pinctrl-names = "default";
+			status = "okay";
+		};
+	
+		serial@78b0000 {
+			pinctrl-0 = <&serial_1_pins>;
+			pinctrl-names = "default";
+			status = "okay";
+		};
+
+		blsp_dma: dma@7884000 {
+			status = "okay";
+		};
+
+		spi_0: spi@78b5000 { 
+			pinctrl-0 = <&spi_0_pins>;
+			pinctrl-names = "default";
+			status = "okay";
+			cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
+
+			m25p80@0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				reg = <0>;
+				compatible = "jedec,spi-nor";
+				linux,modalias = "m25p80", "n25q128a11";
+				spi-max-frequency = <24000000>;
+				partitions {
+					compatible = "fixed-partitions";
+					#address-cells = <1>;
+					#size-cells = <1>;
+	
+					SBL1@0 {
+						label = "0:SBL1";
+						reg = <0x0 0x40000>;
+						read-only;
+					};
+		
+					MIBIB@40000 {
+						label = "0:MIBIB";
+						reg = <0x40000 0x20000>;
+						read-only;
+					};
+		
+					QSEE@60000 {
+						label = "0:QSEE";
+						reg = <0x60000 0x60000>;
+						read-only;
+					};
+		
+					CDT@c0000 {
+						label = "0:CDT";
+						reg = <0xc0000 0x10000>;
+						read-only;
+					};
+		
+					DDRPARAMS@d0000 {
+						label = "0:DDRPARAMS";
+						reg = <0xd0000 0x10000>;
+						read-only;
+					};
+		
+					APPSBLENV@e0000 {
+						label = "0:APPSBLENV";
+						reg = <0xe0000 0x10000>;
+						read-only;
+					};
+		
+					APPSBL@f0000 {
+						label = "0:APPSBL";
+						reg = <0xf0000 0x80000>;
+						read-only;
+					};
+		
+					ART@170000 {
+						label = "0:ART";
+						reg = <0x170000 0x10000>;
+						read-only;
+					};
+	
+					firmware@180000 {
+						compatible = "denx,fit";
+						label = "firmware";
+						reg = <0x180000 0x1e70000>;
+					};
+
+					certificates@1ff0000 {
+						compatible = "denx,fit";
+						label = "certificates";
+						reg = <0x1ff0000 0x10000>;
+					};
+				};
+			};
+		};
+
+		i2c_0: i2c@78b7000 { /* BLSP1 QUP2 */
+			pinctrl-0 = <&i2c_0_pins>;
+			pinctrl-1 = <&i2c_0_pins>;
+			pinctrl-names = "i2c_active", "i2c_sleep";
+			status = "okay";
+
+			qca_codec: qca_codec@12 {
+				compatible = "qca,ipq40xx-codec";
+				reg = <0x12>;
+				status = "disabled";
+			};
+
+			lcd_ts: lcd_ts@40 {
+				compatible = "qca,gsl1680_ts";
+				reg = <0x40>;
+				status = "disabled";
+			};
+		};
+
+
+
+		cryptobam: dma@8e04000 {
+			status = "okay";
+		};
+
+		crypto@8e3a000 {
+			status = "okay";
+		};
+
+		gpio_keys {
+			compatible = "gpio-keys";
+	
+			reset {
+				label = "reset";
+				linux,code = <KEY_RESTART>;
+				gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
+				linux,input-type = <1>;
+			};
+		};
+
+		gpio-leds {
+			compatible = "gpio-leds";
+			pinctrl-0 = <&led_0_pins>;
+
+			wf6203_green_power {
+					gpios = <&tlmm 52 0>;
+					label = "wf6203:green:power";
+					default-state = "off";
+			};
+			wf6203_yellow_eth0 {
+					gpios = <&tlmm 42 0>;
+					label = "wf6203:yellow:eth0";
+					default-state = "off";
+			};
+			wf6203_green_eth0 {
+					gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
+					label = "wf6203:green:eth0";
+					default-state = "off";
+			};
+			wf6203_yellow_eth1 {
+					gpios = <&tlmm 45 0>;
+					label = "wf6203:yellow:eth1";
+					default-state = "off";
+			};
+			wf6203_green_eth1 {
+					gpios = <&tlmm 46 GPIO_ACTIVE_LOW>;
+					label = "wf6203:green:eth1";
+					default-state = "off";
+			};
+			wf6203_yellow_eth2 {
+					gpios = <&tlmm 47 0>;
+					label = "wf6203:yellow:eth2";
+					default-state = "off";
+			};
+			wf6203_green_eth2 {
+					gpios = <&tlmm 48 GPIO_ACTIVE_LOW>;
+					label = "wf6203:green:eth2";
+					default-state = "off";
+			};																
+			wf6203_green_wifi2g {
+					gpios = <&tlmm 40 0>;
+					label = "wf6203:green:wifi2g";
+					default-state = "off";
+			};
+			wf6203_green_wifi5g {
+					gpios = <&tlmm 39 0>;
+					label = "wf6203:green:wifi5g";
+					default-state = "off";
+			};				
+			wf6203_green_status {
+					gpios = <&tlmm 49 0>;
+					label = "wf6203:green:status";
+					default-state = "off";
+			};								
+		};
+
+
+		watchdog@b017000 {
+			timeout-sec = <60>;
+			status = "okay";
+		};
+
+		qpic_bam: dma@7984000 {
+			status = "okay";
+		};
+
+		nand: qpic-nand@79b0000 {
+			pinctrl-0 = <&nand_pins>;
+			pinctrl-names = "default";
+			status = "okay";
+		};
+
+		mdio@90000 {
+			pinctrl-0 = <&mdio_pins>;
+			pinctrl-names = "default";
+			phy-reset-gpio = <&tlmm 18 0>;
+			status = "okay";
+			bias-disable;
+		};
+
+		ess-switch@c000000 {
+			switch_lan_bmp = <0x3e>; /* lan port bitmap */
+			switch_wan_bmp = <1>; /* wan port bitmap */
+			status = "okay";
+		};
+
+		ess-psgmii@98000 {
+			status = "okay";
+		};
+
+		edma@c080000 {
+			status = "okay";
+		};
+
+		usb3_ss_phy: ssphy@9a000 {
+			status = "okay";
+		};
+
+		usb3_hs_phy: hsphy@a6000 {
+			status = "okay";
+		};
+
+		usb3: usb3@8af8800 {
+			status = "okay";
+		};
+
+		usb2_hs_phy: hsphy@a8000 {
+			status = "okay";
+		};
+
+		usb2: usb2@60f8800 {
+			status = "okay";
+		};
+
+		ext_wtd {
+			compatible = "linux,wdt-gpio";
+			gpios = <&tlmm 41 GPIO_ACTIVE_LOW>;
+			hw_algo = "toggle";
+			hw_margin_ms = <1000>;
+			always-running;
+		};
+
+		tcsr@1949000 {
+			compatible = "qcom,tcsr";
+			reg = <0x1949000 0x100>;
+			qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
+		};
+
+		tcsr@1957000 {
+			compatible = "qcom,tcsr";
+			reg = <0x1957000 0x100>;
+			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
+		};
+
+		wifi0: wifi@a000000 {
+			qcom,ath10k-calibration-variant = "CIG WF_610D";
+			status = "okay";
+		};
+	
+		wifi1: wifi@a800000 {
+			qcom,ath10k-calibration-variant = "CIG WF_610D";
+			status = "okay";
+		};
+	};
+
+};
diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 49aa202e62..bca03f58ec 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -271,6 +271,20 @@ define Device/cilab_meshpoint-one
 endef
 TARGET_DEVICES += cilab_meshpoint-one
 
+define Device/cig_wf610d
+	$(call Device/FitImage)
+	DEVICE_TITLE := CIG WF_610D
+	DEVICE_DTS := qcom-ipq4029-ap-cig-wf610d
+	KERNEL_INSTALL := 1
+	KERNEL_SIZE := 4048k
+	BLOCKSIZE := 128k
+	PAGESIZE := 2048
+	DEVICE_PACKAGES := ipq-wifi-cig_wf610d
+	IMAGES = sysupgrade.bin
+	IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
+endef
+TARGET_DEVICES += cig_wf610d
+
 define Device/compex_wpj419
 	$(call Device/FitImage)
 	$(call Device/UbiFit)
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 6b7c68bf63..aa2fc4bd17 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,60 @@ dtb-$(CONFIG_ARCH_QCOM) += \
+@@ -837,11 +837,61 @@ dtb-$(CONFIG_ARCH_QCOM) += \
  	qcom-apq8074-dragonboard.dtb \
  	qcom-apq8084-ifc6540.dtb \
  	qcom-apq8084-mtp.dtb \
@@ -45,6 +45,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
  	qcom-ipq4019-ap.dk07.1-c1.dtb \
  	qcom-ipq4019-ap.dk07.1-c2.dtb \
 +	qcom-ipq4019-a62.dtb \
++	qcom-ipq4029-ap-cig-wf610d.dtb \
 +	qcom-ipq4019-cm520-79f.dtb \
 +	qcom-ipq4019-ea8300.dtb \
 +	qcom-ipq4019-eap2200.dtb \
-- 
2.25.1

