b42915dd332d8af8f8399c423116a500a49fe78c
[openwrt/staging/jow.git] / target / linux / ath79 / dts / qca9533_kuwfi_c910.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/mtd/partitions/uimage.h>
8
9 / {
10 compatible = "kuwfi,c910", "qca,qca9533";
11 model = "KuWFi C910";
12
13 aliases {
14 label-mac-device = &eth1;
15 led-boot = &internet_red;
16 led-failsafe = &internet_red;
17 led-upgrade = &internet_red;
18 };
19
20 virtual_flash {
21 compatible = "mtd-concat";
22 devices = <&fwconcat0 &fwconcat1>;
23
24 partitions {
25 compatible = "fixed-partitions";
26 #address-cells = <1>;
27 #size-cells = <1>;
28
29 partition@0 {
30 reg = <0x0 0x0>;
31 label = "firmware";
32 compatible = "openwrt,uimage", "denx,uimage";
33 openwrt,ih-magic = <IH_MAGIC_OKLI>;
34 };
35 };
36 };
37
38 keys {
39 compatible = "gpio-keys";
40
41 reset {
42 label = "reset";
43 linux,code = <KEY_RESTART>;
44 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
45 debounce-interval = <60>;
46 };
47 };
48
49 leds {
50 compatible = "gpio-leds";
51
52 internet_blue {
53 label = "blue:internet";
54 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
55 };
56
57 wifi {
58 label = "white:wifi";
59 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
60 linux,default-trigger = "phy0tpt";
61 };
62
63 internet_green {
64 label = "green:internet";
65 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
66 };
67
68 wan {
69 label = "white:wan";
70 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
71 };
72
73 lan2 {
74 label = "white:lan2";
75 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
76 };
77
78 // gpio 12 enables or disables LTE (Quectel EC200T)
79
80 internet_red: internet_red {
81 label = "red:internet";
82 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
83 };
84
85 lan1 {
86 label = "white:lan1";
87 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
88 };
89 };
90 };
91
92 &spi {
93 status = "okay";
94
95 flash@0 {
96 compatible = "winbond,w25q128", "jedec,spi-nor";
97 reg = <0>;
98 spi-max-frequency = <25000000>;
99
100 partitions {
101 compatible = "fixed-partitions";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 partition@0 {
106 label = "u-boot";
107 reg = <0x000000 0x020000>;
108 read-only;
109 };
110
111 partition@20000 {
112 label = "u-boot-env";
113 reg = <0x020000 0x010000>;
114 read-only;
115 };
116
117 partition@30000 {
118 label = "config";
119 reg = <0x030000 0x020000>;
120 read-only;
121 };
122
123 fwconcat0: partition@50000 {
124 label = "fwconcat0";
125 reg = <0x050000 0xe30000>;
126 };
127
128 partition@e80000 {
129 label = "loader";
130 reg = <0xe80000 0x10000>;
131 };
132
133 fwconcat1: partition@e90000 {
134 label = "fwconcat1";
135 reg = <0xe90000 0x160000>;
136 };
137
138 partition@ff0000 {
139 label = "art";
140 reg = <0xff0000 0x010000>;
141 read-only;
142
143 nvmem-layout {
144 compatible = "fixed-layout";
145 #address-cells = <1>;
146 #size-cells = <1>;
147
148 calibration_art_1000: macaddr@1000 {
149 reg = <0x1000 0x440>;
150 };
151
152 macaddr_art_1002: macaddr@1002 {
153 reg = <0x1002 0x6>;
154 };
155 };
156 };
157 };
158 };
159 };
160
161 &usb0 {
162 status = "okay";
163 };
164
165 &usb_phy {
166 status = "okay";
167 };
168
169 &eth0 {
170 status = "okay";
171
172 phy-handle = <&swphy0>;
173
174 nvmem-cells = <&macaddr_art_1002>;
175 nvmem-cell-names = "mac-address";
176 mac-address-increment = <1>;
177 };
178
179 &eth1 {
180 phy-handle = <&swphy4>;
181
182 nvmem-cells = <&macaddr_art_1002>;
183 nvmem-cell-names = "mac-address";
184
185 gmac-config {
186 device = <&gmac>;
187 switch-phy-swap = <1>;
188 };
189 };
190
191 &wmac {
192 status = "okay";
193
194 nvmem-cells = <&calibration_art_1000>;
195 nvmem-cell-names = "calibration";
196 };