ramips: add support for XiaoYu XY-C5
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_onion_omega2.dtsi
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7         compatible = "onion,omega2", "mediatek,mt7628an-soc";
8
9         aliases {
10                 led-boot = &system_led;
11                 led-failsafe = &system_led;
12                 led-running = &system_led;
13                 led-upgrade = &system_led;
14         };
15
16         chosen {
17                 bootargs = "console=ttyS0,115200";
18         };
19
20         leds {
21                 compatible = "gpio-leds";
22
23                 system_led: system {
24                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
25                 };
26         };
27
28         keys {
29                 compatible = "gpio-keys-polled";
30                 poll-interval = <20>;
31
32                 reset {
33                         label = "reset";
34                         gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
35                         linux,code = <KEY_RESTART>;
36                 };
37         };
38 };
39
40 &pinctrl {
41         state_default: pinctrl0 {
42                 gpio {
43                         ralink,group = "gpio";
44                         ralink,function = "gpio";
45                 };
46
47                 perst {
48                         ralink,group = "perst";
49                         ralink,function = "gpio";
50                 };
51
52                 refclk {
53                         ralink,group = "refclk";
54                         ralink,function = "gpio";
55                 };
56
57                 i2s {
58                         ralink,group = "i2s";
59                         ralink,function = "gpio";
60                 };
61
62                 spis {
63                         ralink,group = "spis";
64                         ralink,function = "gpio";
65                 };
66
67                 wled_kn {
68                         ralink,group = "wled_kn";
69                         ralink,function = "gpio";
70                 };
71
72                 wled_an {
73                         ralink,group = "wled_an";
74                         ralink,function = "gpio";
75                 };
76
77                 wdt {
78                         ralink,group = "wdt";
79                         ralink,function = "gpio";
80                 };
81
82                 pwm0 {
83                         ralink,group = "pwm0";
84                         ralink,function = "gpio";
85                 };
86
87                 pwm1 {
88                         ralink,group = "pwm1";
89                         ralink,function = "gpio";
90                 };
91         };
92 };
93
94 &gpio1 {
95         status = "okay";
96 };
97
98 &gpio2 {
99         status = "okay";
100 };
101
102 &spi0 {
103         status = "okay";
104
105         pinctrl-names = "default";
106         pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
107
108         m25p80@0 {
109                 compatible = "jedec,spi-nor";
110                 reg = <0>;
111                 spi-max-frequency = <40000000>;
112
113                 partitions {
114                         compatible = "fixed-partitions";
115                         #address-cells = <1>;
116                         #size-cells = <1>;
117
118                         partition@0 {
119                                 label = "u-boot";
120                                 reg = <0x0 0x30000>;
121                                 read-only;
122                         };
123
124                         partition@30000 {
125                                 label = "u-boot-env";
126                                 reg = <0x30000 0x10000>;
127                                 read-only;
128                         };
129
130                         factory: partition@40000 {
131                                 label = "factory";
132                                 reg = <0x40000 0x10000>;
133                                 read-only;
134                         };
135
136                         firmware: partition@50000 {
137                                 compatible = "denx,uimage";
138                                 label = "firmware";
139                         };
140                 };
141         };
142
143         spidev@1 {
144                 #address-cells = <1>;
145                 #size-cells = <1>;
146                 compatible = "linux,spidev";
147                 reg = <1>;
148                 spi-max-frequency = <40000000>;
149         };
150 };
151
152 &i2c {
153         status = "okay";
154 };
155
156 &uart1 {
157         status = "okay";
158 };
159
160 &uart2 {
161         status = "okay";
162 };
163
164 &ethernet {
165         mtd-mac-address = <&factory 0x28>;
166 };
167
168 &sdhci {
169         status = "okay";
170         mediatek,cd-low;
171 };
172
173 &wmac {
174         status = "okay";
175 };