From 97c5cbc496e9cf8139994cd3ea987f4e9c70adbe Mon Sep 17 00:00:00 2001 From: Weijie Gao Date: Wed, 13 Jun 2018 21:14:49 +0800 Subject: ath79: add support for Phicomm K2T This patch adds dts for qca956x and also support for Phicomm K2T The qca965x.dtsi adds nearly all the necessary components. Both ath9k AHB and PCIe worked well. The Phicomm K2T uses MTD partition 'config' to store the mac addresses in JSON format. To extract these fields correctly, a script is introduced: /lib/functions/k2t.sh This script provides a helper function to extract mac addresses, and is used in three places. Hardware spec of Phicomm K2T: CPU: QCA9563 DRAM: 64MB DDR2 Flash: 16MB SPI-NOR Switch: QCA8337 WiFi 5.8GHz: QCA9886 Flash instruction: Apply sysupgrade.bin via serial console: tftp 0x80000000 sysupgrade.bin && erase 0x9f090000 +$filesize && cp.b $fileaddr 0x9f090000 $filesize Signed-off-by: Weijie Gao --- target/linux/ath79/image/generic.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'target/linux/ath79/image') diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 6e662cea46..16a3c8ed53 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -75,3 +75,17 @@ define Device/buffalo_wzr-hp-g450h SUPPORTED_DEVICES += wzr-hp-g450h endef TARGET_DEVICES += buffalo_wzr-hp-g450h + +define Device/phicomm-k2t + ATH_SOC := qca9563 + DEVICE_TITLE := Phicomm K2T + KERNEL := kernel-bin | append-dtb | lzma | uImage lzma + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma + IMAGE_SIZE := 15744k + IMAGES := sysupgrade.bin + IMAGE/default := append-kernel | append-rootfs | pad-rootfs + IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE) + DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k ath10k-firmware-qca9888 + SUPPORTED_DEVICES += phicomm,k2t +endef +TARGET_DEVICES += phicomm-k2t -- cgit v1.2.3