Opennet Firmware
hardware_comfast_ew72.patch
gehe zur Dokumentation dieser Datei
1 diff --git a/openwrt/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts b/openwrt/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts
2 new file mode 100644
3 index 0000000000..df0b7f0d65
4 --- /dev/null
5 +++ b/openwrt/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts
6 @@ -0,0 +1,133 @@
7 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
8 +/dts-v1/;
9 +
10 +#include <dt-bindings/gpio/gpio.h>
11 +#include <dt-bindings/input/input.h>
12 +
13 +#include "qca953x.dtsi"
14 +
15 +/ {
16 + compatible = "comfast,cf-ew72", "qca,qca9531";
17 + model = "COMFAST CF-EW72";
18 +
19 + aliases {
20 + serial0 = &uart;
21 + led-boot = &led_wan;
22 + led-failsafe = &led_wan;
23 + led-upgrade = &led_wan;
24 + };
25 +
26 + leds {
27 + compatible = "gpio-leds";
28 +
29 + pinctrl-names = "default";
30 + pinctrl-0 = <&jtag_disable_pins>;
31 +
32 + lan {
33 + label = "cf-ew72:blue:lan";
34 + gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
35 + };
36 +
37 + led_wan: wan {
38 + label = "cf-ew72:blue:wan";
39 + gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
40 + };
41 +
42 + wlan {
43 + label = "cf-ew72:blue:wlan";
44 + gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
45 + linux,default-trigger = "phy0tpt";
46 + };
47 + };
48 +
49 + keys {
50 + compatible = "gpio-keys";
51 +
52 + reset {
53 + label = "reset";
54 + linux,code = <KEY_RESTART>;
55 + gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
56 + debounce-interval = <60>;
57 + };
58 + };
59 +
60 + watchdog {
61 + compatible = "linux,wdt-gpio";
62 +
63 + gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
64 + hw_algo = "toggle";
65 + hw_margin_ms = <1200>;
66 + always-running;
67 + };
68 +};
69 +
70 +&pcie0 {
71 + status = "okay";
72 +};
73 +
74 +&spi {
75 + status = "okay";
76 +
77 + num-cs = <1>;
78 +
79 + flash@0 {
80 + compatible = "winbond,w25q128", "jedec,spi-nor";
81 + reg = <0>;
82 + spi-max-frequency = <25000000>;
83 +
84 + partitions {
85 + compatible = "fixed-partitions";
86 + #address-cells = <1>;
87 + #size-cells = <1>;
88 +
89 + partition@0 {
90 + label = "u-boot";
91 + reg = <0x000000 0x010000>;
92 + read-only;
93 + };
94 +
95 + art: partition@10000 {
96 + label = "art";
97 + reg = <0x010000 0x010000>;
98 + read-only;
99 + };
100 +
101 + partition@20000 {
102 + compatible = "denx,uimage";
103 + label = "firmware";
104 + reg = <0x020000 0xfd0000>;
105 + };
106 +
107 + partition@ff0000 {
108 + label = "nvram";
109 + reg = <0xff0000 0x010000>;
110 + read-only;
111 + };
112 + };
113 + };
114 +};
115 +
116 +&uart {
117 + status = "okay";
118 +};
119 +
120 +&eth0 {
121 + status = "okay";
122 +
123 + phy-handle = <&swphy4>;
124 + mtd-mac-address = <&art 0x0>;
125 + mtd-mac-address-increment = <1>;
126 +};
127 +
128 +&eth1 {
129 + mtd-mac-address = <&art 0x0>;
130 +};
131 +
132 +&wmac {
133 + status = "okay";
134 +
135 + mtd-cal-data = <&art 0x1000>;
136 + mtd-mac-address = <&art 0x0>;
137 + mtd-mac-address-increment = <3>;
138 +};
139 +
140 diff --git a/openwrt/target/linux/ath79/base-files/etc/board.d/01_leds b/openwrt/target/linux/ath79/base-files/etc/board.d/01_leds
141 index 058ab006e5..de0e6da854 100755
142 --- a/openwrt/target/linux/ath79/base-files/etc/board.d/01_leds
143 +++ b/openwrt/target/linux/ath79/base-files/etc/board.d/01_leds
144 @@ -59,6 +59,10 @@ comfast,cf-e5)
145  ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "$boardname:blue:rssi1" "wlan0" "33" "100"
146  ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:blue:rssi2" "wlan0" "66" "100"
147  ;;
148 +comfast,cf-ew72)
149 + ucidef_set_led_switch "lan" "LAN" "$boardname:blue:lan" "switch0" "0x02"
150 + ucidef_set_led_netdev "wan" "WAN" "$boardname:blue:wan" "eth1"
151 + ;;
152  dlink,dir-859-a1)
153  ucidef_set_led_switch "internet" "WAN" "$boardname:green:internet" "switch0" "0x20"
154  ;;
155 diff --git a/openwrt/target/linux/ath79/image/generic.mk b/openwrt/target/linux/ath79/image/generic.mk
156 index 55053be34f..c843e22e8a 100644
157 --- a/openwrt/target/linux/ath79/image/generic.mk
158 +++ b/openwrt/target/linux/ath79/image/generic.mk
159 @@ -205,6 +205,16 @@ define Device/comfast_cf-e5
160  endef
161  TARGET_DEVICES += comfast_cf-e5
162 
163 +define Device/comfast_cf-ew72
164 + ATH_SOC := qca9531
165 + DEVICE_TITLE := COMFAST CF-EW72
166 + DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct \
167 + -uboot-envtools -swconfig
168 + IMAGE_SIZE := 16192k
169 +endef
170 +
171 +TARGET_DEVICES += comfast_cf-ew72
172 +
173  define Device/devolo_dvl1200e
174  ATH_SOC := qca9558
175  DEVICE_TITLE := devolo WiFi pro 1200e
176 --- a/openwrt/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
177 +++ b/openwrt/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
178 @@ -183,6 +183,13 @@
179  ;;
180  "ath10k/pre-cal-pci-0000:00:00.0.bin")
181  case $board in
182 + comfast,cf-ew72)
183 + ath10kcal_extract "art" 20480 12064
184 + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) +2)
185 + ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
186 + /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
187 + rm /lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
188 + ;;
189  nec,wg1200cr)
190  ath10kcal_extract "art" 20480 12064
191  ath10kcal_patch_mac_crc $(mtd_get_mac_ascii devdata wlan5mac)