thermal: rockchip: Support RK3576 SoC in the thermal driver

The RK3576 SoC has six channels TS-ADC(TOP, BIG_CORE, LITTLE_CORE
DDR, NPU and GPU).

Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I800dee18937d3d35243896fe22a953eac111ba3f
This commit is contained in:
Ye Zhang
2024-01-10 17:58:07 +08:00
committed by Tao Huang
parent 922c5061d2
commit d2e1994957

View File

@@ -1934,6 +1934,28 @@ static const struct rockchip_tsadc_chip rk3568_tsadc_data = {
},
};
static const struct rockchip_tsadc_chip rk3576_tsadc_data = {
/* top, big_core, little_core, ddr, npu, gpu */
.chn_id = {0, 1, 2, 3, 4, 5},
.chn_num = 6, /* six channels for tsadc */
.tshut_mode = TSHUT_MODE_OTP, /* default TSHUT via GPIO give PMIC */
.tshut_polarity = TSHUT_LOW_ACTIVE, /* default TSHUT LOW ACTIVE */
.tshut_temp = 95000,
.initialize = rk_tsadcv8_initialize,
.irq_ack = rk_tsadcv4_irq_ack,
.control = rk_tsadcv4_control,
.get_temp = rk_tsadcv4_get_temp,
.set_alarm_temp = rk_tsadcv3_alarm_temp,
.set_tshut_temp = rk_tsadcv3_tshut_temp,
.set_tshut_mode = rk_tsadcv4_tshut_mode,
.table = {
.id = rk3588_code_table,
.length = ARRAY_SIZE(rk3588_code_table),
.data_mask = TSADCV4_DATA_MASK,
.mode = ADC_INCREMENT,
},
};
static const struct rockchip_tsadc_chip rk3588_tsadc_data = {
/* top, big_core0, big_core1, little_core, center, gpu, npu */
.chn_id = {0, 1, 2, 3, 4, 5, 6},
@@ -2053,6 +2075,12 @@ static const struct of_device_id of_rockchip_thermal_match[] = {
.data = (void *)&rk3568_tsadc_data,
},
#endif
#ifdef CONFIG_CPU_RK3576
{
.compatible = "rockchip,rk3576-tsadc",
.data = (void *)&rk3576_tsadc_data,
},
#endif
#ifdef CONFIG_CPU_RK3588
{
.compatible = "rockchip,rk3588-tsadc",