ath79: convert ath10k calibration data to NVMEM (binary MAC)
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_openmesh_mr.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_power_blue;
16 led-failsafe = &led_power_blue;
17 led-running = &led_power_blue;
18 led-upgrade = &led_power_blue;
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 lan_blue {
36 label = "blue:lan";
37 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
38 };
39
40 led_wifi2g: wifi2g {
41 label = "blue:wifi2g";
42 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
43 };
44
45 status_green {
46 label = "green:status";
47 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
48 };
49
50 status_red {
51 label = "red:status";
52 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
53 };
54
55 led_power_blue: power_blue {
56 label = "blue:power";
57 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
58 default-state = "on";
59 };
60
61 led_wifi5g: wifi5g {
62 label = "blue:wifi5g";
63 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
64 };
65 };
66
67 watchdog {
68 compatible = "linux,wdt-gpio";
69 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
70 hw_algo = "toggle";
71 /* hw_margin_ms is actually 300s but driver limits it to 60s */
72 hw_margin_ms = <60000>;
73 always-running;
74 };
75 };
76
77 &spi {
78 status = "okay";
79
80 flash@0 {
81 compatible = "jedec,spi-nor";
82 reg = <0>;
83 spi-max-frequency = <40000000>;
84
85 /* partitions are passed via bootloader */
86 partitions {
87 compatible = "fixed-partitions";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 partition@0 {
92 label = "u-boot";
93 reg = <0x000000 0x040000>;
94 read-only;
95 };
96
97 partition@40000 {
98 label = "u-boot-env";
99 reg = <0x040000 0x010000>;
100 };
101
102 partition@50000 {
103 label = "custom";
104 reg = <0x050000 0x060000>;
105 read-only;
106 };
107
108 partition@b0000 {
109 label = "inactive";
110 reg = <0x0b0000 0x7a0000>;
111 };
112
113 partition@850000 {
114 label = "inactive2";
115 reg = <0x850000 0x7a0000>;
116 };
117
118 art: partition@ff0000 {
119 label = "ART";
120 reg = <0xff0000 0x010000>;
121 read-only;
122
123 nvmem-layout {
124 compatible = "fixed-layout";
125 #address-cells = <1>;
126 #size-cells = <1>;
127
128 macaddr_art_0: macaddr@0 {
129 compatible = "mac-base";
130 reg = <0x0 0x6>;
131 #nvmem-cell-cells = <1>;
132 };
133
134 cal_art_5000: calibration@5000 {
135 reg = <0x5000 0x844>;
136 };
137 };
138 };
139 };
140 };
141 };
142
143 &mdio0 {
144 status = "okay";
145
146 phy5: ethernet-phy@5 {
147 reg = <5>;
148 eee-broken-100tx;
149 eee-broken-1000t;
150 };
151 };
152
153 &eth0 {
154 status = "okay";
155
156 pll-data = <0x82000000 0x80000101 0x80001313>;
157
158 nvmem-cells = <&macaddr_art_0 0>;
159 nvmem-cell-names = "mac-address";
160
161 phy-mode = "rgmii-id";
162 phy-handle = <&phy5>;
163
164 gmac-config {
165 device = <&gmac>;
166 rgmii-enabled = <1>;
167 };
168 };
169
170 &wmac {
171 status = "okay";
172
173 mtd-cal-data = <&art 0x1000>;
174 nvmem-cells = <&macaddr_art_0 1>;
175 nvmem-cell-names = "mac-address";
176 };
177
178 &pcie0 {
179 status = "okay";
180
181 wifi@0,0 {
182 compatible = "qcom,ath10k";
183 reg = <0x0000 0 0 0 0>;
184 nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 16>;
185 nvmem-cell-names = "calibration", "mac-address";
186 };
187 };