1 // SPDX-License-Identifier: GPL-2.0-or-later
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/leds/common.h>
9 compatible = "sercomm,na502s", "mediatek,mt7621-soc";
10 model = "SERCOMM NA502S";
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
20 compatible = "gpio-leds";
23 function = LED_FUNCTION_POWER;
24 color = <LED_COLOR_ID_GREEN>;
25 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
30 gpios = <&gpio_expander1 0 GPIO_ACTIVE_LOW>;
31 linux,default-trigger = "phy0tpt";
35 label = "green:zwave";
36 gpios = <&gpio_expander1 1 GPIO_ACTIVE_LOW>;
40 label = "green:zigbee";
41 gpios = <&gpio_expander1 2 GPIO_ACTIVE_LOW>;
45 function = LED_FUNCTION_BLUETOOTH;
46 color = <LED_COLOR_ID_GREEN>;
47 gpios = <&gpio_expander1 3 GPIO_ACTIVE_LOW>;
51 label = "green:rf433";
52 gpios = <&gpio_expander1 4 GPIO_ACTIVE_LOW>;
56 label = "green:service";
57 gpios = <&gpio_expander1 5 GPIO_ACTIVE_LOW>;
62 gpios = <&gpio_expander1 6 GPIO_ACTIVE_LOW>;
66 label = "green:voice";
67 gpios = <&gpio_expander1 7 GPIO_ACTIVE_LOW>;
72 compatible = "gpio-keys";
75 label = "battery_tamper";
76 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
82 gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
83 linux,code = <KEY_RESTART>;
88 gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
94 gpios = <&gpio 31 GPIO_ACTIVE_LOW>;
100 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
101 linux,code = <KEY_RFKILL>;
106 compatible = "gpio-export";
109 gpio-export,name = "zwave_reset";
110 gpio-export,output = <1>;
111 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
115 gpio-export,name = "lprf_reset";
116 gpio-export,output = <1>;
117 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
121 gpio-export,name = "charger_detect";
122 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
126 gpio-export,name = "buzzer";
127 gpio-export,output = <0>;
128 gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
132 gpio-export,name = "3g_hw_shunt_en";
133 gpio-export,output = <0>;
134 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
138 gpio-export,name = "3g_sw_on_off";
139 gpio-export,output = <1>;
140 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
144 gpio-export,name = "3g_wake_up";
145 gpio-export,output = <0>;
146 gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
150 gpio-export,name = "3g_hw_reset";
151 gpio-export,output = <1>;
152 gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
156 gpio-export,name = "zigbee_reset";
157 gpio-export,output = <1>;
158 gpios = <&gpio_expander0 0 GPIO_ACTIVE_LOW>;
162 gpio-export,name = "zigbee_boot";
163 gpio-export,output = <1>;
164 gpios = <&gpio_expander0 1 GPIO_ACTIVE_LOW>;
168 gpio-export,name = "2g_sw0";
169 gpio-export,output = <1>;
170 gpios = <&gpio_expander0 2 GPIO_ACTIVE_LOW>;
174 gpio-export,name = "2g_sw1";
175 gpio-export,output = <1>;
176 gpios = <&gpio_expander0 3 GPIO_ACTIVE_LOW>;
180 gpio-export,name = "fm2018_pwd";
181 gpio-export,output = <1>;
182 gpios = <&gpio_expander0 4 GPIO_ACTIVE_LOW>;
186 gpio-export,name = "fm2018_reset";
187 gpio-export,output = <1>;
188 gpios = <&gpio_expander0 5 GPIO_ACTIVE_LOW>;
192 gpio-export,name = "batt_test";
193 gpio-export,output = <1>;
194 gpios = <&gpio_expander0 6 GPIO_ACTIVE_LOW>;
198 gpio-export,name = "mfi_reset";
199 gpio-export,output = <1>;
200 gpios = <&gpio_expander0 7 GPIO_ACTIVE_LOW>;
206 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
210 nvmem-cells = <&macaddr_factory_e000 0>;
211 nvmem-cell-names = "mac-address";
218 compatible = "fixed-partitions";
219 #address-cells = <1>;
230 reg = <0x80000 0x80000>;
236 reg = <0x100000 0x40000>;
239 compatible = "fixed-layout";
240 #address-cells = <1>;
243 eeprom_factory_0: eeprom@0 {
247 eeprom_factory_8000: eeprom@8000 {
248 reg = <0x8000 0x200>;
251 macaddr_factory_e000: macaddr@e000 {
252 compatible = "mac-base";
254 #nvmem-cell-cells = <1>;
261 reg = <0x140000 0x1400000>;
266 reg = <0x1540000 0x400000>;
271 reg = <0x1940000 0x1000000>;
275 label = "user_storage";
276 reg = <0x2940000 0x100000>;
281 reg = <0x2a40000 0x1000000>;
286 reg = <0x3a40000 0x3200000>;
291 reg = <0x6c40000 0x1340000>;
302 compatible = "mediatek,mt76";
303 reg = <0x0000 0 0 0 0>;
304 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000 1>;
305 nvmem-cell-names = "eeprom", "mac-address";
306 ieee80211-freq-limit = <5000000 6000000>;
312 compatible = "mediatek,mt76";
314 nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 2>;
315 nvmem-cell-names = "eeprom", "mac-address";
316 ieee80211-freq-limit = <2400000 2500000>;
322 groups = "jtag", "rgmii2";
330 /* This GPIO expander is fake. The kernel fails to initialize the
331 first expander, but succeeds on the second (real) one */
332 gpio_expander2: gpio-expander2@22 {
334 #interrupt-cells = <2>;
335 compatible = "semtech,sx1502q";
339 interrupt-controller;
342 gpio_expander0: gpio-expander0@20 {
344 #interrupt-cells = <2>;
345 compatible = "semtech,sx1502q";
349 interrupt-controller;
352 gpio_expander1: gpio-expander1@21 {
354 #interrupt-cells = <2>;
355 compatible = "semtech,sx1502q";
359 interrupt-controller;