052b2a4babe60b097b3793f733d74b32d2daddb0
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_netgear_sercomm_ayx.dtsi
1 // SPDX-License-Identifier: GPL-2.0-only
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 };
17
18 keys {
19 compatible = "gpio-keys";
20
21 wps {
22 label = "wps";
23 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
24 linux,code = <KEY_WPS_BUTTON>;
25 };
26
27 wifi {
28 label = "wifi";
29 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RFKILL>;
31 };
32
33 reset {
34 label = "reset";
35 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RESTART>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led_power: power {
44 label = "green:power";
45 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
46 };
47
48 usb {
49 label = "green:usb";
50 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
51 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
52 linux,default-trigger = "usbport";
53 };
54
55 internet {
56 label = "green:wan";
57 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
58 };
59
60 wifi {
61 label = "green:wifi";
62 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
63 linux,default-trigger = "phy0tpt";
64 };
65
66 wps {
67 label = "green: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 ieee80211-freq-limit = <5000000 6000000>;
95 nvmem-cells = <&eeprom1>;
96 nvmem-cell-names = "eeprom";
97 };
98 };
99
100 &pcie2 {
101 wifi@0,0 {
102 compatible = "mediatek,mt76";
103 reg = <0x0 0 0 0 0>;
104 ieee80211-freq-limit = <2400000 2500000>;
105 nvmem-cells = <&eeprom0>;
106 nvmem-cell-names = "eeprom";
107 };
108 };
109
110 &gmac1 {
111 status = "okay";
112 label = "wan";
113 phy-handle = <&ethphy4>;
114 };
115
116 &mdio {
117 ethphy4: ethernet-phy@4 {
118 reg = <4>;
119 };
120 };
121
122 &switch0 {
123 ports {
124 port@0 {
125 status = "okay";
126 label = "lan4";
127 };
128
129 port@1 {
130 status = "okay";
131 label = "lan3";
132 };
133
134 port@2 {
135 status = "okay";
136 label = "lan2";
137 };
138
139 port@3 {
140 status = "okay";
141 label = "lan1";
142 };
143 };
144 };
145
146 &state_default {
147 gpio {
148 groups = "uart3", "uart2", "jtag", "wdt";
149 function = "gpio";
150 };
151 };