From 80fc35319d3fefe30011da3b4ae81f2bb2eb5ced Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Mon, 10 Feb 2025 17:11:22 +0800 Subject: [PATCH] ipq806x: fix boot issue for Xiaomi Mi Router HD Replace removed qcom,boot_pages_size prop with qcom,boot-partitions. Also update to use new emc2305 fan driver. Signed-off-by: Tianling Shen (cherry picked from commit 32b366e450a317065c9740623bdf5bb3bcfb97e9) --- .../dts/qcom/qcom-ipq8064-mi-router-hd.dts | 40 +++++++++++-------- target/linux/ipq806x/image/generic.mk | 2 +- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-mi-router-hd.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-mi-router-hd.dts index 5aca8c3ed5..26fcbf8ee7 100644 --- a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-mi-router-hd.dts +++ b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-mi-router-hd.dts @@ -67,21 +67,18 @@ function = LED_FUNCTION_STATUS; color = ; gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>; - default-state = "keep"; }; led_status_blue: led_status_blue { function = LED_FUNCTION_STATUS; color = ; gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>; - default-state = "keep"; }; led_status_yellow: led_status_yellow { function = LED_FUNCTION_STATUS; color = ; gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>; - default-state = "keep"; }; }; @@ -95,16 +92,12 @@ scl-gpios = <&qcom_pinmux 54 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; i2c-gpio,delay-us = <5>; - emc2301@2f { - compatible = "smsc,emc2301"; + fan@2f { + compatible = "microchip,emc2305"; reg = <0x2f>; - #address-cells = <1>; - #size-cells = <0>; - - fan@0 { - reg = <0>; - pwm-output-mode = <1>; - }; + emc2305,pwm-channel = <0>; + emc2305,pwm-min = <0>; + emc2305,pwm-max = <255>; }; }; @@ -198,10 +191,26 @@ status = "okay"; }; +&hs_phy_0 { + status = "okay"; +}; + +&ss_phy_0 { + status = "okay"; +}; + &usb3_0 { status = "okay"; }; +&hs_phy_1 { + status = "okay"; +}; + +&ss_phy_1 { + status = "okay"; +}; + &usb3_1 { status = "okay"; pinctrl-0 = <&usb_pwr_en_pins>; @@ -210,7 +219,7 @@ &pcie0 { status = "okay"; - reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>; + reset-gpios = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie0_pins>; pinctrl-names = "default"; @@ -232,7 +241,7 @@ &pcie1 { status = "okay"; - reset-gpio = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>; + reset-gpios = <&qcom_pinmux 48 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie1_pins>; pinctrl-names = "default"; max-link-speed = <1>; @@ -265,7 +274,7 @@ nand-ecc-step-size = <512>; nand-is-boot-medium; - qcom,boot_pages_size = <0xf0000000>; + qcom,boot-partitions = <0x0 0xf0000000>; partitions { compatible = "fixed-partitions"; @@ -336,7 +345,6 @@ reg = <0x540000 0x80000>; read-only; - compatible = "nvmem-cells"; nvmem-layout { compatible = "fixed-layout"; #address-cells = <1>; diff --git a/target/linux/ipq806x/image/generic.mk b/target/linux/ipq806x/image/generic.mk index 57bb0847a5..0aea78dcd5 100644 --- a/target/linux/ipq806x/image/generic.mk +++ b/target/linux/ipq806x/image/generic.mk @@ -607,7 +607,7 @@ define Device/xiaomi_mi-router-hd UBINIZE_OPTS := -E 5 IMAGES := factory.bin sysupgrade.bin IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | pad-to $$$$(BLOCKSIZE) | check-size - DEVICE_PACKAGES := kmod-i2c-gpio kmod-hwmon-lm75 kmod-hwmon-drivetemp \ + DEVICE_PACKAGES := kmod-i2c-gpio kmod-hwmon-emc2305 kmod-hwmon-lm75 kmod-hwmon-drivetemp \ ath10k-firmware-qca9984-ct ath10k-firmware-qca99x0-ct endef TARGET_DEVICES += xiaomi_mi-router-hd