apm821xx: use SPDX-License-identifiers
[openwrt/staging/stintel.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 "apm82181.dtsi"
10
11 / {
12 compatible = "wd,mybooklive", "amcc,apollo3g";
13 model = "MyBook Live";
14
15 aliases {
16 serial0 = &UART0;
17 led-boot = &status;
18 led-failsafe = &status;
19 led-running = &status;
20 led-upgrade = &status;
21 };
22 };
23
24 &POB0 {
25 ebc {
26 nor_flash@0,0 {
27 status = "okay";
28 compatible = "amd,s29gl512n", "jedec-probe", "cfi-flash", "mtd-rom";
29 bank-width = <1>;
30 reg = <0x00000000 0x00000000 0x00080000>;
31 #address-cells = <1>;
32 #size-cells = <1>;
33
34 partition@0 {
35 /* Part of bootrom - Don't use it without a jump */
36 label = "free";
37 reg = <0x00000000 0x0001e000>;
38 };
39
40 partition@1e000 {
41 label = "env";
42 reg = <0x0001e000 0x00002000>;
43 };
44
45 partition@20000 {
46 label = "uboot";
47 reg = <0x00020000 0x00050000>;
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 failsafe: power-red {
90 label = "mbl:red:power";
91 gpios = <&GPIO1 4 GPIO_ACTIVE_HIGH>;
92 linux,default-trigger = "panic";
93 };
94
95 status: power-green {
96 label = "mbl:green:power";
97 gpios = <&GPIO1 5 GPIO_ACTIVE_HIGH>;
98 };
99
100 power-blue {
101 label = "mbl:blue:power";
102 gpios = <&GPIO1 6 GPIO_ACTIVE_HIGH>;
103 linux,default-trigger = "disk-activity";
104 };
105 };
106
107 keys {
108 compatible = "gpio-keys-polled";
109 poll-interval = <60>; /* 3 * 20 = 60ms */
110 autorepeat;
111
112 reset-button {
113 label = "Reset button";
114 linux,code = <KEY_RESTART>;
115 gpios = <&GPIO2 2 GPIO_ACTIVE_LOW>;
116 };
117 };
118
119 usbpwr: usb-regulator {
120 compatible = "regulator-fixed";
121 regulator-name = "Power USB Core";
122 gpios = <&GPIO1 2 GPIO_ACTIVE_LOW>;
123 regulator-min-microvolt = <5000000>;
124 regulator-max-microvolt = <5000000>;
125 };
126
127 sata1pwr: sata1-regulator {
128 compatible = "regulator-fixed";
129 regulator-name = "Power Drive Port 1";
130 gpios = <&GPIO1 3 GPIO_ACTIVE_LOW>;
131 regulator-min-microvolt = <12000000>;
132 regulator-max-microvolt = <12000000>;
133 regulator-always-on; /* needed to read OS from HDD */
134 };
135
136 sata0pwr: sata0-regulator {
137 compatible = "regulator-fixed";
138 regulator-name = "Power Drive Port 0";
139 gpios = <&GPIO1 7 GPIO_ACTIVE_LOW>;
140 regulator-min-microvolt = <12000000>;
141 regulator-max-microvolt = <12000000>;
142 regulator-always-on; /* needed to read OS from HDD */
143 };
144 };
145
146 &EMAC0 {
147 status = "okay";
148
149 phy-map = <0x2>;
150 phy-address = <0x1>;
151 phy-handle = <&phy>;
152
153 mdio {
154 #address-cells = <1>;
155 #size-cells = <0>;
156 reset-gpios = <&GPIO1 0 GPIO_ACTIVE_LOW>;
157
158 phy: phy@1 {
159 compatible = "ethernet-phy-ieee802.3-c22";
160 reg = <1>;
161 };
162 };
163 };
164
165 &CRYPTO {
166 status = "okay";
167 };
168
169 &PKA {
170 status = "okay";
171 };
172
173 &TRNG {
174 status = "okay";
175 };
176
177 &SATA0 {
178 status = "okay";
179
180 drive0: sata-port@0 {
181 reg = <0>;
182 #thermal-sensor-cells = <0>;
183 };
184 };
185
186 &SATA1 {
187 status = "okay";
188
189 drive1: sata-port@0 {
190 reg = <0>;
191 #thermal-sensor-cells = <0>;
192 };
193 };
194
195 &UART0 {
196 status = "okay";
197 };
198
199 &USBOTG0 {
200 status = "okay";
201 dr_mode = "host";
202 vbus-supply = <&usbpwr>;
203 };