ramips/mt762x: convert devices to interrupt-driven gpio-keys
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7620n_ravpower_wd03.dts
1 /dts-v1/;
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "ravpower,wd03", "ralink,mt7620n-soc";
10 model = "Ravpower WD03";
11
12 chosen {
13 bootargs = "console=ttyS0,115200";
14 };
15
16 leds {
17 compatible = "gpio-leds";
18
19 green-wifi {
20 label = "wd03:green:wifi";
21 gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
22 };
23
24 blue-wifi {
25 label = "wd03:blue:wifi";
26 gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
27 };
28 };
29
30 keys {
31 compatible = "gpio-keys";
32
33 reset {
34 label = "reset";
35 gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
36 linux,code = <KEY_RESTART>;
37 };
38 };
39 };
40
41 &gpio2 {
42 status = "okay";
43 };
44
45 &gpio3 {
46 status = "okay";
47 };
48
49 &i2c {
50 status = "okay";
51 };
52
53 &spi0 {
54 status = "okay";
55
56 m25p80@0 {
57 compatible = "jedec,spi-nor";
58 reg = <0>;
59 spi-max-frequency = <10000000>;
60
61 partitions {
62 compatible = "fixed-partitions";
63 #address-cells = <1>;
64 #size-cells = <1>;
65
66 partition@0 {
67 label = "u-boot";
68 reg = <0x0 0x30000>;
69 read-only;
70 };
71
72 partition@30000 {
73 label = "u-boot-env";
74 reg = <0x30000 0x10000>;
75 read-only;
76 };
77
78 factory: partition@40000 {
79 label = "factory";
80 reg = <0x40000 0x10000>;
81 read-only;
82 };
83
84 partition@50000 {
85 compatible = "denx,uimage";
86 label = "firmware";
87 reg = <0x50000 0x7b0000>;
88 };
89 };
90 };
91 };
92
93 &ehci {
94 status = "okay";
95 };
96
97 &ohci {
98 status = "okay";
99 };
100
101 &ethernet {
102 mtd-mac-address = <&factory 0x4000>;
103 ralink,port-map = "wllll";
104 };
105
106 &wmac {
107 ralink,mtd-eeprom = <&factory 0>;
108 };
109
110 &pinctrl {
111 state_default: pinctrl0 {
112 gpio {
113 ralink,group = "wled", "ephy";
114 ralink,function = "gpio";
115 };
116 };
117 };