Opennet Firmware
hardware_comfast_e313ac.patch
gehe zur Dokumentation dieser Datei
1 --- a/openwrt/target/linux/ath79/base-files/etc/board.d/01_leds
2 +++ b/openwrt/target/linux/ath79/base-files/etc/board.d/01_leds
3 @@ -51,6 +51,15 @@
4  ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssimediumhigh" "wlan0" "51" "100"
5  ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssihigh" "wlan0" "76" "100"
6  ;;
7 +comfast,cf-e313ac)
8 + ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x02"
9 + ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth1"
10 + ucidef_set_rssimon "wlan0" "200000" "1"
11 + ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:red:rssilow" "wlan0" "1" "100"
12 + ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$boardname:red:rssimediumlow" "wlan0" "26" "100"
13 + ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssimediumhigh" "wlan0" "51" "100"
14 + ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssihigh" "wlan0" "76" "100"
15 + ;;
16  comfast,cf-e5)
17  ucidef_set_led_switch "lan" "LAN" "$boardname:blue:lan" "switch0" "0x02"
18  ucidef_set_led_netdev "wan" "WAN" "$boardname:blue:wan" "eth1"
19 --- a/openwrt/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata.orig
20 +++ b/openwrt/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
21 @@ -190,6 +190,13 @@
22  /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
23  rm /lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
24  ;;
25 + comfast,cf-e313ac)
26 + ath10kcal_extract "art" 20480 12064
27 + ath10k_patch_mac_crc $(mtd_get_mac_binary art 0x6)
28 + ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
29 + /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
30 + rm /lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
31 + ;;
32  nec,wg1200cr)
33  ath10kcal_extract "art" 20480 12064
34  ath10kcal_patch_mac_crc $(mtd_get_mac_ascii devdata wlan5mac)
35 --- a/openwrt/target/linux/ath79/image/generic.mk
36 +++ b/openwrt/target/linux/ath79/image/generic.mk
37 @@ -215,6 +215,16 @@
38 
39  TARGET_DEVICES += comfast_cf-ew72
40 
41 +define Device/comfast_cf-e313ac
42 + ATH_SOC := qca9531
43 + DEVICE_TITLE:= COMFAST CF-E313AC
44 + DEVICE_PACKAGES := rssileds kmod-leds-gpio kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct \
45 + -swconfig -uboot-envtools
46 + IMAGE_SIZE := 7936k
47 +endef
48 +TARGET_DEVICES += comfast_cf-e313ac
49 +
50 +
51  define Device/devolo_dvl1200e
52  ATH_SOC := qca9558
53  DEVICE_TITLE := devolo WiFi pro 1200e
54 --- /dev/null
55 +++ b/openwrt/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts
56 @@ -0,0 +1,148 @@
57 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
58 +/dts-v1/;
59 +
60 +#include <dt-bindings/gpio/gpio.h>
61 +#include <dt-bindings/input/input.h>
62 +
63 +#include "qca953x.dtsi"
64 +
65 +/ {
66 + compatible = "comfast,cf-e313ac", "qca,qca9531";
67 + model = "COMFAST CF-E313AC";
68 +
69 + aliases {
70 + serial0 = &uart;
71 + led-boot = &rssihigh;
72 + led-failsafe = &rssihigh;
73 + led-upgrade = &rssihigh;
74 + label-mac-device = &eth1;
75 + };
76 +
77 + leds {
78 + compatible = "gpio-leds";
79 + pinctrl-names = "default";
80 +
81 + wlan {
82 + label = "cf-e313ac:green:wlan";
83 + gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
84 + linux,default-trigger = "phy0tpt";
85 + };
86 +
87 + lan {
88 + label = "cf-e313ac:green:lan";
89 + gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
90 + };
91 +
92 + wan {
93 + label = "cf-e313ac:green:wan";
94 + gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
95 + };
96 +
97 + rssilow {
98 + label = "cf-e313ac:red:rssilow";
99 + gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
100 + };
101 +
102 + rssimediumlow {
103 + label = "cf-e313ac:red:rssimediumlow";
104 + gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
105 + };
106 +
107 + rssimediumhigh {
108 + label = "cf-e313ac:green:rssimediumhigh";
109 + gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
110 + };
111 +
112 + rssihigh: rssihigh {
113 + label = "cf-e313ac:green:rssihigh";
114 + gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
115 + };
116 + };
117 +
118 + keys {
119 + compatible = "gpio-keys";
120 +
121 + reset {
122 + label = "reset";
123 + linux,code = <KEY_RESTART>;
124 + gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
125 + debounce-interval = <60>;
126 + };
127 + };
128 +};
129 +
130 +&spi {
131 + status = "okay";
132 + num-cs = <1>;
133 +
134 + flash@0 {
135 + compatible = "jedec,spi-nor";
136 + reg = <0>;
137 + spi-max-frequency = <25000000>;
138 +
139 + partitions {
140 + compatible = "fixed-partitions";
141 + #address-cells = <1>;
142 + #size-cells = <1>;
143 +
144 + partition@0 {
145 + label = "u-boot";
146 + reg = <0x000000 0x010000>;
147 + read-only;
148 + };
149 +
150 + art: partition@10000 {
151 + label = "art";
152 + reg = <0x010000 0x010000>;
153 + read-only;
154 + };
155 +
156 + partition@20000 {
157 + compatible = "denx,uimage";
158 + label = "firmware";
159 + reg = <0x020000 0x7c0000>;
160 + };
161 +
162 + partition@7e0000 {
163 + label = "config";
164 + reg = <0x7e0000 0x010000>;
165 + read-only;
166 + };
167 +
168 + partition@7f0000 {
169 + label = "nvram";
170 + reg = <0x7f0000 0x010000>;
171 + read-only;
172 + };
173 + };
174 + };
175 +};
176 +
177 +&uart {
178 + status = "okay";
179 +};
180 +
181 +&eth0 {
182 + status = "okay";
183 + phy-handle = <&swphy0>;
184 + mtd-mac-address = <&art 0x1002>;
185 +
186 + gmac-config {
187 + device = <&gmac>;
188 + switch-phy-swap = <1>;
189 + };
190 +};
191 +
192 +&eth1 {
193 + status = "okay";
194 + mtd-mac-address = <&art 0x0>;
195 +};
196 +
197 +&pcie0 {
198 + status = "okay";
199 +
200 + wifi@0,0 {
201 + compatible = "qcom,ath10k";
202 + reg = <0 0 0 0 0>;
203 + };
204 +};