ramips: mt7621: convert GPIO dts refs
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_netgear_sercomm_ayx.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "mediatek,mt7621-soc";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 label-mac-device = &ethernet;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,57600";
21 };
22
23 keys {
24 compatible = "gpio-keys";
25
26 wps {
27 label = "wps";
28 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_WPS_BUTTON>;
30 };
31
32 wifi {
33 label = "wifi";
34 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RFKILL>;
36 };
37
38 reset {
39 label = "reset";
40 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_RESTART>;
42 };
43 };
44
45 leds {
46 compatible = "gpio-leds";
47
48 led_power: power {
49 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
50 };
51
52 led_usb: usb {
53 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
54 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
55 linux,default-trigger = "usbport";
56 };
57
58 led_internet: internet {
59 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
60 };
61
62 led_wifi: wifi {
63 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
64 linux,default-trigger = "phy0tpt";
65 };
66
67 led_wps: wps {
68 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
69 };
70 };
71
72 reg_usb_vbus: regulator {
73 compatible = "regulator-fixed";
74 regulator-name = "usb_vbus";
75 regulator-min-microvolt = <5000000>;
76 regulator-max-microvolt = <5000000>;
77 gpio = <&gpio 10 GPIO_ACTIVE_HIGH>;
78 enable-active-high;
79 };
80 };
81
82 &xhci {
83 vbus-supply = <&reg_usb_vbus>;
84 };
85
86 &pcie {
87 status = "okay";
88 };
89
90 &pcie0 {
91 wifi@0,0 {
92 compatible = "mediatek,mt76";
93 reg = <0x0 0 0 0 0>;
94 mediatek,mtd-eeprom = <&factory 0x8000>;
95 ieee80211-freq-limit = <5000000 6000000>;
96 };
97 };
98
99 &pcie1 {
100 wifi@0,0 {
101 compatible = "mediatek,mt76";
102 reg = <0x0 0 0 0 0>;
103 mediatek,mtd-eeprom = <&factory 0x0>;
104 ieee80211-freq-limit = <2400000 2500000>;
105 };
106 };
107
108 &ethernet {
109 mtd-mac-address = <&factory 0x4>;
110 };
111
112 &state_default {
113 gpio {
114 ralink,group = "uart3", "uart2", "jtag", "wdt";
115 ralink,function = "gpio";
116 };
117 };