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