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>;
283 compatible = "nvmem-cells";
284 #address-cells = <1>;
287 macaddr_dp1: macaddr@0 {
291 macaddr_dp2: macaddr@6 {
295 macaddr_dp3: macaddr@c {
299 macaddr_dp4: macaddr@12 {
303 macaddr_dp5: macaddr@18 {
307 caldata_qca9889: caldata@4d000 {
308 reg = <0x4d000 0x844>;
314 reg = <0x1000000 0x80000>;
318 /* This is crash + crash_syslog parts combined */
320 reg = <0x1080000 0x100000>;
324 label = "ubi_kernel";
325 reg = <0x1180000 0x3800000>;
330 reg = <0x4980000 0xb680000>;
351 pinctrl-0 = <&mdio_pins>;
352 pinctrl-names = "default";
353 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
355 qca8075_0: ethernet-phy@0 {
356 compatible = "ethernet-phy-ieee802.3-c22";
360 qca8075_1: ethernet-phy@1 {
361 compatible = "ethernet-phy-ieee802.3-c22";
365 qca8075_2: ethernet-phy@2 {
366 compatible = "ethernet-phy-ieee802.3-c22";
370 qca8075_3: ethernet-phy@3 {
371 compatible = "ethernet-phy-ieee802.3-c22";
375 qca8081: ethernet-phy@24 {
376 compatible = "ethernet-phy-id004d.d101";
378 reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
385 switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
386 switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
387 switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
388 switch_mac_mode1 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance1*/
410 port_mac_sel = "QGMAC_PORT";
421 phy-handle = <&qca8075_0>;
423 nvmem-cells = <&macaddr_dp1>;
424 nvmem-cell-names = "mac-address";
429 phy-handle = <&qca8075_1>;
431 nvmem-cells = <&macaddr_dp2>;
432 nvmem-cell-names = "mac-address";
437 phy-handle = <&qca8075_2>;
439 nvmem-cells = <&macaddr_dp3>;
440 nvmem-cell-names = "mac-address";
445 phy-handle = <&qca8075_3>;
447 nvmem-cells = <&macaddr_dp4>;
448 nvmem-cell-names = "mac-address";
453 phy-handle = <&qca8081>;
455 nvmem-cells = <&macaddr_dp5>;
456 nvmem-cell-names = "mac-address";
466 perst-gpio = <&tlmm 58 GPIO_ACTIVE_LOW>;
469 reg = <0x00000000 0 0 0 0>;
470 #address-cells = <3>;
477 /* ath11k has no DT compatible for PCI cards */
478 compatible = "pci17cb,1104";
479 reg = <0x00010000 0 0 0 0>;
481 qcom,ath11k-calibration-variant = "Xiaomi-AX9000";
493 perst-gpio = <&tlmm 62 GPIO_ACTIVE_HIGH>;
496 reg = <0x00010000 0 0 0 0>;
497 #address-cells = <3>;
504 compatible = "qcom,ath10k";
505 reg = <0x00010000 0 0 0 0>;
507 qcom,ath10k-calibration-variant = "Xiaomi-AX9000";
508 nvmem-cell-names = "calibration";
509 nvmem-cells = <&caldata_qca9889>;
517 qcom,ath11k-calibration-variant = "Xiaomi-AX9000";