thermal: rockchip: add tsadc support for px30
Change-Id: I46ac8ebd4a92367acb610fb96c18a487c67602d4 Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
This commit is contained in:
parent
0181dc0e9c
commit
b7dca1ff57
2 changed files with 29 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
Required properties:
|
||||
- compatible : should be "rockchip,<name>-tsadc"
|
||||
"rockchip,px30-tsadc": found on PX30 SoCs
|
||||
"rockchip,rk3228-tsadc": found on RK3228 SoCs
|
||||
"rockchip,rk3288-tsadc": found on RK3288 SoCs
|
||||
"rockchip,rk3328-tsadc": found on RK3328 SoCs
|
||||
|
|
|
|||
|
|
@ -871,6 +871,30 @@ static const struct rockchip_tsadc_chip rk3288_tsadc_data = {
|
|||
},
|
||||
};
|
||||
|
||||
static const struct rockchip_tsadc_chip px30_tsadc_data = {
|
||||
.chn_id[SENSOR_CPU] = 0, /* cpu sensor is channel 0 */
|
||||
.chn_id[SENSOR_GPU] = 1, /* gpu sensor is channel 1 */
|
||||
.chn_num = 2, /* 2 channels for tsadc */
|
||||
|
||||
.tshut_mode = TSHUT_MODE_CRU, /* default TSHUT via CRU */
|
||||
.tshut_temp = 95000,
|
||||
|
||||
.initialize = rk_tsadcv2_initialize,
|
||||
.irq_ack = rk_tsadcv3_irq_ack,
|
||||
.control = rk_tsadcv3_control,
|
||||
.get_temp = rk_tsadcv2_get_temp,
|
||||
.set_alarm_temp = rk_tsadcv2_alarm_temp,
|
||||
.set_tshut_temp = rk_tsadcv2_tshut_temp,
|
||||
.set_tshut_mode = rk_tsadcv2_tshut_mode,
|
||||
|
||||
.table = {
|
||||
.id = rk3328_code_table,
|
||||
.length = ARRAY_SIZE(rk3328_code_table),
|
||||
.data_mask = TSADCV2_DATA_MASK,
|
||||
.mode = ADC_INCREMENT,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct rockchip_tsadc_chip rk3328_tsadc_data = {
|
||||
.chn_id[SENSOR_CPU] = 0, /* cpu sensor is channel 0 */
|
||||
.chn_num = 1, /* one channels for tsadc */
|
||||
|
|
@ -970,6 +994,10 @@ static const struct rockchip_tsadc_chip rk3399_tsadc_data = {
|
|||
};
|
||||
|
||||
static const struct of_device_id of_rockchip_thermal_match[] = {
|
||||
{
|
||||
.compatible = "rockchip,px30-tsadc",
|
||||
.data = (void *)&px30_tsadc_data,
|
||||
},
|
||||
{
|
||||
.compatible = "rockchip,rk3228-tsadc",
|
||||
.data = (void *)&rk3228_tsadc_data,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue