TSensor 配置
3 Mar 2025
Read time: 1 minute(s)
内核配置
-
在内核配置界面,按如下选择:
Linux Device Drivers [*] Thermal drivers <*> ArtInChip thermal driver
DTS 参数配置
-
TSensor 驱动支持从 DTS 中配置的自定义参数,如下表:
表 1. TSensor 自定义参数 参数名称
类型
取值范围
功能说明
aic,sample-period
正整数
> 0, (0, 10]
周期采样模式下的周期值,单位:s
aic,high-temp-thd
正整数
> 0
高电平报警阈值
aic,low-temp-thd
正整数
> 0
低电平报警阈值
aic,htp-enable
boolean
有 - 1,无 - 0
是否使能高温保护功能
注:- 需在周期模式下,高/低电平报警以及高温保护功能才可使能有效。
- 配置 aic,htp-enable 时,需配置 aic,high-temp-thd,否则高温保护使能无效。
- D211 配置common/d211.dtsi 中的参数配置:
tsen: tsen@19253000 { compatible = "artinchip,aic-tsen-v1.0"; reg = <0x0 0x19253000 0x0 0x1000>; interrupts-extended = <&plic0 94 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cmu CLK_TSEN>, <&cmu CLK_APB1>; clock-names = "tsen", "pclk"; resets = <&rst RESET_TSEN>; };
- Board 配置。xxx/board.dts 中的参数配置:
&tsen { status = "okay"; tsen0 { status = "okay"; }; tsen1 { status = "okay"; }; };
- 上述配置采样的是非周期模式。
- 阈值未配置,表示未打开相关功能。详见 TSensor 自定义参数。
- 仅在实测后才能确认阈值的配置值。