ath79: convert ath10k calibration data to NVMEM (binary MAC)
[openwrt/staging/svanheule.git] / target / linux / ath79 / dts / qca9558_openmesh_a60.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 chosen {
10 /delete-property/ bootargs;
11 };
12
13 aliases {
14 serial0 = &uart;
15 led-boot = &led_status_green;
16 led-failsafe = &led_status_green;
17 led-running = &led_status_green;
18 led-upgrade = &led_status_green;
19 label-mac-device = &eth0;
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 linux,code = <KEY_RESTART>;
28 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 status_blue {
36 label = "blue:status";
37 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
38 };
39
40 status_red {
41 label = "red:status";
42 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
43 };
44
45 led_status_green: status_green {
46 label = "green:status";
47 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
48 };
49 };
50
51 watchdog {
52 compatible = "linux,wdt-gpio";
53 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
54 hw_algo = "toggle";
55 /* hw_margin_ms is actually 300s but driver limits it to 60s */
56 hw_margin_ms = <60000>;
57 always-running;
58 };
59 };
60
61 &usb_phy1 {
62 status = "okay";
63 };
64
65 &usb1 {
66 status = "okay";
67 };
68
69 &spi {
70 status = "okay";
71
72 flash@0 {
73 compatible = "jedec,spi-nor";
74 reg = <0>;
75 spi-max-frequency = <40000000>;
76
77 /* partitions are passed via bootloader */
78 partitions {
79 compatible = "fixed-partitions";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 partition@0 {
84 label = "u-boot";
85 reg = <0x000000 0x040000>;
86 read-only;
87 };
88
89 partition@40000 {
90 label = "u-boot-env";
91 reg = <0x040000 0x010000>;
92 };
93
94 partition@50000 {
95 label = "custom";
96 reg = <0x050000 0x060000>;
97 read-only;
98 };
99
100 partition@b0000 {
101 label = "inactive";
102 reg = <0x0b0000 0x7a0000>;
103 };
104
105 partition@850000 {
106 label = "inactive2";
107 reg = <0x850000 0x7a0000>;
108 };
109
110 art: partition@ff0000 {
111 label = "ART";
112 reg = <0xff0000 0x010000>;
113 read-only;
114
115 nvmem-layout {
116 compatible = "fixed-layout";
117 #address-cells = <1>;
118 #size-cells = <1>;
119
120 macaddr_art_0: macaddr@0 {
121 compatible = "mac-base";
122 reg = <0x0 0x6>;
123 #nvmem-cell-cells = <1>;
124 };
125
126 macaddr_art_6: macaddr@6 {
127 reg = <0x6 0x6>;
128 };
129
130 cal_art_5000: calibration@5000 {
131 reg = <0x5000 0x844>;
132 };
133 };
134 };
135 };
136 };
137 };
138
139 &mdio0 {
140 status = "okay";
141
142 phy1: ethernet-phy@1 {
143 reg = <1>;
144 eee-broken-100tx;
145 eee-broken-1000t;
146 };
147
148 phy2: ethernet-phy@2 {
149 reg = <2>;
150 eee-broken-100tx;
151 eee-broken-1000t;
152 at803x-override-sgmii-link-check;
153 };
154 };
155
156 &eth0 {
157 status = "okay";
158
159 pll-data = <0x82000101 0x80000101 0x80001313>;
160
161 nvmem-cells = <&macaddr_art_0 0>;
162 nvmem-cell-names = "mac-address";
163
164 phy-mode = "rgmii-id";
165 phy-handle = <&phy1>;
166
167 gmac-config {
168 device = <&gmac>;
169 rgmii-enabled = <1>;
170 rxd-delay = <3>;
171 rxdv-delay = <3>;
172 txd-delay = <0>;
173 txen-delay = <0>;
174 };
175 };
176
177 &eth1 {
178 status = "okay";
179
180 pll-data = <0x03000101 0x80000101 0x80001313>;
181
182 nvmem-cells = <&macaddr_art_6>;
183 nvmem-cell-names = "mac-address";
184
185 qca955x-sgmii-fixup;
186
187 phy-handle = <&phy2>;
188 };
189
190 &wmac {
191 status = "okay";
192
193 mtd-cal-data = <&art 0x1000>;
194 nvmem-cells = <&macaddr_art_0 2>;
195 nvmem-cell-names = "mac-address";
196 };
197
198 &pcie0 {
199 status = "okay";
200
201 wifi@0,0 {
202 compatible = "qcom,ath10k";
203 reg = <0x0000 0 0 0 0>;
204 nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 16>;
205 nvmem-cell-names = "calibration", "mac-address";
206 };
207 };