ath79: convert ath10k calibration data to NVMEM (binary MAC)
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_openmesh_om5p-ac-v1.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-v1", "qca,qca9558";
10 model = "OpenMesh OM5P-AC v1";
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 led_power_blue: power_blue {
29 label = "blue:power";
30 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
31 default-state = "on";
32 };
33
34 wan_blue {
35 label = "blue:wan";
36 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
37 };
38
39 lan_blue {
40 label = "blue:lan";
41 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
42 };
43
44 wifi_green {
45 label = "green:wifi";
46 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
47 linux,default-trigger = "phy0tpt";
48 };
49
50 wifi_yellow {
51 label = "yellow:wifi";
52 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
53 };
54
55 wifi_red {
56 label = "red:wifi";
57 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
58 };
59 };
60
61 i2c {
62 compatible = "i2c-gpio";
63 gpios = <&gpio 11 GPIO_ACTIVE_HIGH /* sda */
64 &gpio 12 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@4c {
73 compatible = "ti,tmp423";
74 reg = <0x4c>;
75 };
76 };
77
78 watchdog {
79 compatible = "linux,wdt-gpio";
80 gpios = <&gpio 17 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
88 &spi {
89 status = "okay";
90
91 flash@0 {
92 compatible = "jedec,spi-nor";
93 reg = <0>;
94 spi-max-frequency = <40000000>;
95
96 /* partitions are passed via bootloader */
97 partitions {
98 compatible = "fixed-partitions";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 partition@0 {
103 label = "u-boot";
104 reg = <0x000000 0x040000>;
105 read-only;
106 };
107
108 partition@40000 {
109 label = "u-boot-env";
110 reg = <0x040000 0x010000>;
111 };
112
113 partition@50000 {
114 label = "custom";
115 reg = <0x050000 0x060000>;
116 read-only;
117 };
118
119 partition@b0000 {
120 label = "inactive";
121 reg = <0x0b0000 0x7a0000>;
122 };
123
124 partition@850000 {
125 label = "inactive2";
126 reg = <0x850000 0x7a0000>;
127 };
128
129 art: partition@ff0000 {
130 label = "ART";
131 reg = <0xff0000 0x010000>;
132 read-only;
133
134 nvmem-layout {
135 compatible = "fixed-layout";
136 #address-cells = <1>;
137 #size-cells = <1>;
138
139 macaddr_art_0: macaddr@0 {
140 compatible = "mac-base";
141 reg = <0x0 0x6>;
142 #nvmem-cell-cells = <1>;
143 };
144
145 macaddr_art_6: macaddr@6 {
146 reg = <0x6 0x6>;
147 };
148
149 cal_art_5000: calibration@5000 {
150 reg = <0x5000 0x844>;
151 };
152 };
153 };
154 };
155 };
156 };
157
158 &mdio0 {
159 status = "okay";
160
161 phy1: ethernet-phy@1 {
162 reg = <1>;
163 eee-broken-100tx;
164 eee-broken-1000t;
165 };
166
167 phy2: ethernet-phy@2 {
168 reg = <2>;
169 eee-broken-100tx;
170 eee-broken-1000t;
171 at803x-override-sgmii-link-check;
172 };
173 };
174
175 &eth0 {
176 status = "okay";
177
178 pll-data = <0x82000101 0x80000101 0x80001313>;
179
180 nvmem-cells = <&macaddr_art_0 0>;
181 nvmem-cell-names = "mac-address";
182
183 phy-mode = "rgmii-id";
184 phy-handle = <&phy1>;
185
186 gmac-config {
187 device = <&gmac>;
188 rgmii-enabled = <1>;
189 rxd-delay = <3>;
190 rxdv-delay = <3>;
191 txd-delay = <0>;
192 txen-delay = <0>;
193 };
194 };
195
196 &eth1 {
197 status = "okay";
198
199 pll-data = <0x03000101 0x80000101 0x80001313>;
200
201 nvmem-cells = <&macaddr_art_6>;
202 nvmem-cell-names = "mac-address";
203
204 qca955x-sgmii-fixup;
205
206 phy-handle = <&phy2>;
207 };
208
209 &wmac {
210 status = "okay";
211
212 mtd-cal-data = <&art 0x1000>;
213 nvmem-cells = <&macaddr_art_0 2>;
214 nvmem-cell-names = "mac-address";
215 };
216
217 &pcie1 {
218 status = "okay";
219
220 wifi@0,0 {
221 compatible = "qcom,ath10k";
222 reg = <0x0000 0 0 0 0>;
223 nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 16>;
224 nvmem-cell-names = "calibration", "mac-address";
225 };
226 };