[PATCH 1/1] arm64: dts: mt8183-kukui: Enable thermal Tboard

2021-04-09 Thread Michael Kao
-off-by: Michael Kao Signed-off-by: Nicolas Boichat --- arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 14 ++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch

Re: [v3,2/3] thermal: mediatek: Add LVTS drivers for SoC theraml zones

2021-04-07 Thread Michael Kao
Hi Maintainers, Gentle pin for this patch. Thanks On Fri, 2021-03-12 at 11:40 +0800, Michael Kao wrote: > Add a LVTS (Low voltage thermal sensor) driver to report junction > temperatures in Mediatek SoC and register the maximum temperature > of sensors and each sensor as a the

Re: [v3,1/3] thermal: mediatek: Relocate driver to mediatek folder

2021-04-07 Thread Michael Kao
Hi Maintainers, Gentle pin for this patch. Thanks On Fri, 2021-03-12 at 11:40 +0800, Michael Kao wrote: > Add Mediatek proprietary folder to upstream more thermal zone and cooler > drivers. Relocate the original thermal controller driver to it and rename > as soc_temp.c to show it

Re: [v7, 3/3] thermal: mediatek: add another get_temp ops for thermal sensors

2021-04-07 Thread Michael Kao
Hi Maintainers, Gentle pin for this patch. Thanks On Tue, 2021-03-16 at 15:01 +0800, Michael Kao wrote: > Provide thermal zone to read thermal sensor > in the SoC. We can read all the thermal sensors > value in the SoC by the node /sys/class/thermal/ > > In mtk_thermal_bank_temp

Re: [PATCH v2] thermal: cpufreq_cooling: fix slab OOB issue

2021-03-29 Thread Michael Kao
Dear Daniel, Kindly ping. Can this patch be merged? Or any comment? BR, Michael On Tue, 2020-12-29 at 13:08 +0800, Michael Kao wrote: > From: brian-sy yang > > Slab OOB issue is scanned by KASAN in cpu_power_to_freq(). > If power is limited below the power of OPP0 in EM table, >

[v7,1/3] arm64: dts: mt8183: add thermal zone node

2021-03-16 Thread Michael Kao
From: "michael.kao" Add thermal zone node to Mediatek MT8183 dts file. Evaluate the thermal zone every 500ms while not cooling and every 100ms when passive cooling is performed. Signed-off-by: Matthias Kaehlcke Signed-off-by: Michael Kao --- arch/arm64/boot/dts/mediatek/mt8183

[v7,3/3] thermal: mediatek: add another get_temp ops for thermal sensors

2021-03-16 Thread Michael Kao
warning on boot: thermal thermal_zone6: failed to read out thermal zone (-13) Signed-off-by: Michael Kao Signed-off-by: Hsin-Yi Wang --- drivers/thermal/mtk_thermal.c | 100 +- 1 file changed, 75 insertions(+), 25 deletions(-) diff --git a/drivers/thermal

[v7,2/3] arm64: dts: mt8183: Configure CPU cooling

2021-03-16 Thread Michael Kao
From: Matthias Kaehlcke Add two passive trip points at 68??C and 80??C for the CPU temperature. Signed-off-by: Matthias Kaehlcke Signed-off-by: Michael Kao Tested-by: Hsin-Yi Wang --- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 56 1 file changed, 56 insertions

[v7,0/3] mt8183: Add Mediatek thermal driver and dtsi

2021-03-16 Thread Michael Kao
s in v2: - [1/8] - Add the sustainable-power,trips,cooling-maps to the tzts1~tztsABB. - [4/8] - Add the min opp of cpu throttle. Matthias Kaehlcke (1): arm64: dts: mt8183: Configure CPU cooling Michael Kao (2): thermal: mediatek: add another get_temp ops for thermal sensors

[v3,3/3] dt-bindings: thermal: Add binding document for mt6873 thermal controller

2021-03-11 Thread Michael Kao
This patch adds binding document for mt6873 thermal controller. Signed-off-by: Michael Kao --- This patch depends on [1]. [1]https://patchwork.kernel.org/project/linux-mediatek/cover/1608642587-15634-1-git-send-email-weiyi...@mediatek.com/ --- .../thermal/mediatek-thermal-lvts.yaml| 81

[v3,2/3] thermal: mediatek: Add LVTS drivers for SoC theraml zones

2021-03-11 Thread Michael Kao
Add a LVTS (Low voltage thermal sensor) driver to report junction temperatures in Mediatek SoC and register the maximum temperature of sensors and each sensor as a thermal zone. Signed-off-by: Yu-Chia Chang Signed-off-by: Michael Kao --- drivers/thermal/mediatek/Kconfig | 10

