a7c28341b2d8ccd2f589f291200cc849e0d89f5e
[openwrt/openwrt.git] / target / linux / ramips / dts / WHR-G300N.dts
1 /dts-v1/;
2
3 #include "rt3050.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "buffalo,whr-g300n", "ralink,rt3052-soc";
10 model = "Buffalo WHR-G300N";
11
12 cfi@1f000000 {
13 compatible = "cfi-flash";
14 reg = <0x1f000000 0x800000>;
15 bank-width = <2>;
16 device-width = <2>;
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 partition@0 {
21 label = "u-boot";
22 reg = <0x0 0x30000>;
23 read-only;
24 };
25
26 partition@30000 {
27 label = "u-boot-env";
28 reg = <0x30000 0x10000>;
29 read-only;
30 };
31
32 factory: partition@40000 {
33 label = "factory";
34 reg = <0x40000 0x10000>;
35 read-only;
36 };
37
38 partition@50000 {
39 label = "firmware";
40 reg = <0x50000 0x3a0000>;
41 };
42
43 partition@3f0000 {
44 label = "user";
45 reg = <0x3f0000 0x10000>;
46 read-only;
47 };
48 };
49
50 gpio-leds {
51 compatible = "gpio-leds";
52
53 diag {
54 label = "whr-g300n:red:diag";
55 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
56 };
57
58 router {
59 label = "whr-g300n:green:router";
60 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
61 };
62
63 security {
64 label = "whr-g300n:amber:security";
65 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
66 };
67 };
68
69 gpio-keys-polled {
70 compatible = "gpio-keys-polled";
71 #address-cells = <1>;
72 #size-cells = <0>;
73 poll-interval = <20>;
74
75 reset {
76 label = "reset";
77 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
78 linux,code = <KEY_RESTART>;
79 };
80
81 aoss {
82 label = "aoss";
83 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
84 linux,code = <KEY_WPS_BUTTON>;
85 };
86
87 router-off {
88 label = "router-off";
89 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
90 linux,code = <BTN_2>;
91 };
92
93 router-on {
94 label = "router-on";
95 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
96 linux,code = <BTN_3>;
97 };
98 };
99 };
100
101 &pinctrl {
102 state_default: pinctrl0 {
103 gpio {
104 ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
105 ralink,function = "gpio";
106 };
107 };
108 };
109
110 &ethernet {
111 mtd-mac-address = <&factory 0x4>;
112 };
113
114 &esw {
115 mediatek,portmap = <0x2f>;
116 };
117
118 &wmac {
119 ralink,mtd-eeprom = <&factory 0>;
120 };