ath79: add Cisco Meraki MR18
[openwrt/staging/chunkeey.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 = "mr18:white:power";
26 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
27 };
28
29 orange: orange {
30 label = "mr18:orange:power";
31 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
32 panic-indicator;
33 };
34 };
35
36 uleds {
37 compatible = "virtual-leds";
38
39 #if 0
40 /* not supported by uleds driver */
41 rgbled-0 {
42 function = LED_FUNCTION_POWER;
43 color = <LED_COLOR_ID_RGB>;
44 #address-cells = <1>;
45 #size-cells = <0>;
46
47 led@0 {
48 reg = <0>;
49 color = <LED_COLOR_ID_RED>;
50 };
51
52 green: led@1 {
53 reg = <1>;
54 color = <LED_COLOR_ID_GREEN>;
55 };
56
57 led@2 {
58 reg = <2>;
59 color = <LED_COLOR_ID_BLUE>;
60 };
61 };
62 #else
63 green: green {
64 label = "green:tricolor";
65 color = <LED_COLOR_ID_GREEN>;
66 };
67
68 blue {
69 color = <LED_COLOR_ID_BLUE>;
70 label = "mr18:blue:tricolor";
71 };
72
73 red {
74 label = "mr18:red:tricolor";
75 color = <LED_COLOR_ID_RED>;
76 };
77 #endif
78 };
79
80 button {
81 compatible = "gpio-keys";
82
83 reset {
84 label = "Reset";
85 linux,code = <KEY_RESTART>;
86 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
87 debounce-interval = <60>;
88 };
89
90 };
91 };
92
93 &nand {
94 status = "okay";
95
96 nand-ecc-mode = "soft";
97 nand-ecc-algo = "bch";
98 nand-ecc-strength = <4>;
99 nand-ecc-step-size = <512>;
100 nand-is-boot-medium;
101
102 partitions {
103 compatible = "fixed-partitions";
104 #address-cells = <1>;
105 #size-cells = <1>;
106
107 partition@0 {
108 label = "nandloader";
109 reg = <0x0 0x80000>;
110 read-only;
111 };
112
113 partition@80000 {
114 label = "kernel";
115 reg = <0x80000 0x800000>;
116 };
117
118 partition@880000 {
119 label = "recovery";
120 reg = <0x880000 0x800000>;
121 };
122
123 partition@1080000 {
124 label = "ubi";
125 reg = <0x1080000 0x6f00000>;
126 };
127
128 partition@7fe0000 {
129 label = "odm-caldata";
130 reg = <0x7fe0000 0x20000>;
131 read-only;
132 };
133 };
134 };
135
136 &pcie0 {
137 status = "okay";
138
139 wifi@0,0 {
140 compatible = "pci168c,0033";
141 reg = <0x0000 0 0 0 0>;
142 qca,no-eeprom;
143 };
144 };
145
146 &pcie1 {
147 status = "okay";
148
149 wifi@0,0 {
150 compatible = "pci168c,0033";
151 reg = <0x0000 0 0 0 0>;
152 qca,no-eeprom;
153 };
154 };
155
156 &uart {
157 status = "okay";
158 };
159
160 &mdio0 {
161 status = "okay";
162
163 phy: ethernet-phy@3 {
164 reg = <3>;
165 };
166 };
167
168 &eth0 {
169 status = "okay";
170 pll-data = <0xa6000000 0xa0000101 0x80001313>;
171 phy-handle = <&phy>;
172
173 gmac-config {
174 device = <&gmac>;
175 rgmii-enabled = <1>;
176 rxd-delay = <3>;
177 rxdv-delay = <3>;
178 };
179 };
180
181 &wmac {
182 status = "okay";
183 qca,no-eeprom;
184 };