devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] arm64: mediatek: Enable efuse GPU speed bin post-processing
@ 2025-06-10  6:34 Chen-Yu Tsai
  2025-06-10  6:34 ` [PATCH v2 1/2] dt-bindings: nvmem: mediatek: efuse: split MT8186/MT8188 from base version Chen-Yu Tsai
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2025-06-10  6:34 UTC (permalink / raw)
  To: Srinivas Kandagatla, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Andrew-CT Chen, Lala Lin, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Chen-Yu Tsai, linux-arm-kernel, linux-mediatek, devicetree,
	linux-kernel

Hi everyone,

This is v2 of the MT8188 efuse GPU speed bin post-processing enablement
patches. In v1 [1] the change was made to the driver. Angelo, the platform
maintainer believes the change should be made to the DT binding instead
[2]. v2 adopts Angelo's argument.

Patch 1 updates the efuse DT binding so that MT8186 is a base compatible
with no fallback, and MT8188 falls back to MT8186.

Patch 2 updates the MT8188 DT to follow the new binding.

If possible I would like to see both patches merged through the soc
tree once the DT binding maintainers give an ack. This avoids prolonged
waiting for the binding changes to land and uncertainty about whether
things have fully landed or not.


Thanks
ChenYu

[1] https://lore.kernel.org/all/20241223100648.2166754-1-wenst@chromium.org/
[2] https://lore.kernel.org/all/11028242-afe4-474a-9d76-cd1bd9208987@collabora.com/

Chen-Yu Tsai (2):
  dt-bindings: nvmem: mediatek: efuse: split MT8186/MT8188 from base
    version
  arm64: dts: mediatek: mt8188: Change efuse fallback compatible to
    mt8186

 .../bindings/nvmem/mediatek,efuse.yaml          | 17 +++++++++++++++--
 arch/arm64/boot/dts/mediatek/mt8188.dtsi        |  2 +-
 2 files changed, 16 insertions(+), 3 deletions(-)

-- 
2.50.0.rc0.604.gd4ff7b7c86-goog


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/2] dt-bindings: nvmem: mediatek: efuse: split MT8186/MT8188 from base version
  2025-06-10  6:34 [PATCH v2 0/2] arm64: mediatek: Enable efuse GPU speed bin post-processing Chen-Yu Tsai
@ 2025-06-10  6:34 ` Chen-Yu Tsai
  2025-06-10 15:18   ` Conor Dooley
  2025-06-10  6:34 ` [PATCH v2 2/2] arm64: dts: mediatek: mt8188: Change efuse fallback compatible to mt8186 Chen-Yu Tsai
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Chen-Yu Tsai @ 2025-06-10  6:34 UTC (permalink / raw)
  To: Srinivas Kandagatla, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Andrew-CT Chen, Lala Lin, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Chen-Yu Tsai, linux-arm-kernel, linux-mediatek, devicetree,
	linux-kernel, Johnson Wang

On MT8186 and MT8188 one of the NVMEM cells contains the GPU speed bin
value. In combination with the GPU OPP bindings, on these two platforms
there is an implied scheme of converting the cell value to what the GPU
OPP "opp-supported-hw" property matches. This does not apply to the base
mediatek,efuse hardware, nor does it apply to any of the other platforms
that do not have the GPU speed bin cell. The platform maintainer argues
that this makes the compatibles incompatible with the base
"mediatek,efuse" compatible, as shown in the link given.

Deprecate the MT8186/MT8188 + "mediatek,efuse" combination, and add
new entries with MT8186 being the base model and MT8188 falling back
to MT8186.

Link: https://lore.kernel.org/all/11028242-afe4-474a-9d76-cd1bd9208987@collabora.com/
Fixes: ff1df1886f43 ("dt-bindings: nvmem: mediatek: efuse: Add support for MT8188")
Cc: Johnson Wang <johnson.wang@mediatek.com>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
 .../bindings/nvmem/mediatek,efuse.yaml          | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
