[PATCH 03/12] dt-bindings: phy: mediatek,hdmi-phy: Document extra clocks for MT8195

Louis-Alexis Eyraud posted 12 patches 1 week, 3 days ago
There is a newer version of this series
[PATCH 03/12] dt-bindings: phy: mediatek,hdmi-phy: Document extra clocks for MT8195
Posted by Louis-Alexis Eyraud 1 week, 3 days ago
From: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>

MT8195's HDMI PHY block has 4 clocks instead of just a single one.
Describe the extra clocks for it.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
 .../devicetree/bindings/phy/mediatek,hdmi-phy.yaml | 36 +++++++++++++++++++---
 1 file changed, 32 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/mediatek,hdmi-phy.yaml b/Documentation/devicetree/bindings/phy/mediatek,hdmi-phy.yaml
index cd4ac42ee45e4648ed512f68f6f28d1f3f2e1116..91f8118689d5e838c4d75264822bb09a00fea21b 100644
--- a/Documentation/devicetree/bindings/phy/mediatek,hdmi-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/mediatek,hdmi-phy.yaml
@@ -38,12 +38,12 @@ properties:
     maxItems: 1
 
   clocks:
-    items:
-      - description: PLL reference clock
+    minItems: 1
+    maxItems: 4
 
   clock-names:
-    items:
-      - const: pll_ref
+    minItems: 1
+    maxItems: 4
 
   clock-output-names:
     maxItems: 1
@@ -79,6 +79,34 @@ required:
   - "#phy-cells"
   - "#clock-cells"
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          const: mediatek,mt8195-hdmi-phy
+    then:
+      properties:
+        clocks:
+          items:
+            - description: PLL reference clock
+            - description: HDMI 26MHz clock
+            - description: HDMI PLL1 clock
+            - description: HDMI PLL2 clock
+        clock-names:
+          items:
+            - const: pll_ref
+            - const: hdmi_26m
+            - const: hdmi_pll1
+            - const: hdmi_pll2
+    else:
+      properties:
+        clocks:
+          items:
+            - description: PLL reference clock
+        clock-names:
+          items:
+            - const: pll_ref
+
 additionalProperties: false
 
 examples:

-- 
2.52.0

Re: [PATCH 03/12] dt-bindings: phy: mediatek,hdmi-phy: Document extra clocks for MT8195
Posted by Rob Herring 1 week, 1 day ago
On Tue, Dec 09, 2025 at 05:34:33PM +0100, Louis-Alexis Eyraud wrote:
> From: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
> 
> MT8195's HDMI PHY block has 4 clocks instead of just a single one.
> Describe the extra clocks for it.
> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
> ---
>  .../devicetree/bindings/phy/mediatek,hdmi-phy.yaml | 36 +++++++++++++++++++---
>  1 file changed, 32 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/mediatek,hdmi-phy.yaml b/Documentation/devicetree/bindings/phy/mediatek,hdmi-phy.yaml
> index cd4ac42ee45e4648ed512f68f6f28d1f3f2e1116..91f8118689d5e838c4d75264822bb09a00fea21b 100644
> --- a/Documentation/devicetree/bindings/phy/mediatek,hdmi-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/mediatek,hdmi-phy.yaml
> @@ -38,12 +38,12 @@ properties:
>      maxItems: 1
>  
>    clocks:
> -    items:
> -      - description: PLL reference clock
> +    minItems: 1
> +    maxItems: 4
>  
>    clock-names:
> -    items:
> -      - const: pll_ref
> +    minItems: 1
> +    maxItems: 4
>  
>    clock-output-names:
>      maxItems: 1
> @@ -79,6 +79,34 @@ required:
>    - "#phy-cells"
>    - "#clock-cells"
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          const: mediatek,mt8195-hdmi-phy

You just said mt8188 is compatible, but it's excluded here. If mt8188 
can work without knowing about the 3 new clocks (and no driver changes), 
then it is compatible .

> +    then:
> +      properties:
> +        clocks:
> +          items:
> +            - description: PLL reference clock
> +            - description: HDMI 26MHz clock
> +            - description: HDMI PLL1 clock
> +            - description: HDMI PLL2 clock
> +        clock-names:
> +          items:
> +            - const: pll_ref
> +            - const: hdmi_26m
> +            - const: hdmi_pll1
> +            - const: hdmi_pll2

Move all this to the top-level (so just add entries 2-4) and add 
'minItems: 1'. Here, just put 'minItems: 4' except that I assume it did 
work with 1 clock, so requiring 4 breaks the ABI.

Also, drop 'hdmi_'. It's redundant.

> +    else:
> +      properties:
> +        clocks:
> +          items:
> +            - description: PLL reference clock
> +        clock-names:
> +          items:
> +            - const: pll_ref

And here, just 'maxItems: 1'

> +
>  additionalProperties: false
>  
>  examples:
> 
> -- 
> 2.52.0
>