ramips: add support for YunCore G720
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_xiaomi_mi-router-3g.dts
1 #include "mt7621_xiaomi_nand_128m.dtsi"
2 #include <dt-bindings/leds/common.h>
3
4 / {
5 compatible = "xiaomi,mi-router-3g", "mediatek,mt7621-soc";
6 model = "Xiaomi Mi Router 3G";
7
8 aliases {
9 led-boot = &led_status_yellow;
10 led-failsafe = &led_status_red;
11 led-running = &led_status_blue;
12 led-upgrade = &led_status_yellow;
13 label-mac-device = &gmac0;
14 };
15
16 leds {
17 compatible = "gpio-leds";
18
19 led_status_red: led-0 {
20 color = <LED_COLOR_ID_RED>;
21 function = LED_FUNCTION_STATUS;
22 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
23 };
24
25 led_status_blue: led-1 {
26 color = <LED_COLOR_ID_BLUE>;
27 function = LED_FUNCTION_STATUS;
28 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
29 };
30
31 led_status_yellow: led-2 {
32 color = <LED_COLOR_ID_YELLOW>;
33 function = LED_FUNCTION_STATUS;
34 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
35 };
36
37 led-3 {
38 color = <LED_COLOR_ID_AMBER>;
39 function = LED_FUNCTION_WAN;
40 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
41 linux,default-trigger = "mt7530-0:01:1Gbps";
42 };
43
44 led-4 {
45 color = <LED_COLOR_ID_AMBER>;
46 function = LED_FUNCTION_LAN;
47 function-enumerator = <1>;
48 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
49 linux,default-trigger = "mt7530-0:03:1Gbps";
50 };
51
52 led-5 {
53 color = <LED_COLOR_ID_AMBER>;
54 function = LED_FUNCTION_LAN;
55 function-enumerator = <2>;
56 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
57 linux,default-trigger = "mt7530-0:02:1Gbps";
58 };
59 };
60
61 reg_usb_vbus: regulator {
62 compatible = "regulator-fixed";
63 regulator-name = "usb_vbus";
64 regulator-min-microvolt = <5000000>;
65 regulator-max-microvolt = <5000000>;
66 gpio = <&gpio 12 GPIO_ACTIVE_HIGH>;
67 enable-active-high;
68 };
69 };
70
71 &xhci {
72 vbus-supply = <&reg_usb_vbus>;
73 };
74
75 &pcie {
76 status = "okay";
77 };
78
79 &pcie0 {
80 wifi@0,0 {
81 compatible = "pci14c3,7603";
82 reg = <0x0000 0 0 0 0>;
83 nvmem-cells = <&eeprom_factory_0>;
84 nvmem-cell-names = "eeprom";
85 ieee80211-freq-limit = <2400000 2500000>;
86 };
87 };
88
89 &pcie1 {
90 wifi@0,0 {
91 compatible = "pci14c3,7662";
92 reg = <0x0000 0 0 0 0>;
93 nvmem-cells = <&eeprom_factory_8000>;
94 nvmem-cell-names = "eeprom";
95 ieee80211-freq-limit = <5000000 6000000>;
96 };
97 };
98
99 &gmac0 {
100 nvmem-cells = <&macaddr_factory_e006>;
101 nvmem-cell-names = "mac-address";
102 };
103
104 &switch0 {
105 ports {
106 port@1 {
107 status = "okay";
108 label = "wan";
109 nvmem-cells = <&macaddr_factory_e000>;
110 nvmem-cell-names = "mac-address";
111 };
112
113 port@2 {
114 status = "okay";
115 label = "lan2";
116 };
117
118 port@3 {
119 status = "okay";
120 label = "lan1";
121 };
122 };
123 };
124
125 &state_default {
126 gpio {
127 groups = "jtag", "uart2", "uart3", "wdt";
128 function = "gpio";
129 };
130 };