hostapd: bump to 2024-09-06 (wip)
[openwrt/staging/xback.git] / target / linux / ramips / dts / mt7621_ubnt_usw-flex.dts
1 #include "mt7621.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 model = "Ubiquiti UniFi Switch Flex";
9 compatible = "ubnt,usw-flex", "mediatek,mt7621-soc";
10
11 aliases {
12 led-boot = &led_white;
13 led-failsafe = &led_white;
14 led-running = &led_blue;
15 led-upgrade = &led_blue;
16 label-mac-device = &gmac0;
17 };
18
19 chosen {
20 bootargs-override = "console=ttyS0,115200";
21 };
22
23 keys {
24 compatible = "gpio-keys";
25
26 reset {
27 label = "reset";
28 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 };
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 led_blue: status_blue {
37 function = LED_FUNCTION_STATUS;
38 color = <LED_COLOR_ID_BLUE>;
39 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
40 };
41
42 led_white: status_white {
43 function = LED_FUNCTION_STATUS;
44 color = <LED_COLOR_ID_WHITE>;
45 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
46 };
47 };
48
49 i2c-gpio {
50 compatible = "i2c-gpio";
51
52 sda-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
53 scl-gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
54
55 i2c-gpio,delay-us = <50>;
56
57 /* Microsemi PD69104B1 PSE controller */
58 };
59 };
60
61 &gmac0 {
62 nvmem-cells = <&macaddr_eeprom>;
63 nvmem-cell-names = "mac-address";
64 label = "dsa";
65 };
66
67 &gmac1 {
68 status = "okay";
69 label = "lan1";
70 phy-handle = <&ethphy4>;
71
72 nvmem-cells = <&macaddr_eeprom>;
73 nvmem-cell-names = "mac-address";
74 };
75
76 &ethphy4 {
77 /delete-property/ interrupts;
78 };
79
80 &switch0 {
81 ports {
82 port@0 {
83 status = "okay";
84 label = "lan5";
85 };
86
87 port@1 {
88 status = "okay";
89 label = "lan4";
90 };
91
92 port@2 {
93 status = "okay";
94 label = "lan3";
95 };
96
97 port@3 {
98 status = "okay";
99 label = "lan2";
100 };
101 };
102 };
103
104 &state_default {
105 gpio {
106 groups = "i2c", "uart2", "uart3", "jtag";
107 function = "gpio";
108 };
109 };
110
111 &spi0 {
112 status = "okay";
113
114 flash@0 {
115 compatible = "jedec,spi-nor";
116 reg = <0>;
117 spi-max-frequency = <30000000>;
118
119 partitions {
120 compatible = "fixed-partitions";
121 #address-cells = <1>;
122 #size-cells = <1>;
123
124 partition@0 {
125 label = "u-boot";
126 reg = <0x0 0x60000>;
127 read-only;
128 };
129
130 partition@60000 {
131 label = "u-boot-env";
132 reg = <0x60000 0x10000>;
133 };
134
135 partition@70000 {
136 label = "factory";
137 reg = <0x70000 0x10000>;
138 read-only;
139 };
140
141 partition@80000 {
142 label = "eeprom";
143 reg = <0x80000 0x10000>;
144 read-only;
145
146 nvmem-layout {
147 compatible = "fixed-layout";
148 #address-cells = <1>;
149 #size-cells = <1>;
150
151 macaddr_eeprom: macaddr@0 {
152 reg = <0x0 0x6>;
153 };
154 };
155 };
156
157 partition@90000 {
158 label = "bs";
159 reg = <0x90000 0x10000>;
160 };
161
162 partition@a0000 {
163 label = "cfg";
164 reg = <0xa0000 0x100000>;
165 read-only;
166 };
167
168 partition@1a0000 {
169 /* Combine kernel0 / kernel1 */
170 compatible = "denx,fit";
171 label = "firmware";
172 reg = <0x1a0000 0xe60000>;
173 };
174 };
175 };
176 };
177
178 &xhci {
179 status = "disabled";
180 };