perf: fix build on PowerPC
[openwrt/openwrt.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 <dt-bindings/leds/common.h>
13 #include "apm82181.dtsi"
14
15 / {
16 model = "Meraki MX60/MX60W Security Appliance";
17 compatible = "meraki,mx60", "meraki,buckminster", "apm,bluestone";
18
19 aliases {
20 serial0 = &UART1;
21 };
22
23 chosen {
24 stdout-path = "/plb/opb/serial@ef600400";
25 };
26 };
27
28 &CRYPTO {
29 status = "okay";
30 };
31
32 &PKA {
33 status = "okay";
34 };
35
36 &TRNG {
37 status = "okay";
38 };
39
40 &USBOTG0 {
41 status = "okay";
42 dr_mode = "host";
43 };
44
45 &ndfc {
46 /* Buckminster has 1GiB of NAND */
47 status = "okay";
48
49 nand {
50 partitions {
51 compatible = "fixed-partitions";
52 #address-cells = <1>;
53 #size-cells = <1>;
54
55 partition@0 {
56 label = "u-boot";
57 reg = <0x00000000 0x00100000>;
58 read-only;
59 };
60
61 partition@100000 {
62 label = "u-boot-env";
63 reg = <0x00100000 0x00100000>;
64 compatible = "u-boot,env";
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 led-0 {
121 color = <LED_COLOR_ID_GREEN>;
122 function = LED_FUNCTION_POWER;
123 gpios = <&GPIO0 18 GPIO_ACTIVE_LOW>;
124 };
125
126 led-1 {
127 color = <LED_COLOR_ID_AMBER>;
128 function = LED_FUNCTION_FAULT;
129 gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>;
130 panic-indicator;
131 };
132
133 led-2 {
134 color = <LED_COLOR_ID_GREEN>;
135 function = LED_FUNCTION_WAN;
136 gpios = <&GPIO0 17 GPIO_ACTIVE_LOW>;
137 };
138
139 led-3 {
140 color = <LED_COLOR_ID_AMBER>;
141 function = LED_FUNCTION_WAN;
142 gpios = <&GPIO0 15 GPIO_ACTIVE_LOW>;
143 };
144
145 led-4 {
146 color = <LED_COLOR_ID_GREEN>;
147 function = LED_FUNCTION_LAN;
148 function-enumerator = <0>;
149 gpios = <&GPIO0 20 GPIO_ACTIVE_LOW>;
150 };
151
152 led-5 {
153 color = <LED_COLOR_ID_GREEN>;
154 function = LED_FUNCTION_LAN;
155 function-enumerator = <1>;
156 gpios = <&GPIO0 21 GPIO_ACTIVE_LOW>;
157 };
158
159 led-6 {
160 color = <LED_COLOR_ID_GREEN>;
161 function = LED_FUNCTION_LAN;
162 function-enumerator = <2>;
163 gpios = <&GPIO0 22 GPIO_ACTIVE_LOW>;
164 };
165
166 led-7 {
167 color = <LED_COLOR_ID_GREEN>;
168 function = LED_FUNCTION_LAN;
169 function-enumerator = <3>;
170 gpios = <&GPIO0 23 GPIO_ACTIVE_LOW>;
171 };
172 };
173
174 keys {
175 compatible = "gpio-keys";
176
177 button-restart {
178 label = "Reset button";
179 linux,code = <KEY_RESTART>;
180 gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>;
181 interrupt-parent = <&UIC1>;
182 interrupts = <0x15 IRQ_TYPE_EDGE_FALLING>;
183 debounce-interval = <60>;
184 };
185 };
186 };
187
188 &PCIE0 {
189 /* Leave this enabled as u-boot on the MX60 will disable it for us */
190 status = "okay";
191
192 /*
193 * relevant lspci topology:
194 *
195 * -+-[0000:40]---00.0-[41-7f]----00.0
196 */
197
198 bridge@64,0 {
199 reg = <0x00400000 0 0 0 0>;
200 #address-cells = <3>;
201 #size-cells = <2>;
202 ranges;
203
204 wifi0: wifi@65,0 {
205 /* Atheros AR9380 2.4/5GHz */
206 compatible = "pci168c,0030";
207 reg = <0x00410000 0 0 0 0>;
208 interrupts = <1>; /* INTA */
209 };
210 };
211 };