index 32b8c1eb4e80..4dc0d42df3e6 100644
--- a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
+++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
@@ -24,6 +24,21 @@ properties:
 
   compatible:
     oneOf:
+      - items:
+          - const: mediatek,mt8188-efuse
+          - const: mediatek,mt8186-efuse
+      - const: mediatek,mt8186-efuse
+
+      - items:
+          - enum:
+              - mediatek,mt8186-efuse
+              - mediatek,mt8188-efuse
+          - const: mediatek,efuse
+        deprecated: true
+        description: Some compatibles also imply a decoding scheme for the
+          "gpu-speedbin" cell, and thus are not backward compatible to the
+          generic "mediatek,efuse" compatible.
+
       - items:
           - enum:
               - mediatek,mt7622-efuse
@@ -33,8 +48,6 @@ properties:
               - mediatek,mt7988-efuse
               - mediatek,mt8173-efuse
               - mediatek,mt8183-efuse
-              - mediatek,mt8186-efuse
-              - mediatek,mt8188-efuse
               - mediatek,mt8192-efuse
               - mediatek,mt8195-efuse
               - mediatek,mt8516-efuse
-- 
2.50.0.rc0.604.gd4ff7b7c86-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] arm64: dts: mediatek: mt8188: Change efuse fallback compatible to mt8186
  2025-06-10  6:34 [PATCH v2 0/2] arm64: mediatek: Enable efuse GPU speed bin post-processing Chen-Yu Tsai
  2025-06-10  6:34 ` [PATCH v2 1/2] dt-bindings: nvmem: mediatek: efuse: split MT8186/MT8188 from base version Chen-Yu Tsai
@ 2025-06-10  6:34 ` Chen-Yu Tsai
  2025-07-01  9:15 ` [PATCH v2 0/2] arm64: mediatek: Enable efuse GPU speed bin post-processing Chen-Yu Tsai
  2025-07-11 16:52 ` (subset) " Srinivas Kandagatla
  3 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2025-06-10  6:34 UTC (permalink / raw)
  To: Srinivas Kandagatla, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Andrew-CT Chen, Lala Lin, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: Chen-Yu Tsai, linux-arm-kernel, linux-mediatek, devicetree,
	linux-kernel

The efuse block in the MT8188 contains the GPU speed bin cell, and like
the MT8186 one, has the same conversion scheme to work with the GPU OPP
binding. This was reflected in a corresponding change to the efuse DT
binding.

Change the fallback compatible of the MT8188's efuse block from the
generic one to the MT8186 one. This also makes GPU DVFS work properly.

Fixes: d39aacd1021a ("arm64: dts: mediatek: mt8188: add lvts definitions")
Fixes: 50e7592cb696 ("arm64: dts: mediatek: mt8188: Add GPU speed bin NVMEM cells")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
 arch/arm64/boot/dts/mediatek/mt8188.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8188.dtsi b/arch/arm64/boot/dts/mediatek/mt8188.dtsi
