ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / qca9563_xiaomi_aiot-ac2350.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca956x.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 model = "Xiaomi AIoT AC2350";
11 compatible = "xiaomi,aiot-ac2350", "qca,qca9563";
12
13 aliases {
14 label-mac-device = &eth0;
15
16 led-boot = &led_system_orange;
17 led-failsafe = &led_system_orange;
18 led-running = &led_system_blue;
19 led-upgrade = &led_system_orange;
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 linux,code = <KEY_RESTART>;
28 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 led_system_blue: system_blue {
36 label = "blue:system";
37 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
38 };
39
40 led_system_orange: system_orange {
41 label = "orange:system";
42 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
43 };
44
45 wan_blue {
46 function = LED_FUNCTION_WAN;
47 color = <LED_COLOR_ID_BLUE>;
48 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
49 };
50
51 wan_orange {
52 function = LED_FUNCTION_WAN;
53 color = <LED_COLOR_ID_ORANGE>;
54 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
55 };
56 };
57
58 gpio-export {
59 compatible = "gpio-export";
60
61 wps {
62 gpio-export,name = "wps";
63 gpio-export,output = <0>;
64 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
65 };
66
67 usb-reset {
68 gpio-export,name = "usb-reset";
69 gpio-export,output = <0>;
70 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
71 };
72 };
73 };
74
75 &spi {
76 status = "okay";
77
78 flash@0 {
79 compatible = "jedec,spi-nor";
80 reg = <0>;
81 spi-max-frequency = <50000000>;
82
83 partitions {
84 compatible = "fixed-partitions";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 partition@0 {
89 label = "Bootloader";
90 reg = <0x0 0x30000>;
91 read-only;
92 };
93
94 partition@30000 {
95 label = "Nvram";
96 reg = <0x30000 0x10000>;
97 };
98
99 partition@40000 {
100 label = "Bdata";
101 reg = <0x40000 0x10000>;
102 read-only;
103 };
104
105 partition@50000 {
106 label = "crash";
107 reg = <0x50000 0x10000>;
108 read-only;
109 };
110
111 art: partition@60000 {
112 label = "art";
113 reg = <0x60000 0x10000>;
114 read-only;
115
116 nvmem-layout {
117 compatible = "fixed-layout";
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 macaddr_art_0: macaddr@0 {
122 reg = <0x0 0x6>;
123 };
124
125 precal_art_5000: pre-calibration@5000 {
126 reg = <0x5000 0x2f20>;
127 };
128 };
129 };
130
131 partition@70000 {
132 label = "cfg_bak";
133 reg = <0x70000 0x20000>;
134 read-only;
135 };
136
137 partition@90000 {
138 label = "overlay";
139 reg = <0x90000 0x170000>;
140 read-only;
141 };
142
143 partition@200000 {
144 compatible = "denx,uimage";
145 label = "firmware";
146 reg = <0x200000 0xe00000>;
147 };
148 };
149 };
150 };
151
152 &mdio0 {
153 status = "okay";
154
155 phy0: ethernet-phy@0 {
156 reg = <0>;
157 phy-mode = "sgmii";
158
159 qca,ar8327-initvals = <
160 0x04 0x00000080 /* PORT0 PAD MODE CTRL */
161 0x08 0x01000000 /* PORT5 PAD MODE CTRL */
162 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
163 0x10 0x602613a0 /* POWER_ON_STRAP */
164 0x50 0xcf35cf35 /* LED_CTRL0 */
165 0x54 0xca35ca35 /* LED_CTRL1 */
166 0x58 0xc935c935 /* LED_CTRL2 */
167 0x5c 0x03ffff00 /* LED_CTRL3 */
168 0x7c 0x000000fe /* PORT0_STATUS */
169 0x94 0x000010c2 /* PORT6_STATUS */
170 0xe0 0xc74164de /* SGMII_CTRL */
171 >;
172 };
173 };
174
175 &eth0 {
176 status = "okay";
177
178 phy-mode = "sgmii";
179 phy-handle = <&phy0>;
180
181 nvmem-cells = <&macaddr_art_0>;
182 nvmem-cell-names = "mac-address";
183 };
184
185 &wmac {
186 status = "okay";
187
188 mtd-cal-data = <&art 0x1000>;
189 };
190
191 &pcie {
192 status = "okay";
193
194 wifi@0,0 {
195 compatible = "qcom,ath10k";
196 reg = <0x0000 0 0 0 0>;
197 nvmem-cells = <&precal_art_5000>;
198 nvmem-cell-names = "pre-calibration";
199 };
200 };