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>;
80 compatible = "gpio-keys";
84 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
85 linux,code = <KEY_RESTART>;
90 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
91 linux,code = <KEY_RFKILL>;
96 gpios = <&tlmm 42 GPIO_ACTIVE_LOW>;
97 linux,code = <KEY_WPS_BUTTON>;
102 compatible = "gpio-leds";
104 led_status_blue: status-blue {
105 function = LED_FUNCTION_STATUS;
106 color = <LED_COLOR_ID_BLUE>;
107 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
110 led_status_red: status-red {
111 function = LED_FUNCTION_STATUS;
112 color = <LED_COLOR_ID_RED>;
113 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
117 led_status_green: status-green {
118 function = LED_FUNCTION_STATUS;
119 color = <LED_COLOR_ID_GREEN>;
120 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
124 function = LED_FUNCTION_WLAN;
125 color = <LED_COLOR_ID_GREEN>;
126 gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
130 label = "green:ethernet";
131 gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
135 function = LED_FUNCTION_WAN;
136 color = <LED_COLOR_ID_GREEN>;
137 gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
141 label = "green:lan1";
142 gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
146 label = "green:lan2";
147 gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
151 label = "green:lan3";
152 gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
156 label = "green:lan4";
157 gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
162 gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>;
168 serial_pins: serial_pinmux {
170 pins = "gpio16", "gpio17";
171 function = "blsp_uart0";
176 spi_0_pins: spi_0_pinmux {
178 function = "blsp_spi0";
179 pins = "gpio13", "gpio14", "gpio15";
180 drive-strength = <12>;
187 drive-strength = <2>;
193 nand_pins: nand_pins {
195 pins = "gpio53", "gpio58", "gpio59";
201 pins = "gpio55", "gpio56", "gpio57", "gpio60",
202 "gpio62", "gpio63", "gpio64", "gpio65",
203 "gpio66", "gpio67", "gpio68", "gpio69";
211 gpios = <44 GPIO_ACTIVE_HIGH>;
213 line-name = "enable USB power";
224 pinctrl-0 = <&spi_0_pins>;
225 pinctrl-names = "default";
226 cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
230 compatible = "jedec,spi-nor";
231 spi-max-frequency = <40000000>;
234 compatible = "fixed-partitions";
235 #address-cells = <1>;
245 compatible = "mikrotik,routerboot-partitions";
246 #address-cells = <1>;
248 label = "RouterBoot";
249 reg = <0x80000 0x80000>;
274 pinctrl-0 = <&nand_pins>;
275 pinctrl-names = "default";
279 compatible = "fixed-partitions";
280 #address-cells = <1>;
285 reg = <0x0 0xa00000>;
290 reg = <0xa00000 0x7600000>;
299 pinctrl-0 = <&serial_pins>;
300 pinctrl-names = "default";
350 qcom,ath10k-calibration-variant = "MikroTik-hAP-ac3";
356 qcom,ath10k-calibration-variant = "MikroTik-hAP-ac3";