index 202478407727..90c388f1890f 100644
--- a/arch/arm64/boot/dts/mediatek/mt8188.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8188.dtsi
@@ -2183,7 +2183,7 @@ imp_iic_wrap_en: clock-controller@11ec2000 {
 		};
 
 		efuse: efuse@11f20000 {
-			compatible = "mediatek,mt8188-efuse", "mediatek,efuse";
+			compatible = "mediatek,mt8188-efuse", "mediatek,mt8186-efuse";
 			reg = <0 0x11f20000 0 0x1000>;
 			#address-cells = <1>;
 			#size-cells = <1>;
-- 
2.50.0.rc0.604.gd4ff7b7c86-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: nvmem: mediatek: efuse: split MT8186/MT8188 from base version
  2025-06-10  6:34 ` [PATCH v2 1/2] dt-bindings: nvmem: mediatek: efuse: split MT8186/MT8188 from base version Chen-Yu Tsai
@ 2025-06-10 15:18   ` Conor Dooley
  0 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2025-06-10 15:18 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Srinivas Kandagatla, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Andrew-CT Chen, Lala Lin, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-arm-kernel, linux-mediatek,
	devicetree, linux-kernel, Johnson Wang

[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]

On Tue, Jun 10, 2025 at 02:34:29PM +0800, Chen-Yu Tsai wrote:
> On MT8186 and MT8188 one of the NVMEM cells contains the GPU speed bin
> value. In combination with the GPU OPP bindings, on these two platforms
> there is an implied scheme of converting the cell value to what the GPU
> OPP "opp-supported-hw" property matches. This does not apply to the base
> mediatek,efuse hardware, nor does it apply to any of the other platforms
> that do not have the GPU speed bin cell. The platform maintainer argues
> that this makes the compatibles incompatible with the base
> "mediatek,efuse" compatible, as shown in the link given.
> 
> Deprecate the MT8186/MT8188 + "mediatek,efuse" combination, and add
> new entries with MT8186 being the base model and MT8188 falling back
> to MT8186.
> 
> Link: https://lore.kernel.org/all/11028242-afe4-474a-9d76-cd1bd9208987@collabora.com/
> Fixes: ff1df1886f43 ("dt-bindings: nvmem: mediatek: efuse: Add support for MT8188")
> Cc: Johnson Wang <johnson.wang@mediatek.com>
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 0/2] arm64: mediatek: Enable efuse GPU speed bin post-processing
  2025-06-10  6:34 [PATCH v2 0/2] arm64: mediatek: Enable efuse GPU speed bin post-processing Chen-Yu Tsai
  2025-06-10  6:34 ` [PATCH v2 1/2] dt-bindings: nvmem: mediatek: efuse: split MT8186/MT8188 from base version Chen-Yu Tsai
  2025-06-10  6:34 ` [PATCH v2 2/2] arm64: dts: mediatek: mt8188: Change efuse fallback compatible to mt8186 Chen-Yu Tsai
@ 2025-07-01  9:15 ` Chen-Yu Tsai
  2025-07-03 11:48   ` AngeloGioacchino Del Regno
  2025-07-11 16:52 ` (subset) " Srinivas Kandagatla
  3 siblings, 1 reply; 8+ messages in thread
From: Chen-Yu Tsai @ 2025-07-01  9:15 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: linux-arm-kernel, linux-mediatek, devicetree, linux-kernel,
	Lala Lin, Matthias Brugger, Srinivas Kandagatla, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Andrew-CT Chen

Hi Angelo,

On Tue, Jun 10, 2025 at 2:34 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
>
> Hi everyone,
>
> This is v2 of the MT8188 efuse GPU speed bin post-processing enablement
> patches. In v1 [1] the change was made to the driver. Angelo, the platform
> maintainer believes the change should be made to the DT binding instead
> [2]. v2 adopts Angelo's argument.
>
> Patch 1 updates the efuse DT binding so that MT8186 is a base compatible
> with no fallback, and MT8188 falls back to MT8186.
>
> Patch 2 updates the MT8188 DT to follow the new binding.
>
> If possible I would like to see both patches merged through the soc
> tree once the DT binding maintainers give an ack. This avoids prolonged
> waiting for the binding changes to land and uncertainty about whether
> things have fully landed or not.
>
>
> Thanks
> ChenYu
>
> [1] https://lore.kernel.org/all/20241223100648.2166754-1-wenst@chromium.org/
> [2] https://lore.kernel.org/all/11028242-afe4-474a-9d76-cd1bd9208987@collabora.com/
>
> Chen-Yu Tsai (2):
>   dt-bindings: nvmem: mediatek: efuse: split MT8186/MT8188 from base
>     version
>   arm64: dts: mediatek: mt8188: Change efuse fallback compatible to
>     mt8186

Friendly ping. Please take a look and see if this scheme is to your liking.


Thanks
ChenYu

>  .../bindings/nvmem/mediatek,efuse.yaml          | 17 +++++++++++++++--
>  arch/arm64/boot/dts/mediatek/mt8188.dtsi        |  2 +-
>  2 files changed, 16 insertions(+), 3 deletions(-)
>
> --
> 2.50.0.rc0.604.gd4ff7b7c86-goog
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 0/2] arm64: mediatek: Enable efuse GPU speed bin post-processing
  2025-07-01  9:15 ` [PATCH v2 0/2] arm64: mediatek: Enable efuse GPU speed bin post-processing Chen-Yu Tsai
