This series adds support for Allwinner D1/T113s thermal sensor controller.
THIS controller is similar to the one on H6, but with only one sensor and
uses a different scale and offset values.
v2:
- Fixed SoB tag
- Moved binding patch before driver changes
v1:
- Initial version
Maxim Kiselev (3):
dt-bindings: thermal: sun8i: Add binding for D1/T113s THS controller
thermal: sun8i: Add D1/T113s THS controller support
riscv: dts: allwinner: d1: Add thermal sensor and thermal zone
.../thermal/allwinner,sun8i-a83t-ths.yaml | 20 +++++++++++++-
.../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 26 +++++++++++++++++++
drivers/thermal/sun8i_thermal.c | 13 ++++++++++
3 files changed, 58 insertions(+), 1 deletion(-)
--
2.39.2
From: Maxim Kiselev <[email protected]>
This patch adds a thermal sensor controller support for the D1/T113s,
which is similar to the one on H6, but with only one sensor and
different scale and offset values.
Signed-off-by: Maxim Kiselev <[email protected]>
Signed-off-by: Maksim Kiselev <[email protected]>
---
drivers/thermal/sun8i_thermal.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 793ddce72132..01cc4e130892 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -628,6 +628,18 @@ static const struct ths_thermal_chip sun50i_h6_ths = {
.calc_temp = sun8i_ths_calc_temp,
};
+static const struct ths_thermal_chip sun20i_d1_ths = {
+ .sensor_num = 1,
+ .has_bus_clk_reset = true,
+ .offset = 188552,
+ .scale = 673,
+ .temp_data_base = SUN50I_H6_THS_TEMP_DATA,
+ .calibrate = sun50i_h6_ths_calibrate,
+ .init = sun50i_h6_thermal_init,
+ .irq_ack = sun50i_h6_irq_ack,
+ .calc_temp = sun8i_ths_calc_temp,
+};
+
static const struct of_device_id of_ths_match[] = {
{ .compatible = "allwinner,sun8i-a83t-ths", .data = &sun8i_a83t_ths },
{ .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths },
@@ -636,6 +648,7 @@ static const struct of_device_id of_ths_match[] = {
{ .compatible = "allwinner,sun50i-a100-ths", .data = &sun50i_a100_ths },
{ .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths },
{ .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths },
+ { .compatible = "allwinner,sun20i-d1-ths", .data = &sun20i_d1_ths },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, of_ths_match);
--
2.39.2
Dne sobota, 10. junij 2023 ob 22:35:41 CEST je Maksim Kiselev napisal(a):
> This series adds support for Allwinner D1/T113s thermal sensor controller.
> THIS controller is similar to the one on H6, but with only one sensor and
> uses a different scale and offset values.
>
> v2:
> - Fixed SoB tag
It doesn't seems you fixed that.
Best regards,
Jernej
> - Moved binding patch before driver changes
>
> v1:
> - Initial version
>
> Maxim Kiselev (3):
> dt-bindings: thermal: sun8i: Add binding for D1/T113s THS controller
> thermal: sun8i: Add D1/T113s THS controller support
> riscv: dts: allwinner: d1: Add thermal sensor and thermal zone
>
> .../thermal/allwinner,sun8i-a83t-ths.yaml | 20 +++++++++++++-
> .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 26 +++++++++++++++++++
> drivers/thermal/sun8i_thermal.c | 13 ++++++++++
> 3 files changed, 58 insertions(+), 1 deletion(-)
>
>
Dne ponedeljek, 12. junij 2023 ob 20:22:43 CEST je Jernej Škrabec napisal(a):
> Dne sobota, 10. junij 2023 ob 22:35:41 CEST je Maksim Kiselev napisal(a):
> > This series adds support for Allwinner D1/T113s thermal sensor controller.
> > THIS controller is similar to the one on H6, but with only one sensor and
> > uses a different scale and offset values.
> >
> > v2:
> > - Fixed SoB tag
>
> It doesn't seems you fixed that.
Sorry, too many revisions in short time. Wait until discussion is finished.
Best regards,
Jernej
>
> > - Moved binding patch before driver changes
> >
> > v1:
> > - Initial version
> >
> > Maxim Kiselev (3):
> > dt-bindings: thermal: sun8i: Add binding for D1/T113s THS controller
> > thermal: sun8i: Add D1/T113s THS controller support
> > riscv: dts: allwinner: d1: Add thermal sensor and thermal zone
> >
> > .../thermal/allwinner,sun8i-a83t-ths.yaml | 20 +++++++++++++-
> > .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 26 +++++++++++++++++++
> > drivers/thermal/sun8i_thermal.c | 13 ++++++++++
> > 3 files changed, 58 insertions(+), 1 deletion(-)
> >
> >
>
>
>
>
>
пн, 12 июн. 2023 г. в 21:22, Jernej Škrabec <[email protected]>:
>
> Dne sobota, 10. junij 2023 ob 22:35:41 CEST je Maksim Kiselev napisal(a):
> > This series adds support for Allwinner D1/T113s thermal sensor controller.
> > THIS controller is similar to the one on H6, but with only one sensor and
> > uses a different scale and offset values.
> >
> > v2:
> > - Fixed SoB tag
>
> It doesn't seems you fixed that.
Sorry for that. I accidentally sent the wrong version of patches . And
immediately after that I sent v3.