* [PATCH v2 1/2] thermal: sun8i: fix r40 ths number
@ 2020-01-06 17:46 Yangtao Li
2020-01-06 17:46 ` [PATCH v2 2/2] ARM: dts: sun8i-r40: Add thermal sensor and thermal zones Yangtao Li
0 siblings, 1 reply; 9+ messages in thread
From: Yangtao Li @ 2020-01-06 17:46 UTC (permalink / raw)
To: robh+dt, mark.rutland, mripard, wens, anarsoul, rui.zhang,
daniel.lezcano, amit.kucheria, megous, devicetree,
linux-arm-kernel, linux-kernel, linux-pm
Cc: Yangtao Li
According to the spec, r40 has 2 thermal sensors.
Sensor0 located in the CPU, another in the GPU.
Fixes: 730a45ccd9322 ("thermal/drivers/sun8i: Add thermal driver for H6/H5/H3/A64/A83T/R40")
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Tested-on: sun8i-r40-bananapi-m2-ultra
---
drivers/thermal/sun8i_thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 23a5f4aa4be4..c5661d7c3e20 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -565,7 +565,7 @@ static const struct ths_thermal_chip sun8i_h3_ths = {
};
static const struct ths_thermal_chip sun8i_r40_ths = {
- .sensor_num = 3,
+ .sensor_num = 2,
.offset = 251086,
.scale = 1130,
.has_mod_clk = true,
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] ARM: dts: sun8i-r40: Add thermal sensor and thermal zones
2020-01-06 17:46 [PATCH v2 1/2] thermal: sun8i: fix r40 ths number Yangtao Li
@ 2020-01-06 17:46 ` Yangtao Li
2020-01-07 7:58 ` Maxime Ripard
0 siblings, 1 reply; 9+ messages in thread
From: Yangtao Li @ 2020-01-06 17:46 UTC (permalink / raw)
To: robh+dt, mark.rutland, mripard, wens, anarsoul, rui.zhang,
daniel.lezcano, amit.kucheria, megous, devicetree,
linux-arm-kernel, linux-kernel, linux-pm
Cc: Yangtao Li
There are two sensors, sensor0 for CPU, sensor1 for GPU.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Tested-on: sun8i-r40-bananapi-m2-ultra
---
arch/arm/boot/dts/sun8i-r40.dtsi | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi
index 421dfbbfd7ee..8ccda5cb873f 100644
--- a/arch/arm/boot/dts/sun8i-r40.dtsi
+++ b/arch/arm/boot/dts/sun8i-r40.dtsi
@@ -46,6 +46,7 @@
#include <dt-bindings/clock/sun8i-r40-ccu.h>
#include <dt-bindings/reset/sun8i-r40-ccu.h>
#include <dt-bindings/reset/sun8i-de2.h>
+#include <dt-bindings/thermal/thermal.h>
/ {
#address-cells = <1>;
@@ -109,6 +110,22 @@
status = "disabled";
};
+ thermal-zones {
+ cpu_thermal: cpu0-thermal {
+ /* milliseconds */
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&ths 0>;
+ };
+
+ gpu_thermal: gpu-thermal {
+ /* milliseconds */
+ polling-delay-passive = <0>;
+ polling-delay = <0>;
+ thermal-sensors = <&ths 1>;
+ };
+ };
+
soc {
compatible = "simple-bus";
#address-cells = <1>;
@@ -421,6 +438,17 @@
clocks = <&osc24M>;
};
+ ths: thermal-sensor@1c24c00 {
+ compatible = "allwinner,sun8i-r40-ths";
+ reg = <0x01c24c00 0x100>;
+ clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
+ clock-names = "bus", "mod";
+ interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&ccu RST_BUS_THS>;
+ /* TODO: add nvmem-cells for calibration */
+ #thermal-sensor-cells = <1>;
+ };
+
uart0: serial@1c28000 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28000 0x400>;
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] ARM: dts: sun8i-r40: Add thermal sensor and thermal zones
2020-01-06 17:46 ` [PATCH v2 2/2] ARM: dts: sun8i-r40: Add thermal sensor and thermal zones Yangtao Li
@ 2020-01-07 7:58 ` Maxime Ripard
2020-01-07 8:00 ` Chen-Yu Tsai
2020-01-09 11:51 ` Daniel Lezcano
0 siblings, 2 replies; 9+ messages in thread
From: Maxime Ripard @ 2020-01-07 7:58 UTC (permalink / raw)
To: Yangtao Li
Cc: robh+dt, mark.rutland, wens, anarsoul, rui.zhang, daniel.lezcano,
amit.kucheria, megous, devicetree, linux-arm-kernel,
linux-kernel, linux-pm
[-- Attachment #1: Type: text/plain, Size: 403 bytes --]
On Mon, Jan 06, 2020 at 05:46:39PM +0000, Yangtao Li wrote:
> There are two sensors, sensor0 for CPU, sensor1 for GPU.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
> Tested-on: sun8i-r40-bananapi-m2-ultra
As far as I know, tested-on is not documented anywhere (and isn't
really used either). I've removed it and applied, thanks!
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] ARM: dts: sun8i-r40: Add thermal sensor and thermal zones
2020-01-07 7:58 ` Maxime Ripard
@ 2020-01-07 8:00 ` Chen-Yu Tsai
2020-01-09 11:51 ` Daniel Lezcano
1 sibling, 0 replies; 9+ messages in thread
From: Chen-Yu Tsai @ 2020-01-07 8:00 UTC (permalink / raw)
To: Maxime Ripard, Yangtao Li
Cc: Rob Herring, Mark Rutland, Vasily Khoruzhick, Zhang Rui,
Daniel Lezcano, Amit Kucheria, Ondřej Jirman, devicetree,
linux-arm-kernel, linux-kernel, open list:THERMAL
On Tue, Jan 7, 2020 at 3:58 PM Maxime Ripard <mripard@kernel.org> wrote:
>
> On Mon, Jan 06, 2020 at 05:46:39PM +0000, Yangtao Li wrote:
> > There are two sensors, sensor0 for CPU, sensor1 for GPU.
> >
> > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
> > Tested-on: sun8i-r40-bananapi-m2-ultra
>
> As far as I know, tested-on is not documented anywhere (and isn't
> really used either). I've removed it and applied, thanks!
I normally add it as a comment following the Tested-by. Makes it
easier to track who tested what when patches touch multiple
boards.
ChenYu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] ARM: dts: sun8i-r40: Add thermal sensor and thermal zones
2020-01-07 7:58 ` Maxime Ripard
2020-01-07 8:00 ` Chen-Yu Tsai
@ 2020-01-09 11:51 ` Daniel Lezcano
2020-01-09 13:13 ` Maxime Ripard
1 sibling, 1 reply; 9+ messages in thread
From: Daniel Lezcano @ 2020-01-09 11:51 UTC (permalink / raw)
To: Maxime Ripard, Yangtao Li
Cc: robh+dt, mark.rutland, wens, anarsoul, rui.zhang, amit.kucheria,
megous, devicetree, linux-arm-kernel, linux-kernel, linux-pm
On 07/01/2020 08:58, Maxime Ripard wrote:
> On Mon, Jan 06, 2020 at 05:46:39PM +0000, Yangtao Li wrote:
>> There are two sensors, sensor0 for CPU, sensor1 for GPU.
>>
>> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
>> Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
>> Tested-on: sun8i-r40-bananapi-m2-ultra
>
> As far as I know, tested-on is not documented anywhere (and isn't
> really used either). I've removed it and applied, thanks!
I think this patch should go through my tree as it refers to a commit in
my branch.
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] ARM: dts: sun8i-r40: Add thermal sensor and thermal zones
2020-01-09 11:51 ` Daniel Lezcano
@ 2020-01-09 13:13 ` Maxime Ripard
2020-01-09 20:08 ` Daniel Lezcano
0 siblings, 1 reply; 9+ messages in thread
From: Maxime Ripard @ 2020-01-09 13:13 UTC (permalink / raw)
To: Daniel Lezcano
Cc: Yangtao Li, robh+dt, mark.rutland, wens, anarsoul, rui.zhang,
amit.kucheria, megous, devicetree, linux-arm-kernel,
linux-kernel, linux-pm
[-- Attachment #1: Type: text/plain, Size: 921 bytes --]
Hi Daniel,
On Thu, Jan 09, 2020 at 12:51:27PM +0100, Daniel Lezcano wrote:
> On 07/01/2020 08:58, Maxime Ripard wrote:
> > On Mon, Jan 06, 2020 at 05:46:39PM +0000, Yangtao Li wrote:
> >> There are two sensors, sensor0 for CPU, sensor1 for GPU.
> >>
> >> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> >> Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
> >> Tested-on: sun8i-r40-bananapi-m2-ultra
> >
> > As far as I know, tested-on is not documented anywhere (and isn't
> > really used either). I've removed it and applied, thanks!
>
> I think this patch should go through my tree as it refers to a commit in
> my branch.
I'm not quite sure to get why. Even though that patch depends on the
one affecting the driver to be functional, it doesn't break anything
when merged through arm-soc, and similarly yours doesn't affect any
other tree if it's merged through your tree, so there's no dependency?
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] ARM: dts: sun8i-r40: Add thermal sensor and thermal zones
2020-01-09 13:13 ` Maxime Ripard
@ 2020-01-09 20:08 ` Daniel Lezcano
2020-01-26 13:01 ` Frank Lee
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Lezcano @ 2020-01-09 20:08 UTC (permalink / raw)
To: Maxime Ripard
Cc: Yangtao Li, robh+dt, mark.rutland, wens, anarsoul, rui.zhang,
amit.kucheria, megous, devicetree, linux-arm-kernel,
linux-kernel, linux-pm
On 09/01/2020 14:13, Maxime Ripard wrote:
> Hi Daniel,
>
> On Thu, Jan 09, 2020 at 12:51:27PM +0100, Daniel Lezcano wrote:
>> On 07/01/2020 08:58, Maxime Ripard wrote:
>>> On Mon, Jan 06, 2020 at 05:46:39PM +0000, Yangtao Li wrote:
>>>> There are two sensors, sensor0 for CPU, sensor1 for GPU.
>>>>
>>>> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
>>>> Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
>>>> Tested-on: sun8i-r40-bananapi-m2-ultra
>>>
>>> As far as I know, tested-on is not documented anywhere (and isn't
>>> really used either). I've removed it and applied, thanks!
>>
>> I think this patch should go through my tree as it refers to a commit in
>> my branch.
>
> I'm not quite sure to get why. Even though that patch depends on the
> one affecting the driver to be functional, it doesn't break anything
> when merged through arm-soc, and similarly yours doesn't affect any
> other tree if it's merged through your tree, so there's no dependency?
Sorry, I puzzled myself, I thought you meant you applied patch 1/2
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] ARM: dts: sun8i-r40: Add thermal sensor and thermal zones
2020-01-09 20:08 ` Daniel Lezcano
@ 2020-01-26 13:01 ` Frank Lee
2020-01-27 9:47 ` Maxime Ripard
0 siblings, 1 reply; 9+ messages in thread
From: Frank Lee @ 2020-01-26 13:01 UTC (permalink / raw)
To: Daniel Lezcano
Cc: Maxime Ripard, Rob Herring, Mark Rutland, Chen-Yu Tsai,
Vasily Khoruzhick, Zhang Rui, Amit Kucheria, Ondřej Jirman,
devicetree, Linux ARM, Linux Kernel Mailing List, Linux PM
HI Chen-Yu and Maxime,
Can you pick this up again?
Yangtao
On Fri, Jan 10, 2020 at 4:08 AM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>
> On 09/01/2020 14:13, Maxime Ripard wrote:
> > Hi Daniel,
> >
> > On Thu, Jan 09, 2020 at 12:51:27PM +0100, Daniel Lezcano wrote:
> >> On 07/01/2020 08:58, Maxime Ripard wrote:
> >>> On Mon, Jan 06, 2020 at 05:46:39PM +0000, Yangtao Li wrote:
> >>>> There are two sensors, sensor0 for CPU, sensor1 for GPU.
> >>>>
> >>>> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> >>>> Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
> >>>> Tested-on: sun8i-r40-bananapi-m2-ultra
> >>>
> >>> As far as I know, tested-on is not documented anywhere (and isn't
> >>> really used either). I've removed it and applied, thanks!
> >>
> >> I think this patch should go through my tree as it refers to a commit in
> >> my branch.
> >
> > I'm not quite sure to get why. Even though that patch depends on the
> > one affecting the driver to be functional, it doesn't break anything
> > when merged through arm-soc, and similarly yours doesn't affect any
> > other tree if it's merged through your tree, so there's no dependency?
>
> Sorry, I puzzled myself, I thought you meant you applied patch 1/2
>
>
> --
> <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
>
> Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
> <http://twitter.com/#!/linaroorg> Twitter |
> <http://www.linaro.org/linaro-blog/> Blog
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] ARM: dts: sun8i-r40: Add thermal sensor and thermal zones
2020-01-26 13:01 ` Frank Lee
@ 2020-01-27 9:47 ` Maxime Ripard
0 siblings, 0 replies; 9+ messages in thread
From: Maxime Ripard @ 2020-01-27 9:47 UTC (permalink / raw)
To: Frank Lee
Cc: Daniel Lezcano, Rob Herring, Mark Rutland, Chen-Yu Tsai,
Vasily Khoruzhick, Zhang Rui, Amit Kucheria, Ondřej Jirman,
devicetree, Linux ARM, Linux Kernel Mailing List, Linux PM
[-- Attachment #1: Type: text/plain, Size: 246 bytes --]
Hi,
On Sun, Jan 26, 2020 at 09:01:01PM +0800, Frank Lee wrote:
> HI Chen-Yu and Maxime,
>
> Can you pick this up again?
Sorry, I'm not quite sure what happened to this patch... I've picked
it up for 5.7 (for real this time, hopefully).
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-01-27 9:47 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-06 17:46 [PATCH v2 1/2] thermal: sun8i: fix r40 ths number Yangtao Li
2020-01-06 17:46 ` [PATCH v2 2/2] ARM: dts: sun8i-r40: Add thermal sensor and thermal zones Yangtao Li
2020-01-07 7:58 ` Maxime Ripard
2020-01-07 8:00 ` Chen-Yu Tsai
2020-01-09 11:51 ` Daniel Lezcano
2020-01-09 13:13 ` Maxime Ripard
2020-01-09 20:08 ` Daniel Lezcano
2020-01-26 13:01 ` Frank Lee
2020-01-27 9:47 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).