ramips: Use dts alias based status led
[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 #address-cells = <1>;
62 #size-cells = <0>;
63 poll-interval = <20>;
64
65 reset {
66 label = "reset";
67 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
68 linux,code = <KEY_RESTART>;
69 };
70
71 wps {
72 label = "wps";
73 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_WPS_BUTTON>;
75 };
76 };
77 };
78
79 &ethernet {
80 mtd-mac-address = <&factory 0xe000>;
81 };
82
83 &spi0 {
84 status = "okay";
85
86 m25p80@0 {
87 #address-cells = <1>;
88 #size-cells = <1>;
89 compatible = "jedec,spi-nor";
90 reg = <0>;
91 spi-max-frequency = <10000000>;
92 m25p,chunked-io = <32>;
93
94 partition@0 {
95 label = "u-boot";
96 reg = <0x0 0x30000>;
97 read-only;
98 };
99
100 partition@30000 {
101 label = "u-boot-env";
102 reg = <0x30000 0x10000>;
103 read-only;
104 };
105
106 factory: partition@40000 {
107 label = "factory";
108 reg = <0x40000 0x10000>;
109 read-only;
110 };
111
112 partition@50000 {
113 label = "firmware";
114 reg = <0x50000 0xf20000>;
115 };
116
117 partition@f70000 {
118 label = "user_data";
119 reg = <0xf70000 0x80000>;
120 read-only;
121 };
122
123 partition@ff0000 {
124 label = "NVRAM";
125 reg = <0xff0000 0x10000>;
126 read-only;
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 // WRC-1167GHBK2-S has MT7615D for 2.4/5 GHz wifi,
143 // but it's not supported in OpenWrt.
144 };
145
146 &xhci {
147 status = "disabled";
148 };