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