ramips: use fixed layout cell "mac-base" for Netgear WNDR3700 v5
[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 label = "red:status";
21 color = <LED_COLOR_ID_RED>;
22 function = LED_FUNCTION_STATUS;
23 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
24 };
25
26 led_status_blue: led-1 {
27 label = "blue:status";
28 color = <LED_COLOR_ID_BLUE>;
29 function = LED_FUNCTION_STATUS;
30 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
31 };
32
33 led_status_yellow: led-2 {
34 label = "yellow:status";
35 color = <LED_COLOR_ID_YELLOW>;
36 function = LED_FUNCTION_STATUS;
37 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
38 };
39
40 led-3 {
41 label = "amber:wan";
42 color = <LED_COLOR_ID_AMBER>;
43 function = LED_FUNCTION_WAN;
44 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
45 linux,default-trigger = "mt7530-0:01:1Gbps";
46 };
47
48 led-4 {
49 label = "amber:lan1";
50 color = <LED_COLOR_ID_AMBER>;
51 function = LED_FUNCTION_LAN;
52 function-enumerator = <1>;
53 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
54 linux,default-trigger = "mt7530-0:03:1Gbps";
55 };
56
57 led-5 {
58 label = "amber:lan2";
59 color = <LED_COLOR_ID_AMBER>;
60 function = LED_FUNCTION_LAN;
61 function-enumerator = <2>;
62 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
63 linux,default-trigger = "mt7530-0:02:1Gbps";
64 };
65 };
66
67 reg_usb_vbus: regulator {
68 compatible = "regulator-fixed";
69 regulator-name = "usb_vbus";
70 regulator-min-microvolt = <5000000>;
71 regulator-max-microvolt = <5000000>;
72 gpio = <&gpio 12 GPIO_ACTIVE_HIGH>;
73 enable-active-high;
74 };
75 };
76
77 &xhci {
78 vbus-supply = <&reg_usb_vbus>;
79 };
80
81 &pcie {
82 status = "okay";
83 };
84
85 &pcie0 {
86 wifi@0,0 {
87 compatible = "pci14c3,7603";
88 reg = <0x0000 0 0 0 0>;
89 mediatek,mtd-eeprom = <&factory 0x0000>;
90 ieee80211-freq-limit = <2400000 2500000>;
91 };
92 };
93
94 &pcie1 {
95 wifi@0,0 {
96 compatible = "pci14c3,7662";
97 reg = <0x0000 0 0 0 0>;
98 mediatek,mtd-eeprom = <&factory 0x8000>;
99 ieee80211-freq-limit = <5000000 6000000>;
100 };
101 };
102
103 &gmac0 {
104 nvmem-cells = <&macaddr_factory_e006>;
105 nvmem-cell-names = "mac-address";
106 };
107
108 &switch0 {
109 ports {
110 port@1 {
111 status = "okay";
112 label = "wan";
113 nvmem-cells = <&macaddr_factory_e000>;
114 nvmem-cell-names = "mac-address";
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 = "jtag", "uart2", "uart3", "wdt";
132 function = "gpio";
133 };
134 };
135
136 &factory {
137 compatible = "nvmem-cells";
138 #address-cells = <1>;
139 #size-cells = <1>;
140
141 macaddr_factory_e000: macaddr@e000 {
142 reg = <0xe000 0x6>;
143 };
144
145 macaddr_factory_e006: macaddr@e006 {
146 reg = <0xe006 0x6>;
147 };
148 };