apm821xx: MR24: convert to interrupt-driven gpio-key driver
[oweals/openwrt.git] / target / linux / apm821xx / dts / meraki-mx60.dts
1 /*
2  * Device Tree Source for Meraki MX60/MX60W (Buckminster)
3  *
4  * Copyright (C) 2016 Chris Blake <chrisrblake93@gmail.com>
5  *
6  * Based on Cisco Meraki DTS extracted from release wired-12-217818
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 MX60/MX60W Security Appliance";
19         compatible = "meraki,mx60", "meraki,buckminster", "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 &CRYPTO {
35         status = "okay";
36 };
37
38 &PKA {
39         status = "okay";
40 };
41
42 &TRNG {
43         status = "okay";
44 };
45
46 &USBOTG0 {
47         status = "okay";
48         dr_mode = "host";
49 };
50
51 &EBC0 {
52         /* Buckminster has 1GiB of NAND */
53         ndfc@1,0 {
54                 status = "okay";
55                 nand {
56                         partition@0 {
57                                 label = "u-boot";
58                                 reg = <0x00000000 0x00100000>;
59                                 read-only;
60                         };
61
62                         partition@100000 {
63                                 label = "u-boot-env";
64                                 reg = <0x00100000 0x00100000>;
65                                 read-only;
66                         };
67
68                         partition@200000 {
69                                 label = "oops";
70                                 reg = <0x00200000 0x00040000>;
71                         };
72
73                         partition@240000 {
74                                 label = "ubi";
75                                 reg = <0x00240000 0x3fdc0000>;
76                         };
77                 };
78         };
79 };
80
81 &UART1 {
82         status = "okay";
83 };
84
85 &GPIO0 {
86         status = "okay";
87 };
88
89 &IIC0 {
90         status = "okay";
91 };
92
93 &EMAC0 {
94         status = "okay";
95         phy-handle = <&phy0>;
96
97         mdio {
98                 #address-cells = <1>;
99                 #size-cells = <0>;
100                 phy0: ethernet-phy@0 {
101                         compatible = "ethernet-phy-id004d.d034";
102                         reg = <0>;
103                         qca,mib-poll-interval = <500>;
104
105                         qca,ar8327-initvals = <
106                                 0x0010 0x40000000
107                                 0x0624 0x007f7f7f
108                                 0x0004 0x07a00000       /* PAD0_MODE */
109                                 0x000c 0x01000000       /* PAD6_MODE */
110                                 0x007c 0x0000007e       /* PORT0_STATUS */
111                         >;
112                 };
113         };
114 };
115
116 &POB0 {
117         leds {
118                 compatible = "gpio-leds";
119
120                 status: power-green {
121                         label = "mx60:green:power";
122                         gpios = <&GPIO0 18 GPIO_ACTIVE_LOW>;
123                 };
124
125                 failsafe: power-orange {
126                         label = "mx60:orange:power";
127                         gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>;
128                 };
129
130                 wan-green {
131                         label = "mx60:green:wan";
132                         gpios = <&GPIO0 17 GPIO_ACTIVE_LOW>;
133                 };
134
135                 wan-orange {
136                         label = "mx60:orange:wan";
137                         gpios = <&GPIO0 15 GPIO_ACTIVE_LOW>;
138                 };
139
140                 lan1 {
141                         label = "mx60:green:lan1";
142                         gpios = <&GPIO0 20 GPIO_ACTIVE_LOW>;
143                 };
144
145                 lan2 {
146                         label = "mx60:green:lan2";
147                         gpios = <&GPIO0 21 GPIO_ACTIVE_LOW>;
148                 };
149
150                 lan3 {
151                         label = "mx60:green:lan3";
152                         gpios = <&GPIO0 22 GPIO_ACTIVE_LOW>;
153                 };
154
155                 lan4 {
156                         label = "mx60:green:lan4";
157                         gpios = <&GPIO0 23 GPIO_ACTIVE_LOW>;
158                 };
159         };
160
161         keys {
162                 compatible = "gpio-keys-polled";
163                 poll-interval = <60>;   /* 3 * 20 = 60ms */
164                 autorepeat;
165
166                 reset {
167                         label = "Reset button";
168                         linux,code = <KEY_RESTART>;
169                         gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>;
170                 };
171         };
172 };
173
174 &PCIE0 {
175         /* Leave this enabled as u-boot on the MX60 will disable it for us */
176         status = "okay";
177 };
178
179 &MSI {
180         status = "okay";
181 };