linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "dt-bindings: usb: mtk-xhci: Make all clocks required"
@ 2022-07-08 19:26 Nícolas F. R. A. Prado
  2022-07-11  6:40 ` Chunfeng Yun
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-07-08 19:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: kernel, AngeloGioacchino Del Regno, Nícolas F. R. A. Prado,
	Chunfeng Yun, Krzysztof Kozlowski, Matthias Brugger, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-mediatek,
	linux-usb

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
-- 
2.37.0


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

* Re: [PATCH] Revert "dt-bindings: usb: mtk-xhci: Make all clocks required"
  2022-07-08 19:26 [PATCH] Revert "dt-bindings: usb: mtk-xhci: Make all clocks required" Nícolas F. R. A. Prado
@ 2022-07-11  6:40 ` Chunfeng Yun
  2022-07-11  9:35 ` AngeloGioacchino Del Regno
  2022-07-11 14:34 ` Rob Herring
  2 siblings, 0 replies; 4+ messages in thread
From: Chunfeng Yun @ 2022-07-11  6:40 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado, Greg Kroah-Hartman
  Cc: kernel, AngeloGioacchino Del Regno, Krzysztof Kozlowski,
	Matthias Brugger, Rob Herring, devicetree, linux-arm-kernel,
	linux-kernel, linux-mediatek, linux-usb

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




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

* Re: [PATCH] Revert "dt-bindings: usb: mtk-xhci: Make all clocks required"
  2022-07-08 19:26 [PATCH] Revert "dt-bindings: usb: mtk-xhci: Make all clocks required" Nícolas F. R. A. Prado
  2022-07-11  6:40 ` Chunfeng Yun
@ 2022-07-11  9:35 ` AngeloGioacchino Del Regno
  2022-07-11 14:34 ` Rob Herring
  2 siblings, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-07-11  9:35 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado, Greg Kroah-Hartman
  Cc: kernel, Chunfeng Yun, Krzysztof Kozlowski, Matthias Brugger,
	Rob Herring, devicetree, linux-arm-kernel, linux-kernel,
	linux-mediatek, linux-usb

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>


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

* Re: [PATCH] Revert "dt-bindings: usb: mtk-xhci: Make all clocks required"
  2022-07-08 19:26 [PATCH] Revert "dt-bindings: usb: mtk-xhci: Make all clocks required" Nícolas F. R. A. Prado
  2022-07-11  6:40 ` Chunfeng Yun
  2022-07-11  9:35 ` AngeloGioacchino Del Regno
@ 2022-07-11 14:34 ` Rob Herring
  2 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2022-07-11 14:34 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: Greg Kroah-Hartman, Collabora Kernel ML,
	AngeloGioacchino Del Regno, Chunfeng Yun, Krzysztof Kozlowski,
	Matthias Brugger, devicetree, linux-arm-kernel, linux-kernel,
	moderated list:ARM/Mediatek SoC support, Linux USB List

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>

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

end of thread, other threads:[~2022-07-11 14:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-08 19:26 [PATCH] Revert "dt-bindings: usb: mtk-xhci: Make all clocks required" Nícolas F. R. A. Prado
2022-07-11  6:40 ` Chunfeng Yun
2022-07-11  9:35 ` AngeloGioacchino Del Regno
2022-07-11 14:34 ` Rob Herring

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).