[v3,1/3] thermal: mediatek: Relocate driver to mediatek folder

2021-03-11 Thread Michael Kao
Add Mediatek proprietary folder to upstream more thermal zone and cooler drivers. Relocate the original thermal controller driver to it and rename as soc_temp.c to show its purpose more clearly. Signed-off-by: Michael Kao --- drivers/thermal/Kconfig | 14

[v3,0/3] thermal: mediatek: Add LVTS architecture thermal controller

2021-03-11 Thread Michael Kao
and compare e.q. in the lvts_read_all_tc_temperature. - add the return with invalid number in the lvts_init. This patch depends on [1]. [1]https://patchwork.kernel.org/project/linux-mediatek/cover/1608642587-15634-1-git-send-email-weiyi...@mediatek.com/ Michael Kao (3): thermal

[v6,0/3] mt8183: Add Mediatek thermal driver and dtsi

2021-01-29 Thread Michael Kao
power,trips,cooling-maps to the tzts1~tztsABB. - [4/8] - Add the min opp of cpu throttle. Matthias Kaehlcke (1): arm64: dts: mt8183: Configure CPU cooling Michael Kao (2): thermal: mediatek: add another get_temp ops for thermal sensors arm64: dts: mt8183: add thermal zone node

[PATCH v2] thermal: cpufreq_cooling: fix slab OOB issue

2020-12-28 Thread Michael Kao
("thermal/drivers/cpufreq_cooling: Fix wrong frequency converted from power") Signed-off-by: brian-sy yang Signed-off-by: Michael Kao Reviewed-by: Lukasz Luba --- Changes from v1: - add fixes tag - add reviewed-by drivers/thermal/cpufreq_cooling.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH] arm64: dts: mt8192: add thermal zones, cooling map and trips

2020-12-22 Thread Michael Kao
Add thermal zone node to support mt8192 read temperature. Thermal throttle will start at 68C and the target temperature is 85C. This patch depends on [1]. [1]https://patchwork.kernel.org/project/linux-mediatek/patch/20201221061018.18503-3-yz...@mediatek.com/ Signed-off-by: Michael Kao

[PATCH] thermal: cpufreq_cooling: fix slab OOB issue

2020-12-22 Thread Michael Kao
From: brian-sy yang Slab OOB issue is scanned by KASAN in cpu_power_to_freq(). If power is limited below the power of OPP0 in EM table, it will cause slab out-of-bound issue with negative array index. Return the lowest frequency if limited power cannot found a suitable OPP in EM table to fix

[PATCH 1/3] thermal: mediatek: Relocate driver to mediatek folder

2020-12-06 Thread Michael Kao
Add Mediatek proprietary folder to upstream more thermal zone and cooler drivers. Relocate the original thermal controller driver to it and rename as soc_temp.c to show its purpose more clearly. Signed-off-by: Michael Kao --- drivers/thermal/Kconfig | 14

[PATCH 3/3] dt-bindings: thermal: Add binding document for mt6873 thermal controller

2020-12-06 Thread Michael Kao
This patch adds binding document for mt6873 thermal controller. Signed-off-by: Michael Kao --- .../thermal/mediatek-thermal-lvts.yaml| 80 +++ 1 file changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/mediatek-thermal-lvts.yaml diff

[PATCH 2/3] thermal: mediatek: Add LVTS drivers for SoC theraml zones

2020-12-06 Thread Michael Kao
Add a LVTS (Low voltage thermal sensor) driver to report junction temperatures in Mediatek SoC and register the maximum temperature of sensors and each sensor as a thermal zone. Signed-off-by: Yu-Chia Chang Signed-off-by: Michael Kao --- drivers/thermal/mediatek/Kconfig | 10

[PATCH 0/3] Add LVTS architecture thermal controller

2020-12-06 Thread Michael Kao
into two parts, the LVTS controller and the LVTS device. The LVTS controller can connect up to 4 LVTS devices, and each LVTS device can connect up to 7 TSMCUs. The architecture will be the first to be used on mt6873 and mt8192. Michael Kao (3): thermal: mediatek: Relocate driver to mediatek folder

[v5 2/3] arm64: dts: mt8183: Configure CPU cooling

2020-10-13 Thread Michael Kao
From: Matthias Kaehlcke Add two passive trip points at 68°C and 80°C for the CPU temperature. Signed-off-by: Matthias Kaehlcke Signed-off-by: Michael Kao --- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 56 1 file changed, 56 insertions(+) diff --git a/arch/arm64/boot

[v5 0/3] mt8183: Add Mediatek thermal driver and dtsi

