apm821xx: use SPDX-License-identifiers
[openwrt/staging/stintel.git] / target / linux / apm821xx / dts / meraki-mx60.dts
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Device Tree Source for Meraki MX60/MX60W (Buckminster)
4 *
5 * Copyright (C) 2016 Chris Blake <chrisrblake93@gmail.com>
6 *
7 * Based on Cisco Meraki DTS extracted from release wired-12-217818
8 */
9
10 /dts-v1/;
11
12 #include "apm82181.dtsi"
13
14 / {
15 model = "Meraki MX60/MX60W Security Appliance";
16 compatible = "meraki,mx60", "meraki,buckminster", "apm,bluestone";
17
18 aliases {
19 serial0 = &UART1;
20 led-boot = &status;
21 led-failsafe = &failsafe;
22 led-running = &status;
23 led-upgrade = &status;
24 };
25
26 chosen {
27 stdout-path = "/plb/opb/serial@ef600400";
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 partition@0 {
54 label = "u-boot";
55 reg = <0x00000000 0x00100000>;
56 read-only;
57 };
58
59 partition@100000 {
60 label = "u-boot-env";
61 reg = <0x00100000 0x00100000>;
62 read-only;
63 };
64
65 partition@200000 {
66 label = "oops";
67 reg = <0x00200000 0x00040000>;
68 };
69
70 partition@240000 {
71 label = "ubi";
72 reg = <0x00240000 0x3fdc0000>;
73 };
74 };
75 };
76 };
77
78 &UART1 {
79 status = "okay";
80 };
81
82 &GPIO0 {
83 status = "okay";
84 };
85
86 &IIC0 {
87 status = "okay";
88 };
89
90 &EMAC0 {
91 status = "okay";
92 phy-handle = <&phy0>;
93
94 mdio {
95 #address-cells = <1>;
96 #size-cells = <0>;
97 phy0: ethernet-phy@0 {
98 compatible = "ethernet-phy-id004d.d034";
99 reg = <0>;
100 qca,mib-poll-interval = <500>;
101
102 qca,ar8327-initvals = <
103 0x0010 0x40000000
104 0x0624 0x007f7f7f
105 0x0004 0x07a00000 /* PAD0_MODE */
106 0x000c 0x01000000 /* PAD6_MODE */
107 0x007c 0x0000007e /* PORT0_STATUS */
108 >;
109 };
110 };
111 };
112
113 &POB0 {
114 leds {
115 compatible = "gpio-leds";
116
117 status: power-green {
118 label = "mx60:green:power";
119 gpios = <&GPIO0 18 GPIO_ACTIVE_LOW>;
120 };
121
122 failsafe: power-orange {
123 label = "mx60:orange:power";
124 gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>;
125 };
126
127 wan-green {
128 label = "mx60:green:wan";
129 gpios = <&GPIO0 17 GPIO_ACTIVE_LOW>;
130 };
131
132 wan-orange {
133 label = "mx60:orange:wan";
134 gpios = <&GPIO0 15 GPIO_ACTIVE_LOW>;
135 };
136
137 lan1 {
138 label = "mx60:green:lan1";
139 gpios = <&GPIO0 20 GPIO_ACTIVE_LOW>;
140 };
141
142 lan2 {
143 label = "mx60:green:lan2";
144 gpios = <&GPIO0 21 GPIO_ACTIVE_LOW>;
145 };
146
147 lan3 {
148 label = "mx60:green:lan3";
149 gpios = <&GPIO0 22 GPIO_ACTIVE_LOW>;
150 };
151
152 lan4 {
153 label = "mx60:green:lan4";
154 gpios = <&GPIO0 23 GPIO_ACTIVE_LOW>;
155 };
156 };
157
158 keys {
159 compatible = "gpio-keys";
160
161 reset {
162 label = "Reset button";
163 linux,code = <KEY_RESTART>;
164 gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>;
165 interrupt-parent = <&UIC1>;
166 interrupts = <0x15 IRQ_TYPE_EDGE_FALLING>;
167 debounce-interval = <60>;
168 };
169 };
170 };
171
172 &PCIE0 {
173 /* Leave this enabled as u-boot on the MX60 will disable it for us */
174 status = "okay";
175
176 /*
177 * relevant lspci topology:
178 *
179 * -+-[0000:40]---00.0-[41-7f]----00.0
180 */
181
182 bridge@64,0 {
183 reg = <0x00400000 0 0 0 0>;
184 #address-cells = <3>;
185 #size-cells = <2>;
186 ranges;
187
188 wifi0: wifi@65,0 {
189 /* Atheros AR9380 2.4/5GHz */
190 compatible = "pci168c,0030";
191 reg = <0x00410000 0 0 0 0>;
192 };
193 };
194 };
195
196 &MSI {
197 status = "okay";
198 };