apm821xx: dts: Unify naming of gpio-keys nodes
[openwrt/openwrt.git] / target / linux / apm821xx / dts / meraki-mr24.dts
1 /*
2 * Device Tree Source for Meraki MR24 (Ikarem)
3 *
4 * Copyright (C) 2016 Chris Blake <chrisrblake93@gmail.com>
5 *
6 * Based on Cisco Meraki GPL Release r23-20150601 MR24 DTS
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without
10 * any warranty of any kind, whether express or implied.
11 */
12
13 /dts-v1/;
14
15 #include "apm82181.dtsi"
16
17 / {
18 model = "Meraki MR24 Access Point";
19 compatible = "meraki,mr24", "meraki,ikarem", "apm,bluestone";
20
21 aliases {
22 serial0 = &UART1;
23 led-boot = &status;
24 led-failsafe = &failsafe;
25 led-running = &status;
26 led-upgrade = &status;
27 };
28
29 chosen {
30 stdout-path = "/plb/opb/serial@ef600400";
31 };
32 };
33
34
35 &CRYPTO {
36 status = "okay";
37 };
38
39 &PKA {
40 status = "okay";
41 };
42
43 &TRNG {
44 status = "okay";
45 };
46
47 &EBC0 {
48 /* Ikarem has 32MB of NAND */
49 ndfc@1,0 {
50 status = "okay";
51 /* 32 MiB NAND Flash */
52 nand {
53 #address-cells = <1>;
54 #size-cells = <1>;
55
56 partition@0 {
57 label = "u-boot";
58 reg = <0x00000000 0x00150000>;
59 read-only;
60 };
61
62 partition@150000 {
63 /*
64 * The u-boot environment size is one NAND
65 * block (16KiB). u-boot allocates four NAND
66 * blocks (64KiB) in order to have spares
67 * around for bad block management
68 */
69 label = "u-boot-env";
70 reg = <0x00150000 0x00010000>;
71 read-only;
72 };
73
74 partition@160000 {
75 /*
76 * redundant u-boot environment.
77 * has to be kept it in sync with the
78 * data in "u-boot-env".
79 */
80 label = "u-boot-env-redundant";
81 reg = <0x00160000 0x00010000>;
82 read-only;
83 };
84
85 partition@170000 {
86 label = "oops";
87 reg = <0x00170000 0x00010000>;
88 };
89
90 partition@180000 {
91 label = "ubi";
92 reg = <0x00180000 0x01e80000>;
93 };
94 };
95 };
96 };
97
98 &UART1 {
99 status = "okay";
100 };
101
102 &GPIO0 {
103 status = "okay";
104 };
105
106 &IIC0 {
107 status = "okay";
108 /* Boot ROM is at 0x52-0x53, do not touch */
109 /* Unknown chip at 0x6e, not sure what it is */
110 };
111
112 &EMAC0 {
113 status = "okay";
114
115 phy-mode = "rgmii-id";
116 phy-map = <0x2>;
117 phy-address = <0x1>;
118 phy-handle = <&phy>;
119
120 mdio {
121 #address-cells = <1>;
122 #size-cells = <0>;
123
124 phy: phy@1 {
125 compatible = "ethernet-phy-ieee802.3-c22";
126 reg = <1>;
127 };
128 };
129 };
130
131 &POB0 {
132 gpio-leds {
133 compatible = "gpio-leds";
134
135 status: power-green {
136 label = "mr24:green:power";
137 gpios = <&GPIO0 18 GPIO_ACTIVE_LOW>;
138 };
139
140 failsafe: power-orange {
141 label = "mr24:orange:power";
142 gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>;
143 };
144
145 lan {
146 label = "mr24:green:wan";
147 gpios = <&GPIO0 17 GPIO_ACTIVE_LOW>;
148 };
149
150 ssi-0 {
151 label = "mr24:green:wifi1";
152 gpios = <&GPIO0 23 GPIO_ACTIVE_LOW>;
153 };
154
155 ssi-1 {
156 label = "mr24:green:wifi2";
157 gpios = <&GPIO0 22 GPIO_ACTIVE_LOW>;
158 };
159
160 ssi-2 {
161 label = "mr24:green:wifi3";
162 gpios = <&GPIO0 21 GPIO_ACTIVE_LOW>;
163 };
164
165 ssi-3 {
166 label = "mr24:green:wifi4";
167 gpios = <&GPIO0 20 GPIO_ACTIVE_LOW>;
168 };
169 };
170
171 keys {
172 compatible = "gpio-keys-polled";
173 #address-cells = <1>;
174 #size-cells = <0>;
175 poll-interval = <60>; /* 3 * 20 = 60ms */
176 autorepeat;
177
178 reset {
179 /* Label as per Meraki's "MR24 Installation Guide" */
180 label = "Factory Reset Button";
181 linux,code = <KEY_RESTART>;
182 gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>;
183 };
184 };
185 };
186
187 &PCIE0 {
188 status = "okay";
189 };
190
191 &MSI {
192 status = "okay";
193 };