4f0427050a6538cf73741f28901524bb07790125
[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         gpio-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         gpio-keys-polled {
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                 m25p,chunked-io = <32>;
92
93                 partitions {
94                         compatible = "fixed-partitions";
95                         #address-cells = <1>;
96                         #size-cells = <1>;
97
98                         partition@0 {
99                                 label = "u-boot";
100                                 reg = <0x0 0x30000>;
101                                 read-only;
102                         };
103
104                         partition@30000 {
105                                 label = "u-boot-env";
106                                 reg = <0x30000 0x10000>;
107                                 read-only;
108                         };
109
110                         factory: partition@40000 {
111                                 label = "factory";
112                                 reg = <0x40000 0x10000>;
113                                 read-only;
114                         };
115
116                         partition@50000 {
117                                 compatible = "denx,uimage";
118                                 label = "firmware";
119                                 reg = <0x50000 0xf20000>;
120                         };
121
122                         partition@f70000 {
123                                 label = "user_data";
124                                 reg = <0xf70000 0x80000>;
125                                 read-only;
126                         };
127
128                         partition@ff0000 {
129                                 label = "NVRAM";
130                                 reg = <0xff0000 0x10000>;
131                                 read-only;
132                         };
133                 };
134         };
135 };
136
137 &pinctrl {
138         state_default: pinctrl0 {
139                 gpio {
140                         ralink,group = "i2c", "uart3", "jtag", "wdt";
141                         ralink,function = "gpio";
142                 };
143         };
144 };
145
146 &pcie {
147         status = "okay";
148         /*
149          * WRC-1167GHBK2-S has MT7615D for 2.4/5 GHz wifi,
150          * but it's not supported in OpenWrt.
151          */
152 };
153
154 &xhci {
155         status = "disabled";
156 };