82e9497ecdb15192f35cbd2b8bfc9d983b46d329
[openwrt/staging/stintel.git] / target / linux / apm821xx / dts / wd-mybooklive.dts
1 /*
2 * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
3 * (c) Copyright 2010 Western Digital Technologies, Inc. All Rights Reserved.
4 *
5 * This file is licensed under the terms of the GNU General Public
6 * License version 2. This program is licensed "as is" without
7 * any warranty of any kind, whether express or implied.
8 */
9
10 /dts-v1/;
11
12 #include "apm82181.dtsi"
13
14 / {
15 compatible = "wd,mybooklive", "amcc,apollo3g";
16 model = "MyBook Live";
17
18 aliases {
19 serial0 = &UART0;
20 led-boot = &status;
21 led-failsafe = &status;
22 led-running = &status;
23 led-upgrade = &status;
24 };
25 };
26
27 &POB0 {
28 ebc {
29 nor_flash@0,0 {
30 status = "okay";
31 compatible = "amd,s29gl512n", "jedec-probe", "cfi-flash", "mtd-rom";
32 bank-width = <1>;
33 reg = <0x00000000 0x00000000 0x00080000>;
34 #address-cells = <1>;
35 #size-cells = <1>;
36
37 partition@0 {
38 /* Part of bootrom - Don't use it without a jump */
39 label = "free";
40 reg = <0x00000000 0x0001e000>;
41 };
42
43 partition@1e000 {
44 label = "env";
45 reg = <0x0001e000 0x00002000>;
46 };
47
48 partition@20000 {
49 label = "uboot";
50 reg = <0x00020000 0x00050000>;
51 };
52 };
53 };
54
55 GPIO1: gpio@e0000000 {
56 compatible = "wd,mbl-gpio", "ti,74273";
57 reg-names = "dat";
58 reg = <0xe0000000 0x1>;
59 #gpio-cells = <2>;
60 gpio-controller;
61
62 enable-button {
63 /* Defined in u-boot as: NOT_NOR
64 * "enables features other than NOR
65 * specifically, the buffer at CS2"
66 * (button).
67 *
68 * Note: This option is disabled as
69 * it prevents the system from being
70 * rebooted successfully.
71 */
72
73 gpio-hog;
74 line-name = "Enable Reset Button, disable NOR";
75 gpios = <1 GPIO_ACTIVE_HIGH>;
76 output-low;
77 };
78 };
79
80 GPIO2: gpio@e0100000 {
81 compatible = "wd,mbl-gpio", "ti,74244";
82 reg-names = "dat";
83 reg = <0xe0100000 0x1>;
84 #gpio-cells = <2>;
85 gpio-controller;
86 no-output;
87 };
88
89 leds {
90 compatible = "gpio-leds";
91
92 failsafe: power-red {
93 label = "mbl:red:power";
94 gpios = <&GPIO1 4 GPIO_ACTIVE_HIGH>;
95 linux,default-trigger = "panic";
96 };
97
98 status: power-green {
99 label = "mbl:green:power";
100 gpios = <&GPIO1 5 GPIO_ACTIVE_HIGH>;
101 };
102
103 power-blue {
104 label = "mbl:blue:power";
105 gpios = <&GPIO1 6 GPIO_ACTIVE_HIGH>;
106 linux,default-trigger = "disk-activity";
107 };
108 };
109
110 keys {
111 compatible = "gpio-keys-polled";
112 poll-interval = <60>; /* 3 * 20 = 60ms */
113 autorepeat;
114
115 reset-button {
116 label = "Reset button";
117 linux,code = <KEY_RESTART>;
118 gpios = <&GPIO2 2 GPIO_ACTIVE_LOW>;
119 };
120 };
121
122 usbpwr: usb-regulator {
123 compatible = "regulator-fixed";
124 regulator-name = "Power USB Core";
125 gpios = <&GPIO1 2 GPIO_ACTIVE_LOW>;
126 regulator-min-microvolt = <5000000>;
127 regulator-max-microvolt = <5000000>;
128 };
129
130 sata1pwr: sata1-regulator {
131 compatible = "regulator-fixed";
132 regulator-name = "Power Drive Port 1";
133 gpios = <&GPIO1 3 GPIO_ACTIVE_LOW>;
134 regulator-min-microvolt = <12000000>;
135 regulator-max-microvolt = <12000000>;
136 regulator-always-on; /* needed to read OS from HDD */
137 };
138
139 sata0pwr: sata0-regulator {
140 compatible = "regulator-fixed";
141 regulator-name = "Power Drive Port 0";
142 gpios = <&GPIO1 7 GPIO_ACTIVE_LOW>;
143 regulator-min-microvolt = <12000000>;
144 regulator-max-microvolt = <12000000>;
145 regulator-always-on; /* needed to read OS from HDD */
146 };
147 };
148
149 &EMAC0 {
150 status = "okay";
151
152 phy-map = <0x2>;
153 phy-address = <0x1>;
154 phy-handle = <&phy>;
155
156 mdio {
157 #address-cells = <1>;
158 #size-cells = <0>;
159 reset-gpios = <&GPIO1 0 GPIO_ACTIVE_LOW>;
160
161 phy: phy@1 {
162 compatible = "ethernet-phy-ieee802.3-c22";
163 reg = <1>;
164 };
165 };
166 };
167
168 &CRYPTO {
169 status = "okay";
170 };
171
172 &PKA {
173 status = "okay";
174 };
175
176 &TRNG {
177 status = "okay";
178 };
179
180 &SATA0 {
181 status = "okay";
182
183 drive0: sata-port@0 {
184 reg = <0>;
185 #thermal-sensor-cells = <0>;
186 };
187 };
188
189 &SATA1 {
190 status = "okay";
191
192 drive1: sata-port@0 {
193 reg = <0>;
194 #thermal-sensor-cells = <0>;
195 };
196 };
197
198 &UART0 {
199 status = "okay";
200 };
201
202 &USBOTG0 {
203 status = "okay";
204 dr_mode = "host";
205 vbus-supply = <&usbpwr>;
206 };