ramips: add support for SNR-CPE-ME2-SFP
[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 mediatek,mtd-eeprom = <&factory 0x8000>;
95 ieee80211-freq-limit = <5000000 6000000>;
96 };
97 };
98
99 &pcie2 {
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 &gmac1 {
109 status = "okay";
110 label = "wan";
111 phy-handle = <&ethphy4>;
112 };
113
114 &mdio {
115 ethphy4: ethernet-phy@4 {
116 reg = <4>;
117 };
118 };
119
120 &switch0 {
121 ports {
122 port@0 {
123 status = "okay";
124 label = "lan4";
125 };
126
127 port@1 {
128 status = "okay";
129 label = "lan3";
130 };
131
132 port@2 {
133 status = "okay";
134 label = "lan2";
135 };
136
137 port@3 {
138 status = "okay";
139 label = "lan1";
140 };
141 };
142 };
143
144 &state_default {
145 gpio {
146 groups = "uart3", "uart2", "jtag", "wdt";
147 function = "gpio";
148 };
149 };