oxnas: kd20: generate image compatible with stock firmware
[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 / {
13         model = "Shuttle KD20";
14
15         chosen {
16                 bootargs = "console=ttyS0,115200n8 earlyprintk=serial mem=256M";
17         };
18
19         pcie-controller@47C00000 {
20                 status = "okay";
21         };
22
23         uart@44200000 {
24                 status = "okay";
25         };
26
27         sata@45900000 {
28                 status = "okay";
29                 nr-ports = <2>;
30         };
31
32         nand@41000000 {
33                 status = "okay";
34
35                 partition@0 {
36                         label = "stage1";
37                         reg = <0x00000000 0x00040000>;
38                         read-only;
39                 };
40
41                 partition@40000 {
42                         label = "u-boot";
43                         reg = <0x00040000 0x00200000>;
44                         read-only;
45                 };
46
47                 partition@240000 {
48                         label = "initrd";
49                         reg = <0x00240000 0x00600000>;
50                 };
51
52                 partition@840000 {
53                         label = "kernel";
54                         reg = <0x00840000 0x007C0000>;
55                 };
56
57                 partition@e00000 {
58                         label = "ubi";
59                         reg = <0x01000000 0x07000000>;
60                 };
61         };
62
63         ethernet@40400000 {
64                 status = "okay";
65                 snps,phy-addr = <1>;
66                 phy-mode = "rgmii-id";
67         };
68
69         ehci@40200100 {
70                 status = "okay";
71         };
72
73         i2c-gpio {
74                 compatible = "i2c-gpio";
75                 gpios = <&GPIOB 9 0 &GPIOB 10 0>;
76                 i2c-gpio,delay-us = <10>;
77                 #address-cells = <1>;
78                 #size-cells = <0>;
79                 pcf8563: rtc@51 {
80                         compatible = "nxp,pcf8563";
81                         reg = <0x51>;
82                 };
83         };
84
85         gpio-keys-polled {
86                 compatible = "gpio-keys-polled";
87                 #address-cells = <1>;
88                 #size-cells = <0>;
89                 poll-interval = <100>;
90
91                 power {
92                         label = "power";
93                         gpios = <&GPIOA 10 1>;
94                         linux,code = <116>;
95                 };
96                 reset {
97                         label = "reset";
98                         gpios = <&GPIOA 11 1>;
99                         linux,code = <0x198>;
100                 };
101                 eject1 {
102                         label = "eject1";
103                         gpios = <&GPIOA 5 1>;
104                         linux,code = <161>;
105                 };
106                 eject2 {
107                         label = "eject2";
108                         gpios = <&GPIOA 6 1>;
109                         linux,code = <162>;
110                 };
111         };
112
113         gpio-leds {
114                 compatible = "gpio-leds";
115                 status {
116                         label = "kd20:blue:status";
117                         gpios = <&GPIOB 16 0>;
118                 };
119                 status2 {
120                         label = "kd20:red:status";
121                         gpios = <&GPIOB 17 0>;
122                 };
123                 hdd1blue {
124                         label = "kd20:blue:hdd1";
125                         gpios = <&GPIOA 27 0>;
126                         linux,default-trigger = "ata1";
127                 };
128                 hdd1red {
129                         label = "kd20:red:hdd1";
130                         gpios = <&GPIOB 4 0>;
131                 };
132                 hdd2blue {
133                         label = "kd20:blue:hdd2";
134                         gpios = <&GPIOB 6 0>;
135                         linux,default-trigger = "ata2";
136                 };
137                 hdd2red {
138                         label = "kd20:red:hdd2";
139                         gpios = <&GPIOB 7 0>;
140                 };
141                 usb {
142                         label = "kd20:blue:usb";
143                         gpios = <&GPIOB 8 0>;
144                 };
145         };
146
147         beeper: beeper {
148                 compatible = "gpio-beeper";
149                 gpios = <&GPIOB 11 0>;
150         };
151
152         gpio-fan {
153                 compatible = "gpio-fan";
154                 gpios = <&GPIOA 2 1>;
155                 gpio-fan,speed-map = <0    0
156                                       3000 1>;
157         };
158
159         gpio-poweroff {
160                 compatible = "gpio-poweroff";
161                 gpios = <&GPIOA 9 0>;
162         };
163 };