* [PATCH v5 13/18] thermal: sun8i: add thermal driver for A64
@ 2019-08-10 5:32 Yangtao Li
0 siblings, 0 replies; 2+ messages in thread
From: Yangtao Li @ 2019-08-10 5:32 UTC (permalink / raw)
To: rui.zhang, edubezval, daniel.lezcano, robh+dt, mark.rutland,
maxime.ripard, wens, mchehab+samsung, davem, gregkh,
Jonathan.Cameron, nicolas.ferre
Cc: linux-pm, devicetree, linux-arm-kernel, linux-kernel, Vasily Khoruzhick
From: Vasily Khoruzhick <anarsoul@gmail.com>
Thermal sensor controller in A64 is similar to H3, but it has 3 sensors.
Extend H3 functions to add support for multiple sensors.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
drivers/thermal/sun8i_thermal.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 41ce8cdc0546..3259081da841 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -515,6 +515,17 @@ static const struct ths_thermal_chip sun8i_h3_ths = {
.irq_ack = sun8i_h3_irq_ack,
};
+static const struct ths_thermal_chip sun50i_a64_ths = {
+ .sensor_num = 3,
+ .offset = -2170,
+ .scale = -117,
+ .has_mod_clk = true,
+ .temp_data_base = SUN8I_THS_TEMP_DATA,
+ .calibrate = sun8i_h3_ths_calibrate,
+ .init = sun8i_h3_thermal_init,
+ .irq_ack = sun8i_h3_irq_ack,
+};
+
static const struct ths_thermal_chip sun50i_h6_ths = {
.sensor_num = 2,
.offset = -2794,
@@ -528,6 +539,7 @@ static const struct ths_thermal_chip sun50i_h6_ths = {
static const struct of_device_id of_ths_match[] = {
{ .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths },
+ { .compatible = "allwinner,sun50i-a64-ths", .data = &sun50i_a64_ths },
{ .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths },
{ /* sentinel */ },
};
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH v5 00/18] add thermal driver for h6
@ 2019-08-10 5:28 Yangtao Li
2019-08-10 5:28 ` [PATCH v5 13/18] thermal: sun8i: add thermal driver for A64 Yangtao Li
0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li @ 2019-08-10 5:28 UTC (permalink / raw)
To: rui.zhang, edubezval, daniel.lezcano, robh+dt, mark.rutland,
maxime.ripard, wens, mchehab+samsung, davem, gregkh,
Jonathan.Cameron, nicolas.ferre
Cc: linux-pm, devicetree, linux-arm-kernel, linux-kernel, Yangtao Li
This patchset add support for A64, H3, H5, H6 and R40 thermal sensor.
Thx to Icenowy and Vasily.
BTY, do a cleanup in thermal makfile.
Icenowy Zheng (3):
thermal: sun8i: allow to use custom temperature calculation function
thermal: sun8i: add support for Allwinner H5 thermal sensor
thermal: sun8i: add support for Allwinner R40 thermal sensor
Vasily Khoruzhick (1):
thermal: sun8i: add thermal driver for A64
Yangtao Li (14):
thermal: sun8i: add thermal driver for h6
dt-bindings: thermal: add binding document for h6 thermal controller
thermal: fix indentation in makefile
thermal: sun8i: get ths sensor number from device compatible
thermal: sun8i: rework for sun8i_ths_get_temp()
thermal: sun8i: get ths init func from device compatible
thermal: sun8i: rework for ths irq handler func
thermal: sun8i: support mod clocks
thermal: sun8i: rework for ths calibrate func
dt-bindings: thermal: add binding document for h3 thermal controller
thermal: sun8i: add thermal driver for h3
dt-bindings: thermal: add binding document for a64 thermal controller
dt-bindings: thermal: add binding document for h5 thermal controller
dt-bindings: thermal: add binding document for r40 thermal controller
.../bindings/thermal/sun8i-thermal.yaml | 157 +++++
MAINTAINERS | 7 +
drivers/thermal/Kconfig | 14 +
drivers/thermal/Makefile | 9 +-
drivers/thermal/sun8i_thermal.c | 596 ++++++++++++++++++
5 files changed, 779 insertions(+), 4 deletions(-)
create mode 100644 Documentation/devicetree/bindings/thermal/sun8i-thermal.yaml
create mode 100644 drivers/thermal/sun8i_thermal.c
---
v5:
-add more support
-some trival fix
---
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v5 13/18] thermal: sun8i: add thermal driver for A64
2019-08-10 5:28 [PATCH v5 00/18] add thermal driver for h6 Yangtao Li
@ 2019-08-10 5:28 ` Yangtao Li
0 siblings, 0 replies; 2+ messages in thread
From: Yangtao Li @ 2019-08-10 5:28 UTC (permalink / raw)
To: rui.zhang, edubezval, daniel.lezcano, robh+dt, mark.rutland,
maxime.ripard, wens, mchehab+samsung, davem, gregkh,
Jonathan.Cameron, nicolas.ferre
Cc: linux-pm, devicetree, linux-arm-kernel, linux-kernel, Vasily Khoruzhick
From: Vasily Khoruzhick <anarsoul@gmail.com>
Thermal sensor controller in A64 is similar to H3, but it has 3 sensors.
Extend H3 functions to add support for multiple sensors.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
drivers/thermal/sun8i_thermal.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 41ce8cdc0546..3259081da841 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -515,6 +515,17 @@ static const struct ths_thermal_chip sun8i_h3_ths = {
.irq_ack = sun8i_h3_irq_ack,
};
+static const struct ths_thermal_chip sun50i_a64_ths = {
+ .sensor_num = 3,
+ .offset = -2170,
+ .scale = -117,
+ .has_mod_clk = true,
+ .temp_data_base = SUN8I_THS_TEMP_DATA,
+ .calibrate = sun8i_h3_ths_calibrate,
+ .init = sun8i_h3_thermal_init,
+ .irq_ack = sun8i_h3_irq_ack,
+};
+
static const struct ths_thermal_chip sun50i_h6_ths = {
.sensor_num = 2,
.offset = -2794,
@@ -528,6 +539,7 @@ static const struct ths_thermal_chip sun50i_h6_ths = {
static const struct of_device_id of_ths_match[] = {
{ .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths },
+ { .compatible = "allwinner,sun50i-a64-ths", .data = &sun50i_a64_ths },
{ .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths },
{ /* sentinel */ },
};
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-10 5:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-10 5:32 [PATCH v5 13/18] thermal: sun8i: add thermal driver for A64 Yangtao Li
-- strict thread matches above, loose matches on Subject: below --
2019-08-10 5:28 [PATCH v5 00/18] add thermal driver for h6 Yangtao Li
2019-08-10 5:28 ` [PATCH v5 13/18] thermal: sun8i: add thermal driver for A64 Yangtao Li
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).