b570d074c6f7e8b30eefeee0ab0b29a740a7eea7
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_dlink_dir-8xx.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
8 / {
9 aliases {
10 led-boot = &led_power_orange;
11 led-failsafe = &led_power_green;
12 led-running = &led_power_green;
13 led-upgrade = &led_net_orange;
14 };
15
16 keys {
17 compatible = "gpio-keys";
18
19 reset {
20 label = "reset";
21 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
22 linux,code = <KEY_RESTART>;
23 };
24
25 wps {
26 label = "wps";
27 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_WPS_BUTTON>;
29 };
30
31 wifi {
32 label = "wifi";
33 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_RFKILL>;
35 };
36 };
37
38 leds: leds {
39 compatible = "gpio-leds";
40
41 led_power_orange: power_orange {
42 label = "orange:power";
43 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
44 };
45
46 led_power_green: power_green {
47 label = "green:power";
48 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
49 };
50
51 led_net_orange: net_orange {
52 label = "orange:net";
53 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
54 };
55
56 net_green {
57 label = "green:net";
58 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
59 };
60 };
61 };
62
63 &pcie {
64 status = "okay";
65 };
66
67 &pcie0 {
68 wifi@0,0 {
69 compatible = "mediatek,mt76";
70 reg = <0x0000 0 0 0 0>;
71 mediatek,mtd-eeprom = <&factory 0x0000>;
72 ieee80211-freq-limit = <2400000 2500000>;
73
74 led {
75 led-active-low;
76 };
77 };
78 };
79
80 &pcie1 {
81 wifi@0,0 {
82 compatible = "mediatek,mt76";
83 reg = <0x0000 0 0 0 0>;
84 mediatek,mtd-eeprom = <&factory 0x8000>;
85 ieee80211-freq-limit = <5000000 6000000>;
86
87 led {
88 led-active-low;
89 };
90 };
91 };
92
93 &gmac1 {
94 status = "okay";
95 label = "wan";
96 phy-handle = <&ethphy4>;
97 };
98
99 &mdio {
100 ethphy4: ethernet-phy@4 {
101 reg = <4>;
102 };
103 };
104
105 &switch0 {
106 ports {
107 port@0 {
108 status = "okay";
109 label = "lan4";
110 };
111
112 port@1 {
113 status = "okay";
114 label = "lan3";
115 };
116
117 port@2 {
118 status = "okay";
119 label = "lan2";
120 };
121
122 port@3 {
123 status = "okay";
124 label = "lan1";
125 };
126 };
127 };
128
129 &state_default {
130 gpio {
131 groups = "i2c", "uart3", "jtag", "wdt";
132 function = "gpio";
133 };
134 };