ath79: qca: convert to nvmem-layout
[openwrt/staging/jow.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 nvmem-layout {
106 compatible = "fixed-layout";
107 #address-cells = <1>;
108 #size-cells = <1>;
109
110 macaddr_art_0: macaddr@0 {
111 reg = <0x0 0x6>;
112 };
113
114 cal_art_1000: cal@1000 {
115 reg = <0x1000 0x440>;
116 };
117
118 cal_art_5000: cal@5000 {
119 reg = <0x5000 0x844>;
120 };
121 };
122 };
123 };
124 };
125 };
126
127 &nand {
128 status = "okay";
129
130 partitions {
131 compatible = "fixed-partitions";
132 #address-cells = <1>;
133 #size-cells = <1>;
134
135 partition@0 {
136 label = "current";
137 reg = <0x0 0x1000000>;
138 read-only;
139 };
140
141 partition@1000000 {
142 label = "kernel";
143 reg = <0x1000000 0x800000>;
144 };
145
146 ubi: partition@1800000 {
147 label = "ubi";
148 };
149 };
150 };
151
152 &pcie0 {
153 status = "okay";
154
155 wifi@0,0 {
156 compatible = "qcom,ath10k";
157 reg = <0 0 0 0 0>;
158
159 nvmem-cells = <&macaddr_art_0>, <&cal_art_5000>;
160 nvmem-cell-names = "mac-address", "calibration";
161 mac-address-increment = <4>;
162 };
163 };
164
165 &wmac {
166 status = "okay";
167
168 nvmem-cells = <&macaddr_art_0>, <&cal_art_1000>;
169 nvmem-cell-names = "mac-address", "calibration";
170 mac-address-increment = <3>;
171 };
172
173 &usb_phy0 {
174 status = "okay";
175 };
176
177 &usb0 {
178 status = "okay";
179 };
180
181 &mdio0 {
182 status = "okay";
183
184 phy0: ethernet-phy@0 {
185 reg = <0>;
186
187 qca,ar8327-initvals = <
188 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
189 0x50 0xcf37cf37 /* LED Control Register 0 */
190 0x54 0x00000000 /* LED Control Register 1 */
191 0x58 0x00000000 /* LED Control Register 2 */
192 0x5c 0x0030c300 /* LED Control Register 3 */
193 0x7c 0x0000007e /* PORT0_STATUS */
194 >;
195 };
196 };
197
198 &eth0 {
199 status = "okay";
200
201 nvmem-cells = <&macaddr_art_0>;
202 nvmem-cell-names = "mac-address";
203 mac-address-increment = <1>;
204 phy-handle = <&phy0>;
205 pll-data = <0xa6000000 0x00000101 0x00001616>;
206
207 gmac-config {
208 device = <&gmac>;
209 rgmii-enabled = <1>;
210 };
211 };