[PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for MT8370 SoC

Louis-Alexis Eyraud posted 3 patches 1 year ago
There is a newer version of this series
[PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for MT8370 SoC
Posted by Louis-Alexis Eyraud 1 year ago
Add a compatible for the MediaTek MT8370 SoC, with an
integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core).
This new compatible is needed for this SoC support, as the other
existing compatibles for the same GPU architecture (MT8188, MT8192) do
not match the required power domain number.
The other compatibles (especially MT8186) cannot be reused because of
GPU architecture difference.

Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
 Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
index 735c7f06c24e632ab738d062f15378f754c8adaf..6f6211950bb495fa6bfcdfe8d1e27e5ce7aeeae0 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
@@ -37,6 +37,7 @@ properties:
           - enum:
               - mediatek,mt8188-mali
               - mediatek,mt8192-mali
+              - mediatek,mt8370-mali
           - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable
 
   reg:
@@ -217,7 +218,9 @@ allOf:
       properties:
         compatible:
           contains:
-            const: mediatek,mt8186-mali
+            enum:
+              - mediatek,mt8186-mali
+              - mediatek,mt8370-mali
     then:
       properties:
         power-domains:

-- 
2.48.1
Re: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for MT8370 SoC
Posted by Krzysztof Kozlowski 12 months ago
On Fri, Feb 07, 2025 at 04:18:30PM +0100, Louis-Alexis Eyraud wrote:
> Add a compatible for the MediaTek MT8370 SoC, with an
> integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core).
> This new compatible is needed for this SoC support, as the other

You *always* need new compatible.

> existing compatibles for the same GPU architecture (MT8188, MT8192) do
> not match the required power domain number.
> The other compatibles (especially MT8186) cannot be reused because of
> GPU architecture difference.

Just FYI: you must not *ever* reuse compatibles. What you wanted is to
mark devices compatible and not. You claim devices are not compatible
because of this and that.

Please fix the commit msg because I am afraid later people will use it:
"I can reuse the compatible because that commit msg was acked".


Best regards,
Krzysztof
Re: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for MT8370 SoC
Posted by AngeloGioacchino Del Regno 12 months ago
Il 07/02/25 16:18, Louis-Alexis Eyraud ha scritto:
> Add a compatible for the MediaTek MT8370 SoC, with an
> integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core).
> This new compatible is needed for this SoC support, as the other
> existing compatibles for the same GPU architecture (MT8188, MT8192) do
> not match the required power domain number.
> The other compatibles (especially MT8186) cannot be reused because of
> GPU architecture difference.
> 
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>

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

> ---
>   Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
> index 735c7f06c24e632ab738d062f15378f754c8adaf..6f6211950bb495fa6bfcdfe8d1e27e5ce7aeeae0 100644
> --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
> @@ -37,6 +37,7 @@ properties:
>             - enum:
>                 - mediatek,mt8188-mali
>                 - mediatek,mt8192-mali
> +              - mediatek,mt8370-mali
>             - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable
>   
>     reg:
> @@ -217,7 +218,9 @@ allOf:
>         properties:
>           compatible:
>             contains:
> -            const: mediatek,mt8186-mali
> +            enum:
> +              - mediatek,mt8186-mali
> +              - mediatek,mt8370-mali
>       then:
>         properties:
>           power-domains:
>