ipq807x: fix mf269 dts

This commit is contained in:
lean 2022-09-13 19:08:25 +08:00
parent 4da63f1fef
commit e438377b24
2 changed files with 235 additions and 468 deletions

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/* Copyright (c) 2021, Dirk Buchwalder <buchwalder@posteo.de> */ /* Copyright (c) 2021, ZhiPing */
/dts-v1/; /dts-v1/;
@ -15,321 +15,138 @@
#address-cells = <2>; #address-cells = <2>;
#size-cells = <2>; #size-cells = <2>;
model = "QNAP 301w"; model = "ZTE MF269";
compatible = "qnap,301w", "qcom,ipq8074"; compatible = "zte,mf269", "qcom,ipq8074";
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
aliases { aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
serial0 = &blsp1_uart5; serial0 = &blsp1_uart5;
/*
* Aliases as required by u-boot
* to patch MAC addresses
*/
led-boot = &led_system_red;
led-failsafe = &led_system_red;
led-running = &led_pwr_green;
led-upgrade = &led_system_red;
ethernet0 = &dp1;
ethernet1 = &dp2;
ethernet2 = &dp3;
ethernet3 = &dp4;
ethernet4 = &dp5;
ethernet5 = &dp6;
label-mac-device = &dp1;
}; };
chosen { chosen {
stdout-path = "serial0:115200n8"; stdout-path = "serial0:115200n8";
bootargs-append = " root=/dev/ubiblock0_1";
};
reserved-memory {
/delete-node/ tzapp@4a400000;
/delete-node/ q6_etr_dump@50f00000;
/delete-node/ m3_dump@51000000;
}; };
keys { keys {
compatible = "gpio-keys"; compatible = "gpio-keys";
wps {
label = "wps";
gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
reset { reset {
label = "reset"; label = "reset";
gpios = <&tlmm 67 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>; linux,code = <KEY_RESTART>;
gpios = <&tlmm 46 GPIO_ACTIVE_LOW>;
};
wps {
label = "wps";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
}; };
}; };
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
led_system_green: system-green { led_power: power {
label = "green:system"; label = "white:power";
gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>; gpio = <&tlmm 56 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>; };
};
soc {
dp5: dp5 {
device_type = "network";
compatible = "qcom,nss-dp";
qcom,id = <5>;
reg = <0x3a003000 0x3fff>;
qcom,mactype = <1>;
local-mac-address = [000000000000];
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <24>;
phy-mode = "sgmii";
mdio-bus = <&mdio>;
}; };
led_system_red: system-red { dp6: dp6 {
label = "red:system"; device_type = "network";
gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; compatible = "qcom,nss-dp";
color = <LED_COLOR_ID_RED>; qcom,id = <6>;
}; reg = <0x3a007000 0x3fff>;
qcom,mactype = <1>;
led_pwr_green: pwr-green { local-mac-address = [000000000000];
label = "green:pwr"; qcom,link-poll = <1>;
gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>; qcom,phy-mdio-addr = <28>;
color = <LED_COLOR_ID_GREEN>; phy-mode = "sgmii";
}; mdio-bus = <&mdio>;
led_wifi_green: wifi-green {
label = "green:wifi";
gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
};
led_lan1_green: lan1-green {
label = "green:lan1";
gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
};
led_lan1_amber: lan1-amber {
label = "amber:lan1";
gpios = <&tlmm 7 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_AMBER>;
};
led_lan2_green: lan2-green {
label = "green:lan2";
gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
};
led_lan2_amber: lan2-amber {
label = "amber:lan2";
gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_AMBER>;
};
led_lan3_green: lan3-green {
label = "green:lan3";
gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
};
led_lan3_amber: lan3-amber {
label = "amber:lan3";
gpios = <&tlmm 13 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_AMBER>;
};
led_lan4_green: lan4-green {
label = "green:lan4";
gpios = <&tlmm 14 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
};
led_lan4_amber: lan4-amber {
label = "amber:lan4";
gpios = <&tlmm 15 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_AMBER>;
};
led_10g_1_green: 10g_1-green {
label = "green:10g_1";
gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
};
led_10g_1_amber: 10g_1-amber {
label = "amber:10g_1";
gpios = <&tlmm 56 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_AMBER>;
};
led_10g_2_green: 10g_2-green {
label = "green:10g_2";
gpios = <&tlmm 51 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
};
led_10g_2_amber: 10g_2-amber {
label = "amber:10g_2";
gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_AMBER>;
}; };
}; };
}; };
&tlmm { &blsp1_spi1 {
status = "okay";
pinctrl-0 = <&spi_0_pins>;
pinctrl-names = "default";
cs-select = <0>;
mdio_pins: mdio-pins { flash@0 {
mdc { compatible = "jedec,spi-nor", "n25q128a11";
pins = "gpio68"; #address-cells = <1>;
function = "mdc"; #size-cells = <1>;
drive-strength = <8>; reg = <0>;
bias-pull-up; spi-max-frequency = <50000000>;
};
mdio {
pins = "gpio69";
function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
}; };
button_pins: button_pins {
wps_button {
pins = "gpio57";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
rst_button {
pins = "gpio67";
function = "gpio";
drive-strength = <8>;
bias-pull-up;
};
};
qpic_pins: qpic-pins {
status = "disabled";
/*disabling qpic-pins due to the leds are using all of the gpios*/
};
leds_pins: leds_pinmux {
led_pwr_green {
pins = "gpio4";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_system_green {
pins = "gpio1";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_system_red {
pins = "gpio3";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_lan1_green {
pins = "gpio6";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_lan1_amber {
pins = "gpio7";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_lan2_green {
pins = "gpio8";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_lan2_amber {
pins = "gpio11";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_lan3_green {
pins = "gpio12";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_lan3_amber {
pins = "gpio13";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_lan4_green {
pins = "gpio14";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_lan4_amber {
pins = "gpio15";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_10g_1_green {
pins = "gpio54";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_10g_1_amber {
pins = "gpio56";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_10g_2_green {
pins = "gpio51";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_10g_2_amber {
pins = "gpio52";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
led_wifi_green {
pins = "gpio42";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
}; };
/*
&blsp1_spi6 {
status = "okay";
pinctrl-0 = <&spi_5_pins>;
pinctrl-names = "default";
cs-select = <0>;
si3217x@0 {
compatible = "si3217x";
num_slic = <1>;
reg = <0>;
spi-cpha;
spi-cpol;
spi-max-frequency = <960000>;
pinctrl-0 = <&slic_ctl_pins>;
pinctrl-names = "default";
ctl-gpio = <&tlmm 57 0>;
rst-gpio = <&tlmm 58 0>;
irq-gpio = <&tlmm 59 0>;
};
};
&blsp1_i2c5 {
status = "okay";
pinctrl-0 = <&i2c_4_pins>;
pinctrl-names = "default";
aw9106b@5b {
compatible = "aw9106b";
reg = <0x5b>;
reset-gpio = <&tlmm 54 0>;
};
};
*/
&blsp1_uart5 { &blsp1_uart5 {
status = "okay"; status = "okay";
}; };
&prng {
status = "okay";
};
&ssphy_0 {
status = "okay";
};
&qusb_phy_0 {
status = "okay";
};
&ssphy_1 {
status = "okay";
};
&qusb_phy_1 {
status = "okay";
};
&usb_0 {
status = "okay";
};
&usb_1 {
status = "okay";
};
&cryptobam { &cryptobam {
status = "okay"; status = "okay";
}; };
@ -338,121 +155,28 @@
status = "okay"; status = "okay";
}; };
&qpic_bam {
status = "okay";
};
&blsp1_spi1 { /* BLSP1 QUP1 */
pinctrl-0 = <&spi_0_pins>;
pinctrl-names = "default";
cs-gpios = <0>;
status = "okay";
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
compatible = "jedec,spi-nor";
spi-max-frequency = <50000000>;
partitions {
compatible = "qcom,smem-part";
};
};
};
&mdio {
status = "okay";
pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
ethernet-phy@0 {
compatible ="ethernet-phy-ieee802.3-c45";
reg = <0>;
reset-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
};
ethernet-phy@8 {
compatible ="ethernet-phy-ieee802.3-c45";
reg = <8>;
reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
};
ethernet-phy@16 {
reg = <16>;
};
ethernet-phy@17 {
reg = <17>;
};
ethernet-phy@18 {
reg = <18>;
};
ethernet-phy@19 {
reg = <19>;
};
};
&sdhc_1 {
/* According to the stock dts from the QNAP gpl drop
* the emmc has a problem with the hs400 > hs200 speed switch.
* Therefore remove the mmc-hs400-1_8v property
*/
/delete-property/ mmc-hs400-1_8v;
mmc-hs200-1_8v;
mmc-ddr-1_8v;
vqmmc-supply = <&ldo11>;
status = "okay";
};
&switch { &switch {
status = "okay";
switch_cpu_bmp = <0x1>; /* cpu port bitmap */ switch_cpu_bmp = <0x1>; /* cpu port bitmap */
switch_lan_bmp = <0x3e>; /* lan port bitmap */ switch_lan_bmp = <0x3e>; /* lan port bitmap */
switch_wan_bmp = <0xc0>; /* wan port bitmap */ switch_wan_bmp = <0x40>; /* wan port bitmap */
switch_mac_mode = <0xb>; /* mac mode for uniphy instance0*/ switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/
switch_mac_mode1 = <0xd>; /* mac mode for uniphy instance1*/ switch_mac_mode1 = <0xf>; /* mac mode for uniphy instance1*/
switch_mac_mode2 = <0xd>; /* mac mode for uniphy instance2*/ switch_mac_mode2 = <0xf>; /* mac mode for uniphy instance2*/
bm_tick_mode = <0>; /* bm tick mode */ bm_tick_mode = <0>; /* bm tick mode */
tm_tick_mode = <0>; /* tm tick mode */ tm_tick_mode = <0>; /* tm tick mode */
qcom,port_phyinfo { qcom,port_phyinfo {
port@0 {
port_id = <1>;
phy_address = <16>;
};
port@1 {
port_id = <2>;
phy_address = <17>;
};
port@2 {
port_id = <3>;
phy_address = <18>;
};
port@3 {
port_id = <4>;
phy_address = <19>;
};
port@4 { port@4 {
port_id = <5>; port_id = <5>;
phy_address = <8>; phy_address = <24>;
compatible = "ethernet-phy-ieee802.3-c45"; port_mac_sel = "QGMAC_PORT";
ethernet-phy-ieee802.3-c45;
}; };
port@5 { port@5 {
port_id = <6>; port_id = <6>;
phy_address = <0>; phy_address = <28>;
compatible = "ethernet-phy-ieee802.3-c45"; port_mac_sel = "QGMAC_PORT";
ethernet-phy-ieee802.3-c45;
}; };
}; };
port_scheduler_resource { port_scheduler_resource {
port@0 { port@0 {
port_id = <0>; port_id = <0>;
@ -727,95 +451,136 @@
}; };
}; };
&edma { &mdio {
status = "okay";
pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
//reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
ethernet-phy@4 {
reg = <24>;
//reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
};
ethernet-phy@5 {
reg = <28>;
//reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;
};
};
&prng {
status = "okay"; status = "okay";
}; };
&soc { &qpic_bam {
dp1: dp1 { status = "okay";
device_type = "network"; };
compatible = "qcom,nss-dp";
qcom,id = <1>; &qpic_nand {
reg = <0x3a001000 0x200>; status = "okay";
qcom,mactype = <0>;
local-mac-address = [000000000000]; nand@0 {
qcom,link-poll = <1>; reg = <0>;
qcom,phy-mdio-addr = <16>; nand-ecc-strength = <4>;
phy-mode = "sgmii"; nand-ecc-step-size = <512>;
mdio-bus = <&mdio>; nand-bus-width = <8>;
partitions {
compatible = "qcom,smem-part";
};
};
};
&qusb_phy_0 {
status = "okay";
};
&ssphy_0 {
status = "okay";
};
&tlmm {
i2c_4_pins: i2c-4-pinmux {
pins = "gpio21", "gpio22";
function = "blsp4_i2c1";
drive-strength = <8>;
bias-disable;
}; };
dp2: dp2 { slic_ctl_pins: slic_ctl_pins {
device_type = "network"; mux {
compatible = "qcom,nss-dp"; pins = "gpio59";
qcom,id = <2>; function = "gpio";
reg = <0x3a001200 0x200>; bias-pull-up;
qcom,mactype = <0>; };
local-mac-address = [000000000000];
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <17>;
phy-mode = "sgmii";
mdio-bus = <&mdio>;
}; };
dp3: dp3 { spi_5_pins: spi-5-pins {
device_type = "network"; pins = "gpio0", "gpio2", "gpio9", "gpio16";
compatible = "qcom,nss-dp"; function = "blsp5_spi";
qcom,id = <3>; drive-strength = <8>;
reg = <0x3a001400 0x200>; bias-disable;
qcom,mactype = <0>;
local-mac-address = [000000000000];
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <18>;
phy-mode = "sgmii";
mdio-bus = <&mdio>;
}; };
dp4: dp4 { mdio_pins: mdio_pinmux {
device_type = "network"; mux_0 {
compatible = "qcom,nss-dp"; pins = "gpio68";
qcom,id = <4>; function = "mdc";
reg = <0x3a001600 0x200>; drive-strength = <8>;
qcom,mactype = <0>; bias-pull-up;
local-mac-address = [000000000000]; };
qcom,link-poll = <1>;
qcom,phy-mdio-addr = <19>; mux_1 {
phy-mode = "sgmii"; pins = "gpio69";
mdio-bus = <&mdio>; function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
mux_2 {
pins = "gpio25";
function = "gpio";
bias-pull-up;
};
mux_3 {
pins = "gpio44";
function = "gpio";
bias-pull-up;
};
}; };
dp5: dp5 { usb_vbus_pins: usb_vbus_pins {
device_type = "network"; mux {
compatible = "qcom,nss-dp"; pins = "gpio29";
qcom,id = <5>; function = "gpio";
reg = <0x3a001800 0x200>; drive-strength = <8>;
qcom,mactype = <1>; bias-disable;
local-mac-address = [000000000000]; output-high;
qcom,link-poll = <1>; };
qcom,phy-mdio-addr = <8>;
phy-mode = "sgmii";
mdio-bus = <&mdio>;
}; };
dp6: dp6 { usb_cc_pins: usb_cc_pins {
device_type = "network"; mux {
compatible = "qcom,nss-dp"; pins = "gpio47", "gpio48";
qcom,id = <6>; function = "gpio";
reg = <0x3a007000 0x3fff>; drive-strength = <8>;
qcom,mactype = <1>; bias-disable;
local-mac-address = [000000000000]; output-high;
qcom,link-poll = <1>; };
qcom,phy-mdio-addr = <0>;
phy-mode = "sgmii";
mdio-bus = <&mdio>;
}; };
}; };
&usb_0 {
pinctrl-0 = <&usb_vbus_pins &usb_cc_pins>;
pinctrl-names = "default";
status = "okay";
};
&wifi { &wifi {
status = "okay"; status = "okay";
/* using board_id 0xff is intentionally
* as the stock firmware is also using this default board_id qcom,board_id = <658>;
*/ qcom,ath11k-calibration-variant = "ZTE-MF269";
qcom,board_id = <0xff>; };
qcom,ath11k-calibration-variant = "QNAP-301w";
};

View File

@ -3,12 +3,13 @@
/dts-v1/; /dts-v1/;
#include "ipq8074.dtsi" #include "ipq8074-512m.dtsi"
#include "ipq8074-hk-cpu.dtsi" #include "ipq8074-ac-cpu.dtsi"
#include "ipq8074-ess.dtsi"
#include "ipq8074-ac-nss.dtsi" #include "ipq8074-ac-nss.dtsi"
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h> #include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ { / {
#address-cells = <2>; #address-cells = <2>;
@ -400,25 +401,22 @@
&sdhc_1 { &sdhc_1 {
/* According to the stock dts from the QNAP gpl drop /* According to the stock dts from the QNAP gpl drop
* the emmc has a problem with the hs400 > hs200 speed switch. * the emmc has a problem with the hs400 > hs200 speed switch.
* But at the momment it doesn't seems possible to run that card in hs200 mode, * Therefore remove the mmc-hs400-1_8v property
* it doesn't get recognized without the hs400 mode.
* Unfortunately it's not stable in hs400 mode so reduce the speed to mmc highspeed.
*/ */
no-1-8-v; /delete-property/ mmc-hs400-1_8v;
cap-sd-highspeed; mmc-hs200-1_8v;
cap-mmc-highspeed; mmc-ddr-1_8v;
max-frequency = <5000000>;
vqmmc-supply = <&ldo11>; vqmmc-supply = <&ldo11>;
status = "okay"; status = "okay";
}; };
&ess_switch { &switch {
status = "okay"; status = "okay";
switch_cpu_bmp = <0x1>; /* cpu port bitmap */ switch_cpu_bmp = <0x1>; /* cpu port bitmap */
switch_lan_bmp = <0x3e>; /* lan port bitmap */ switch_lan_bmp = <0x3e>; /* lan port bitmap */
switch_wan_bmp = <0xc0>; /* wan port bitmap */ switch_wan_bmp = <0xc0>; /* wan port bitmap */
switch_mac_mode = <0x0>; /* mac mode for uniphy instance0*/ switch_mac_mode = <0xb>; /* mac mode for uniphy instance0*/
switch_mac_mode1 = <0xd>; /* mac mode for uniphy instance1*/ switch_mac_mode1 = <0xd>; /* mac mode for uniphy instance1*/
switch_mac_mode2 = <0xd>; /* mac mode for uniphy instance2*/ switch_mac_mode2 = <0xd>; /* mac mode for uniphy instance2*/
bm_tick_mode = <0>; /* bm tick mode */ bm_tick_mode = <0>; /* bm tick mode */
@ -729,6 +727,10 @@
}; };
}; };
&edma {
status = "okay";
};
&soc { &soc {
dp1: dp1 { dp1: dp1 {
device_type = "network"; device_type = "network";
@ -816,4 +818,4 @@
*/ */
qcom,board_id = <0xff>; qcom,board_id = <0xff>;
qcom,ath11k-calibration-variant = "QNAP-301w"; qcom,ath11k-calibration-variant = "QNAP-301w";
}; };