apm821xx: MBL: make mtd chip work
[openwrt/staging/nbd.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 = "microchip,sst39vf040", "jedec-flash";
26 bank-width = <1>;
27 reg = <0x00000000 0x00000000 0x00080000>;
28 #address-cells = <1>;
29 #size-cells = <1>;
30
31 partition@0 {
32 /* Part of bootrom - Don't use it without a jump */
33 label = "free";
34 reg = <0x00000000 0x0001e000>;
35 read-only;
36 };
37
38 partition@1e000 {
39 label = "env";
40 reg = <0x0001e000 0x00002000>;
41 read-only;
42 };
43
44 partition@20000 {
45 label = "uboot";
46 reg = <0x00020000 0x00050000>;
47 read-only;
48 };
49 };
50 };
51
52 GPIO1: gpio@e0000000 {
53 compatible = "wd,mbl-gpio", "ti,74273";
54 reg-names = "dat";
55 reg = <0xe0000000 0x1>;
56 #gpio-cells = <2>;
57 gpio-controller;
58
59 enable-button {
60 /* Defined in u-boot as: NOT_NOR
61 * "enables features other than NOR
62 * specifically, the buffer at CS2"
63 * (button).
64 *
65 * Note: This option is disabled as
66 * it prevents the system from being
67 * rebooted successfully.
68 */
69
70 gpio-hog;
71 line-name = "Enable Reset Button, disable NOR";
72 gpios = <1 GPIO_ACTIVE_HIGH>;
73 output-low;
74 };
75 };
76
77 GPIO2: gpio@e0100000 {
78 compatible = "wd,mbl-gpio", "ti,74244";
79 reg-names = "dat";
80 reg = <0xe0100000 0x1>;
81 #gpio-cells = <2>;
82 gpio-controller;
83 no-output;
84 };
85
86 leds {
87 compatible = "gpio-leds";
88
89 /* There's just one tri-color LED with three separate pins.
90 * One pin for each color (red, green and blue). Each has
91 * a different meaning.
92 */
93 led-0 {
94 color = <LED_COLOR_ID_RED>;
95 function = LED_FUNCTION_FAULT;
96 gpios = <&GPIO1 4 GPIO_ACTIVE_HIGH>;
97 panic-indicator;
98 };
99
100 led-1 {
101 color = <LED_COLOR_ID_GREEN>;
102 function = LED_FUNCTION_POWER;
103 gpios = <&GPIO1 5 GPIO_ACTIVE_HIGH>;
104 };
105
106 led-2 {
107 color = <LED_COLOR_ID_BLUE>;
108 function = LED_FUNCTION_DISK;
109 gpios = <&GPIO1 6 GPIO_ACTIVE_HIGH>;
110 linux,default-trigger = "disk-activity";
111 };
112 };
113
114 keys {
115 compatible = "gpio-keys-polled";
116 poll-interval = <60>; /* 3 * 20 = 60ms */
117 autorepeat;
118
119 reset-button {
120 label = "Reset button";
121 linux,code = <KEY_RESTART>;
122 gpios = <&GPIO2 2 GPIO_ACTIVE_LOW>;
123 };
124 };
125
126 usbpwr: usb-regulator {
127 compatible = "regulator-fixed";
128 regulator-name = "Power USB Core";
129 gpios = <&GPIO1 2 GPIO_ACTIVE_HIGH>;
130 regulator-min-microvolt = <5000000>;
131 regulator-max-microvolt = <5000000>;
132 regulator-boot-on; /* uboot sets this */
133 enable-active-high;
134 };
135
136 sata1pwr: sata1-regulator {
137 compatible = "regulator-fixed";
138 regulator-name = "Power Drive Port 1";
139 gpios = <&GPIO1 3 GPIO_ACTIVE_HIGH>;
140 regulator-min-microvolt = <12000000>;
141 regulator-max-microvolt = <12000000>;
142 regulator-boot-on; /* uboot sets this */
143 regulator-always-on; /* needed to read OS from HDD */
144 enable-active-high;
145 };
146
147 sata0pwr: sata0-regulator {
148 compatible = "regulator-fixed";
149 regulator-name = "Power Drive Port 0";
150 gpios = <&GPIO1 7 GPIO_ACTIVE_HIGH>;
151 regulator-min-microvolt = <12000000>;
152 regulator-max-microvolt = <12000000>;
153 regulator-boot-on; /* uboot sets this */
154 regulator-always-on; /* needed to read OS from HDD */
155 enable-active-high;
156 };
157 };
158
159 &EMAC0 {
160 status = "okay";
161
162 phy-map = <0x2>;
163 phy-address = <0x1>;
164 phy-handle = <&phy>;
165 phy-mode = "rgmii-id";
166
167 mdio {
168 #address-cells = <1>;
169 #size-cells = <0>;
170 reset-gpios = <&GPIO1 0 GPIO_ACTIVE_LOW>;
171
172 phy: phy@1 {
173 compatible = "ethernet-phy-ieee802.3-c22";
174 reg = <1>;
175 };
176 };
177 };
178
179 &CRYPTO {
180 status = "okay";
181 };
182
183 &PKA {
184 status = "okay";
185 };
186
187 &TRNG {
188 status = "okay";
189 };
190
191 &SATA0 {
192 status = "okay";
193
194 drive0: sata-port@0 {
195 reg = <0>;
196 #thermal-sensor-cells = <0>;
197 };
198 };
199
200 &SATA1 {
201 status = "okay";
202
203 drive1: sata-port@0 {
204 reg = <0>;
205 #thermal-sensor-cells = <0>;
206 };
207 };
208
209 &UART0 {
210 status = "okay";
211 };
212
213 &USBOTG0 {
214 status = "okay";
215 dr_mode = "host";
216 vbus-supply = <&usbpwr>;
217 };