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