bd8fd6f8a15d64dc6e76d0c5f49aeccbcc3e53fc
[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 nvmem-cells = <&eeprom_factory_0>;
72 nvmem-cell-names = "eeprom";
73 ieee80211-freq-limit = <2400000 2500000>;
74
75 led {
76 led-active-low;
77 };
78 };
79 };
80
81 &pcie1 {
82 wifi@0,0 {
83 compatible = "mediatek,mt76";
84 reg = <0x0000 0 0 0 0>;
85 nvmem-cells = <&eeprom_factory_8000>;
86 nvmem-cell-names = "eeprom";
87 ieee80211-freq-limit = <5000000 6000000>;
88
89 led {
90 led-active-low;
91 };
92 };
93 };
94
95 &gmac1 {
96 status = "okay";
97 label = "wan";
98 phy-handle = <&ethphy4>;
99 };
100
101 &mdio {
102 ethphy4: ethernet-phy@4 {
103 reg = <4>;
104 };
105 };
106
107 &switch0 {
108 ports {
109 port@0 {
110 status = "okay";
111 label = "lan4";
112 };
113
114 port@1 {
115 status = "okay";
116 label = "lan3";
117 };
118
119 port@2 {
120 status = "okay";
121 label = "lan2";
122 };
123
124 port@3 {
125 status = "okay";
126 label = "lan1";
127 };
128 };
129 };
130
131 &state_default {
132 gpio {
133 groups = "i2c", "uart3", "jtag", "wdt";
134 function = "gpio";
135 };
136 };