4dbb234e824c2b55300689953b3b912d66f5af26
[openwrt/openwrt.git] / target / linux / ramips / dts / R6220.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "mediatek,mt7621-soc";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 memory@0 {
20 device_type = "memory";
21 reg = <0x0 0x8000000>;
22 };
23
24 chosen {
25 bootargs = "console=ttyS0,57600";
26 };
27
28 leds {
29 compatible = "gpio-leds";
30
31 led_power: power {
32 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
33 };
34
35 led_usb: usb {
36 gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
37 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
38 linux,default-trigger = "usbport";
39 };
40
41 led_internet: internet {
42 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
43 };
44
45 led_wifi: wifi {
46 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
47 linux,default-trigger = "phy0tpt";
48 };
49
50 led_wps: wps {
51 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
52 };
53 };
54
55 keys {
56 compatible = "gpio-keys-polled";
57 poll-interval = <20>;
58
59 wps {
60 label = "wps";
61 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
62 linux,code = <KEY_WPS_BUTTON>;
63 };
64
65 wifi {
66 label = "wifi";
67 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
68 linux,code = <KEY_RFKILL>;
69 };
70
71 reset {
72 label = "reset";
73 gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
74 linux,code = <KEY_RESTART>;
75 };
76 };
77
78 reg_usb_vbus: regulator {
79 compatible = "regulator-fixed";
80 regulator-name = "usb_vbus";
81 regulator-min-microvolt = <5000000>;
82 regulator-max-microvolt = <5000000>;
83 gpio = <&gpio0 10 GPIO_ACTIVE_HIGH>;
84 enable-active-high;
85 };
86 };
87
88 &xhci {
89 vbus-supply = <&reg_usb_vbus>;
90 };
91
92 &pcie {
93 status = "okay";
94 };
95
96 &pcie0 {
97 wifi@0,0 {
98 compatible = "pci14c3,7662";
99 reg = <0x0000 0 0 0 0>;
100 mediatek,mtd-eeprom = <&factory 0x8000>;
101 ieee80211-freq-limit = <5000000 6000000>;
102 };
103 };
104
105 &pcie1 {
106 wifi@0,0 {
107 compatible = "pci14c3,7603";
108 reg = <0x0000 0 0 0 0>;
109 mediatek,mtd-eeprom = <&factory 0x0000>;
110 ieee80211-freq-limit = <2400000 2500000>;
111 };
112 };
113
114 &ethernet {
115 mtd-mac-address = <&factory 0x00000004>;
116 };
117
118 &pinctrl {
119 state_default: pinctrl0 {
120 gpio {
121 ralink,group = "uart3", "uart2", "jtag", "wdt";
122 ralink,function = "gpio";
123 };
124 };
125 };