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