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;
32 compatible = "qcom,qca-gcnt";
37 compatible = "qcom,tcsr";
38 reg = <0x1949000 0x100>;
39 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
44 compatible = "qcom,tcsr";
45 reg = <0x194b000 0x100>;
46 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
51 compatible = "qcom,tcsr";
52 reg = <0x1953000 0x1000>;
53 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
57 compatible = "qcom,tcsr";
58 reg = <0x1957000 0x100>;
59 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
64 compatible = "gpio-keys";
68 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
69 linux,code = <KEY_RESTART>;
74 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
75 linux,code = <KEY_RFKILL>;
80 gpios = <&tlmm 42 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_WPS_BUTTON>;
86 compatible = "gpio-leds";
88 led_status_blue: status-blue {
89 function = LED_FUNCTION_STATUS;
90 color = <LED_COLOR_ID_BLUE>;
91 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
94 led_status_red: status-red {
95 function = LED_FUNCTION_STATUS;
96 color = <LED_COLOR_ID_RED>;
97 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
101 led_status_green: status-green {
102 function = LED_FUNCTION_STATUS;
103 color = <LED_COLOR_ID_GREEN>;
104 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
108 function = LED_FUNCTION_WLAN;
109 color = <LED_COLOR_ID_GREEN>;
110 gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
114 label = "green:ethernet";
115 gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
119 function = LED_FUNCTION_WAN;
120 color = <LED_COLOR_ID_GREEN>;
121 gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
125 label = "green:lan1";
126 gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
130 label = "green:lan2";
131 gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
135 label = "green:lan3";
136 gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
140 label = "green:lan4";
141 gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
146 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";