apm821xx: clean up gpio-hogs
[openwrt/openwrt.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@1 {
44 label = "env";
45 reg = <0x0001e000 0x00002000>;
46 };
47
48 partition@2 {
49 label = "uboot";
50 reg = <0x00020000 0x00050000>;
51 };
52 };
53 };
54
55 GPIO1: gpio1@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: gpio2@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 gpio-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 };
107 };
108
109 gpio-keys-polled {
110 compatible = "gpio-keys-polled";
111 #address-cells = <1>;
112 #size-cells = <0>;
113 poll-interval = <60>; /* 3 * 20 = 60ms */
114 autorepeat;
115
116 reset-button {
117 label = "Reset button";
118 linux,code = <KEY_RESTART>;
119 gpios = <&GPIO2 2 GPIO_ACTIVE_LOW>;
120 };
121 };
122
123 usbpwr: usb-regulator {
124 compatible = "regulator-fixed";
125 regulator-name = "Power USB Core";
126 gpios = <&GPIO1 2 GPIO_ACTIVE_LOW>;
127 regulator-min-microvolt = <5000000>;
128 regulator-max-microvolt = <5000000>;
129 };
130
131 sata1pwr: sata1-regulator {
132 compatible = "regulator-fixed";
133 regulator-name = "Power Drive Port 1";
134 gpios = <&GPIO1 3 GPIO_ACTIVE_LOW>;
135 regulator-min-microvolt = <12000000>;
136 regulator-max-microvolt = <12000000>;
137 regulator-always-on; /* needed to read OS from HDD */
138 };
139
140 sata0pwr: sata0-regulator {
141 compatible = "regulator-fixed";
142 regulator-name = "Power Drive Port 0";
143 gpios = <&GPIO1 7 GPIO_ACTIVE_LOW>;
144 regulator-min-microvolt = <12000000>;
145 regulator-max-microvolt = <12000000>;
146 regulator-always-on; /* needed to read OS from HDD */
147 };
148 };
149
150 &EMAC0 {
151 status = "okay";
152
153 phy-map = <0x2>;
154 phy-address = <0x1>;
155 phy-handle = <&phy>;
156
157 mdio {
158 #address-cells = <1>;
159 #size-cells = <0>;
160 reset-gpios = <&GPIO1 0 GPIO_ACTIVE_LOW>;
161
162 phy: phy@1 {
163 compatible = "ethernet-phy-ieee802.3-c22";
164 reg = <1>;
165 };
166 };
167 };
168
169 &CRYPTO {
170 status = "okay";
171 };
172
173 &PKA {
174 status = "okay";
175 };
176
177 &TRNG {
178 status = "okay";
179 };
180
181 &SATA0 {
182 status = "okay";
183 };
184
185 &SATA1 {
186 status = "okay";
187 };
188
189 &UART0 {
190 status = "okay";
191 };
192
193 &USBOTG0 {
194 status = "okay";
195 dr_mode = "host";
196 vbus-supply = <&usbpwr>;
197 };