apm821xx: add u-boot,env compatible
[openwrt/staging/pepe2k.git] / target / linux / apm821xx / dts / wd-mybooklive.dts
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
4 * (c) Copyright 2010 Western Digital Technologies, Inc. All Rights Reserved.
5 */
6
7 /dts-v1/;
8
9 #include <dt-bindings/leds/common.h>
10 #include "apm82181.dtsi"
11
12 / {
13 compatible = "wd,mybooklive", "amcc,apollo3g";
14 model = "MyBook Live";
15
16 aliases {
17 serial0 = &UART0;
18 };
19 };
20
21 &POB0 {
22 ebc {
23 nor_flash@0,0 {
24 status = "okay";
25 compatible = "jedec-flash"; /* "microchip,sst39vf040 */
26 bank-width = <1>;
27 reg = <0x00000000 0x00000000 0x00080000>;
28 #address-cells = <1>;
29 #size-cells = <1>;
30
31 partitions {
32 compatible = "fixed-partitions";
33 #address-cells = <1>;
34 #size-cells = <1>;
35
36 partition@0 {
37 /* Part of bootrom - Don't use it without a jump */
38 label = "free";
39 reg = <0x00000000 0x0001e000>;
40 read-only;
41 };
42
43 partition@1e000 {
44 compatible = "fixed-partitions";
45 reg = <0x0001e000 0x00002000>;
46 label = "u-boot-env";
47 #address-cells = <1>;
48 #size-cells = <1>;
49
50 partition@0 {
51 compatible = "u-boot,env-redundant-bool";
52 reg = <0x00000000 0x00001000>;
53 label = "u-boot-env-1";
54
55 ethaddr {
56 };
57 };
58
59 /*
60 * Causes the following warning: * sysfs: cannot create duplicate filename '/bus/nvmem/devices/u-boot-env0'
61 *
62 * partition@1000 {
63 * compatible = "u-boot,env-redundant-bool";
64 * reg = <0x00001000 0x00001000>;
65 * label = "u-boot-env-2";
66 *
67 * };
68 */
69 };
70
71
72 partition@20000 {
73 label = "uboot";
74 reg = <0x00020000 0x00050000>;
75 read-only;
76 };
77 };
78 };
79 };
80
81 GPIO1: gpio@e0000000 {
82 compatible = "wd,mbl-gpio", "ti,74273";
83 reg-names = "dat";
84 reg = <0xe0000000 0x1>;
85 #gpio-cells = <2>;
86 gpio-controller;
87
88 enable-button {
89 /* Defined in u-boot as: NOT_NOR
90 * "enables features other than NOR
91 * specifically, the buffer at CS2"
92 * (button).
93 *
94 * Note: This option is disabled as
95 * it prevents the system from being
96 * rebooted successfully.
97 */
98
99 gpio-hog;
100 line-name = "Enable Reset Button, disable NOR";
101 gpios = <1 GPIO_ACTIVE_HIGH>;
102 output-low;
103 };
104 };
105
106 GPIO2: gpio@e0100000 {
107 compatible = "wd,mbl-gpio", "ti,74244";
108 reg-names = "dat";
109 reg = <0xe0100000 0x1>;
110 #gpio-cells = <2>;
111 gpio-controller;
112 no-output;
113 };
114
115 leds {
116 compatible = "gpio-leds";
117
118 /* There's just one tri-color LED with three separate pins.
119 * One pin for each color (red, green and blue). Each has
120 * a different meaning.
121 */
122 led-0 {
123 color = <LED_COLOR_ID_RED>;
124 function = LED_FUNCTION_FAULT;
125 gpios = <&GPIO1 4 GPIO_ACTIVE_HIGH>;
126 panic-indicator;
127 };
128
129 led-1 {
130 color = <LED_COLOR_ID_GREEN>;
131 function = LED_FUNCTION_POWER;
132 gpios = <&GPIO1 5 GPIO_ACTIVE_HIGH>;
133 };
134
135 led-2 {
136 color = <LED_COLOR_ID_BLUE>;
137 function = LED_FUNCTION_DISK;
138 gpios = <&GPIO1 6 GPIO_ACTIVE_HIGH>;
139 linux,default-trigger = "disk-activity";
140 };
141 };
142
143 keys {
144 compatible = "gpio-keys-polled";
145 poll-interval = <60>; /* 3 * 20 = 60ms */
146 autorepeat;
147
148 button-restart {
149 label = "Reset button";
150 linux,code = <KEY_RESTART>;
151 gpios = <&GPIO2 2 GPIO_ACTIVE_LOW>;
152 };
153 };
154
155 usbpwr: usb-regulator {
156 compatible = "regulator-fixed";
157 regulator-name = "Power USB Core";
158 gpios = <&GPIO1 2 GPIO_ACTIVE_HIGH>;
159 regulator-min-microvolt = <5000000>;
160 regulator-max-microvolt = <5000000>;
161 regulator-boot-on; /* uboot sets this */
162 enable-active-high;
163 };
164
165 sata1pwr: sata1-regulator {
166 compatible = "regulator-fixed";
167 regulator-name = "Power Drive Port 1";
168 gpios = <&GPIO1 3 GPIO_ACTIVE_HIGH>;
169 regulator-min-microvolt = <12000000>;
170 regulator-max-microvolt = <12000000>;
171 regulator-boot-on; /* uboot sets this */
172 regulator-always-on; /* needed to read OS from HDD */
173 enable-active-high;
174 };
175
176 sata0pwr: sata0-regulator {
177 compatible = "regulator-fixed";
178 regulator-name = "Power Drive Port 0";
179 gpios = <&GPIO1 7 GPIO_ACTIVE_HIGH>;
180 regulator-min-microvolt = <12000000>;
181 regulator-max-microvolt = <12000000>;
182 regulator-boot-on; /* uboot sets this */
183 regulator-always-on; /* needed to read OS from HDD */
184 enable-active-high;
185 };
186 };
187
188 &EMAC0 {
189 status = "okay";
190
191 phy-map = <0x2>;
192 phy-address = <0x1>;
193 phy-handle = <&phy>;
194 phy-mode = "rgmii-id";
195
196 mdio {
197 #address-cells = <1>;
198 #size-cells = <0>;
199 reset-gpios = <&GPIO1 0 GPIO_ACTIVE_LOW>;
200
201 phy: phy@1 {
202 compatible = "ethernet-phy-ieee802.3-c22";
203 reg = <1>;
204 };
205 };
206 };
207
208 &CRYPTO {
209 status = "okay";
210 };
211
212 &PKA {
213 status = "okay";
214 };
215
216 &TRNG {
217 status = "okay";
218 };
219
220 &SATA0 {
221 status = "okay";
222
223 drive0: sata-port@0 {
224 reg = <0>;
225 #thermal-sensor-cells = <0>;
226 };
227 };
228
229 &SATA1 {
230 status = "okay";
231
232 drive1: sata-port@0 {
233 reg = <0>;
234 #thermal-sensor-cells = <0>;
235 };
236 };
237
238 &UART0 {
239 status = "okay";
240 };
241
242 &USBOTG0 {
243 status = "okay";
244 dr_mode = "host";
245 vbus-supply = <&usbpwr>;
246 };