mediatek: filogic: add support for Ubiquiti UniFi 6 Plus (U6+)
[openwrt/openwrt.git] / target / linux / mediatek / dts / mt7981a-ubnt-unifi-6-plus.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4 #include "mt7981.dtsi"
5
6 / {
7 model = "Ubiquiti UniFi 6 Plus";
8 compatible = "ubnt,unifi-6-plus", "mediatek,mt7981";
9
10 aliases {
11 serial0 = &uart0;
12 led-boot = &led_white;
13 led-failsafe = &led_white;
14 led-running = &led_blue;
15 led-upgrade = &led_blue;
16 label-mac-device = &gmac1;
17 };
18
19 chosen {
20 bootargs-override = "console=ttyS0,115200n8 rootwait root=/dev/mmcblk0p7";
21 stdout-path = "serial0:115200n8";
22 };
23
24 gpio-keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 linux,code = <KEY_RESTART>;
30 gpios = <&pio 1 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34
35 leds {
36 compatible = "gpio-leds";
37
38 led_blue: dome-blue {
39 label = "blue:dome";
40 gpios = <&pio 9 GPIO_ACTIVE_HIGH>;
41 };
42
43 led_white: dome-white {
44 label = "white:dome";
45 gpios = <&pio 34 GPIO_ACTIVE_HIGH>;
46 };
47 };
48 };
49
50 &uart0 {
51 status = "okay";
52 };
53
54 &watchdog {
55 status = "okay";
56 };
57
58 &pio {
59 spi2_flash_pins: spi2-pins {
60 mux {
61 function = "spi";
62 groups = "spi2", "spi2_wp_hold";
63 };
64
65 conf-pu {
66 pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
67 drive-strength = <8>;
68 bias-pull-up = <103>;
69 };
70
71 conf-pd {
72 pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
73 drive-strength = <8>;
74 bias-pull-down = <103>;
75 };
76 };
77
78 mmc0_pins_default: mmc0-pins-default {
79 mux {
80 function = "flash";
81 groups = "emmc_45";
82 };
83 };
84
85 mmc0_pins_uhs: mmc0-pins-uhs {
86 mux {
87 function = "flash";
88 groups = "emmc_45";
89 };
90 };
91 };
92
93 &spi2 {
94 pinctrl-names = "default";
95 pinctrl-0 = <&spi2_flash_pins>;
96 status = "okay";
97
98 flash@0 {
99 #address-cells = <1>;
100 #size-cells = <1>;
101 compatible = "jedec,spi-nor";
102 reg = <0>;
103
104 spi-max-frequency = <52000000>;
105 spi-tx-bus-width = <4>;
106 spi-rx-bus-width = <4>;
107
108 partitions {
109 compatible = "fixed-partitions";
110 #address-cells = <1>;
111 #size-cells = <1>;
112
113 eeprom: partition@00000 {
114 label = "EEPROM";
115 reg = <0x00000 0x10000>;
116 read-only;
117
118 compatible = "nvmem-cells";
119 #address-cells = <1>;
120 #size-cells = <1>;
121
122 macaddr_eeprom_0: macaddr@0 {
123 reg = <0x0 0x6>;
124 };
125
126 macaddr_eeprom_6: macaddr@6 {
127 reg = <0x6 0x6>;
128 };
129 };
130
131 partition@10000 {
132 label = "u-boot-env";
133 reg = <0x10000 0x80000>;
134 };
135 };
136 };
137 };
138
139 &mmc0 {
140 pinctrl-names = "default", "state_uhs";
141 pinctrl-0 = <&mmc0_pins_default>;
142 pinctrl-1 = <&mmc0_pins_uhs>;
143 bus-width = <8>;
144 max-frequency = <52000000>;
145 cap-mmc-highspeed;
146 vmmc-supply = <&reg_3p3v>;
147 non-removable;
148 status = "okay";
149 };
150
151 &eth {
152 pinctrl-names = "default";
153 pinctrl-0 = <&mdio_pins>;
154 status = "okay";
155
156 gmac1: mac@1 {
157 compatible = "mediatek,eth-mac";
158 reg = <1>;
159 phy-mode = "gmii";
160 phy-handle = <&int_gbe_phy>;
161 nvmem-cell-names = "mac-address";
162 nvmem-cells = <&macaddr_eeprom_0>;
163 };
164 };
165
166 &wifi {
167 status = "okay";
168 };