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