ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / qca9557_meraki_mr18.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 = "meraki,mr18", "qca,qca9558";
11 model = "Meraki MR18";
12
13 aliases {
14 label-mac-device = &eth0;
15 led-boot = &white;
16 led-failsafe = &orange;
17 led-running = &green;
18 led-upgrade = &white;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 white: white {
25 function = LED_FUNCTION_POWER;
26 color = <LED_COLOR_ID_WHITE>;
27 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
28 };
29
30 orange: orange {
31 function = LED_FUNCTION_POWER;
32 color = <LED_COLOR_ID_ORANGE>;
33 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
34 panic-indicator;
35 };
36 };
37
38 uleds {
39 compatible = "virtual-leds";
40 #if 0
41 /*
42 * RGB leds are not supported by uleds driver.
43 * but this is what the definitions for a as
44 * of yet unwritten leds_nu801 would look like.
45 */
46
47 rgbled-0 {
48 function = LED_FUNCTION_POWER;
49 color = <LED_COLOR_ID_RGB>;
50 #address-cells = <1>;
51 #size-cells = <0>;
52
53 led@0 {
54 reg = <0>;
55 color = <LED_COLOR_ID_RED>;
56 };
57
58 green: led@1 {
59 reg = <1>;
60 color = <LED_COLOR_ID_GREEN>;
61 };
62
63 led@2 {
64 reg = <2>;
65 color = <LED_COLOR_ID_BLUE>;
66 };
67 };
68
69 #else
70 red {
71 color = <LED_COLOR_ID_RED>;
72 };
73
74 green: green {
75 color = <LED_COLOR_ID_GREEN>;
76 };
77
78 blue {
79 color = <LED_COLOR_ID_BLUE>;
80 };
81 #endif
82 };
83
84 button {
85 compatible = "gpio-keys";
86
87 reset {
88 label = "Reset";
89 linux,code = <KEY_RESTART>;
90 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
91 debounce-interval = <60>;
92 };
93
94 };
95 };
96
97 &nand {
98 status = "okay";
99
100 nand-ecc-mode = "soft";
101 nand-ecc-algo = "bch";
102 nand-ecc-strength = <4>;
103 nand-ecc-step-size = <512>;
104 nand-is-boot-medium;
105
106 partitions {
107 compatible = "fixed-partitions";
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 partition@0 {
112 label = "nandloader";
113 reg = <0x0 0x80000>;
114 read-only;
115 };
116
117 partition@80000 {
118 label = "kernel";
119 reg = <0x80000 0x800000>;
120 };
121
122 partition@880000 {
123 label = "recovery";
124 reg = <0x880000 0x800000>;
125 };
126
127 partition@1080000 {
128 label = "ubi";
129 reg = <0x1080000 0x6f00000>;
130 };
131
132 partition@7fe0000 {
133 /*
134 * This is not always present. And if
135 * it is, then Meraki (or contractor)
136 * used a different ecc method than
137 * the one we need for the UBI partition.
138 * Reading this causes various reading
139 * errors.
140 *
141 * As a result: Please don't convert
142 * this to nvmem-cells. Instead there's
143 * a ubi-volume "caldata" that has the
144 * necessary data.
145 */
146
147 label = "odm-caldata";
148 reg = <0x7fe0000 0x20000>;
149 read-only;
150 };
151 };
152 };
153
154 &pcie0 {
155 status = "okay";
156
157 wifi@0,0 {
158 compatible = "pci168c,0033";
159 reg = <0x0000 0 0 0 0>;
160 qca,no-eeprom;
161 };
162 };
163
164 &pcie1 {
165 status = "okay";
166
167 wifi@0,0 {
168 compatible = "pci168c,0033";
169 reg = <0x0000 0 0 0 0>;
170 qca,no-eeprom;
171 };
172 };
173
174 &uart {
175 status = "okay";
176 };
177
178 &mdio0 {
179 status = "okay";
180
181 phy: ethernet-phy@3 {
182 reg = <3>;
183 };
184 };
185
186 &eth0 {
187 status = "okay";
188 pll-data = <0xa6000000 0xa0000101 0x80001313>;
189 phy-handle = <&phy>;
190
191 gmac-config {
192 device = <&gmac>;
193 rgmii-enabled = <1>;
194 rxd-delay = <3>;
195 rxdv-delay = <3>;
196 };
197 };
198
199 &wmac {
200 status = "okay";
201 qca,no-eeprom;
202 };