ramips: add support for TP-Link RE200 v1
[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";
30
31                 reset {
32                         label = "reset";
33                         gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
34                         linux,code = <KEY_RESTART>;
35                 };
36         };
37 };
38
39 &state_default {
40         gpio {
41                 ralink,group = "gpio";
42                 ralink,function = "gpio";
43         };
44
45         perst {
46                 ralink,group = "perst";
47                 ralink,function = "gpio";
48         };
49
50         refclk {
51                 ralink,group = "refclk";
52                 ralink,function = "gpio";
53         };
54
55         i2s {
56                 ralink,group = "i2s";
57                 ralink,function = "gpio";
58         };
59
60         spis {
61                 ralink,group = "spis";
62                 ralink,function = "gpio";
63         };
64
65         wled_kn {
66                 ralink,group = "wled_kn";
67                 ralink,function = "gpio";
68         };
69
70         wled_an {
71                 ralink,group = "wled_an";
72                 ralink,function = "gpio";
73         };
74
75         wdt {
76                 ralink,group = "wdt";
77                 ralink,function = "gpio";
78         };
79
80         pwm0 {
81                 ralink,group = "pwm0";
82                 ralink,function = "gpio";
83         };
84
85         pwm1 {
86                 ralink,group = "pwm1";
87                 ralink,function = "gpio";
88         };
89 };
90
91 &gpio1 {
92         status = "okay";
93 };
94
95 &gpio2 {
96         status = "okay";
97 };
98
99 &spi0 {
100         status = "okay";
101
102         pinctrl-names = "default";
103         pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
104
105         m25p80@0 {
106                 compatible = "jedec,spi-nor";
107                 reg = <0>;
108                 spi-max-frequency = <40000000>;
109
110                 partitions {
111                         compatible = "fixed-partitions";
112                         #address-cells = <1>;
113                         #size-cells = <1>;
114
115                         partition@0 {
116                                 label = "u-boot";
117                                 reg = <0x0 0x30000>;
118                                 read-only;
119                         };
120
121                         partition@30000 {
122                                 label = "u-boot-env";
123                                 reg = <0x30000 0x10000>;
124                                 read-only;
125                         };
126
127                         factory: partition@40000 {
128                                 label = "factory";
129                                 reg = <0x40000 0x10000>;
130                                 read-only;
131                         };
132
133                         firmware: partition@50000 {
134                                 compatible = "denx,uimage";
135                                 label = "firmware";
136                         };
137                 };
138         };
139
140         spidev@1 {
141                 #address-cells = <1>;
142                 #size-cells = <1>;
143                 compatible = "linux,spidev";
144                 reg = <1>;
145                 spi-max-frequency = <40000000>;
146         };
147 };
148
149 &i2c {
150         status = "okay";
151 };
152
153 &uart1 {
154         status = "okay";
155 };
156
157 &uart2 {
158         status = "okay";
159 };
160
161 &ethernet {
162         mtd-mac-address = <&factory 0x28>;
163 };
164
165 &sdhci {
166         status = "okay";
167         mediatek,cd-low;
168 };
169
170 &wmac {
171         status = "okay";
172 };