toplevel.mk: make sure tmp exist for .packagedynamicdefault
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9531_comfast_cf-e313ac.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "comfast,cf-e313ac", "qca,qca9531";
11 model = "COMFAST CF-E313AC";
12
13 aliases {
14 serial0 = &uart;
15 led-boot = &led_rssihigh;
16 led-failsafe = &led_rssihigh;
17 led-upgrade = &led_rssihigh;
18 label-mac-device = &eth1;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23 pinctrl-names = "default";
24
25 wlan {
26 function = LED_FUNCTION_WLAN;
27 color = <LED_COLOR_ID_GREEN>;
28 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
29 linux,default-trigger = "phy0tpt";
30 };
31
32 lan {
33 function = LED_FUNCTION_LAN;
34 color = <LED_COLOR_ID_GREEN>;
35 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
36 };
37
38 wan {
39 function = LED_FUNCTION_WAN;
40 color = <LED_COLOR_ID_GREEN>;
41 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
42 };
43
44 rssilow {
45 label = "red:rssilow";
46 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
47 };
48
49 rssimediumlow {
50 label = "red:rssimediumlow";
51 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
52 };
53
54 rssimediumhigh {
55 label = "green:rssimediumhigh";
56 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
57 };
58
59 led_rssihigh: rssihigh {
60 label = "green:rssihigh";
61 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
62 };
63 };
64
65 keys {
66 compatible = "gpio-keys";
67
68 reset {
69 label = "reset";
70 linux,code = <KEY_RESTART>;
71 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
72 debounce-interval = <60>;
73 };
74 };
75 };
76
77 &spi {
78 status = "okay";
79
80 flash@0 {
81 compatible = "jedec,spi-nor";
82 reg = <0>;
83 spi-max-frequency = <25000000>;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "u-boot";
92 reg = <0x000000 0x010000>;
93 read-only;
94 };
95
96 partition@10000 {
97 label = "art";
98 reg = <0x010000 0x010000>;
99 read-only;
100
101 nvmem-layout {
102 compatible = "fixed-layout";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 macaddr_art_0: macaddr@0 {
107 reg = <0x0 0x6>;
108 };
109
110 macaddr_art_6: macaddr@6 {
111 reg = <0x6 0x6>;
112 };
113
114 macaddr_art_1002: macaddr@1002 {
115 reg = <0x1002 0x6>;
116 };
117
118 precal_art_5000: pre-calibration@5000 {
119 reg = <0x5000 0x2f20>;
120 };
121 };
122 };
123
124 partition@20000 {
125 compatible = "denx,uimage";
126 label = "firmware";
127 reg = <0x020000 0x7c0000>;
128 };
129
130 partition@7e0000 {
131 label = "config";
132 reg = <0x7e0000 0x010000>;
133 read-only;
134 };
135
136 partition@7f0000 {
137 label = "nvram";
138 reg = <0x7f0000 0x010000>;
139 read-only;
140 };
141 };
142 };
143 };
144
145 &eth0 {
146 status = "okay";
147
148 phy-handle = <&swphy0>;
149
150 nvmem-cells = <&macaddr_art_1002>;
151 nvmem-cell-names = "mac-address";
152
153 gmac-config {
154 device = <&gmac>;
155 switch-phy-swap = <1>;
156 };
157 };
158
159 &eth1 {
160 nvmem-cells = <&macaddr_art_0>;
161 nvmem-cell-names = "mac-address";
162 };
163
164 &pcie0 {
165 status = "okay";
166
167 wifi@0,0 {
168 compatible = "qcom,ath10k";
169 reg = <0 0 0 0 0>;
170 nvmem-cells = <&precal_art_5000>, <&macaddr_art_6>;
171 nvmem-cell-names = "pre-calibration", "mac-address";
172 };
173 };