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