diff mbox series

Revert "dt-bindings: usb: mtk-xhci: Make all clocks required"

Message ID 20220708192605.43351-1-nfraprado@collabora.com (mailing list archive)
State Accepted
Commit aae7948d564c614c26eb896eb8be57879146240c
Headers show
Series Revert "dt-bindings: usb: mtk-xhci: Make all clocks required" | expand

Commit Message

Nícolas F. R. A. Prado July 8, 2022, 7:26 p.m. UTC
This reverts commit ebc4969ae125e65fdb563f66f4bfa7aec95f7eb4. That
commit was supposed to make the binding better reflect the MediaTek XHCI
hardware block by requiring all clocks to be present. But doing that
also causes too much noise in the devicetrees, since it requires
updating old MediaTek DTs to add clock handles for the fixed clocks, and
going forward every new clock added to the binding would require even
more updates.

The commit also didn't update the example to match the changes, causing
additional warnings.

Instead let's keep the clocks optional so that old devicetrees can keep
omitting the fixed clocks, and we'll just add the clocks as required on
new DTs.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

---

 Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Chunfeng Yun (云春峰) July 11, 2022, 6:40 a.m. UTC | #1
On Fri, 2022-07-08 at 15:26 -0400, Nícolas F. R. A. Prado wrote:
> This reverts commit ebc4969ae125e65fdb563f66f4bfa7aec95f7eb4. That
> commit was supposed to make the binding better reflect the MediaTek
> XHCI
> hardware block by requiring all clocks to be present. But doing that
> also causes too much noise in the devicetrees, since it requires
> updating old MediaTek DTs to add clock handles for the fixed clocks,
> and
> going forward every new clock added to the binding would require even
> more updates.
> 
> The commit also didn't update the example to match the changes,
> causing
> additional warnings.
> 
> Instead let's keep the clocks optional so that old devicetrees can
> keep
> omitting the fixed clocks, and we'll just add the clocks as required
> on
> new DTs.
> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> 
> ---
> 
>  Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 4
> +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-
> xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-
> xhci.yaml
> index 1444d18ef9bc..63cbc2b62d18 100644
> --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> @@ -67,6 +67,7 @@ properties:
>      maxItems: 1
>  
>    clocks:
> +    minItems: 1
>      items:
>        - description: Controller clock used by normal mode
>        - description: Reference clock used by low power mode etc
> @@ -75,8 +76,9 @@ properties:
>        - description: controller clock
>  
>    clock-names:
> +    minItems: 1
>      items:
> -      - const: sys_ck
> +      - const: sys_ck  # required, the following ones are optional
>        - const: ref_ck
>        - const: mcu_ck
>        - const: dma_ck

Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>

Thanks a lot
AngeloGioacchino Del Regno July 11, 2022, 9:35 a.m. UTC | #2
Il 08/07/22 21:26, Nícolas F. R. A. Prado ha scritto:
> This reverts commit ebc4969ae125e65fdb563f66f4bfa7aec95f7eb4. That
> commit was supposed to make the binding better reflect the MediaTek XHCI
> hardware block by requiring all clocks to be present. But doing that
> also causes too much noise in the devicetrees, since it requires
> updating old MediaTek DTs to add clock handles for the fixed clocks, and
> going forward every new clock added to the binding would require even
> more updates.
> 
> The commit also didn't update the example to match the changes, causing
> additional warnings.
> 
> Instead let's keep the clocks optional so that old devicetrees can keep
> omitting the fixed clocks, and we'll just add the clocks as required on
> new DTs.
> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Rob Herring July 11, 2022, 2:34 p.m. UTC | #3
On Fri, Jul 8, 2022 at 1:26 PM Nícolas F. R. A. Prado
<nfraprado@collabora.com> wrote:
>
> This reverts commit ebc4969ae125e65fdb563f66f4bfa7aec95f7eb4. That
> commit was supposed to make the binding better reflect the MediaTek XHCI
> hardware block by requiring all clocks to be present. But doing that
> also causes too much noise in the devicetrees, since it requires
> updating old MediaTek DTs to add clock handles for the fixed clocks, and
> going forward every new clock added to the binding would require even
> more updates.
>
> The commit also didn't update the example to match the changes, causing
> additional warnings.
>
> Instead let's keep the clocks optional so that old devicetrees can keep
> omitting the fixed clocks, and we'll just add the clocks as required on
> new DTs.
>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>
> ---
>
>  Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Acked-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
index 1444d18ef9bc..63cbc2b62d18 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
@@ -67,6 +67,7 @@  properties:
     maxItems: 1
 
   clocks:
+    minItems: 1
     items:
       - description: Controller clock used by normal mode
       - description: Reference clock used by low power mode etc
@@ -75,8 +76,9 @@  properties:
       - description: controller clock
 
   clock-names:
+    minItems: 1
     items:
-      - const: sys_ck
+      - const: sys_ck  # required, the following ones are optional
       - const: ref_ck
       - const: mcu_ck
       - const: dma_ck