[PATCH 3/5] nvmem: mtk-efuse: Enable postprocess for mt8188 GPU speed binning

Pablo Sun posted 5 patches 2 months, 1 week ago
There is a newer version of this series
[PATCH 3/5] nvmem: mtk-efuse: Enable postprocess for mt8188 GPU speed binning
Posted by Pablo Sun 2 months, 1 week ago
Similar to mt8186, the efuse data for mt8188's GPU speed binning
requires post-process to convert the bit field format expected
by the OPP table.

Since mt8188 efuse is not compatible to mt8186, add a new compatible
entry for mt8188 and enable postprocess.

Signed-off-by: Pablo Sun <pablo.sun@mediatek.com>
---
 drivers/nvmem/mtk-efuse.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/nvmem/mtk-efuse.c b/drivers/nvmem/mtk-efuse.c
index 9caf04667341..4984145025bb 100644
--- a/drivers/nvmem/mtk-efuse.c
+++ b/drivers/nvmem/mtk-efuse.c
@@ -105,6 +105,10 @@ static const struct mtk_efuse_pdata mtk_mt8186_efuse_pdata = {
 	.uses_post_processing = true,
 };
 
+static const struct mtk_efuse_pdata mtk_mt8188_efuse_pdata = {
+	.uses_post_processing = true,
+};
+
 static const struct mtk_efuse_pdata mtk_efuse_pdata = {
 	.uses_post_processing = false,
 };
@@ -112,6 +116,7 @@ static const struct mtk_efuse_pdata mtk_efuse_pdata = {
 static const struct of_device_id mtk_efuse_of_match[] = {
 	{ .compatible = "mediatek,mt8173-efuse", .data = &mtk_efuse_pdata },
 	{ .compatible = "mediatek,mt8186-efuse", .data = &mtk_mt8186_efuse_pdata },
+	{ .compatible = "mediatek,mt8188-efuse", .data = &mtk_mt8188_efuse_pdata },
 	{ .compatible = "mediatek,efuse", .data = &mtk_efuse_pdata },
 	{/* sentinel */},
 };
-- 
2.45.2
Re: [PATCH 3/5] nvmem: mtk-efuse: Enable postprocess for mt8188 GPU speed binning
Posted by AngeloGioacchino Del Regno 2 months, 1 week ago
Il 20/09/24 15:41, Pablo Sun ha scritto:
> Similar to mt8186, the efuse data for mt8188's GPU speed binning
> requires post-process to convert the bit field format expected
> by the OPP table.
> 
> Since mt8188 efuse is not compatible to mt8186, add a new compatible
> entry for mt8188 and enable postprocess.
> 
> Signed-off-by: Pablo Sun <pablo.sun@mediatek.com>
> ---
>   drivers/nvmem/mtk-efuse.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/nvmem/mtk-efuse.c b/drivers/nvmem/mtk-efuse.c
> index 9caf04667341..4984145025bb 100644
> --- a/drivers/nvmem/mtk-efuse.c
> +++ b/drivers/nvmem/mtk-efuse.c
> @@ -105,6 +105,10 @@ static const struct mtk_efuse_pdata mtk_mt8186_efuse_pdata = {
>   	.uses_post_processing = true,
>   };
>   
> +static const struct mtk_efuse_pdata mtk_mt8188_efuse_pdata = {
> +	.uses_post_processing = true,
> +};
> +
>   static const struct mtk_efuse_pdata mtk_efuse_pdata = {
>   	.uses_post_processing = false,
>   };
> @@ -112,6 +116,7 @@ static const struct mtk_efuse_pdata mtk_efuse_pdata = {
>   static const struct of_device_id mtk_efuse_of_match[] = {
>   	{ .compatible = "mediatek,mt8173-efuse", .data = &mtk_efuse_pdata },
>   	{ .compatible = "mediatek,mt8186-efuse", .data = &mtk_mt8186_efuse_pdata },
> +	{ .compatible = "mediatek,mt8188-efuse", .data = &mtk_mt8188_efuse_pdata },

Please reuse mtk_mt8186_efuse_pdata. There's no need to add a duplicate.

{ .compatible = "mediatek,mt8188-efuse", .data = &mtk_mt8186_efuse_pdata },

Cheers,
Angelo

>   	{ .compatible = "mediatek,efuse", .data = &mtk_efuse_pdata },
>   	{/* sentinel */},
>   };
Re: [PATCH 3/5] nvmem: mtk-efuse: Enable postprocess for mt8188 GPU speed binning
Posted by Pablo Sun 2 months, 1 week ago
Hi Angelo,

On 9/23/24 16:37, AngeloGioacchino Del Regno wrote:
[snipped]
> 
> Please reuse mtk_mt8186_efuse_pdata. There's no need to add a duplicate.
> 
> { .compatible = "mediatek,mt8188-efuse", .data = &mtk_mt8186_efuse_pdata },

Thanks, will fix in v2.

Best regards,
Pablo