ramips/mt762x: convert devices to interrupt-driven gpio-keys
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / mt7621_netis_wf-2881.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "netis,wf-2881", "mediatek,mt7621-soc";
10 model = "NETIS WF-2881";
11
12 aliases {
13 led-boot = &led_wps;
14 led-failsafe = &led_wps;
15 led-running = &led_wps;
16 led-upgrade = &led_wps;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,57600";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 usb {
27 label = "wf-2881:green:usb";
28 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
29 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
30 linux,default-trigger = "usbport";
31 };
32
33 led_wps: wps {
34 label = "wf-2881:green:wps";
35 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
36 };
37 };
38
39 keys {
40 compatible = "gpio-keys";
41
42 reset {
43 label = "reset";
44 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_RESTART>;
46 };
47 };
48 };
49
50 &nand {
51 status = "okay";
52
53 partitions {
54 compatible = "fixed-partitions";
55 #address-cells = <1>;
56 #size-cells = <1>;
57
58 partition@0 {
59 label = "u-boot";
60 reg = <0x0 0x30000>;
61 read-only;
62 };
63
64 partition@30000 {
65 label = "u-boot-env";
66 reg = <0x30000 0x1000>;
67 read-only;
68 };
69
70 partition@80000 {
71 label = "config";
72 reg = <0x80000 0x80000>;
73 read-only;
74 };
75
76 factory: partition@100000 {
77 label = "factory";
78 reg = <0x100000 0x40000>;
79 read-only;
80 };
81
82 partition@140000 {
83 compatible = "denx,uimage";
84 label = "firmware";
85 reg = <0x140000 0x7E40000>;
86 };
87 };
88 };
89
90 &pcie {
91 status = "okay";
92 };
93
94 &pcie0 {
95 mt76@0,0 {
96 reg = <0x0000 0 0 0 0>;
97 mediatek,mtd-eeprom = <&factory 0x8000>;
98 ieee80211-freq-limit = <5000000 6000000>;
99 };
100 };
101
102 &pcie1 {
103 mt76@0,0 {
104 reg = <0x0000 0 0 0 0>;
105 mediatek,mtd-eeprom = <&factory 0x0000>;
106 ieee80211-freq-limit = <2400000 2500000>;
107 };
108 };
109
110 &ethernet {
111 mtd-mac-address = <&factory 0xe006>;
112 };
113
114 &pinctrl {
115 state_default: pinctrl0 {
116 gpio {
117 ralink,group = "uart3", "jtag";
118 ralink,function = "gpio";
119 };
120 };
121 };