@ 2025-07-03 11:48   ` AngeloGioacchino Del Regno
  2025-07-10  8:42     ` Chen-Yu Tsai
  0 siblings, 1 reply; 8+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-07-03 11:48 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: linux-arm-kernel, linux-mediatek, devicetree, linux-kernel,
	Lala Lin, Matthias Brugger, Srinivas Kandagatla, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Andrew-CT Chen

Il 01/07/25 11:15, Chen-Yu Tsai ha scritto:
> Hi Angelo,
> 
> On Tue, Jun 10, 2025 at 2:34 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
>>
>> Hi everyone,
>>
>> This is v2 of the MT8188 efuse GPU speed bin post-processing enablement
>> patches. In v1 [1] the change was made to the driver. Angelo, the platform
>> maintainer believes the change should be made to the DT binding instead
>> [2]. v2 adopts Angelo's argument.
>>
>> Patch 1 updates the efuse DT binding so that MT8186 is a base compatible
>> with no fallback, and MT8188 falls back to MT8186.
>>
>> Patch 2 updates the MT8188 DT to follow the new binding.
>>
>> If possible I would like to see both patches merged through the soc
>> tree once the DT binding maintainers give an ack. This avoids prolonged
>> waiting for the binding changes to land and uncertainty about whether
>> things have fully landed or not.
>>
>>
>> Thanks
>> ChenYu
>>
>> [1] https://lore.kernel.org/all/20241223100648.2166754-1-wenst@chromium.org/
>> [2] https://lore.kernel.org/all/11028242-afe4-474a-9d76-cd1bd9208987@collabora.com/
>>
>> Chen-Yu Tsai (2):
>>    dt-bindings: nvmem: mediatek: efuse: split MT8186/MT8188 from base
>>      version
>>    arm64: dts: mediatek: mt8188: Change efuse fallback compatible to
>>      mt8186
> 
> Friendly ping. Please take a look and see if this scheme is to your liking.
> 

For the whole series

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

> 
> Thanks
> ChenYu
> 
>>   .../bindings/nvmem/mediatek,efuse.yaml          | 17 +++++++++++++++--
>>   arch/arm64/boot/dts/mediatek/mt8188.dtsi        |  2 +-
>>   2 files changed, 16 insertions(+), 3 deletions(-)
>>
>> --
>> 2.50.0.rc0.604.gd4ff7b7c86-goog
>>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 0/2] arm64: mediatek: Enable efuse GPU speed bin post-processing
  2025-07-03 11:48   ` AngeloGioacchino Del Regno
@ 2025-07-10  8:42     ` Chen-Yu Tsai
  0 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2025-07-10  8:42 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: AngeloGioacchino Del Regno, linux-arm-kernel, linux-mediatek,
	devicetree, linux-kernel, Lala Lin, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Andrew-CT Chen

Srinivas,

