apm821xx: convert to dt based diag LED script
[openwrt/openwrt.git] / target / linux / apm821xx / dts / MR24.dts
1 /*
2 * Device Tree Source for Meraki MR24 (Ikarem)
3 *
4 * Copyright (C) 2016 Chris Blake <chrisrblake93@gmail.com>
5 *
6 * Based on Cisco Meraki GPL Release r23-20150601 MR24 DTS
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 MR24 Access Point";
19 compatible = "meraki,ikarem";
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 linux,stdout-path = "/plb/opb/serial@ef600400";
31 };
32
33 };
34
35
36 &CRYPTO {
37 status = "okay";
38 };
39
40 &PKA {
41 status = "okay";
42 };
43
44 &TRNG {
45 status = "okay";
46 };
47
48 &EBC0 {
49 /* Ikarem has 32MB of NAND */
50 ndfc@1,0 {
51 status = "okay";
52 /* 32 MiB NAND Flash */
53 nand {
54 #address-cells = <1>;
55 #size-cells = <1>;
56
57 partition@0 {
58 label = "u-boot";
59 reg = <0x00000000 0x00170000>;
60 read-only;
61 };
62
63 partition@170000 {
64 label = "oops";
65 reg = <0x00170000 0x00010000>;
66 };
67
68 partition@180000 {
69 label = "ubi";
70 reg = <0x00180000 0x01e80000>;
71 };
72 };
73 };
74 };
75
76 &UART1 {
77 status = "okay";
78 };
79
80 &GPIO0 {
81 status = "okay";
82 };
83
84 &IIC0 {
85 status = "okay";
86 /* Boot ROM is at 0x52-0x53, do not touch */
87 /* Unknown chip at 0x6e, not sure what it is */
88 };
89
90 &EMAC0 {
91 status = "okay";
92 };
93
94 &POB0 {
95 gpio-leds {
96 compatible = "gpio-leds";
97
98 status: power-green {
99 label = "mr24:green:power";
100 gpios = <&GPIO0 18 GPIO_ACTIVE_LOW>;
101 };
102
103 failsafe: power-orange {
104 label = "mr24:orange:power";
105 gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>;
106 };
107
108 lan {
109 label = "mr24:green:wan";
110 gpios = <&GPIO0 17 GPIO_ACTIVE_LOW>;
111 };
112
113 ssi-0 {
114 label = "mr24:green:wifi1";
115 gpios = <&GPIO0 23 GPIO_ACTIVE_LOW>;
116 };
117
118 ssi-1 {
119 label = "mr24:green:wifi2";
120 gpios = <&GPIO0 22 GPIO_ACTIVE_LOW>;
121 };
122
123 ssi-2 {
124 label = "mr24:green:wifi3";
125 gpios = <&GPIO0 21 GPIO_ACTIVE_LOW>;
126 };
127
128 ssi-3 {
129 label = "mr24:green:wifi4";
130 gpios = <&GPIO0 20 GPIO_ACTIVE_LOW>;
131 };
132 };
133
134 gpio_keys_polled {
135 compatible = "gpio-keys-polled";
136 #address-cells = <1>;
137 #size-cells = <0>;
138 poll-interval = <60>; /* 3 * 20 = 60ms */
139 autorepeat;
140
141 button@1 {
142 label = "Reset button";
143 linux,code = <KEY_RESTART>;
144 gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>;
145 };
146 };
147 };
148
149 &PCIE0 {
150 status = "okay";
151 };
152
153 &MSI {
154 status = "okay";
155 };