apm821xx: Add support for the Cisco Meraki MX60/MX60W
[openwrt/openwrt.git] / target / linux / apm821xx / dts / 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,buckminster";
20
21 aliases {
22 serial0 = &UART1;
23 };
24
25 chosen {
26 linux,stdout-path = "/plb/opb/serial@ef600400";
27 };
28
29 };
30
31 &CRYPTO {
32 status = "okay";
33 };
34
35 &PKA {
36 status = "okay";
37 };
38
39 &TRNG {
40 status = "okay";
41 };
42
43 &USBOTG0 {
44 status = "okay";
45 dr_mode = "host";
46 };
47
48 &EBC0 {
49 /* Buckminster has 1GiB of NAND */
50 ndfc@1,0 {
51 status = "okay";
52 nand {
53 #address-cells = <1>;
54 #size-cells = <1>;
55
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 all {
79 label = "all";
80 reg = <0x00000000 0x40000000>;
81 };
82 };
83 };
84 };
85
86 &UART1 {
87 status = "okay";
88 };
89
90 &GPIO0 {
91 status = "okay";
92 };
93
94 &IIC0 {
95 status = "okay";
96 };
97
98 &EMAC0 {
99 status = "okay";
100 phy-handle = <&phy0>;
101
102 mdio {
103 #address-cells = <1>;
104 #size-cells = <0>;
105 phy0: ethernet-phy@0 {
106 device_type = "ethernet-phy";
107 reg = <0>;
108 qca,ar8327-initvals = <
109 0x0010 0x40000000
110 0x0624 0x007f7f7f
111 0x0004 0x07a00000 /* PAD0_MODE */
112 0x000c 0x01000000 /* PAD6_MODE */
113 0x007c 0x0000007e /* PORT0_STATUS */
114 >;
115 };
116 };
117 };
118
119 &POB0 {
120 gpio-leds {
121 compatible = "gpio-leds";
122
123 power-green {
124 label = "mx60:green:power";
125 gpios = <&GPIO0 18 GPIO_ACTIVE_LOW>;
126 };
127
128 power-orange {
129 label = "mx60:orange:power";
130 gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>;
131 };
132
133 wan-green {
134 label = "mx60:green:wan";
135 gpios = <&GPIO0 17 GPIO_ACTIVE_LOW>;
136 };
137
138 wan-orange {
139 label = "mx60:orange:wan";
140 gpios = <&GPIO0 15 GPIO_ACTIVE_LOW>;
141 };
142
143 lan1 {
144 label = "mx60:green:lan1";
145 gpios = <&GPIO0 20 GPIO_ACTIVE_LOW>;
146 };
147
148 lan2 {
149 label = "mx60:green:lan2";
150 gpios = <&GPIO0 21 GPIO_ACTIVE_LOW>;
151 };
152
153 lan3 {
154 label = "mx60:green:lan3";
155 gpios = <&GPIO0 22 GPIO_ACTIVE_LOW>;
156 };
157
158 lan4 {
159 label = "mx60:green:lan4";
160 gpios = <&GPIO0 23 GPIO_ACTIVE_LOW>;
161 };
162 };
163
164 gpio_keys_polled {
165 compatible = "gpio-keys-polled";
166 #address-cells = <1>;
167 #size-cells = <0>;
168 poll-interval = <60>; /* 3 * 20 = 60ms */
169 autorepeat;
170
171 button@1 {
172 label = "Reset button";
173 linux,code = <KEY_RESTART>;
174 gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>;
175 };
176 };
177 };
178
179 &PCIE0 {
180 /* Leave this enabled as u-boot on the MX60 will disable it for us */
181 status = "okay";
182 };
183
184 &MSI {
185 status = "okay";
186 };