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