ramips/mt762x: convert devices to interrupt-driven gpio-keys
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_planex_cs-qr10.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "planex,cs-qr10", "ralink,mt7620a-soc";
10         model = "Planex CS-QR10";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         leds {
20                 compatible = "gpio-leds";
21
22                 led_power: power {
23                         label = "cs-qr10:red:power";
24                         gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
25                 };
26         };
27
28         keys {
29                 compatible = "gpio-keys";
30
31                 s1 {
32                         label = "reset";
33                         gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
34                         linux,code = <KEY_RESTART>;
35                 };
36
37                 s2 {
38                         label = "wps";
39                         gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
40                         linux,code = <KEY_WPS_BUTTON>;
41                 };
42         };
43 };
44
45 &gpio0 {
46         status = "okay";
47 };
48
49 &gpio1 {
50         status = "okay";
51 };
52
53 &gpio2 {
54         status = "okay";
55 };
56
57 &gpio3 {
58         status = "okay";
59 };
60
61 &i2c {
62         status = "okay";
63 };
64
65 &i2s {
66         status = "okay";
67         pinctrl-names = "default";
68         pinctrl-0 = <&pcm_i2s_pins>;
69 };
70
71 &spi0 {
72         status = "okay";
73
74         m25p80@0 {
75                 compatible = "jedec,spi-nor";
76                 reg = <0>;
77                 spi-max-frequency = <10000000>;
78
79                 partitions {
80                         compatible = "fixed-partitions";
81                         #address-cells = <1>;
82                         #size-cells = <1>;
83
84                         partition@0 {
85                                 label = "u-boot";
86                                 reg = <0x0 0x30000>;
87                                 read-only;
88                         };
89
90                         partition@30000 {
91                                 label = "u-boot-env";
92                                 reg = <0x30000 0x10000>;
93                                 read-only;
94                         };
95
96                         factory: partition@40000 {
97                                 label = "factory";
98                                 reg = <0x40000 0x10000>;
99                                 read-only;
100                         };
101
102                         partition@50000 {
103                                 compatible = "denx,uimage";
104                                 label = "firmware";
105                                 reg = <0x50000 0x7b0000>;
106                         };
107                 };
108         };
109 };
110
111 &pcm {
112         status = "okay";
113 };
114
115 &gdma {
116         status = "okay";
117 };
118
119 &pinctrl {
120         state_default: pinctrl0 {
121                 gpio {
122                         ralink,group = "spi refclk", "rgmii1";
123                         ralink,function = "gpio";
124                 };
125                 wdt {
126                         ralink,group = "wdt";
127                         ralink,function = "wdt refclk";
128                 };
129         };
130 };
131
132 &ethernet {
133         pinctrl-names = "default";
134         pinctrl-0 = <&ephy_pins>;
135         mtd-mac-address = <&factory 0x4>;
136         mediatek,portmap = "llllw";
137 };
138
139 &gsw {
140         ralink,port4 = "ephy";
141 };
142
143 &sdhci {
144         status = "okay";
145 };
146
147 &ehci {
148         status = "okay";
149 };
150
151 &ohci {
152         status = "okay";
153 };
154
155 &wmac {
156         ralink,mtd-eeprom = <&factory 0>;
157 };