treewide: dts: use keycode defines from input dt-binding
[openwrt/openwrt.git] / target / linux / ramips / dts / WZR-AGL300NH.dts
1 /dts-v1/;
2
3 #include "rt2880.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8 #address-cells = <1>;
9 #size-cells = <1>;
10 compatible = "WZR-AGL300NH", "ralink,rt2880-soc";
11 model = "Buffalo WZR-AGL300NH";
12
13 pci@440000 {
14 compatible = "ralink,rt288x-pci";
15 reg = <0x00440000 0x20000>;
16 #address-cells = <1>;
17 #size-cells = <1>;
18 status = "ok";
19 };
20
21 cfi@1f000000 {
22 compatible = "cfi-flash";
23 reg = <0x1f000000 0x800000>;
24 bank-width = <2>;
25 device-width = <2>;
26 #address-cells = <1>;
27 #size-cells = <1>;
28
29 partition@0 {
30 label = "uboot";
31 reg = <0x0 0x30000>;
32 read-only;
33 };
34
35 partition@30000 {
36 label = "uboot-env";
37 reg = <0x30000 0x10000>;
38 read-only;
39 };
40
41 factory: partition@40000 {
42 label = "factory";
43 reg = <0x40000 0x10000>;
44 read-only;
45 };
46
47 partition@50000 {
48 label = "firmware";
49 reg = <0x50000 0x3b0000>;
50 };
51 };
52
53 rtl8366s {
54 compatible = "realtek,rtl8366s";
55 gpio-sda = <&gpio0 1 0>;
56 gpio-sck = <&gpio0 2 0>;
57 };
58
59 gpio-keys-polled {
60 compatible = "gpio-keys-polled";
61 #address-cells = <1>;
62 #size-cells = <0>;
63 poll-interval = <100>;
64
65 wps {
66 label = "wps";
67 gpios = <&gpio0 0 1>;
68 linux,code = <KEY_WPS_BUTTON>;
69 };
70
71 router {
72 label = "router_switch";
73 gpios = <&gpio0 7 0>;
74 linux,code = <BTN_0>;
75 };
76
77 reset {
78 label = "reset";
79 gpios = <&gpio0 9 1>;
80 linux,code = <KEY_RESTART>;
81 };
82 };
83
84 gpio-leds {
85 compatible = "gpio-leds";
86
87 router {
88 label = "wzr-agl300nh:green:router";
89 gpios = <&gpio0 8 1>;
90 };
91
92 diag {
93 label = "wzr-agl300nh:red:diag";
94 gpios = <&gpio0 12 1>;
95 };
96
97 security_g {
98 label = "wzr-agl300nh:orange:security_g";
99 gpios = <&gpio0 11 1>;
100 };
101
102 security_n {
103 label = "wzr-agl300nh:orange:security_n";
104 gpios = <&gpio0 13 1>;
105 };
106 };
107 };
108
109 &gpio0 {
110 status = "okay";
111 };
112
113 &pinctrl {
114 state_default: pinctrl0 {
115 gpio {
116 ralink,group = "i2c", "uartlite", "mdio";
117 ralink,function = "gpio";
118 };
119 };
120 };
121
122 &ethernet {
123 status = "okay";
124 mtd-mac-address = <&factory 0x4>;
125
126 port@0 {
127 mediatek,fixed-link = <1000 1 1 1>;
128 };
129
130 mdio-bus {
131 status = "okay";
132
133 phy0: ethernet-phy@0 {
134 phy-mode = "mii";
135 reg = <0>;
136 };
137 };
138 };
139
140 &wmac {
141 ralink,mtd-eeprom = <&factory 0>;
142 };