ath79: qca: convert to nvmem-layout
[openwrt/staging/jow.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
118 &spi {
119 status = "okay";
120
121 flash@0 {
122 compatible = "jedec,spi-nor";
123 reg = <0>;
124 spi-max-frequency = <25000000>;
125
126 /* partitions are passed via bootloader */
127 partitions {
128 compatible = "fixed-partitions";
129 #address-cells = <1>;
130 #size-cells = <1>;
131
132 partition@0 {
133 label = "u-boot";
134 reg = <0x000000 0x040000>;
135 read-only;
136 };
137
138 partition@40000 {
139 label = "u-boot-env";
140 reg = <0x040000 0x010000>;
141 };
142
143 partition@50000 {
144 label = "custom";
145 reg = <0x050000 0x060000>;
146 read-only;
147 };
148
149 partition@b0000 {
150 label = "inactive";
151 reg = <0x0b0000 0x7a0000>;
152 };
153
154 partition@850000 {
155 label = "inactive2";
156 reg = <0x850000 0x7a0000>;
157 };
158
159 art: partition@ff0000 {
160 label = "ART";
161 reg = <0xff0000 0x010000>;
162 read-only;
163
164 nvmem-layout {
165 compatible = "fixed-layout";
166 #address-cells = <1>;
167 #size-cells = <1>;
168
169 macaddr_art_0: macaddr@0 {
170 reg = <0x0 0x6>;
171 };
172
173 macaddr_art_6: macaddr@6 {
174 reg = <0x6 0x6>;
175 };
176 };
177 };
178 };
179 };
180 };
181
182 &mdio0 {
183 status = "okay";
184
185 phy4: ethernet-phy@4 {
186 reg = <4>;
187 eee-broken-100tx;
188 eee-broken-1000t;
189 };
190 };
191
192 &mdio1 {
193 status = "okay";
194
195 phy1: ethernet-phy@1 {
196 reg = <1>;
197 eee-broken-100tx;
198 eee-broken-1000t;
199 at803x-override-sgmii-link-check;
200 };
201 };
202
203 &eth0 {
204 status = "okay";
205
206 pll-data = <0x82000101 0x80000101 0x80001313>;
207
208 nvmem-cells = <&macaddr_art_0>;
209 nvmem-cell-names = "mac-address";
210
211 phy-mode = "rgmii-id";
212 phy-handle = <&phy4>;
213
214 gmac-config {
215 device = <&gmac>;
216 rgmii-enabled = <1>;
217 rxd-delay = <2>;
218 rxdv-delay = <2>;
219 txd-delay = <0>;
220 txen-delay = <0>;
221 };
222 };
223
224 &eth1 {
225 status = "okay";
226
227 pll-data = <0x03000101 0x80000101 0x80001313>;
228
229 nvmem-cells = <&macaddr_art_6>;
230 nvmem-cell-names = "mac-address";
231
232 qca955x-sgmii-fixup;
233
234 phy-handle = <&phy1>;
235 };
236
237 &wmac {
238 status = "okay";
239
240 mtd-cal-data = <&art 0x1000>;
241 nvmem-cells = <&macaddr_art_0>;
242 nvmem-cell-names = "mac-address";
243 mac-address-increment = <2>;
244 };