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