Skip to contentSkip to conversation

dt-bindings: mmc: Add support for rk3576 eMMC

PATCH In review Detlev Casanova 3 participants 4 messages Sep 4, 2024 – Sep 5, 2024

Subsystems (2)

v4 of 5 In review Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 cover dt-bindings: mmc: Add support for rk3576 eMMC

This patch has been extracted from the [0] patch set to be rebased on the next branch of the mmc tree as requested in [1].

[0]: https://lore.kernel.org/all/010201919989e3de-60b56341-85e0-4869-89d1-362407c4f2ec-000000@eu-west-1.amazonses.com/
[1]: https://lore.kernel.org/all/CAPDyKFoJoqwNTKvpK93QtK1wA9vzVUTzCrP32s_HEZcrujN2Mg@mail.gmail.com/

Changes since v3:
- Rebased on mmc tree's next branch
- Improve power-domains requirements
- Removed Reviewed-by: tag

Changes since v2:
- Move the allOf: after the required: block

Detlev.

Detlev Casanova (1):
dt-bindings: mmc: Add support for rk3576 eMMC

 .../bindings/mmc/snps,dwcmshc-sdhci.yaml      | 37 +++++++++++++++----
 1 file changed, 29 insertions(+), 8 deletions(-)
Signature · 1 line
2.46.0
#1 lore raw

PATCH v4 1/1 dt-bindings: mmc: Add support for rk3576 eMMC

The device is compatible with rk3588, so add an entry for the 2 compatibles together.

The rk3576 device has a power-domain that needs to be on for the eMMC to be used. Add it as a requirement.

---
 .../bindings/mmc/snps,dwcmshc-sdhci.yaml      | 37 +++++++++++++++----
 1 file changed, 29 insertions(+), 8 deletions(-)
Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +29 -8
index 80d50178d2e3..c3d5e0230af1 100644
@@ -12,14 +12,18 @@ maintainers:
 
 properties:
   compatible:
-    enum:
-      - rockchip,rk3568-dwcmshc
-      - rockchip,rk3588-dwcmshc
-      - snps,dwcmshc-sdhci
-      - sophgo,cv1800b-dwcmshc
-      - sophgo,sg2002-dwcmshc
-      - sophgo,sg2042-dwcmshc
-      - thead,th1520-dwcmshc
+    oneOf:
+      - items:
+          - const: rockchip,rk3576-dwcmshc
+          - const: rockchip,rk3588-dwcmshc
+      - enum:
+          - rockchip,rk3568-dwcmshc
+          - rockchip,rk3588-dwcmshc
+          - snps,dwcmshc-sdhci
+          - sophgo,cv1800b-dwcmshc
+          - sophgo,sg2002-dwcmshc
+          - sophgo,sg2042-dwcmshc
+          - thead,th1520-dwcmshc
 
   reg:
     maxItems: 1
@@ -35,6 +39,9 @@ properties:
     minItems: 1
     maxItems: 5
 
+  power-domains:
+    maxItems: 1
+
   resets:
     maxItems: 5
 
@@ -97,6 +104,20 @@ allOf:
             - const: block
             - const: timer
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: rockchip,rk3576-dwcmshc
+
+    then:
+      required:
+        - power-domains
+
+    else:
+      properties:
+        power-domains: false
+
 unevaluatedProperties: false
 
 examples:
Signature · 1 line
2.46.0
Reviewed-by on v4 1/1
#2 lore raw
Quoted 10 lines · Detlev Casanova

The device is compatible with rk3588, so add an entry for the 2 compatibles together.

The rk3576 device has a power-domain that needs to be on for the eMMC to be used. Add it as a requirement.

---
 .../bindings/mmc/snps,dwcmshc-sdhci.yaml      | 37 +++++++++++++++----
 1 file changed, 29 insertions(+), 8 deletions(-)

Best regards,
Krzysztof

#3 lore raw
In reply to Detlev Casanova
Quoted 8 lines · Detlev Casanova

The device is compatible with rk3588, so add an entry for the 2 compatibles together.

The rk3576 device has a power-domain that needs to be on for the eMMC to be used. Add it as a requirement.

Applied for next, thanks!

Kind regards
Uffe

Quoted 69 lines
---
 .../bindings/mmc/snps,dwcmshc-sdhci.yaml      | 37 +++++++++++++++----
 1 file changed, 29 insertions(+), 8 deletions(-)
Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +29 -9
index 80d50178d2e3..c3d5e0230af1 100644
@@ -12,14 +12,18 @@ maintainers:
 
 properties:
   compatible:
-    enum:
-      - rockchip,rk3568-dwcmshc
-      - rockchip,rk3588-dwcmshc
-      - snps,dwcmshc-sdhci
-      - sophgo,cv1800b-dwcmshc
-      - sophgo,sg2002-dwcmshc
-      - sophgo,sg2042-dwcmshc
-      - thead,th1520-dwcmshc
+    oneOf:
+      - items:
+          - const: rockchip,rk3576-dwcmshc
+          - const: rockchip,rk3588-dwcmshc
+      - enum:
+          - rockchip,rk3568-dwcmshc
+          - rockchip,rk3588-dwcmshc
+          - snps,dwcmshc-sdhci
+          - sophgo,cv1800b-dwcmshc
+          - sophgo,sg2002-dwcmshc
+          - sophgo,sg2042-dwcmshc
+          - thead,th1520-dwcmshc
 
   reg:
     maxItems: 1
@@ -35,6 +39,9 @@ properties:
     minItems: 1
     maxItems: 5
 
+  power-domains:
+    maxItems: 1
+
   resets:
     maxItems: 5
 
@@ -97,6 +104,20 @@ allOf:
             - const: block
             - const: timer
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: rockchip,rk3576-dwcmshc
+
+    then:
+      required:
+        - power-domains
+
+    else:
+      properties:
+        power-domains: false
+
 unevaluatedProperties: false
 
 examples:
--

2.46.0