3a6eb7cec8758ab7af084d3eda9f2e9e4c38b609
[openwrt/staging/mkresin.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 };
30
31 wlan5g {
32 label = "wrc-1167ghbk2-s:white:wlan5g";
33 gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
34 };
35
36 led_power_green: power_green {
37 label = "wrc-1167ghbk2-s:green:power";
38 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
39 };
40
41 power_blue {
42 label = "wrc-1167ghbk2-s:blue:power";
43 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
44 };
45
46 wps {
47 label = "wrc-1167ghbk2-s:red:wps";
48 gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
49 };
50
51 power_red {
52 label = "wrc-1167ghbk2-s:red:power";
53 gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
54 };
55 };
56
57 keys {
58 compatible = "gpio-keys-polled";
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 compatible = "jedec,spi-nor";
84 reg = <0>;
85 spi-max-frequency = <10000000>;
86
87 partitions {
88 compatible = "fixed-partitions";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 partition@0 {
93 label = "u-boot";
94 reg = <0x0 0x30000>;
95 read-only;
96 };
97
98 partition@30000 {
99 label = "u-boot-env";
100 reg = <0x30000 0x10000>;
101 read-only;
102 };
103
104 factory: partition@40000 {
105 label = "factory";
106 reg = <0x40000 0x10000>;
107 read-only;
108 };
109
110 partition@50000 {
111 compatible = "denx,uimage";
112 label = "firmware";
113 reg = <0x50000 0xf20000>;
114 };
115
116 partition@f70000 {
117 label = "user_data";
118 reg = <0xf70000 0x80000>;
119 read-only;
120 };
121
122 partition@ff0000 {
123 label = "NVRAM";
124 reg = <0xff0000 0x10000>;
125 read-only;
126 };
127 };
128 };
129 };
130
131 &pinctrl {
132 state_default: pinctrl0 {
133 gpio {
134 ralink,group = "i2c", "uart3", "jtag", "wdt";
135 ralink,function = "gpio";
136 };
137 };
138 };
139
140 &pcie {
141 status = "okay";
142 /*
143 * WRC-1167GHBK2-S has MT7615D for 2.4/5 GHz wifi,
144 * but it's not supported in OpenWrt.
145 */
146 };
147
148 &xhci {
149 status = "disabled";
150 };