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 label = "blue:system";
52 gpios = <&tlmm 48 GPIO_ACTIVE_HIGH>;
53 color = <LED_COLOR_ID_BLUE>;
56 led_system_yellow: system-yellow {
57 label = "yellow:system";
58 gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
59 color = <LED_COLOR_ID_YELLOW>;
63 label = "yellow:network";
64 gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
65 color = <LED_COLOR_ID_YELLOW>;
69 label = "blue:network";
70 gpios = <&tlmm 51 GPIO_ACTIVE_HIGH>;
71 color = <LED_COLOR_ID_BLUE>;
76 gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>;
77 color = <LED_COLOR_ID_RED>;
78 default-state = "keep";
83 gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
84 color = <LED_COLOR_ID_GREEN>;
85 default-state = "keep";
90 gpios = <&tlmm 66 GPIO_ACTIVE_HIGH>;
91 color = <LED_COLOR_ID_BLUE>;
92 default-state = "keep";
98 mdio_pins: mdio-pins {
102 drive-strength = <8>;
109 drive-strength = <8>;
115 pins = "gpio0", "gpio2";
116 function = "blsp5_i2c";
117 drive-strength = <8>;
129 pinctrl-0 = <&i2c_pins>;
130 pinctrl-names = "default";
153 * Bootloader will find the NAND DT node by the compatible and
154 * then "fixup" it by adding the partitions from the SMEM table
155 * using the legacy bindings thus making it impossible for us
156 * to change the partition table or utilize NVMEM for calibration.
157 * So add a dummy partitions node that bootloader will populate
158 * and set it as disabled so the kernel ignores it instead of
159 * printing warnings due to the broken way bootloader adds the
168 nand-ecc-strength = <4>;
169 nand-ecc-step-size = <512>;
170 nand-bus-width = <8>;
173 compatible = "fixed-partitions";
174 #address-cells = <1>;
179 reg = <0x0 0x100000>;
185 reg = <0x100000 0x100000>;
190 label = "0:bootconfig";
191 reg = <0x200000 0x80000>;
196 label = "0:bootconfig1";
197 reg = <0x280000 0x80000>;
203 reg = <0x300000 0x300000>;
209 reg = <0x600000 0x300000>;
215 reg = <0x900000 0x80000>;
220 label = "0:devcfg_1";
221 reg = <0x980000 0x80000>;
227 reg = <0xa00000 0x80000>;
233 reg = <0xa80000 0x80000>;
239 reg = <0xb00000 0x80000>;
245 reg = <0xb80000 0x80000>;
251 reg = <0xc00000 0x80000>;
257 reg = <0xc80000 0x80000>;
262 label = "0:appsblenv";
263 reg = <0xd00000 0x80000>;
268 reg = <0xd80000 0x100000>;
273 label = "0:appsbl_1";
274 reg = <0xe80000 0x100000>;
280 reg = <0xf80000 0x80000>;
284 compatible = "fixed-layout";
285 #address-cells = <1>;
288 macaddr_dp1: macaddr@0 {
292 macaddr_dp2: macaddr@6 {
296 macaddr_dp3: macaddr@c {
300 macaddr_dp4: macaddr@12 {
304 macaddr_dp5: macaddr@18 {
308 caldata_qca9889: caldata@4d000 {
309 reg = <0x4d000 0x844>;
316 reg = <0x1000000 0x80000>;
320 /* This is crash + crash_syslog parts combined */
322 reg = <0x1080000 0x100000>;
326 label = "ubi_kernel";
327 reg = <0x1180000 0x3800000>;
332 reg = <0x4980000 0xb680000>;
353 pinctrl-0 = <&mdio_pins>;
354 pinctrl-names = "default";
355 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
357 qca8075_0: ethernet-phy@0 {
358 compatible = "ethernet-phy-ieee802.3-c22";
362 qca8075_1: ethernet-phy@1 {
363 compatible = "ethernet-phy-ieee802.3-c22";
367 qca8075_2: ethernet-phy@2 {
368 compatible = "ethernet-phy-ieee802.3-c22";
372 qca8075_3: ethernet-phy@3 {
373 compatible = "ethernet-phy-ieee802.3-c22";
377 qca8081: ethernet-phy@24 {
378 compatible = "ethernet-phy-id004d.d101";
380 reset-deassert-us = <10000>;
381 reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
384 #address-cells = <1>;
389 color = <LED_COLOR_ID_GREEN>;
390 function = LED_FUNCTION_WAN;
391 default-state = "keep";
400 switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
401 switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
402 switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
403 switch_mac_mode1 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance1*/
425 port_mac_sel = "QGMAC_PORT";
436 phy-handle = <&qca8075_0>;
438 nvmem-cells = <&macaddr_dp1>;
439 nvmem-cell-names = "mac-address";
444 phy-handle = <&qca8075_1>;
446 nvmem-cells = <&macaddr_dp2>;
447 nvmem-cell-names = "mac-address";
452 phy-handle = <&qca8075_2>;
454 nvmem-cells = <&macaddr_dp3>;
455 nvmem-cell-names = "mac-address";
460 phy-handle = <&qca8075_3>;
462 nvmem-cells = <&macaddr_dp4>;
463 nvmem-cell-names = "mac-address";
468 phy-handle = <&qca8081>;
470 nvmem-cells = <&macaddr_dp5>;
471 nvmem-cell-names = "mac-address";
481 perst-gpio = <&tlmm 58 GPIO_ACTIVE_LOW>;
484 reg = <0x00000000 0 0 0 0>;
485 #address-cells = <3>;
492 /* ath11k has no DT compatible for PCI cards */
493 compatible = "pci17cb,1104";
494 reg = <0x00010000 0 0 0 0>;
496 qcom,ath11k-calibration-variant = "Xiaomi-AX9000";
508 perst-gpio = <&tlmm 62 GPIO_ACTIVE_HIGH>;
511 reg = <0x00010000 0 0 0 0>;
512 #address-cells = <3>;
519 compatible = "qcom,ath10k";
520 reg = <0x00010000 0 0 0 0>;
522 qcom,ath10k-calibration-variant = "Xiaomi-AX9000";
523 nvmem-cell-names = "calibration";
524 nvmem-cells = <&caldata_qca9889>;
532 qcom,ath11k-calibration-variant = "Xiaomi-AX9000";