Re: [PATCH 1/4] thermal/drivers/mediatek: Add efuse calibration support for mobile SoCs

From: Roman Vivchar

Date: Fri Dec 04 2026 - 06:46:46 EST


On Thursday, December 3rd, 2026 at 2:03 PM, Ben Grisdale via B4 Relay <devnull+bengris32.protonmail.ch@xxxxxxxxxx> wrote:

> From: Ben Grisdale <bengris32@xxxxxxxxxxxxx>
>
> The efuse calibration layout on mobile MediaTek SoCs (MT67xx / MT68xx)
> seems to sit in between the V1 and V2 layout. Whilst it overall is
> mostly V1, it has additional entries for ADC_OE, which is otherwise
> only seen in the V2 efuse layout [1] [2] [3] [4].
>
> The downstream driver's implementation for raw_to_mcelsius uses a modified
> version of the V2 calculations, with differences being: VTS value for each
> sensor and slightly adjusted constants / slope correction.
>
> Link: https://github.com/helio-x20/linux/blob/helio-x20/drivers/misc/mediatek/thermal/mt6797/src/mtk_tc.c#L326-L659 [1]
> Link: https://github.com/NotKit/kernel-4.4-alps/blob/master/drivers/misc/mediatek/thermal/mt6757/src/mtk_tc.c#L257-L570 [2]
> Link: https://github.com/LineageOS/android_kernel_xiaomi_mt6768/blob/lineage-24.0/drivers/misc/mediatek/thermal/mt6768/src/mtk_tc.c#L280-L643 [3]
> Link: https://github.com/LineageOS/android_kernel_xiaomi_mt6768/blob/lineage-24.0/drivers/misc/mediatek/thermal/mt6873/src/mtk_tc.c#L212-L584 [4]
> [rva333: select calibration value from the struct field instead]
> Signed-off-by: Roman Vivchar <rva333@xxxxxxxxxxxxxx>
> Signed-off-by: Ben Grisdale <bengris32@xxxxxxxxxxxxx>
> ---

Tested-by: Roman Vivchar <rva333@xxxxxxxxxxxxxx> # mt6595, mt6768, mt6797

Best regards,
Roman