9189c6e55161c739ec55aa25d760ee3efeb10f61
[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 color = <LED_COLOR_ID_RED>;
70 };
71
72 green: green {
73 color = <LED_COLOR_ID_GREEN>;
74 };
75
76 blue {
77 color = <LED_COLOR_ID_BLUE>;
78 };
79 #endif
80 };
81
82 button {
83 compatible = "gpio-keys";
84
85 reset {
86 label = "Reset";
87 linux,code = <KEY_RESTART>;
88 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
89 debounce-interval = <60>;
90 };
91
92 };
93 };
94
95 &nand {
96 status = "okay";
97
98 nand-ecc-mode = "soft";
99 nand-ecc-algo = "bch";
100 nand-ecc-strength = <4>;
101 nand-ecc-step-size = <512>;
102 nand-is-boot-medium;
103
104 partitions {
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 partition@0 {
110 label = "nandloader";
111 reg = <0x0 0x80000>;
112 read-only;
113 };
114
115 partition@80000 {
116 label = "kernel";
117 reg = <0x80000 0x800000>;
118 };
119
120 partition@880000 {
121 label = "recovery";
122 reg = <0x880000 0x800000>;
123 };
124
125 partition@1080000 {
126 label = "ubi";
127 reg = <0x1080000 0x6f00000>;
128 };
129
130 partition@7fe0000 {
131 /*
132 * This is not always present. And if
133 * it is, then Meraki (or contractor)
134 * used a different ecc method than
135 * the one we need for the UBI partition.
136 * Reading this causes various reading
137 * errors.
138 *
139 * As a result: Please don't convert
140 * this to nvmem-cells. Instead there's
141 * a ubi-volume "caldata" that has the
142 * necessary data.
143 */
144
145 label = "odm-caldata";
146 reg = <0x7fe0000 0x20000>;
147 read-only;
148 };
149 };
150 };
151
152 &pcie0 {
153 status = "okay";
154
155 wifi@0,0 {
156 compatible = "pci168c,0033";
157 reg = <0x0000 0 0 0 0>;
158 qca,no-eeprom;
159 };
160 };
161
162 &pcie1 {
163 status = "okay";
164
165 wifi@0,0 {
166 compatible = "pci168c,0033";
167 reg = <0x0000 0 0 0 0>;
168 qca,no-eeprom;
169 };
170 };
171
172 &uart {
173 status = "okay";
174 };
175
176 &mdio0 {
177 status = "okay";
178
179 phy: ethernet-phy@3 {
180 reg = <3>;
181 };
182 };
183
184 &eth0 {
185 status = "okay";
186 pll-data = <0xa6000000 0xa0000101 0x80001313>;
187 phy-handle = <&phy>;
188
189 gmac-config {
190 device = <&gmac>;
191 rgmii-enabled = <1>;
192 rxd-delay = <3>;
193 rxdv-delay = <3>;
194 };
195 };
196
197 &wmac {
198 status = "okay";
199 qca,no-eeprom;
200 };