Skip to contentSkip to conversation

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

PATCH In review Nícolas F. R. A. Prado 4 participants 4 messages Jul 8, 2022 – Jul 11, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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

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.

---

 Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml +3 -1
index 1444d18ef9bc..63cbc2b62d18 100644
@@ -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
Signature · 1 line
2.37.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 43 lines · Nícolas F. R. A. Prado

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.

---

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

xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk- xhci.yaml
index 1444d18ef9bc..63cbc2b62d18 100644

Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml +1 -0
@@ -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

Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml properties: · line 84

Quoted 10 lines
Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml +2 -1
@@ -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

Thanks a lot

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Nícolas F. R. A. Prado

Il 08/07/22 21:26, Nícolas F. R. A. Prado ha scritto:

Quoted 11 lines

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.

Quoted 6 lines

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.

Acked-by on v1 1/1
#3 lore raw
In reply to Nícolas F. R. A. Prado
Quoted 16 lines · Nícolas F. R. A. Prado

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.

Quoted 6 lines

---

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