2020-10-13 Thread Michael Kao
PU cooling Michael Kao (2): thermal: mediatek: add another get_temp ops for thermal sensors arm64: dts: mt8183: add thermal zone node arch/arm64/boot/dts/mediatek/mt8183.dtsi | 140 +++ drivers/thermal/mtk_thermal.c| 99 2 files changed, 216 inserti

[v5 3/3] thermal: mediatek: add another get_temp ops for thermal sensors

2020-10-13 Thread Michael Kao
warning on boot: thermal thermal_zone6: failed to read out thermal zone (-13) Signed-off-by: Michael Kao Signed-off-by: Hsin-Yi Wang --- drivers/thermal/mtk_thermal.c | 99 +++ 1 file changed, 76 insertions(+), 23 deletions(-) diff --git a/drivers/thermal

[no subject]

2020-10-07 Thread Michael Kao
m 308d530ee9c28c7c729a5020073405522d27e091 Mon Sep 17 00:00:00 2001 From: Michael Kao Date: Wed, 7 Oct 2020 15:42:57 +0800 Subject: [v5 0/2] Add Mediatek thermal dirver and dtsi This patchset supports for MT8183 chip to mtk_thermal.c. Add thermal zone of all the thermal sensor in SoC for another

[v5 0/2] Add Mediatek thermal dirver and dtsi

2020-10-07 Thread Michael Kao
Rebase to kernel-5.9-rc1. Update content: - Remove the [v4,7/7] thermal: mediatek: use spinlock to protect PTPCORESEL [2/2] - Add the judgement to the version of raw_to_mcelsius. Michael Kao (1): arm64: dts: mt8183: add thermal zone node thermal: mediatek: add another get_temp ops

[PATCH 2/2] thermal: mediatek: add another get_temp ops for thermal sensors

2020-10-07 Thread Michael Kao
warning on boot: thermal thermal_zone6: failed to read out thermal zone (-13) Signed-off-by: Michael Kao Signed-off-by: Hsin-Yi Wang --- drivers/thermal/mtk_thermal.c | 77 +++ 1 file changed, 70 insertions(+), 7 deletions(-) diff --git a/drivers/thermal

[PATCH] [v2] thermal: core: add upper and lower limits to power_actor_set_power

2020-10-06 Thread Michael Kao
The upper and lower limits of thermal throttle state in the DT do not apply to the Intelligent Power Allocation (IPA) governor. Add the clamping for cooling device upper and lower limits in the power_actor_set_power() used by IPA. Signed-off-by: Michael Kao --- drivers/thermal/thermal_core.c

Re: [PATCH] thermal: power_allocate: add upper and lower limits

2020-08-25 Thread Michael Kao
On Wed, 2020-04-29 at 21:24 +0100, Lukasz Luba wrote: > > On 4/29/20 11:39 AM, Michael Kao wrote: > > On Fri, 2020-04-24 at 10:22 +0100, Lukasz Luba wrote: > >> Hi Michael, > >> > >> On 4/24/20 8:16 AM, Michael Kao wrote: > >>> T

Re: [v4,7/7] thermal: mediatek: use spinlock to protect PTPCORESEL

2020-07-08 Thread Michael Kao
On Tue, 2020-07-07 at 10:13 +0200, Daniel Lezcano wrote: > On 05/06/2020 05:50, Michael Kao wrote: > > On Fri, 2020-05-22 at 17:36 +0200, Daniel Lezcano wrote: > >> On 23/03/2020 13:15, Michael Kao wrote: > >>> From: "michael.kao" > >>> > &g

Re: [RESEND PATCH] thermal: mediatek: add suspend/resume callback

2020-07-07 Thread Michael Kao
On Thu, 2020-05-14 at 16:46 +0800, Michael Kao wrote: > On Wed, 2020-04-08 at 17:05 +0800, Michael Kao (高振翔) wrote: > > From: Louis Yu > > > > Add suspend/resume callback to disable/enable Mediatek thermal sensor > > respectively. Since thermal power domain is off

Re: [v4, 6/7] thermal: mediatek: add another get_temp ops for thermal sensors

2020-07-06 Thread Michael Kao
On Fri, 2020-05-22 at 17:32 +0200, Daniel Lezcano wrote: > On 23/03/2020 13:15, Michael Kao wrote: > > Provide thermal zone to read thermal sensor > > in the SoC. We can read all the thermal sensors > > value in the SoC by the node /sys/class/thermal/ > > > >

Re: [v4,0/7] Add Mediatek thermal dirver and dtsi

