ath79: convert ath10k calibration data to NVMEM (binary MAC)
[openwrt/staging/stintel.git] / target / linux / ath79 / dts / qca9558_domywifi_dw33d.dts
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 compatible = "domywifi,dw33d", "qca,qca9558";
10 model = "DomyWifi DW33D";
11
12 aliases {
13 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-running = &led_system;
16 led-upgrade = &led_system;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_system: system {
23 label = "blue:system";
24 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
25 };
26
27 mmc {
28 label = "blue:mmc";
29 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
30 trigger-sources = <&hub_port0>;
31 linux,default-trigger = "usbport";
32 };
33
34 usb {
35 label = "blue:usb";
36 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
37 trigger-sources = <&hub_port1>;
38 linux,default-trigger = "usbport";
39 };
40
41 wlan2g {
42 label = "blue:wlan2g";
43 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
44 linux,default-trigger = "phy1tpt";
45 };
46
47 internet {
48 label = "blue:internet";
49 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 keys {
54 compatible = "gpio-keys";
55
56 reset {
57 label = "Reset button";
58 linux,code = <KEY_RESTART>;
59 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
60 debounce-interval = <60>;
61 };
62 };
63 };
64
65 &pcie0 {
66 status = "okay";
67
68 wifi@0,0 {
69 compatible = "qcom,ath10k";
70 reg = <0 0 0 0 0>;
71 nvmem-cells = <&cal_art_5000>, <&macaddr_art_12>;
72 nvmem-cell-names = "calibration", "mac-address";
73 };
74 };
75
76 &usb_phy0 {
77 status = "okay";
78 };
79
80 &usb0 {
81 status = "okay";
82 };
83
84 &usb_phy1 {
85 status = "okay";
86 };
87
88 &usb1 {
89 status = "okay";
90 };
91
92 &spi {
93 status = "okay";
94
95 flash@0 {
96 compatible = "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 = <0x0 0x40000>;
108 read-only;
109 };
110
111 partition@40000 {
112 label = "u-boot-env";
113 reg = <0x40000 0x10000>;
114 };
115
116 partition@50000 {
117 label = "oem-firmware";
118 reg = <0x50000 0xfa0000>;
119 };
120
121 art: partition@ff0000 {
122 label = "art";
123 reg = <0xff0000 0x10000>;
124 read-only;
125
126 nvmem-layout {
127 compatible = "fixed-layout";
128 #address-cells = <1>;
129 #size-cells = <1>;
130
131 macaddr_art_0: macaddr@0 {
132 reg = <0x0 0x6>;
133 };
134
135 macaddr_art_6: macaddr@6 {
136 reg = <0x6 0x6>;
137 };
138
139 macaddr_art_c: macaddr@c {
140 reg = <0xc 0x6>;
141 };
142
143 macaddr_art_12: macaddr@12 {
144 reg = <0x12 0x6>;
145 };
146
147 cal_art_5000: calibration@5000 {
148 reg = <0x5000 0x844>;
149 };
150 };
151 };
152 };
153 };
154 };
155
156 &nand {
157 status = "okay";
158
159 partitions {
160 compatible = "fixed-partitions";
161 #address-cells = <1>;
162 #size-cells = <1>;
163
164 partition@0 {
165 label = "kernel";
166 reg = <0x0 0x500000>;
167 };
168
169 partition@500000 {
170 label = "ubi";
171 reg = <0x500000 0x5b00000>;
172 };
173
174 partition@6000000 {
175 label = "oem-backup";
176 reg = <0x6000000 0x2000000>;
177 };
178 };
179 };
180
181 &mdio0 {
182 status = "okay";
183
184 phy0: ethernet-phy@0 {
185 reg = <0>;
186
187 qca,ar8327-initvals = <
188 0x04 0x87600000 /* PORT0 PAD MODE CTRL */
189 0x0c 0x00080080 /* PORT6 PAD MODE CTRL */
190 0x7c 0x0000007e /* PORT0_STATUS */
191 0x94 0x0000007e /* PORT6 STATUS */
192 >;
193 };
194 };
195
196 &eth0 {
197 status = "okay";
198
199 nvmem-cells = <&macaddr_art_0>;
200 nvmem-cell-names = "mac-address";
201 pll-data = <0x56000000 0x00000101 0x00001616>;
202 phy-handle = <&phy0>;
203 };
204
205 &eth1 {
206 status = "okay";
207
208 nvmem-cells = <&macaddr_art_6>;
209 nvmem-cell-names = "mac-address";
210 pll-data = <0x03000101 0x00000101 0x00001616>;
211 fixed-link {
212 speed = <1000>;
213 full-duplex;
214 };
215 };
216
217 &wmac {
218 status = "okay";
219
220 mtd-cal-data = <&art 0x1000>;
221 nvmem-cells = <&macaddr_art_c>;
222 nvmem-cell-names = "mac-address";
223 };