From 686efcbd7e76a722cb21d5b01432445398927f6a Mon Sep 17 00:00:00 2001 From: yidiantongxin Date: Thu, 25 Apr 2024 12:03:53 +0800 Subject: [PATCH] fan ok --- .../boot/dts/rockchip/rk3528-armsom-sige1.dts | 57 ++++++++++++------- .../arm64/configs/rockchip_linux_defconfig | 1 + 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/kernel/arch/arm64/boot/dts/rockchip/rk3528-armsom-sige1.dts b/kernel/arch/arm64/boot/dts/rockchip/rk3528-armsom-sige1.dts index 2222e7b306..0e1a9cf8dd 100644 --- a/kernel/arch/arm64/boot/dts/rockchip/rk3528-armsom-sige1.dts +++ b/kernel/arch/arm64/boot/dts/rockchip/rk3528-armsom-sige1.dts @@ -123,20 +123,6 @@ status = "okay"; }; - vdd_gpu: vdd-gpu { - compatible = "pwm-regulator"; - pwms = <&pwm0 0 5000 1>; - regulator-name = "vdd_gpu"; - regulator-min-microvolt = <705000>; - regulator-max-microvolt = <1148000>; - regulator-init-microvolt = <900000>; - regulator-always-on; - regulator-boot-on; - regulator-settling-time-up-us = <250>; - pwm-supply = <&vcc5v0_sys>; - status = "okay"; - }; - vdd_0v9_s3: vdd-0v9-s3 { compatible = "regulator-fixed"; regulator-name = "vdd_0v9_s3"; @@ -307,6 +293,20 @@ label = "green:user"; }; }; + + fan: pwm-fan { + compatible = "pwm-fan"; + #cooling-cells = <2>; + pwms = <&pwm6 0 50000 0>; + cooling-levels = <0 50 100 150 200 255>; + rockchip,temp-trips = < + 50000 1 + 55000 2 + 60000 3 + 65000 4 + 70000 5 + >; + }; }; &acodec { @@ -340,7 +340,7 @@ }; &gpu { - mali-supply = <&vdd_gpu>; + mali-supply = <&vdd_logic>; status = "okay"; }; @@ -594,12 +594,6 @@ }; }; - fan { - fan_en: fan-en { - rockchip,pins = <3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - led { led_red_en: led-red-en { rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; @@ -610,6 +604,27 @@ }; }; +&pwm0 { + status = "okay"; +}; + +&pwm1 { + status = "okay"; +}; + +&pwm2 { + status = "okay"; +}; + +&pwm3 { + status = "okay"; +}; + +&pwm6 { + status = "okay"; + pinctrl-0 = <&pwm6m2_pins>; +}; + &acodec { pa-ctl-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; status = "okay"; diff --git a/kernel/arch/arm64/configs/rockchip_linux_defconfig b/kernel/arch/arm64/configs/rockchip_linux_defconfig index 1eb3670d13..1157b4a871 100644 --- a/kernel/arch/arm64/configs/rockchip_linux_defconfig +++ b/kernel/arch/arm64/configs/rockchip_linux_defconfig @@ -2854,6 +2854,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_W83L786NG is not set # CONFIG_SENSORS_W83627HF is not set # CONFIG_SENSORS_W83627EHF is not set +CONFIG_SENSORS_PWM_FAN=y CONFIG_THERMAL=y # CONFIG_THERMAL_NETLINK is not set # CONFIG_THERMAL_STATISTICS is not set