498499c14660651caed2b1dfac0f3a4144c5c5a1
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9557_dongwon_dw02-412h.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 led-boot = &led_wan;
11 led-failsafe = &led_wan;
12 led-upgrade = &led_wan;
13 };
14
15 keys {
16 compatible = "gpio-keys";
17
18 wps {
19 label = "WPS button";
20 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
21 linux,code = <KEY_WPS_BUTTON>;
22 };
23
24 reset {
25 label = "Reset button";
26 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 };
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 led_wan: wan {
35 label = "green:wan";
36 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
37 };
38
39 wlan {
40 label = "green:wlan";
41 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
42 };
43 };
44 };
45
46 &spi {
47 status = "okay";
48
49 flash@0 {
50 compatible = "jedec,spi-nor";
51 reg = <0>;
52 spi-max-frequency = <50000000>;
53
54 partitions {
55 compatible = "fixed-partitions";
56 #address-cells = <1>;
57 #size-cells = <1>;
58
59 partition@0 {
60 label = "u-boot";
61 reg = <0x000000 0x040000>;
62 read-only;
63 };
64
65 partition@40000 {
66 label = "u-boot-env";
67 reg = <0x040000 0x010000>;
68 };
69
70 partition@50000 {
71 label = "log";
72 reg = <0x050000 0x010000>;
73 read-only;
74 };
75
76 partition@60000 {
77 label = "recoverk";
78 reg = <0x060000 0x0e0000>;
79 read-only;
80 };
81
82 partition@140000 {
83 label = "recoverr";
84 reg = <0x140000 0x090000>;
85 read-only;
86 };
87
88 partition@1d0000 {
89 label = "nvram";
90 reg = <0x1d0000 0x010000>;
91 read-only;
92 };
93
94 partition@1e0000 {
95 label = "nvbackup";
96 reg = <0x1e0000 0x010000>;
97 read-only;
98 };
99
100 partition@1f0000 {
101 label = "art";
102 reg = <0x1f0000 0x010000>;
103 read-only;
104
105 compatible = "nvmem-cells";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 macaddr_art_0: macaddr@0 {
110 reg = <0x0 0x6>;
111 };
112
113 cal_art_1000: cal@1000 {
114 reg = <0x1000 0x440>;
115 };
116
117 cal_art_5000: cal@5000 {
118 reg = <0x5000 0x844>;
119 };
120 };
121 };
122 };
123 };
124
125 &nand {
126 status = "okay";
127
128 partitions {
129 compatible = "fixed-partitions";
130 #address-cells = <1>;
131 #size-cells = <1>;
132
133 partition@0 {
134 label = "current";
135 reg = <0x0 0x1000000>;
136 read-only;
137 };
138
139 partition@1000000 {
140 label = "kernel";
141 reg = <0x1000000 0x800000>;
142 };
143
144 ubi: partition@1800000 {
145 label = "ubi";
146 };
147 };
148 };
149
150 &pcie0 {
151 status = "okay";
152
153 wifi@0,0 {
154 compatible = "qcom,ath10k";
155 reg = <0 0 0 0 0>;
156
157 nvmem-cells = <&macaddr_art_0>, <&cal_art_5000>;
158 nvmem-cell-names = "mac-address", "calibration";
159 mac-address-increment = <4>;
160 };
161 };
162
163 &wmac {
164 status = "okay";
165
166 nvmem-cells = <&macaddr_art_0>, <&cal_art_1000>;
167 nvmem-cell-names = "mac-address", "calibration";
168 mac-address-increment = <3>;
169 };
170
171 &usb_phy0 {
172 status = "okay";
173 };
174
175 &usb0 {
176 status = "okay";
177 };
178
179 &mdio0 {
180 status = "okay";
181
182 phy0: ethernet-phy@0 {
183 reg = <0>;
184
185 qca,ar8327-initvals = <
186 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
187 0x50 0xcf37cf37 /* LED Control Register 0 */
188 0x54 0x00000000 /* LED Control Register 1 */
189 0x58 0x00000000 /* LED Control Register 2 */
190 0x5c 0x0030c300 /* LED Control Register 3 */
191 0x7c 0x0000007e /* PORT0_STATUS */
192 >;
193 };
194 };
195
196 &eth0 {
197 status = "okay";
198
199 nvmem-cells = <&macaddr_art_0>;
200 nvmem-cell-names = "mac-address";
201 mac-address-increment = <1>;
202 phy-handle = <&phy0>;
203 pll-data = <0xa6000000 0x00000101 0x00001616>;
204
205 gmac-config {
206 device = <&gmac>;
207 rgmii-enabled = <1>;
208 };
209 };