tools/zstd: enable position independent code compilation
[openwrt/staging/nbd.git] / target / linux / oxnas / files / arch / arm / boot / dts / ox820-shuttle-kd20.dts
1 /dts-v1/;
2
3 #include "ox820.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/thermal/thermal.h>
8
9 / {
10 model = "Shuttle KD20";
11
12 compatible = "shuttle,kd20", "oxsemi,ox820";
13
14 chosen {
15 bootargs = "earlyprintk console=ttyS0,115200";
16 stdout-path = "serial0:115200n8";
17 };
18
19 memory {
20 /* 256Mbytes DDR */
21 reg = <0x60000000 0x10000000>;
22 };
23
24 aliases {
25 serial0 = &uart0;
26 gpio0 = &gpio0;
27 gpio1 = &gpio1;
28 led-boot = &led_status;
29 led-failsafe = &led_warn;
30 led-running = &led_status;
31 led-upgrade = &led_warn;
32 };
33
34 thermal-zones {
35 chassis-thermal {
36 /* Poll every 20 seconds */
37 polling-delay = <20000>;
38 /* Poll every 2nd second when cooling */
39 polling-delay-passive = <2000>;
40
41 thermal-sensors = <&hdd0_temp>, <&hdd1_temp>;
42
43 trips {
44 chassis_alert0: chassis-alert0 {
45 /* At 43 degrees turn on fan */
46 temperature = <43000>;
47 hysteresis = <3000>;
48 type = "active";
49 };
50
51 chassis_alert1: chassis-alert1 {
52 /* At 60 degrees emergency shutdown */
53 temperature = <60000>;
54 hysteresis = <2000>;
55 type = "critical";
56 };
57 };
58
59 cooling-maps {
60 map0 {
61 trip = <&chassis_alert0>;
62 cooling-device = <&system_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
63 };
64 };
65 };
66 };
67
68 i2c-gpio {
69 compatible = "i2c-gpio";
70 sda-gpios = <&gpio1 9 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
71 sck-gpios = <&gpio1 10 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
72 i2c-gpio,delay-us = <10>;
73 #address-cells = <1>;
74 #size-cells = <0>;
75
76 rtc0: rtc@51 {
77 compatible = "nxp,pcf8563";
78 reg = <0x51>;
79 };
80 };
81
82 keys {
83 compatible = "gpio-keys-polled";
84 #address-cells = <1>;
85 #size-cells = <0>;
86 poll-interval = <100>;
87
88 power {
89 label = "power";
90 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
91 linux,code = <KEY_POWER>;
92 };
93 reset {
94 label = "reset";
95 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
96 linux,code = <KEY_RESTART>;
97 };
98 eject1 {
99 label = "eject1";
100 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
101 linux,code = <KEY_EJECTCD>;
102 };
103 eject2 {
104 label = "eject2";
105 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
106 linux,code = <162>;
107 };
108 };
109
110 leds {
111 compatible = "gpio-leds";
112 led_status: status {
113 label = "kd20:blue:status";
114 gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
115 };
116 led_warn: status2 {
117 label = "kd20:red:status";
118 gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
119 };
120 hdd1blue {
121 label = "kd20:blue:hdd1";
122 gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
123 linux,default-trigger = "ata1";
124 };
125 hdd1red {
126 label = "kd20:red:hdd1";
127 gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
128 };
129 hdd2blue {
130 label = "kd20:blue:hdd2";
131 gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
132 linux,default-trigger = "ata2";
133 };
134 hdd2red {
135 label = "kd20:red:hdd2";
136 gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
137 };
138 usb {
139 label = "kd20:blue:usb";
140 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
141 trigger-sources = <&ehci_port1>, <&ehci_port2>;
142 linux,default-trigger = "usbport";
143 };
144 };
145
146 beeper: beeper {
147 compatible = "gpio-beeper";
148 gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
149 };
150
151 system_fan: gpio-fan {
152 compatible = "gpio-fan";
153 gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
154 gpio-fan,speed-map = <0 0
155 3000 1>;
156 #cooling-cells = <2>;
157 };
158
159 gpio-poweroff {
160 compatible = "gpio-poweroff";
161 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
162 };
163 };
164
165 &uart0 {
166 status = "okay";
167
168 pinctrl-names = "default";
169 pinctrl-0 = <&pinctrl_uart0>;
170 };
171
172 &nandc {
173 status = "okay";
174
175 pinctrl-names = "default";
176 pinctrl-0 = <&pinctrl_nand>;
177
178 nand@0 {
179 reg = <0>;
180 #address-cells = <1>;
181 #size-cells = <1>;
182 nand-ecc-mode = "soft";
183 nand-ecc-algo = "hamming";
184
185 partition@0 {
186 label = "stage1";
187 reg = <0x00000000 0x00040000>;
188 read-only;
189 };
190
191 partition@40000 {
192 label = "u-boot";
193 reg = <0x00040000 0x001e0000>;
194 read-only;
195 };
196
197 partition@220000 {
198 label = "u-boot-env";
199 reg = <0x00220000 0x00020000>;
200 };
201
202 partition@240000 {
203 label = "initrd";
204 reg = <0x00240000 0x00600000>;
205 };
206
207 partition@840000 {
208 label = "kernel";
209 reg = <0x00840000 0x007C0000>;
210 };
211
212 partition@e00000 {
213 label = "ubi";
214 reg = <0x01000000 0x07000000>;
215 };
216 };
217 };
218
219 &etha {
220 status = "okay";
221
222 pinctrl-names = "default";
223 pinctrl-0 = <&pinctrl_etha_mdio>;
224 };
225
226 &ehci {
227 status = "okay";
228 };
229
230 &sata {
231 status = "okay";
232 nr-ports = <2>;
233
234 hdd0_temp: sata-port@0 {
235 reg = <0>;
236 #thermal-sensor-cells = <0>;
237 };
238
239 hdd1_temp: sata-port@1 {
240 reg = <1>;
241 #thermal-sensor-cells = <0>;
242 };
243 };
244
245 &pcie_phy {
246 status = "okay";
247 };
248
249 &pcie0 {
250 status = "okay";
251 };