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