Fresh pull from upstream
[librecmc/librecmc.git] / target / linux / ramips / dts / WHR-G300N.dts
1 /dts-v1/;
2
3 #include "rt3050.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         compatible = "WHR-G300N", "ralink,rt3052-soc";
9         model = "Buffalo WHR-G300N";
10
11         cfi@1f000000 {
12                 compatible = "cfi-flash";
13                 reg = <0x1f000000 0x800000>;
14                 bank-width = <2>;
15                 device-width = <2>;
16                 #address-cells = <1>;
17                 #size-cells = <1>;
18         };
19
20         gpio-leds {
21                 compatible = "gpio-leds";
22
23                 diag {
24                         label = "whr-g300n:red:diag";
25                         gpios = <&gpio0 7 1>;
26                 };
27
28                 router {
29                         label = "whr-g300n:green:router";
30                         gpios = <&gpio0 9 1>;
31                 };
32
33                 security {
34                         label = "whr-g300n:amber:security";
35                         gpios = <&gpio0 14 1>;
36                 };
37         };
38
39         gpio-keys-polled {
40                 compatible = "gpio-keys-polled";
41                 #address-cells = <1>;
42                 #size-cells = <0>;
43                 poll-interval = <20>;
44
45                 reset {
46                         label = "reset";
47                         gpios = <&gpio0 10 1>;
48                         linux,code = <KEY_RESTART>;
49                 };
50
51                 aoss {
52                         label = "aoss";
53                         gpios = <&gpio0 0 1>;
54                         linux,code = <KEY_WPS_BUTTON>;
55                 };
56
57                 router-off {
58                         label = "router-off";
59                         gpios = <&gpio0 11 1>;
60                         linux,code = <BTN_2>;
61                 };
62
63                 router-on {
64                         label = "router-on";
65                         gpios = <&gpio0 8 1>;
66                         linux,code = <BTN_3>;
67                 };
68         };
69 };
70
71 &pinctrl {
72         state_default: pinctrl0 {
73                 gpio {
74                         ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
75                         ralink,function = "gpio";
76                 };
77         };
78 };
79
80 &esw {
81         mediatek,portmap = <0x2f>;
82 };
83
84 /* FIXME: no partitions defined */
85 /*&wmac {
86         ralink,mtd-eeprom = <&factory 0>;
87 };
88 */