mediatek: add Ubiquiti UniFi 6 LR v2 targets
[openwrt/staging/dedeckeh.git] / target / linux / mediatek / dts / mt7622-ubnt-unifi-6-lr.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/leds/common.h>
7
8 #include "mt7622.dtsi"
9 #include "mt6380.dtsi"
10
11 / {
12 aliases {
13 led-boot = &led_blue;
14 led-failsafe = &led_blue;
15 led-running = &led_blue;
16 led-upgrade = &led_blue;
17 label-mac-device = &gmac0;
18 serial0 = &uart0;
19 };
20
21 chosen {
22 stdout-path = "serial0:115200n8";
23 bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512 console=ttyS0,115200n8";
24 };
25
26 cpus {
27 cpu@0 {
28 proc-supply = <&mt6380_vcpu_reg>;
29 sram-supply = <&mt6380_vm_reg>;
30 };
31
32 cpu@1 {
33 proc-supply = <&mt6380_vcpu_reg>;
34 sram-supply = <&mt6380_vm_reg>;
35 };
36 };
37
38 gpio-keys {
39 compatible = "gpio-keys";
40
41 reset {
42 label = "reset";
43 linux,code = <KEY_RESTART>;
44 gpios = <&pio 62 GPIO_ACTIVE_LOW>;
45 };
46 };
47
48 memory {
49 reg = <0 0x40000000 0 0x3f000000>;
50 };
51
52 reg_1p8v: regulator-1p8v {
53 compatible = "regulator-fixed";
54 regulator-name = "fixed-1.8V";
55 regulator-min-microvolt = <1800000>;
56 regulator-max-microvolt = <1800000>;
57 regulator-always-on;
58 };
59
60 reg_3p3v: regulator-3p3v {
61 compatible = "regulator-fixed";
62 regulator-name = "fixed-3.3V";
63 regulator-min-microvolt = <3300000>;
64 regulator-max-microvolt = <3300000>;
65 regulator-boot-on;
66 regulator-always-on;
67 };
68 };
69
70 &pcie0 {
71 pinctrl-names = "default";
72 pinctrl-0 = <&pcie0_pins>;
73 status = "okay";
74 };
75
76
77 &pio {
78 eth_pins: eth-pins {
79 mux {
80 function = "eth";
81 groups = "mdc_mdio", "rgmii_via_gmac2";
82 };
83 };
84
85 pcie0_pins: pcie0-pins {
86 mux {
87 function = "pcie";
88 groups = "pcie0_pad_perst",
89 "pcie0_1_waken",
90 "pcie0_1_clkreq";
91 };
92 };
93
94 pcie1_pins: pcie1-pins {
95 mux {
96 function = "pcie";
97 groups = "pcie1_pad_perst",
98 "pcie1_0_waken",
99 "pcie1_0_clkreq";
100 };
101 };
102
103 pmic_bus_pins: pmic-bus-pins {
104 mux {
105 function = "pmic";
106 groups = "pmic_bus";
107 };
108 };
109
110 spi_nor_pins: spi-nor-pins {
111 mux {
112 function = "flash";
113 groups = "spi_nor";
114 };
115 };
116
117 uart0_pins: uart0-pins {
118 mux {
119 function = "uart";
120 groups = "uart0_0_tx_rx" ;
121 };
122 };
123
124 uart3_pins: uart3-pins {
125 mux {
126 function = "uart";
127 groups = "uart3_1_tx_rx" ;
128 };
129 };
130
131 i2c0_pins: i2c0-pins {
132 mux {
133 function = "i2c";
134 groups = "i2c0";
135 };
136 };
137
138 watchdog_pins: watchdog-pins {
139 mux {
140 function = "watchdog";
141 groups = "watchdog";
142 };
143 };
144 };
145
146 &bch {
147 status = "okay";
148 };
149
150 &btif {
151 status = "disabled";
152 };
153
154 &eth {
155 status = "okay";
156 pinctrl-names = "default";
157 pinctrl-0 = <&eth_pins>;
158
159 gmac0: mac@0 {
160 compatible = "mediatek,eth-mac";
161 reg = <0>;
162
163 phy-mode = "2500base-x";
164 phy-handle = <&phy0>;
165 phy-connection-type = "2500base-x";
166 };
167
168 mdio: mdio-bus {
169 #address-cells = <1>;
170 #size-cells = <0>;
171
172 phy0: ethernet-phy@8 {
173 compatible = "ethernet-phy-ieee802.3-c45";
174 reg = <0x8>;
175 };
176 };
177 };
178
179 &pwrap {
180 pinctrl-names = "default";
181 pinctrl-0 = <&pmic_bus_pins>;
182
183 status = "okay";
184 };
185
186 &nor_flash {
187 pinctrl-names = "default";
188 pinctrl-0 = <&spi_nor_pins>;
189
190 status = "okay";
191
192 flash@0 {
193 compatible = "jedec,spi-nor";
194 reg = <0>;
195 spi-max-frequency = <50000000>;
196
197 nor_partitions: partitions {
198 compatible = "fixed-partitions";
199 #address-cells = <1>;
200 #size-cells = <1>;
201
202 };
203 };
204 };
205
206 &uart0 {
207 pinctrl-names = "default";
208 pinctrl-0 = <&uart0_pins>;
209 status = "okay";
210 };
211
212 &uart3 {
213 pinctrl-names = "default";
214 pinctrl-0 = <&uart3_pins>;
215 status = "okay";
216
217 /* MT7915 Bluetooth */
218 };
219
220 &watchdog {
221 pinctrl-names = "default";
222 pinctrl-0 = <&watchdog_pins>;
223 status = "okay";
224 };