1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2021, Robert Marko <robimarko@gmail.com> */
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>
14 model = "Xiaomi AX9000";
15 compatible = "xiaomi,ax9000", "qcom,ipq8074";
18 serial0 = &blsp1_uart5;
19 led-boot = &led_system_yellow;
20 led-failsafe = &led_system_yellow;
21 led-running = &led_system_blue;
22 led-upgrade = &led_system_yellow;
23 label-mac-device = &dp5;
27 stdout-path = "serial0:115200n8";
28 bootargs-append = " root=/dev/ubiblock0_0";
32 compatible = "gpio-keys";
36 gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RESTART>;
41 label = "wps"; /* Labeled Mesh on the device */
42 gpios = <&tlmm 46 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_WPS_BUTTON>;
48 compatible = "gpio-leds";
50 led_system_blue: system-blue {
51 gpios = <&tlmm 48 GPIO_ACTIVE_HIGH>;
52 color = <LED_COLOR_ID_BLUE>;
55 led_system_yellow: system-yellow {
56 gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
57 color = <LED_COLOR_ID_YELLOW>;
61 gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
62 color = <LED_COLOR_ID_YELLOW>;
66 gpios = <&tlmm 51 GPIO_ACTIVE_HIGH>;
67 color = <LED_COLOR_ID_BLUE>;
71 gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>;
72 color = <LED_COLOR_ID_RED>;
73 default-state = "keep";
77 gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
78 color = <LED_COLOR_ID_GREEN>;
79 default-state = "keep";
83 gpios = <&tlmm 66 GPIO_ACTIVE_HIGH>;
84 color = <LED_COLOR_ID_BLUE>;
85 default-state = "keep";
91 mdio_pins: mdio-pins {
102 drive-strength = <8>;
108 pins = "gpio0", "gpio2";
109 function = "blsp5_i2c";
110 drive-strength = <8>;
122 pinctrl-0 = <&i2c_pins>;
123 pinctrl-names = "default";
146 * Bootloader will find the NAND DT node by the compatible and
147 * then "fixup" it by adding the partitions from the SMEM table
148 * using the legacy bindings thus making it impossible for us
149 * to change the partition table or utilize NVMEM for calibration.
150 * So add a dummy partitions node that bootloader will populate
151 * and set it as disabled so the kernel ignores it instead of
152 * printing warnings due to the broken way bootloader adds the
161 nand-ecc-strength = <4>;
162 nand-ecc-step-size = <512>;
163 nand-bus-width = <8>;
166 compatible = "fixed-partitions";
167 #address-cells = <1>;
172 reg = <0x0 0x100000>;
178 reg = <0x100000 0x100000>;
183 label = "0:bootconfig";
184 reg = <0x200000 0x80000>;
189 label = "0:bootconfig1";
190 reg = <0x280000 0x80000>;
196 reg = <0x300000 0x300000>;
202 reg = <0x600000 0x300000>;
208 reg = <0x900000 0x80000>;
213 label = "0:devcfg_1";
214 reg = <0x980000 0x80000>;
220 reg = <0xa00000 0x80000>;
226 reg = <0xa80000 0x80000>;
232 reg = <0xb00000 0x80000>;
238 reg = <0xb80000 0x80000>;
244 reg = <0xc00000 0x80000>;
250 reg = <0xc80000 0x80000>;
255 label = "0:appsblenv";
256 reg = <0xd00000 0x80000>;
261 reg = <0xd80000 0x100000>;
266 label = "0:appsbl_1";
267 reg = <0xe80000 0x100000>;
273 reg = <0xf80000 0x80000>;
277 compatible = "fixed-layout";
278 #address-cells = <1>;
281 macaddr_dp1: macaddr@0 {
285 macaddr_dp2: macaddr@6 {
289 macaddr_dp3: macaddr@c {
293 macaddr_dp4: macaddr@12 {
297 macaddr_dp5: macaddr@18 {
301 caldata_qca9889: caldata@4d000 {
302 reg = <0x4d000 0x844>;
309 reg = <0x1000000 0x80000>;
313 /* This is crash + crash_syslog parts combined */
315 reg = <0x1080000 0x100000>;
319 label = "ubi_kernel";
320 reg = <0x1180000 0x3800000>;
325 reg = <0x4980000 0xb680000>;
346 pinctrl-0 = <&mdio_pins>;
347 pinctrl-names = "default";
348 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
350 ethernet-phy-package@0 {
351 #address-cells = <1>;
353 compatible = "qcom,qca8075-package";
356 qcom,package-mode = "qsgmii";
358 qca8075_0: ethernet-phy@0 {
359 compatible = "ethernet-phy-ieee802.3-c22";
363 qca8075_1: ethernet-phy@1 {
364 compatible = "ethernet-phy-ieee802.3-c22";
368 qca8075_2: ethernet-phy@2 {
369 compatible = "ethernet-phy-ieee802.3-c22";
373 qca8075_3: ethernet-phy@3 {
374 compatible = "ethernet-phy-ieee802.3-c22";
379 qca8081: ethernet-phy@24 {
380 compatible = "ethernet-phy-id004d.d101";
382 reset-deassert-us = <10000>;
383 reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
386 #address-cells = <1>;
391 color = <LED_COLOR_ID_GREEN>;
392 function = LED_FUNCTION_WAN;
393 default-state = "keep";
402 switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
403 switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
404 switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
405 switch_mac_mode1 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance1*/
427 port_mac_sel = "QGMAC_PORT";
439 phy-handle = <&qca8075_0>;
441 nvmem-cells = <&macaddr_dp1>;
442 nvmem-cell-names = "mac-address";
448 phy-handle = <&qca8075_1>;
450 nvmem-cells = <&macaddr_dp2>;
451 nvmem-cell-names = "mac-address";
457 phy-handle = <&qca8075_2>;
459 nvmem-cells = <&macaddr_dp3>;
460 nvmem-cell-names = "mac-address";
466 phy-handle = <&qca8075_3>;
468 nvmem-cells = <&macaddr_dp4>;
469 nvmem-cell-names = "mac-address";
474 phy-handle = <&qca8081>;
476 nvmem-cells = <&macaddr_dp5>;
477 nvmem-cell-names = "mac-address";
487 perst-gpio = <&tlmm 58 GPIO_ACTIVE_LOW>;
490 reg = <0x00000000 0 0 0 0>;
491 #address-cells = <3>;
498 /* ath11k has no DT compatible for PCI cards */
499 compatible = "pci17cb,1104";
500 reg = <0x00010000 0 0 0 0>;
502 qcom,ath11k-calibration-variant = "Xiaomi-AX9000";
514 perst-gpio = <&tlmm 62 GPIO_ACTIVE_HIGH>;
517 reg = <0x00010000 0 0 0 0>;
518 #address-cells = <3>;
525 compatible = "qcom,ath10k";
526 reg = <0x00010000 0 0 0 0>;
528 qcom,ath10k-calibration-variant = "Xiaomi-AX9000";
529 nvmem-cell-names = "calibration";
530 nvmem-cells = <&caldata_qca9889>;
538 qcom,ath11k-calibration-variant = "Xiaomi-AX9000";