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