fc879fe8c1cdb4e85135c285ad8f0d34d2212a7f
[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                         #address-cells = <1>;
54                         #size-cells = <1>;
55
56                         partition@0 {
57                                 label = "u-boot";
58                                 reg = <0x00000000 0x00170000>;
59                                 read-only;
60                         };
61
62                         partition@170000 {
63                                 label = "oops";
64                                 reg = <0x00170000 0x00010000>;
65                         };
66
67                         partition@180000 {
68                                 label = "ubi";
69                                 reg = <0x00180000 0x01e80000>;
70                         };
71                 };
72         };
73 };
74
75 &UART1 {
76         status = "okay";
77 };
78
79 &GPIO0 {
80         status = "okay";
81 };
82
83 &IIC0 {
84         status = "okay";
85         /* Boot ROM is at 0x52-0x53, do not touch */
86         /* Unknown chip at 0x6e, not sure what it is */
87 };
88
89 &EMAC0 {
90         status = "okay";
91
92         phy-mode = "rgmii-id";
93         phy-map = <0x2>;
94         phy-address = <0x1>;
95         phy-handle = <&phy>;
96
97         mdio {
98                 #address-cells = <1>;
99                 #size-cells = <0>;
100
101                 phy: phy@1 {
102                         compatible = "ethernet-phy-ieee802.3-c22";
103                         reg = <1>;
104                 };
105         };
106 };
107
108 &POB0 {
109         gpio-leds {
110                 compatible = "gpio-leds";
111
112                 status: power-green {
113                         label = "mr24:green:power";
114                         gpios = <&GPIO0 18 GPIO_ACTIVE_LOW>;
115                 };
116
117                 failsafe: power-orange {
118                         label = "mr24:orange:power";
119                         gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>;
120                 };
121
122                 lan {
123                         label = "mr24:green:wan";
124                         gpios = <&GPIO0 17 GPIO_ACTIVE_LOW>;
125                 };
126
127                 ssi-0 {
128                         label = "mr24:green:wifi1";
129                         gpios = <&GPIO0 23 GPIO_ACTIVE_LOW>;
130                 };
131
132                 ssi-1 {
133                         label = "mr24:green:wifi2";
134                         gpios = <&GPIO0 22 GPIO_ACTIVE_LOW>;
135                 };
136
137                 ssi-2 {
138                         label = "mr24:green:wifi3";
139                         gpios = <&GPIO0 21 GPIO_ACTIVE_LOW>;
140                 };
141
142                 ssi-3 {
143                         label = "mr24:green:wifi4";
144                         gpios = <&GPIO0 20 GPIO_ACTIVE_LOW>;
145                 };
146         };
147
148         gpio_keys_polled {
149                 compatible = "gpio-keys-polled";
150                 #address-cells = <1>;
151                 #size-cells = <0>;
152                 poll-interval = <60>;   /* 3 * 20 = 60ms */
153                 autorepeat;
154
155                 reset {
156                         /* Label as per Meraki's "MR24 Installation Guide" */
157                         label = "Factory Reset Button";
158                         linux,code = <KEY_RESTART>;
159                         gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>;
160                 };
161         };
162 };
163
164 &PCIE0 {
165         status = "okay";
166 };
167
168 &MSI {
169         status = "okay";
170 };