From e288cf24518471c0289ccc31a4122657e9767ab2 Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Wed, 14 May 2025 12:49:26 -0500 Subject: [PATCH] qualcommax: ipq60xx: unify eap6xx device trees The EAP625 and EAP623 are extremely similar. The only difference in the vendor's device tree is that EAP625 also enables USB and UART2. Use the eap6xx dtsi instead of writing out a full devicetree. The EAP623 uses the same RTL8211F as the 625 and 610. Since this is a gigabit PHY, it is okay to change the ess mac mode from SGMII_PLUS to SGMII. This is now consistent across all three devices. Move the 'realtek,clkout-disable' and 'realtek,aldps-enable' PHY properties to the common dtsi, as they work well on all three devices. Reflect the remaining differences in the eap625 dts. Signed-off-by: Alexandru Gagniuc Link: https://github.com/openwrt/openwrt/pull/18804 Signed-off-by: Robert Marko --- .../dts/ipq6018-tplink-eap6xx-outdoor.dtsi | 2 + .../dts/qcom/ipq6018-eap623-outdoor-hd-v1.dts | 137 +----------------- 2 files changed, 6 insertions(+), 133 deletions(-) diff --git a/target/linux/qualcommax/dts/ipq6018-tplink-eap6xx-outdoor.dtsi b/target/linux/qualcommax/dts/ipq6018-tplink-eap6xx-outdoor.dtsi index cefdcde311..9ab252ef37 100644 --- a/target/linux/qualcommax/dts/ipq6018-tplink-eap6xx-outdoor.dtsi +++ b/target/linux/qualcommax/dts/ipq6018-tplink-eap6xx-outdoor.dtsi @@ -115,6 +115,8 @@ rtl8211f_4: ethernet-phy@4 { reg = <4>; + realtek,clkout-disable; + realtek,aldps-enable; }; }; diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-eap623-outdoor-hd-v1.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-eap623-outdoor-hd-v1.dts index 3aaa32e827..a474c2043f 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-eap623-outdoor-hd-v1.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-eap623-outdoor-hd-v1.dts @@ -3,145 +3,16 @@ /dts-v1/; -#include "ipq6018.dtsi" -#include "ipq6018-cp-cpu.dtsi" -#include "ipq6018-ess.dtsi" -#include -#include -#include +#include "ipq6018-tplink-eap6xx-outdoor.dtsi" / { model = "TP-Link EAP623-Outdoor HD V1.0"; compatible = "tplink,eap623-outdoor-hd-v1", "qcom,ipq6018"; - - aliases { - serial0 = &blsp1_uart3; - led-boot = &led_sys_green; - led-failsafe = &led_sys_yellow; - led-running = &led_sys_green; - led-upgrade = &led_sys_yellow; - }; - - chosen { - stdout-path = "serial0:115200n8"; - bootargs-append = " root=/dev/ubiblock0_1"; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&tlmm 9 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_sys_green: led-0 { - color = ; - function = LED_FUNCTION_STATUS; - gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>; - }; - - led_sys_yellow: led-1 { - color = ; - function = LED_FUNCTION_STATUS; - gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>; - }; - }; }; -&blsp1_uart3 { - pinctrl-0 = <&serial_3_pins>; - pinctrl-names = "default"; - status = "okay"; -}; - -&tlmm { - mdio_pins: mdio-pins { - mdc { - pins = "gpio64"; - function = "mdc"; - drive-strength = <8>; - bias-pull-up; - }; - - mdio { - pins = "gpio65"; - function = "mdio"; - drive-strength = <8>; - bias-pull-up; - }; - }; - - phy_pins: phy-reset-pin { - pins = "gpio77"; - function = "gpio"; - bias-pull-up; - }; -}; - -&mdio { - status = "okay"; - reset-gpios = <&tlmm 77 GPIO_ACTIVE_LOW>; - reset-delay-us = <10000>; - reset-post-delay-us = <50000>; - pinctrl-0 = <&mdio_pins>, <&phy_pins>; - pinctrl-names = "default"; - - rtl8211f: ethernet-phy@4 { - reg = <4>; - - realtek,clkout-disable; - realtek,aldps-enable; - }; -}; - -&switch { - status = "okay"; - switch_lan_bmp = ; /* lan port bitmap */ - switch_mac_mode1 = ; /* mac mode for uniphy instance0*/ - - qcom,port_phyinfo { - port@5 { - port_id = <5>; - phy_address = <4>; - port_mac_sel = "QGMAC_PORT"; - }; - }; -}; - -&edma { - status = "okay"; -}; - -&dp5 { - status = "okay"; - phy-handle = <&rtl8211f>; - phy-mode = "sgmii"; - label = "lan"; -}; - -&qpic_bam { - status = "okay"; -}; - -&qpic_nand { - status = "okay"; - - nand@0 { - reg = <0>; - nand-ecc-strength = <4>; - nand-ecc-step-size = <512>; - nand-bus-width = <8>; - - partitions { - compatible = "qcom,smem-part"; - }; - }; +&led_sys_yellow { + function = LED_FUNCTION_STATUS; + gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>; }; &wifi {