On Thu, Jul 3, 2025 at 7:48 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>
> Il 01/07/25 11:15, Chen-Yu Tsai ha scritto:
> > Hi Angelo,
> >
> > On Tue, Jun 10, 2025 at 2:34 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
> >>
> >> Hi everyone,
> >>
> >> This is v2 of the MT8188 efuse GPU speed bin post-processing enablement
> >> patches. In v1 [1] the change was made to the driver. Angelo, the platform
> >> maintainer believes the change should be made to the DT binding instead
> >> [2]. v2 adopts Angelo's argument.
> >>
> >> Patch 1 updates the efuse DT binding so that MT8186 is a base compatible
> >> with no fallback, and MT8188 falls back to MT8186.
> >>
> >> Patch 2 updates the MT8188 DT to follow the new binding.
> >>
> >> If possible I would like to see both patches merged through the soc
> >> tree once the DT binding maintainers give an ack. This avoids prolonged
> >> waiting for the binding changes to land and uncertainty about whether
> >> things have fully landed or not.
> >>
> >>
> >> Thanks
> >> ChenYu
> >>
> >> [1] https://lore.kernel.org/all/20241223100648.2166754-1-wenst@chromium.org/
> >> [2] https://lore.kernel.org/all/11028242-afe4-474a-9d76-cd1bd9208987@collabora.com/
> >>
> >> Chen-Yu Tsai (2):
> >>    dt-bindings: nvmem: mediatek: efuse: split MT8186/MT8188 from base
> >>      version
> >>    arm64: dts: mediatek: mt8188: Change efuse fallback compatible to
> >>      mt8186
> >
> > Friendly ping. Please take a look and see if this scheme is to your liking.
> >
>
> For the whole series
>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Could you merge  the DT binding patch so that we can merge the DT change
ahead of -rc6? Or alternatively could you give an Ack so both patches
go through the soc tree?


Thanks
ChenYu

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: (subset) [PATCH v2 0/2] arm64: mediatek: Enable efuse GPU speed bin post-processing
  2025-06-10  6:34 [PATCH v2 0/2] arm64: mediatek: Enable efuse GPU speed bin post-processing Chen-Yu Tsai
                   ` (2 preceding siblings ...)
  2025-07-01  9:15 ` [PATCH v2 0/2] arm64: mediatek: Enable efuse GPU speed bin post-processing Chen-Yu Tsai
@ 2025-07-11 16:52 ` Srinivas Kandagatla
  3 siblings, 0 replies; 8+ messages in thread
From: Srinivas Kandagatla @ 2025-07-11 16:52 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew-CT Chen,
	Lala Lin, Matthias Brugger, AngeloGioacchino Del Regno,
	Chen-Yu Tsai
  Cc: linux-arm-kernel, linux-mediatek, devicetree, linux-kernel


On Tue, 10 Jun 2025 14:34:28 +0800, Chen-Yu Tsai wrote:
> This is v2 of the MT8188 efuse GPU speed bin post-processing enablement
> patches. In v1 [1] the change was made to the driver. Angelo, the platform
> maintainer believes the change should be made to the DT binding instead
> [2]. v2 adopts Angelo's argument.
> 
> Patch 1 updates the efuse DT binding so that MT8186 is a base compatible
> with no fallback, and MT8188 falls back to MT8186.
> 
> [...]

Applied, thanks!

[1/2] dt-bindings: nvmem: mediatek: efuse: split MT8186/MT8188 from base version
      commit: ce32f3cdfbc31dab626e20122e577f75ea46b940

Best regards,
-- 
Srinivas Kandagatla <srini@kernel.org>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-07-11 16:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-10  6:34 [PATCH v2 0/2] arm64: mediatek: Enable efuse GPU speed bin post-processing Chen-Yu Tsai
2025-06-10  6:34 ` [PATCH v2 1/2] dt-bindings: nvmem: mediatek: efuse: split MT8186/MT8188 from base version Chen-Yu Tsai
2025-06-10 15:18   ` Conor Dooley
2025-06-10  6:34 ` [PATCH v2 2/2] arm64: dts: mediatek: mt8188: Change efuse fallback compatible to mt8186 Chen-Yu Tsai
2025-07-01  9:15 ` [PATCH v2 0/2] arm64: mediatek: Enable efuse GPU speed bin post-processing Chen-Yu Tsai
2025-07-03 11:48   ` AngeloGioacchino Del Regno
2025-07-10  8:42     ` Chen-Yu Tsai
2025-07-11 16:52 ` (subset) " Srinivas Kandagatla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).