Skip to content

Commit ebbf19e

Browse files
bigunclemaxdlezcano
authored andcommitted
thermal/drivers/sun8i: Add D1/T113s THS controller support
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]> Acked-by: Jernej Skrabec <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 20bf626 commit ebbf19e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/thermal/sun8i_thermal.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,18 @@ static const struct ths_thermal_chip sun50i_h6_ths = {
606606
.calc_temp = sun8i_ths_calc_temp,
607607
};
608608

609+
static const struct ths_thermal_chip sun20i_d1_ths = {
610+
.sensor_num = 1,
611+
.has_bus_clk_reset = true,
612+
.offset = 188552,
613+
.scale = 673,
614+
.temp_data_base = SUN50I_H6_THS_TEMP_DATA,
615+
.calibrate = sun50i_h6_ths_calibrate,
616+
.init = sun50i_h6_thermal_init,
617+
.irq_ack = sun50i_h6_irq_ack,
618+
.calc_temp = sun8i_ths_calc_temp,
619+
};
620+
609621
static const struct of_device_id of_ths_match[] = {
610622
{ .compatible = "allwinner,sun8i-a83t-ths", .data = &sun8i_a83t_ths },
611623
{ .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths },
@@ -614,6 +626,7 @@ static const struct of_device_id of_ths_match[] = {
614626
{ .compatible = "allwinner,sun50i-a100-ths", .data = &sun50i_a100_ths },
615627
{ .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths },
616628
{ .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths },
629+
{ .compatible = "allwinner,sun20i-d1-ths", .data = &sun20i_d1_ths },
617630
{ /* sentinel */ },
618631
};
619632
MODULE_DEVICE_TABLE(of, of_ths_match);

0 commit comments

Comments
 (0)