ramips: drop non-existant ralink,port-map for Ravpower WD03
[oweals/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                         partition@0 {
54                                 label = "u-boot";
55                                 reg = <0x00000000 0x00150000>;
56                                 read-only;
57                         };
58
59                         partition@150000 {
60                                 /*
61                                  * The u-boot environment size is one NAND
62                                  * block (16KiB). u-boot allocates four NAND
63                                  * blocks (64KiB) in order to have spares
64                                  * around for bad block management
65                                  */
66                                 label = "u-boot-env";
67                                 reg = <0x00150000 0x00010000>;
68                                 read-only;
69                         };
70
71                         partition@160000 {
72                                 /*
73                                  * redundant u-boot environment.
74                                  * has to be kept it in sync with the
75                                  * data in "u-boot-env".
76                                  */
77                                 label = "u-boot-env-redundant";
78                                 reg = <0x00160000 0x00010000>;
79                                 read-only;
80                         };
81
82                         partition@170000 {
83                                 label = "oops";
84                                 reg = <0x00170000 0x00010000>;
85                         };
86
87                         partition@180000 {
88                                 label = "ubi";
89                                 reg = <0x00180000 0x01e80000>;
90                         };
91                 };
92         };
93 };
94
95 &UART1 {
96         status = "okay";
97 };
98
99 &GPIO0 {
100         status = "okay";
101 };
102
103 &IIC0 {
104         status = "okay";
105         /* Boot ROM is at 0x52-0x53, do not touch */
106         /* Unknown chip at 0x6e, not sure what it is */
107 };
108
109 &EMAC0 {
110         status = "okay";
111
112         phy-mode = "rgmii-id";
113         phy-map = <0x2>;
114         phy-address = <0x1>;
115         phy-handle = <&phy>;
116
117         mdio {
118                 #address-cells = <1>;
119                 #size-cells = <0>;
120
121                 phy: phy@1 {
122                         compatible = "ethernet-phy-ieee802.3-c22";
123                         reg = <1>;
124                 };
125         };
126 };
127
128 &POB0 {
129         leds {
130                 compatible = "gpio-leds";
131
132                 status: power-green {
133                         label = "mr24:green:power";
134                         gpios = <&GPIO0 18 GPIO_ACTIVE_LOW>;
135                 };
136
137                 failsafe: power-orange {
138                         label = "mr24:orange:power";
139                         gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>;
140                 };
141
142                 lan {
143                         label = "mr24:green:wan";
144                         gpios = <&GPIO0 17 GPIO_ACTIVE_LOW>;
145                 };
146
147                 ssi-0 {
148                         label = "mr24:green:wifi1";
149                         gpios = <&GPIO0 23 GPIO_ACTIVE_LOW>;
150                 };
151
152                 ssi-1 {
153                         label = "mr24:green:wifi2";
154                         gpios = <&GPIO0 22 GPIO_ACTIVE_LOW>;
155                 };
156
157                 ssi-2 {
158                         label = "mr24:green:wifi3";
159                         gpios = <&GPIO0 21 GPIO_ACTIVE_LOW>;
160                 };
161
162                 ssi-3 {
163                         label = "mr24:green:wifi4";
164                         gpios = <&GPIO0 20 GPIO_ACTIVE_LOW>;
165                 };
166         };
167
168         keys {
169                 compatible = "gpio-keys";
170
171                 reset {
172                         /* Label as per Meraki's "MR24 Installation Guide" */
173                         label = "Factory Reset Button";
174                         linux,code = <KEY_RESTART>;
175                         interrupt-parent = <&UIC1>;
176                         interrupts = <0x15 IRQ_TYPE_EDGE_FALLING>;
177                         gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>;
178                         debounce-interval = <60>;
179                 };
180         };
181 };
182
183 &PCIE0 {
184         status = "okay";
185 };
186
187 &MSI {
188         status = "okay";
189 };