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