From b269dc8fa75a8bee731555d878c687d72161cd5c Mon Sep 17 00:00:00 2001 From: thead_admin Date: Mon, 19 Jun 2023 19:07:46 +0800 Subject: [PATCH] apply lpi4a patches --- arch/riscv/boot/dts/thead/light-lpi4a-ref.dts | 67 ++++++++++++++++--- arch/riscv/configs/light_defconfig | 5 ++ 2 files changed, 63 insertions(+), 9 deletions(-) diff --git a/arch/riscv/boot/dts/thead/light-lpi4a-ref.dts b/arch/riscv/boot/dts/thead/light-lpi4a-ref.dts index b04503dd3..fabd1e6b6 100644 --- a/arch/riscv/boot/dts/thead/light-lpi4a-ref.dts +++ b/arch/riscv/boot/dts/thead/light-lpi4a-ref.dts @@ -192,12 +192,19 @@ sound-name-prefix = "DUMMY"; }; + fan: pwm-fan { + compatible = "pwm-fan"; + #cooling-cells = <2>; + pwms = <&pwm 1 10000000 0>; + cooling-levels = <0 64 192 255>; + }; + reg_vref_1v8: regulator-adc-verf { compatible = "regulator-fixed"; regulator-name = "vref-1v8"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; - status = "okay"; + status = "okay"; }; reg_tp_pwr_en: regulator-pwr-en { @@ -559,6 +566,48 @@ }; }; + thermal-zones { + cpu-thermal-zone { + trips { + fan_config0: fan-trip0 { + temperature = <40000>; + hysteresis = <5000>; + type = "active"; + }; + + fan_config1: fan-trip1 { + temperature = <50000>; + hysteresis = <5000>; + type = "active"; + }; + + fan_config2: fan-trip2 { + temperature = <60000>; + hysteresis = <5000>; + type = "active"; + }; + }; + + cooling-maps { + fan-on { + trip = <&fan_config0>; + cooling-device = + <&fan 1 1>; + }; + fan-faster { + trip = <&fan_config1>; + cooling-device = + <&fan 2 2>; + }; + fan-full { + trip = <&fan_config2>; + cooling-device = + <&fan 3 3>; + }; + }; + }; + }; + }; &resmem { @@ -638,8 +687,8 @@ }; pcal6408ahk_a: gpio@20 { - compatible = "nxp,pcal9554b"; - reg = <0x20>; + compatible = "nxp,pca9557"; + reg = <0x18>; gpio-controller; #gpio-cells = <2>; }; @@ -942,8 +991,8 @@ status = "okay"; pcal6408ahk_b: gpio@20 { - compatible = "nxp,pcal9554b"; - reg = <0x20>; + compatible = "nxp,pca9557"; + reg = <0x18>; gpio-controller; #gpio-cells = <2>; }; @@ -954,8 +1003,8 @@ status = "okay"; pcal6408ahk_c: gpio@20 { - compatible = "nxp,pcal9554b"; - reg = <0x20>; + compatible = "nxp,pca9557"; + reg = <0x18>; gpio-controller; #gpio-cells = <2>; }; @@ -971,8 +1020,8 @@ status = "okay"; pcal6408ahk_d: gpio@20 { - compatible = "nxp,pcal9554b"; - reg = <0x20>; + compatible = "nxp,pca9557"; + reg = <0x18>; gpio-controller; #gpio-cells = <2>; }; diff --git a/arch/riscv/configs/light_defconfig b/arch/riscv/configs/light_defconfig index db5633009..28458a56f 100644 --- a/arch/riscv/configs/light_defconfig +++ b/arch/riscv/configs/light_defconfig @@ -3,6 +3,10 @@ CONFIG_POSIX_MQUEUE=y CONFIG_NO_HZ_IDLE=y CONFIG_HIGH_RES_TIMERS=y CONFIG_PREEMPT=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_CGROUPS=y @@ -331,6 +335,7 @@ CONFIG_OVERLAY_FS=y CONFIG_LOCKUP_DETECTOR=y CONFIG_SOFTLOCKUP_DETECTOR=y CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 +CONFIG_SCHED_INFO=y CONFIG_PM=y # CONFIG_SUSPEND is not set # CONFIG_PM_SLEEP is not set