oxnas: backport upstream NAND driver
[lede.git] / target / linux / oxnas / files / arch / arm / boot / dts / ox820-stg212.dts
1 /*
2  * Copyright (C) 2013 OpenWrt.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
11 #include "ox820.dtsi"
12
13 #include <dt-bindings/input/input.h>
14
15 / {
16         model = "MitraStar Technology Corp. STG-212";
17
18         chosen {
19                 bootargs = "console=ttyS0,115200n8 earlyprintk=serial mem=128M";
20         };
21
22         uart@44200000 {
23                 status = "okay";
24         };
25
26         sata@45900000 {
27                 status = "okay";
28         };
29
30
31         ethernet@40400000 {
32                 status = "okay";
33         };
34
35         ehci@40200100 {
36                 status = "okay";
37         };
38
39         gpio-keys-polled {
40                 compatible = "gpio-keys-polled";
41                 #address-cells = <1>;
42                 #size-cells = <0>;
43                 poll-interval = <100>;
44
45                 reset {
46                         label = "reset";
47                         gpios = <&GPIOB 11 1>;
48                         linux,code = <KEY_RESTART>;
49                 };
50                 copy {
51                         label = "copy";
52                         gpios = <&GPIOB 13 1>;
53                         linux,code = <KEY_COPY>;
54                 };
55         };
56
57         gpio-leds {
58                 compatible = "gpio-leds";
59                 status {
60                         label = "zyxel:blue:status";
61                         gpios = <&GPIOB 5 0>;
62                 };
63                 status2 {
64                         label = "zyxel:red:status";
65                         gpios = <&GPIOB 6 1>;
66                 };
67                 copy {
68                         label = "zyxel:orange:copy";
69                         gpios = <&GPIOB 8 1>;
70                 };
71         };
72
73         i2c-gpio {
74                 compatible = "i2c-gpio";
75                 gpios = <&GPIOB 9 0 &GPIOB 10 0>;
76                 i2c-gpio,delay-us = <10>;
77         };
78
79 };
80
81 &nandc {
82         status = "okay";
83
84         nand@0 {
85                 reg = <0>;
86                 #address-cells = <1>;
87                 #size-cells = <1>;
88                 nand-ecc-mode = "soft";
89                 nand-ecc-algo = "hamming";
90
91                 partition@0 {
92                         label = "boot";
93                         reg = <0x00000000 0x00e00000>;
94                         read-only;
95                 };
96
97                 partition@e00000 {
98                         label = "ubi";
99                         reg = <0x00e00000 0x07200000>;
100                 };
101         };
102 };