oxnas: switch to DTS aliases for LEDs and use generic diag.sh
[oweals/openwrt.git] / target / linux / oxnas / files / arch / arm / boot / dts / ox820-mitrastar-stg212.dts
1 /dts-v1/;
2
3 #include "ox820.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         model = "MitraStar Technology Corp. STG-212";
9
10         compatible = "mitrastar,stg-212", "oxsemi,ox820";
11
12         chosen {
13                 bootargs = "earlyprintk console=ttyS0,115200";
14                 stdout-path = "serial0:115200n8";
15         };
16
17         memory {
18                 /* 128Mbytes DDR */
19                 reg = <0x60000000 0x8000000>;
20         };
21
22         aliases {
23                 serial0 = &uart0;
24                 gpio0 = &gpio0;
25                 gpio1 = &gpio1;
26                 led-boot = &led_status;
27                 led-failsafe = &led_warn;
28                 led-running = &led_status;
29                 led-upgrade = &led_warn;
30         };
31
32         keys {
33                 compatible = "gpio-keys-polled";
34                 #address-cells = <1>;
35                 #size-cells = <0>;
36                 poll-interval = <100>;
37
38                 reset {
39                         label = "reset";
40                         gpios = <&gpio1 11 1>;
41                         linux,code = <KEY_RESTART>;
42                 };
43                 copy {
44                         label = "copy";
45                         gpios = <&gpio1 13 1>;
46                         linux,code = <KEY_COPY>;
47                 };
48         };
49
50         leds {
51                 compatible = "gpio-leds";
52                 led_status: status {
53                         label = "zyxel:blue:status";
54                         gpios = <&gpio1 5 0>;
55                 };
56                 led_warn: status2 {
57                         label = "zyxel:red:status";
58                         gpios = <&gpio1 6 1>;
59                 };
60                 copy {
61                         label = "zyxel:orange:copy";
62                         gpios = <&gpio1 8 1>;
63                         trigger-sources = <&ehci_port1>, <&ehci_port2>;
64                         linux,default-trigger = "usbport";
65                 };
66         };
67
68         i2c-gpio {
69                 compatible = "i2c-gpio";
70                 gpios = <&gpio1 9 0 &gpio1 10 0>;
71                 i2c-gpio,delay-us = <10>;
72         };
73 };
74
75 &uart0 {
76         status = "okay";
77
78         pinctrl-names = "default";
79         pinctrl-0 = <&pinctrl_uart0>;
80 };
81
82 &nandc {
83         status = "okay";
84
85         pinctrl-names = "default";
86         pinctrl-0 = <&pinctrl_nand>;
87
88         nand@0 {
89                 reg = <0>;
90                 #address-cells = <1>;
91                 #size-cells = <1>;
92                 nand-ecc-mode = "soft";
93                 nand-ecc-algo = "hamming";
94
95                 partition@0 {
96                         label = "stage1";
97                         reg = <0x00000000 0x00040000>;
98                         read-only;
99                 };
100
101                 partition@40000 {
102                         label = "u-boot";
103                         reg = <0x00040000 0x00380000>;
104                         read-only;
105                 };
106
107                 partition@3c0000 {
108                         label = "u-boot-env";
109                         reg = <0x003c0000 0x00080000>;
110                 };
111
112                 partition@440000 {
113                         label = "kernel";
114                         reg = <0x00440000 0x009c0000>;
115                 };
116
117                 partition@e00000 {
118                         label = "ubi";
119                         reg = <0x00e00000 0x07200000>;
120                 };
121         };
122 };
123
124 &etha {
125         status = "okay";
126
127         pinctrl-names = "default";
128         pinctrl-0 = <&pinctrl_etha_mdio>;
129 };
130
131 &ehci {
132         status = "okay";
133 };
134
135 &sata {
136         status = "okay";
137 };