ath79: convert ath10k calibration data to NVMEM (binary MAC)
[openwrt/staging/svanheule.git] / target / linux / ath79 / dts / qca9558_openmesh_om5p-ac-v2.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 = "openmesh,om5p-ac-v2", "qca,qca9558";
10 model = "OpenMesh OM5P-AC v2";
11
12 chosen {
13 /delete-property/ bootargs;
14 };
15
16 aliases {
17 serial0 = &uart;
18 led-boot = &led_power_blue;
19 led-failsafe = &led_power_blue;
20 led-running = &led_power_blue;
21 led-upgrade = &led_power_blue;
22 label-mac-device = &eth0;
23 };
24
25 leds {
26 compatible = "gpio-leds";
27
28 wifi_green {
29 label = "green:wifi";
30 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
31 linux,default-trigger = "phy0tpt";
32 };
33
34 led_power_blue: power_blue {
35 label = "blue:power";
36 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
37 default-state = "on";
38 };
39
40 wifi_yellow {
41 label = "yellow:wifi";
42 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
43 };
44
45 wifi_red {
46 label = "red:wifi";
47 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
48 };
49 };
50
51 keys {
52 compatible = "gpio-keys";
53
54 reset {
55 label = "reset";
56 linux,code = <KEY_RESTART>;
57 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
58 };
59 };
60
61 i2c {
62 compatible = "i2c-gpio";
63 gpios = <&gpio 19 GPIO_ACTIVE_HIGH /* sda */
64 &gpio 18 GPIO_ACTIVE_HIGH /* scl */
65 >;
66 #address-cells = <1>;
67 #size-cells = <0>;
68
69 i2c-gpio,scl-open-drain;
70 i2c-gpio,sda-open-drain;
71
72 tmp423a@4e {
73 compatible = "ti,tmp423";
74 reg = <0x4e>;
75 };
76 };
77
78 watchdog {
79 compatible = "linux,wdt-gpio";
80 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
81 hw_algo = "toggle";
82 /* hw_margin_ms is actually 300s but driver limits it to 60s */
83 hw_margin_ms = <60000>;
84 always-running;
85 };
86
87 gpio-export {
88 compatible = "gpio-export";
89 #size-cells = <0>;
90
91 gpio_pa_dcdc {
92 gpio-export,name = "om5pac:pa_dcdc";
93 gpio-export,output = <1>;
94 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
95 };
96 gpio_pa_high {
97 gpio-export,name = "om5pac:pa_high";
98 gpio-export,output = <1>;
99 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
100 };
101 };
102 };
103
104 &pinmux {
105 pinmux_pa_dcdc_pins {
106 pinctrl-single,bits = <0x0 0x0 0xff0000>;
107 };
108
109 pinmux_pa_high_pins {
110 pinctrl-single,bits = <0x10 0x0 0xff>;
111 };
112 };
113
114 &pcie0 {
115 status = "okay";
116
117 wifi@0,0 {
118 compatible = "qcom,ath10k";
119 reg = <0x0000 0 0 0 0>;
120 nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 16>;
121 nvmem-cell-names = "calibration", "mac-address";
122 };
123 };
124
125 &spi {
126 status = "okay";
127
128 flash@0 {
129 compatible = "jedec,spi-nor";
130 reg = <0>;
131 spi-max-frequency = <25000000>;
132
133 /* partitions are passed via bootloader */
134 partitions {
135 compatible = "fixed-partitions";
136 #address-cells = <1>;
137 #size-cells = <1>;
138
139 partition@0 {
140 label = "u-boot";
141 reg = <0x000000 0x040000>;
142 read-only;
143 };
144
145 partition@40000 {
146 label = "u-boot-env";
147 reg = <0x040000 0x010000>;
148 };
149
150 partition@50000 {
151 label = "custom";
152 reg = <0x050000 0x060000>;
153 read-only;
154 };
155
156 partition@b0000 {
157 label = "inactive";
158 reg = <0x0b0000 0x7a0000>;
159 };
160
161 partition@850000 {
162 label = "inactive2";
163 reg = <0x850000 0x7a0000>;
164 };
165
166 art: partition@ff0000 {
167 label = "ART";
168 reg = <0xff0000 0x010000>;
169 read-only;
170
171 nvmem-layout {
172 compatible = "fixed-layout";
173 #address-cells = <1>;
174 #size-cells = <1>;
175
176 macaddr_art_0: macaddr@0 {
177 compatible = "mac-base";
178 reg = <0x0 0x6>;
179 #nvmem-cell-cells = <1>;
180 };
181
182 macaddr_art_6: macaddr@6 {
183 reg = <0x6 0x6>;
184 };
185
186 cal_art_5000: calibration@5000 {
187 reg = <0x5000 0x844>;
188 };
189 };
190 };
191 };
192 };
193 };
194
195 &mdio0 {
196 status = "okay";
197
198 phy4: ethernet-phy@4 {
199 reg = <4>;
200 eee-broken-100tx;
201 eee-broken-1000t;
202 };
203 };
204
205 &mdio1 {
206 status = "okay";
207
208 phy1: ethernet-phy@1 {
209 reg = <1>;
210 eee-broken-100tx;
211 eee-broken-1000t;
212 at803x-override-sgmii-link-check;
213 };
214 };
215
216 &eth0 {
217 status = "okay";
218
219 pll-data = <0x82000101 0x80000101 0x80001313>;
220
221 nvmem-cells = <&macaddr_art_0 0>;
222 nvmem-cell-names = "mac-address";
223
224 phy-mode = "rgmii-id";
225 phy-handle = <&phy4>;
226
227 gmac-config {
228 device = <&gmac>;
229 rgmii-enabled = <1>;
230 rxd-delay = <2>;
231 rxdv-delay = <2>;
232 txd-delay = <0>;
233 txen-delay = <0>;
234 };
235 };
236
237 &eth1 {
238 status = "okay";
239
240 pll-data = <0x03000101 0x80000101 0x80001313>;
241
242 nvmem-cells = <&macaddr_art_6>;
243 nvmem-cell-names = "mac-address";
244
245 qca955x-sgmii-fixup;
246
247 phy-handle = <&phy1>;
248 };
249
250 &wmac {
251 status = "okay";
252
253 mtd-cal-data = <&art 0x1000>;
254 nvmem-cells = <&macaddr_art_0 2>;
255 nvmem-cell-names = "mac-address";
256 };