diff options
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/ath79/dts/qca9533_kuwfi_c910.dts | 194 | ||||
-rw-r--r-- | target/linux/ath79/generic/base-files/etc/board.d/01_leds | 5 | ||||
-rw-r--r-- | target/linux/ath79/generic/base-files/etc/board.d/02_network | 5 | ||||
-rw-r--r-- | target/linux/ath79/image/generic.mk | 16 |
4 files changed, 220 insertions, 0 deletions
diff --git a/target/linux/ath79/dts/qca9533_kuwfi_c910.dts b/target/linux/ath79/dts/qca9533_kuwfi_c910.dts new file mode 100644 index 0000000000..a705aa8686 --- /dev/null +++ b/target/linux/ath79/dts/qca9533_kuwfi_c910.dts @@ -0,0 +1,194 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca953x.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/mtd/partitions/uimage.h> + +/ { + compatible = "kuwfi,c910", "qca,qca9533"; + model = "KuWFi C910"; + + aliases { + label-mac-device = ð1; + led-boot = &internet_red; + led-failsafe = &internet_red; + led-upgrade = &internet_red; + }; + + virtual_flash { + compatible = "mtd-concat"; + devices = <&fwconcat0 &fwconcat1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = <0x0 0x0>; + label = "firmware"; + compatible = "openwrt,uimage", "denx,uimage"; + openwrt,ih-magic = <IH_MAGIC_OKLI>; + }; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = <KEY_RESTART>; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + internet_blue { + label = "blue:internet"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + + wifi { + label = "white:wifi"; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + internet_green { + label = "green:internet"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "white:wan"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + }; + + lan2 { + label = "white:lan2"; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + // gpio 12 enables or disables LTE (Quectel EC200T) + + internet_red: internet_red { + label = "red:internet"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + lan1 { + label = "white:lan1"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "winbond,w25q128", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x020000>; + read-only; + }; + + partition@20000 { + label = "u-boot-env"; + reg = <0x020000 0x010000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x030000 0x020000>; + read-only; + }; + + fwconcat0: partition@50000 { + label = "fwconcat0"; + reg = <0x050000 0xe30000>; + }; + + partition@e80000 { + label = "loader"; + reg = <0xe80000 0x10000>; + }; + + fwconcat1: partition@e90000 { + label = "fwconcat1"; + reg = <0xe90000 0x160000>; + }; + + partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + calibration_art_1000: macaddr@1000 { + reg = <0x1000 0x440>; + }; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; + }; + }; + }; +}; + +&usb0 { + status = "okay"; +}; + +&usb_phy { + status = "okay"; +}; + +ð0 { + status = "okay"; + + phy-handle = <&swphy0>; + + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; +}; + +ð1 { + phy-handle = <&swphy4>; + + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; + + gmac-config { + device = <&gmac>; + switch-phy-swap = <1>; + }; +}; + +&wmac { + status = "okay"; + + nvmem-cells = <&calibration_art_1000>; + nvmem-cell-names = "calibration"; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index f0610f39e9..5855d2a928 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -268,6 +268,11 @@ hiwifi,hc6361) ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" ucidef_set_led_wlan "wlan" "WLAN" "blue:wlan" "phy0tpt" ;; +kuwfi,c910) + ucidef_set_led_netdev "wan" "WAN" "white:wan" "eth1" + ucidef_set_led_switch "lan1" "LAN1" "white:lan1" "switch0" "0x10" + ucidef_set_led_switch "lan2" "LAN2" "white:lan2" "switch0" "0x02" + ;; meraki,mr12|\ tplink,cpe210-v2|\ tplink,cpe210-v3) diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 529d33782f..92541cd9f8 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -347,6 +347,11 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1" ;; + kuwfi,c910) + ucidef_set_interface_wan "eth1" + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan:2" "4:lan:1" + ;; letv,lba-047-ch) ucidef_set_interface_wan "eth0" ucidef_add_switch "switch0" \ diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 9c209b041f..d66684a124 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1583,6 +1583,22 @@ define Device/joyit_jt-or750i endef TARGET_DEVICES += joyit_jt-or750i +define Device/kuwfi_c910 + $(Device/loader-okli-uimage) + SOC := qca9533 + DEVICE_VENDOR := KuWFi + DEVICE_MODEL := C910 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-net-cdc-ether comgt-ncm + LOADER_FLASH_OFFS := 0x50000 + KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 + IMAGE_SIZE := 15936k + IMAGES += factory.bin + IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ + append-rootfs | pad-rootfs | check-size | pad-to 14528k | \ + append-loader-okli-uimage $(1) | pad-to 64k +endef +TARGET_DEVICES += kuwfi_c910 + define Device/letv_lba-047-ch $(Device/loader-okli-uimage) SOC := qca9531 |