ramips: add support for Rostelecom RT-FE-1A
[openwrt/openwrt.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 label = "factory";
41 reg = <0x40000 0x10000>;
42 read-only;
43
44 nvmem-layout {
45 compatible = "fixed-layout";
46 #address-cells = <1>;
47 #size-cells = <1>;
48
49 eeprom_factory_0: eeprom@0 {
50 reg = <0x0 0x200>;
51 };
52
53 macaddr_factory_4: macaddr@4 {
54 reg = <0x4 0x6>;
55 };
56 };
57 };
58
59 partition@50000 {
60 compatible = "denx,uimage";
61 label = "firmware";
62 reg = <0x50000 0x3a0000>;
63 };
64
65 partition@3f0000 {
66 label = "user";
67 reg = <0x3f0000 0x10000>;
68 read-only;
69 };
70 };
71 };
72
73 leds {
74 compatible = "gpio-leds";
75
76 led_diag: diag {
77 label = "red:diag";
78 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
79 };
80
81 router {
82 label = "green:router";
83 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
84 };
85
86 security {
87 label = "amber:security";
88 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
89 };
90 };
91
92 keys {
93 compatible = "gpio-keys-polled";
94 poll-interval = <20>;
95
96 reset {
97 label = "reset";
98 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
99 linux,code = <KEY_RESTART>;
100 };
101
102 aoss {
103 label = "aoss";
104 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
105 linux,code = <KEY_WPS_BUTTON>;
106 };
107
108 router-off {
109 label = "router-off";
110 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
111 linux,code = <BTN_2>;
112 };
113
114 router-on {
115 label = "router-on";
116 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
117 linux,code = <BTN_3>;
118 };
119 };
120 };
121
122 &state_default {
123 gpio {
124 groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
125 function = "gpio";
126 };
127 };
128
129 &ethernet {
130 nvmem-cells = <&macaddr_factory_4>;
131 nvmem-cell-names = "mac-address";
132 };
133
134 &esw {
135 mediatek,portmap = <0x2f>;
136 };
137
138 &wmac {
139 nvmem-cells = <&eeprom_factory_0>;
140 nvmem-cell-names = "eeprom";
141 };