mediatek: fix wps button for nokia ea0326gmp
[openwrt/staging/pepe2k.git] / target / linux / ramips / dts / mt7621_elecom_wrc-2533ghbk.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 wps {
21 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
22 color = <LED_COLOR_ID_RED>;
23 function = LED_FUNCTION_WPS;
24 };
25
26 led_power: power {
27 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
28 color = <LED_COLOR_ID_WHITE>;
29 function = LED_FUNCTION_POWER;
30 };
31
32 wlan2g {
33 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
34 color = <LED_COLOR_ID_WHITE>;
35 function = LED_FUNCTION_WLAN;
36 function-enumerator = <1>;
37 linux,default-trigger = "phy0tpt";
38 };
39
40 wlan5g {
41 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
42 color = <LED_COLOR_ID_WHITE>;
43 function = LED_FUNCTION_WLAN;
44 function-enumerator = <2>;
45 linux,default-trigger = "phy1tpt";
46 };
47 };
48
49 keys {
50 compatible = "gpio-keys";
51
52 auto {
53 label = "auto";
54 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
55 linux,code = <BTN_0>;
56 linux,input-type = <EV_SW>;
57 };
58
59 reset {
60 label = "reset";
61 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
62 linux,code = <KEY_RESTART>;
63 };
64
65 wps {
66 label = "wps";
67 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
68 linux,code = <KEY_WPS_BUTTON>;
69 };
70 };
71 };
72
73 &spi0 {
74 status = "okay";
75
76 flash@0 {
77 compatible = "jedec,spi-nor";
78 reg = <0>;
79 spi-max-frequency = <40000000>;
80
81 partitions: partitions {
82 compatible = "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "u-boot";
88 reg = <0x0 0x30000>;
89 read-only;
90 };
91
92 partition@30000 {
93 label = "u-boot-env";
94 reg = <0x30000 0x10000>;
95 read-only;
96 };
97
98 partition@40000 {
99 label = "factory";
100 reg = <0x40000 0x10000>;
101 read-only;
102
103 nvmem-layout {
104 compatible = "fixed-layout";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 eeprom_factory_0: eeprom@0 {
109 reg = <0x0 0x4da8>;
110 };
111
112 eeprom_factory_8000: eeprom@8000 {
113 reg = <0x8000 0x4da8>;
114 };
115 };
116 };
117 };
118 };
119 };
120
121 &gmac1 {
122 status = "okay";
123 label = "wan";
124 phy-handle = <&ethphy0>;
125 };
126
127 &ethphy0 {
128 /delete-property/ interrupts;
129 };
130
131 &switch0 {
132 ports {
133 port@1 {
134 status = "okay";
135 label = "lan4";
136 };
137
138 port@2 {
139 status = "okay";
140 label = "lan3";
141 };
142
143 port@3 {
144 status = "okay";
145 label = "lan2";
146 };
147
148 port@4 {
149 status = "okay";
150 label = "lan1";
151 };
152 };
153 };
154
155 &state_default {
156 gpio {
157 groups = "uart2", "uart3", "jtag", "wdt";
158 function = "gpio";
159 };
160 };
161
162 &pcie {
163 status = "okay";
164 };
165
166 &pcie0 {
167 wifi@0,0 {
168 compatible = "mediatek,mt76";
169 reg = <0x0000 0 0 0 0>;
170 nvmem-cells = <&eeprom_factory_0>;
171 nvmem-cell-names = "eeprom";
172 ieee80211-freq-limit = <2400000 2500000>;
173 };
174 };
175
176 &pcie1 {
177 wifi@0,0 {
178 compatible = "mediatek,mt76";
179 reg = <0x0000 0 0 0 0>;
180 nvmem-cells = <&eeprom_factory_8000>;
181 nvmem-cell-names = "eeprom";
182 ieee80211-freq-limit = <5000000 6000000>;
183 };
184 };
185
186 &xhci {
187 status = "disabled";
188 };