5998f6960a1300fb224608d0eba313daa0975ca2
[openwrt/staging/stintel.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";
163
164 reset {
165 label = "Reset button";
166 linux,code = <KEY_RESTART>;
167 gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>;
168 interrupt-parent = <&UIC1>;
169 interrupts = <0x15 IRQ_TYPE_EDGE_FALLING>;
170 debounce-interval = <60>;
171 };
172 };
173 };
174
175 &PCIE0 {
176 /* Leave this enabled as u-boot on the MX60 will disable it for us */
177 status = "okay";
178
179 /*
180 * relevant lspci topology:
181 *
182 * -+-[0000:40]---00.0-[41-7f]----00.0
183 */
184
185 bridge@64,0 {
186 reg = <0x00400000 0 0 0 0>;
187 #address-cells = <3>;
188 #size-cells = <2>;
189 ranges;
190
191 wifi0: wifi@65,0 {
192 /* Atheros AR9380 2.4/5GHz */
193 compatible = "pci168c,0030";
194 reg = <0x00410000 0 0 0 0>;
195 };
196 };
197 };
198
199 &MSI {
200 status = "okay";
201 };