a59addccacddf20054f68f82e44f3d11552c3602
[lede.git] / target / linux / oxnas / files / arch / arm / boot / dts / ox820-kd20.dts
1 /*
2  * Copyright (C) 2014 Daniel Golle <daniel@makrotopia.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
8
9 /dts-v1/;
10 #include "ox820.dtsi"
11
12 #include <dt-bindings/input/input.h>
13
14 / {
15         model = "Shuttle KD20";
16
17         chosen {
18                 bootargs = "console=ttyS0,115200n8 earlyprintk=serial mem=256M";
19         };
20
21         pcie-controller@47C00000 {
22                 status = "okay";
23         };
24
25         uart@44200000 {
26                 status = "okay";
27         };
28
29         sata@45900000 {
30                 status = "okay";
31                 nr-ports = <2>;
32         };
33
34         ethernet@40400000 {
35                 status = "okay";
36                 snps,phy-addr = <1>;
37                 phy-mode = "rgmii-id";
38         };
39
40         ehci@40200100 {
41                 status = "okay";
42         };
43
44         i2c-gpio {
45                 compatible = "i2c-gpio";
46                 gpios = <&GPIOB 9 0 &GPIOB 10 0>;
47                 i2c-gpio,delay-us = <10>;
48                 #address-cells = <1>;
49                 #size-cells = <0>;
50                 pcf8563: rtc@51 {
51                         compatible = "nxp,pcf8563";
52                         reg = <0x51>;
53                 };
54         };
55
56         gpio-keys-polled {
57                 compatible = "gpio-keys-polled";
58                 #address-cells = <1>;
59                 #size-cells = <0>;
60                 poll-interval = <100>;
61
62                 power {
63                         label = "power";
64                         gpios = <&GPIOA 10 1>;
65                         linux,code = <KEY_POWER>;
66                 };
67                 reset {
68                         label = "reset";
69                         gpios = <&GPIOA 11 1>;
70                         linux,code = <KEY_RESTART>;
71                 };
72                 eject1 {
73                         label = "eject1";
74                         gpios = <&GPIOA 5 1>;
75                         linux,code = <KEY_EJECTCD>;
76                 };
77                 eject2 {
78                         label = "eject2";
79                         gpios = <&GPIOA 6 1>;
80                         linux,code = <162>;
81                 };
82         };
83
84         gpio-leds {
85                 compatible = "gpio-leds";
86                 status {
87                         label = "kd20:blue:status";
88                         gpios = <&GPIOB 16 0>;
89                 };
90                 status2 {
91                         label = "kd20:red:status";
92                         gpios = <&GPIOB 17 0>;
93                 };
94                 hdd1blue {
95                         label = "kd20:blue:hdd1";
96                         gpios = <&GPIOA 27 0>;
97                         linux,default-trigger = "ata1";
98                 };
99                 hdd1red {
100                         label = "kd20:red:hdd1";
101                         gpios = <&GPIOB 4 0>;
102                 };
103                 hdd2blue {
104                         label = "kd20:blue:hdd2";
105                         gpios = <&GPIOB 6 0>;
106                         linux,default-trigger = "ata2";
107                 };
108                 hdd2red {
109                         label = "kd20:red:hdd2";
110                         gpios = <&GPIOB 7 0>;
111                 };
112                 usb {
113                         label = "kd20:blue:usb";
114                         gpios = <&GPIOB 8 0>;
115                 };
116         };
117
118         beeper: beeper {
119                 compatible = "gpio-beeper";
120                 gpios = <&GPIOB 11 0>;
121         };
122
123         gpio-fan {
124                 compatible = "gpio-fan";
125                 gpios = <&GPIOA 2 1>;
126                 gpio-fan,speed-map = <0    0
127                                       3000 1>;
128         };
129
130         gpio-poweroff {
131                 compatible = "gpio-poweroff";
132                 gpios = <&GPIOA 9 0>;
133         };
134 };
135
136 &nandc {
137         status = "okay";
138
139         nand@0 {
140                 reg = <0>;
141                 #address-cells = <1>;
142                 #size-cells = <1>;
143                 nand-ecc-mode = "soft";
144                 nand-ecc-algo = "hamming";
145
146                 partition@0 {
147                         label = "stage1";
148                         reg = <0x00000000 0x00040000>;
149                         read-only;
150                 };
151
152                 partition@40000 {
153                         label = "u-boot";
154                         reg = <0x00040000 0x00200000>;
155                         read-only;
156                 };
157
158                 partition@240000 {
159                         label = "initrd";
160                         reg = <0x00240000 0x00600000>;
161                 };
162
163                 partition@840000 {
164                         label = "kernel";
165                         reg = <0x00840000 0x007C0000>;
166                 };
167
168                 partition@e00000 {
169                         label = "ubi";
170                         reg = <0x01000000 0x07000000>;
171                 };
172         };
173 };