1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2021, Dirk Buchwalder <buchwalder@posteo.de> */
6 #include "ipq8074.dtsi"
7 #include "ipq8074-hk-cpu.dtsi"
8 #include "ipq8074-ess.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/leds/common.h>
15 compatible = "qnap,301w", "qcom,ipq8074";
18 serial0 = &blsp1_uart5;
20 * Aliases as required by u-boot
21 * to patch MAC addresses
23 led-boot = &led_system_red;
24 led-failsafe = &led_system_red;
25 led-running = &led_pwr_green;
26 led-upgrade = &led_system_red;
33 label-mac-device = &dp1;
37 stdout-path = "serial0:115200n8";
41 compatible = "gpio-keys";
42 pinctrl-0 = <&button_pins>;
43 pinctrl-names = "default";
47 gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_WPS_BUTTON>;
53 gpios = <&tlmm 67 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RESTART>;
59 compatible = "gpio-leds";
60 pinctrl-0 = <&leds_pins>;
61 pinctrl-names = "default";
63 led_system_green: led-system-green {
64 label = "green:system";
65 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
66 color = <LED_COLOR_ID_GREEN>;
69 led_system_red: led-system-red {
71 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
72 color = <LED_COLOR_ID_RED>;
75 led_pwr_green: led-pwr-green {
77 gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
78 color = <LED_COLOR_ID_GREEN>;
83 gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>;
84 color = <LED_COLOR_ID_GREEN>;
89 gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
90 color = <LED_COLOR_ID_GREEN>;
95 gpios = <&tlmm 7 GPIO_ACTIVE_HIGH>;
96 color = <LED_COLOR_ID_AMBER>;
100 label = "green:lan3";
101 gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
102 color = <LED_COLOR_ID_GREEN>;
106 label = "amber:lan3";
107 gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>;
108 color = <LED_COLOR_ID_AMBER>;
112 label = "green:lan2";
113 gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
114 color = <LED_COLOR_ID_GREEN>;
118 label = "amber:lan2";
119 gpios = <&tlmm 13 GPIO_ACTIVE_HIGH>;
120 color = <LED_COLOR_ID_AMBER>;
124 label = "green:lan1";
125 gpios = <&tlmm 14 GPIO_ACTIVE_HIGH>;
126 color = <LED_COLOR_ID_GREEN>;
130 label = "amber:lan1";
131 gpios = <&tlmm 15 GPIO_ACTIVE_HIGH>;
132 color = <LED_COLOR_ID_AMBER>;
136 label = "green:10g_1";
137 gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
138 color = <LED_COLOR_ID_GREEN>;
142 label = "amber:10g_1";
143 gpios = <&tlmm 56 GPIO_ACTIVE_HIGH>;
144 color = <LED_COLOR_ID_AMBER>;
148 label = "green:10g_2";
149 gpios = <&tlmm 51 GPIO_ACTIVE_HIGH>;
150 color = <LED_COLOR_ID_GREEN>;
154 label = "amber:10g_2";
155 gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
156 color = <LED_COLOR_ID_AMBER>;
163 mdio_pins: mdio-state {
167 drive-strength = <8>;
174 drive-strength = <8>;
179 button_pins: button-state {
183 drive-strength = <8>;
190 drive-strength = <8>;
195 leds_pins: leds-state {
196 pins = "gpio1", "gpio3", "gpio4", "gpio6", "gpio7", "gpio8",
197 "gpio11", "gpio12", "gpio13", "gpio14", "gpio15", "gpio42",
198 "gpio51", "gpio52", "gpio54", "gpio56";
200 drive-strength = <8>;
249 &blsp1_spi1 { /* BLSP1 QUP1 */
250 pinctrl-0 = <&spi_0_pins>;
251 pinctrl-names = "default";
256 #address-cells = <1>;
259 compatible = "jedec,spi-nor";
260 spi-max-frequency = <50000000>;
263 compatible = "qcom,smem-part";
271 pinctrl-0 = <&mdio_pins>;
272 pinctrl-names = "default";
273 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
275 aqr113c_0: ethernet-phy@0 {
276 compatible ="ethernet-phy-ieee802.3-c45";
278 reset-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
281 aqr113c_8: ethernet-phy@8 {
282 compatible ="ethernet-phy-ieee802.3-c45";
284 reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
287 qca8075_16: ethernet-phy@16 {
288 compatible = "ethernet-phy-ieee802.3-c22";
292 qca8075_17: ethernet-phy@17 {
293 compatible = "ethernet-phy-ieee802.3-c22";
297 qca8075_18: ethernet-phy@18 {
298 compatible = "ethernet-phy-ieee802.3-c22";
302 qca8075_19: ethernet-phy@19 {
303 compatible = "ethernet-phy-ieee802.3-c22";
311 /* According to the stock dts from the QNAP gpl drop
312 * the emmc has a problem with the hs400 > hs200 speed switch.
313 * Therefore remove the mmc-hs400-1_8v property
315 /delete-property/ mmc-hs400-1_8v;
318 vqmmc-supply = <&l11>;
324 switch_cpu_bmp = <0x1>; /* cpu port bitmap */
325 switch_lan_bmp = <0x3e>; /* lan port bitmap */
326 switch_wan_bmp = <0xc0>; /* wan port bitmap */
327 switch_mac_mode = <0xb>; /* mac mode for uniphy instance0*/
328 switch_mac_mode1 = <0xd>; /* mac mode for uniphy instance1*/
329 switch_mac_mode2 = <0xd>; /* mac mode for uniphy instance2*/
330 bm_tick_mode = <0>; /* bm tick mode */
331 tm_tick_mode = <0>; /* tm tick mode */
353 compatible = "ethernet-phy-ieee802.3-c45";
354 ethernet-phy-ieee802.3-c45;
359 compatible = "ethernet-phy-ieee802.3-c45";
360 ethernet-phy-ieee802.3-c45;
371 phy-handle = <&qca8075_16>;
377 phy-handle = <&qca8075_17>;
383 phy-handle = <&qca8075_18>;
389 phy-handle = <&qca8075_19>;
396 phy-handle = <&aqr113c_8>;
402 phy-handle = <&aqr113c_0>;
409 qcom,ath11k-calibration-variant = "QNAP-301w";