ramips: add support for EnGenius ESR600
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_elecom_wrc-1167ghbk2-s.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "elecom,wrc-1167ghbk2-s", "mediatek,mt7621-soc";
10         model = "ELECOM WRC-1167GHBK2-S";
11
12         aliases {
13                 led-boot = &led_power_green;
14                 led-failsafe = &led_power_green;
15                 led-running = &led_power_green;
16                 led-upgrade = &led_power_green;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,57600";
21         };
22
23         leds {
24                 compatible = "gpio-leds";
25
26                 wlan2g {
27                         label = "wrc-1167ghbk2-s:white:wlan2g";
28                         gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
29                         linux,default-trigger = "phy0radio";
30                 };
31
32                 wlan5g {
33                         label = "wrc-1167ghbk2-s:white:wlan5g";
34                         gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
35                 };
36
37                 led_power_green: power_green {
38                         label = "wrc-1167ghbk2-s:green:power";
39                         gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
40                 };
41
42                 power_blue {
43                         label = "wrc-1167ghbk2-s:blue:power";
44                         gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
45                 };
46
47                 wps {
48                         label = "wrc-1167ghbk2-s:red:wps";
49                         gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
50                 };
51
52                 power_red {
53                         label = "wrc-1167ghbk2-s:red:power";
54                         gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
55                 };
56         };
57
58         keys {
59                 compatible = "gpio-keys-polled";
60                 poll-interval = <20>;
61
62                 reset {
63                         label = "reset";
64                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
65                         linux,code = <KEY_RESTART>;
66                 };
67
68                 wps {
69                         label = "wps";
70                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
71                         linux,code = <KEY_WPS_BUTTON>;
72                 };
73         };
74 };
75
76 &ethernet {
77         mtd-mac-address = <&factory 0xe000>;
78 };
79
80 &spi0 {
81         status = "okay";
82
83         m25p80@0 {
84                 compatible = "jedec,spi-nor";
85                 reg = <0>;
86                 spi-max-frequency = <10000000>;
87
88                 partitions {
89                         compatible = "fixed-partitions";
90                         #address-cells = <1>;
91                         #size-cells = <1>;
92
93                         partition@0 {
94                                 label = "u-boot";
95                                 reg = <0x0 0x30000>;
96                                 read-only;
97                         };
98
99                         partition@30000 {
100                                 label = "u-boot-env";
101                                 reg = <0x30000 0x10000>;
102                                 read-only;
103                         };
104
105                         factory: partition@40000 {
106                                 label = "factory";
107                                 reg = <0x40000 0x10000>;
108                                 read-only;
109                         };
110
111                         partition@50000 {
112                                 compatible = "denx,uimage";
113                                 label = "firmware";
114                                 reg = <0x50000 0xf20000>;
115                         };
116
117                         partition@f70000 {
118                                 label = "user_data";
119                                 reg = <0xf70000 0x80000>;
120                                 read-only;
121                         };
122
123                         partition@ff0000 {
124                                 label = "NVRAM";
125                                 reg = <0xff0000 0x10000>;
126                                 read-only;
127                         };
128                 };
129         };
130 };
131
132 &pinctrl {
133         state_default: pinctrl0 {
134                 gpio {
135                         ralink,group = "i2c", "uart3", "jtag", "wdt";
136                         ralink,function = "gpio";
137                 };
138         };
139 };
140
141 &pcie {
142         status = "okay";
143 };
144
145 &pcie0 {
146         wifi@0,0 {
147                 compatible = "mediatek,mt76";
148                 reg = <0x0000 0 0 0 0>;
149                 mediatek,mtd-eeprom = <&factory 0x0>;
150                 mtd-mac-address = <&factory 0xe000>;
151                 mtd-mac-address-increment = <1>;
152         };
153 };
154
155 &xhci {
156         status = "disabled";
157 };