1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2021, Robert Marko <robimarko@gmail.com> */
4 #include "qcom-ipq4019.dtsi"
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8 #include <dt-bindings/soc/qcom,tcsr.h>
11 model = "MikroTik hAP ac3";
12 compatible = "mikrotik,hap-ac3";
15 device_type = "memory";
16 reg = <0x80000000 0x10000000>;
20 stdout-path = "serial0:115200n8";
24 led-boot = &led_status_blue;
25 led-failsafe = &led_status_red;
26 led-running = &led_status_blue;
27 led-upgrade = &led_status_red;
36 compatible = "qcom,qca-gcnt";
41 compatible = "qcom,tcsr";
42 reg = <0x1949000 0x100>;
43 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
48 compatible = "qcom,tcsr";
49 reg = <0x194b000 0x100>;
50 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
55 compatible = "qcom,tcsr";
56 reg = <0x1953000 0x1000>;
57 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
61 compatible = "qcom,tcsr";
62 reg = <0x1957000 0x100>;
63 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
76 compatible = "gpio-keys";
80 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_RESTART>;
86 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
87 linux,code = <KEY_RFKILL>;
92 gpios = <&tlmm 42 GPIO_ACTIVE_LOW>;
93 linux,code = <KEY_WPS_BUTTON>;
98 compatible = "gpio-leds";
100 led_status_blue: status-blue {
101 function = LED_FUNCTION_STATUS;
102 color = <LED_COLOR_ID_BLUE>;
103 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
106 led_status_red: status-red {
107 function = LED_FUNCTION_STATUS;
108 color = <LED_COLOR_ID_RED>;
109 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
113 led_status_green: status-green {
114 function = LED_FUNCTION_STATUS;
115 color = <LED_COLOR_ID_GREEN>;
116 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
120 function = LED_FUNCTION_WLAN;
121 color = <LED_COLOR_ID_GREEN>;
122 gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
126 label = "green:ethernet";
127 gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
131 function = LED_FUNCTION_WAN;
132 color = <LED_COLOR_ID_GREEN>;
133 gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
137 label = "green:lan1";
138 gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
142 label = "green:lan2";
143 gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
147 label = "green:lan3";
148 gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
152 label = "green:lan4";
153 gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
158 gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
164 serial_pins: serial_pinmux {
166 pins = "gpio16", "gpio17";
167 function = "blsp_uart0";
172 spi_0_pins: spi_0_pinmux {
174 function = "blsp_spi0";
175 pins = "gpio13", "gpio14", "gpio15";
176 drive-strength = <12>;
183 drive-strength = <2>;
189 nand_pins: nand_pins {
191 pins = "gpio53", "gpio58", "gpio59";
197 pins = "gpio55", "gpio56", "gpio57", "gpio60",
198 "gpio62", "gpio63", "gpio64", "gpio65",
199 "gpio66", "gpio67", "gpio68", "gpio69";
207 gpios = <44 GPIO_ACTIVE_HIGH>;
209 line-name = "enable USB power";
220 pinctrl-0 = <&spi_0_pins>;
221 pinctrl-names = "default";
222 cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
226 compatible = "jedec,spi-nor";
227 spi-max-frequency = <40000000>;
230 compatible = "fixed-partitions";
231 #address-cells = <1>;
241 compatible = "mikrotik,routerboot-partitions";
242 #address-cells = <1>;
244 label = "RouterBoot";
245 reg = <0x80000 0x80000>;
270 pinctrl-0 = <&nand_pins>;
271 pinctrl-names = "default";
275 compatible = "fixed-partitions";
276 #address-cells = <1>;
281 reg = <0x0 0xa00000>;
286 reg = <0xa00000 0x7600000>;
295 pinctrl-0 = <&serial_pins>;
296 pinctrl-names = "default";
350 qcom,ath10k-calibration-variant = "MikroTik-hAP-ac3";
356 qcom,ath10k-calibration-variant = "MikroTik-hAP-ac3";