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