2020-05-21 Thread Michael Kao
On Thu, 2020-05-21 at 14:51 +0200, Matthias Brugger wrote: > Hi Michael, > > On 23/03/2020 13:15, Michael Kao wrote: > > This patchset supports for MT8183 chip to mtk_thermal.c. > > Add thermal zone of all the thermal sensor in SoC for > > another get temperatrue.

Re: [v4,0/7] Add Mediatek thermal dirver and dtsi

2020-05-21 Thread Michael Kao
On Thu, 2020-05-21 at 14:51 +0200, Matthias Brugger wrote: > Hi Michael, > > On 23/03/2020 13:15, Michael Kao wrote: > > This patchset supports for MT8183 chip to mtk_thermal.c. > > Add thermal zone of all the thermal sensor in SoC for > > another get temperatrue.

Re: [RESEND PATCH] thermal: mediatek: add suspend/resume callback

2020-05-14 Thread Michael Kao
On Wed, 2020-04-08 at 17:05 +0800, Michael Kao (高振翔) wrote: > From: Louis Yu > > Add suspend/resume callback to disable/enable Mediatek thermal sensor > respectively. Since thermal power domain is off in suspend, thermal driver > needs re-initialization during resume. > >

Re: [PATCH] thermal: power_allocate: add upper and lower limits

2020-04-29 Thread Michael Kao
On Fri, 2020-04-24 at 10:22 +0100, Lukasz Luba wrote: > Hi Michael, > > On 4/24/20 8:16 AM, Michael Kao wrote: > > The upper and lower limits of thermal throttle state in the > > device tree do not apply to the power_allocate governor. > > Add the upper and lower l

[PATCH 4/4] arm64: dts: mt8183: Configure CPU cooling

2019-08-14 Thread Michael Kao
From: Matthias Kaehlcke Add SoC temperature threshold at 68°C and target at 80°C. Add trip points and cooling maps for big and litter clusters. Signed-off-by: Matthias Kaehlcke Signed-off-by: Michael Kao --- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 55 1

[PATCH 0/4] add dts for Mediatek MT8183 thermal functions

2019-08-14 Thread Michael Kao
Splitting the dtsi part from [1] and sending it again. Add tzts1~5 and tztsABB from thermal sensor in SoC for another get temperatrue. They don't need to thermal throttle. And we bind coolers for thermal zone nodes of cpu_thermal. Refernece: [1] [v2,0/8] Add Mediatek thermal dirver and dtsi

Re: [PATCH 1/8] arm64: dts: mt8183: add thermal zone node

2019-05-10 Thread Michael Kao
On Wed, 2019-05-08 at 20:23 +0800, Michael Kao wrote: > On Mon, 2019-05-06 at 12:43 +0200, Daniel Lezcano wrote: > > On 03/05/2019 18:46, Matthias Kaehlcke wrote: > > > Hi, > > > > > > On Fri, May 03, 2019 at 04:03:58PM +0800, Hsin-Yi Wang wrote: > > >

Re: [PATCH 2/8] arm64: dts: mt8183: add/update dynamic power coefficients

2019-05-08 Thread Michael Kao
On Fri, 2019-05-03 at 15:16 +0800, Hsin-Yi Wang wrote: > On Thu, May 2, 2019 at 10:43 AM michael.kao wrote: > > > > Add dynamic power coefficients for all cores and update those of > > CPU0 and CPU4. > > > > Signed-off-by: Michael.Kao > > --- > > arch/arm64/boot/dts/mediatek/mt8183.dtsi | 16

Re: [PATCH 1/8] arm64: dts: mt8183: add thermal zone node

2019-05-08 Thread Michael Kao
gt;>> > >>> Add thermal zone node to Mediatek MT8183 dts file. > >>> > >>> Signed-off-by: Michael Kao > >>> --- > >>> arch/arm64/boot/dts/mediatek/mt8183.dtsi | 64 > >>> > >>> 1

Re: [PATCH 4/7] thermal: mediatek: add thermal controller offset

2019-02-12 Thread Michael Kao
On Tue, 2019-02-05 at 16:53 -0800, Eduardo Valentin wrote: > On Fri, Feb 01, 2019 at 03:38:10PM +0800, michael@mediatek.com wrote: > > From: Michael Kao > > > > One thermal controller can read four sensors at most, > > so we need to add controller_offset for the

Re: [PATCH 1/7] thermal: mediatek: fix register index error

2019-02-12 Thread Michael Kao
On Mon, 2019-02-04 at 18:24 +0100, Matthias Brugger wrote: > > On 01/02/2019 08:38, michael@mediatek.com wrote: > > From: Michael Kao > > > > The index of msr and adcpnp should match the sensor > > which belongs to the selected bank in the for loop. > >