Skip to contentSkip to conversation

dt-bindings: mmc: Add support for rk3576 eMMC

PATCH NAK Detlev Casanova 3 participants 7 messages Sep 3, 2024 – Sep 4, 2024

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

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/

Detlev.

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

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

PATCH 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      | 34 ++++++++++++++-----
 1 file changed, 26 insertions(+), 8 deletions(-)
Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +26 -8
index 80d50178d2e3..84a667f0c526 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,17 @@ allOf:
             - const: block
             - const: timer
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: rockchip,rk3576-dwcmshc
+
+    then:
+      properties:
+        power-domains:
+          minItems: 1
+
 unevaluatedProperties: false
 
 examples:
Signature · 1 line
2.46.0
#2 lore raw
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.

NAK

Drop fake tag. It is impossible to receive a review-tag from me on THE FIRST version. I almost never provide reviews out of mailing lists.

And since there is no changelog here and no versioning, this obviously is not v2 or v3.

Quoted 49 lines
---
 .../bindings/mmc/snps,dwcmshc-sdhci.yaml      | 34 ++++++++++++++-----
 1 file changed, 26 insertions(+), 8 deletions(-)
Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +15 -8
index 80d50178d2e3..84a667f0c526 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,17 @@ allOf:
             - const: block
             - const: timer
 

Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml allOf: · line 116

Quoted 10 lines
Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +10 -0
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: rockchip,rk3576-dwcmshc
+
+    then:
+      properties:
+        power-domains:
+          minItems: 1

Why minItems? This does not look right. I don't get what you are trying to say here.

Best regards,
Krzysztof

#3 lore raw
Quoted 10 lines · On Wednesday, 4 September 2024 02:00:27 EDT Krzysztof Kozlowski wrote:
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.

Quoted 7 lines

NAK

Drop fake tag. It is impossible to receive a review-tag from me on THE FIRST version. I almost never provide reviews out of mailing lists.

And since there is no changelog here and no versioning, this obviously is not v2 or v3.

That's because the patch was from another patchset[0]. Only this patch needed a rebase on the mmc tree, so I sent it separately. You reviewed it here [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/m5ua5jnbv4u36glqt2qrps35asuqfycxedgjrfhodi5bvs2r2h@xvy4qxt4gx74/

Quoted 53 lines
Quoted 53 lines

---

 .../bindings/mmc/snps,dwcmshc-sdhci.yaml      | 34 ++++++++++++++-----
 1 file changed, 26 insertions(+), 8 deletions(-)
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml index 80d50178d2e3..84a667f0c526 100644

Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +15 -8
@@ -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,17 @@ allOf:
             - const: block
             - const: timer
 
Quoted 13 lines

Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml allOf: · line 116

Quoted 10 lines
Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +10 -0
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: rockchip,rk3576-dwcmshc
+
+    then:
+      properties:
+        power-domains:
+          minItems: 1

Why minItems? This does not look right. I don't get what you are trying to say here.

I'm saying that for the rockchip,rk3576-dwcmshc compatible, 1 power-domain node has to be set.

Regards,
Detlev.

#4 lore raw
Quoted 16 lines · Detlev Casanova
Quoted 15 lines · On Wednesday, 4 September 2024 02:00:27 EDT Krzysztof Kozlowski wrote:
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.

NAK

Drop fake tag. It is impossible to receive a review-tag from me on THE FIRST version. I almost never provide reviews out of mailing lists.

Quoted 8 lines
Quoted 2 lines

And since there is no changelog here and no versioning, this obviously is not v2 or v3.

That's because the patch was from another patchset[0]. Only this patch needed a rebase on the mmc tree, so I sent it separately. You reviewed it here [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/m5ua5jnbv4u36glqt2qrps35asuqfycxedgjrfhodi5bvs2r2h@xvy4qxt4gx74/

Hm, ok, changelog should explained this and the versioning should continue, including history of this patch.

Quoted 68 lines
Quoted 54 lines
Quoted 54 lines

---

 .../bindings/mmc/snps,dwcmshc-sdhci.yaml      | 34 ++++++++++++++-----
 1 file changed, 26 insertions(+), 8 deletions(-)
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml index 80d50178d2e3..84a667f0c526 100644

Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +15 -8
@@ -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,17 @@ allOf:
             - const: block
             - const: timer
 
Quoted 13 lines

Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml allOf: · line 116

Quoted 10 lines
Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +10 -0
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: rockchip,rk3576-dwcmshc
+
+    then:
+      properties:
+        power-domains:
+          minItems: 1

Why minItems? This does not look right. I don't get what you are trying to say here.

Quoted 2 lines

I'm saying that for the rockchip,rk3576-dwcmshc compatible, 1 power-domain node has to be set.

The top-level property already says this. You need to disallow it for other variants (:false).

Best regards,
Krzysztof

#5 lore raw
Quoted 24 lines · On Wednesday, 4 September 2024 09:02:40 EDT Krzysztof Kozlowski wrote:
Quoted 23 lines · Detlev Casanova
Quoted 10 lines · On Wednesday, 4 September 2024 02:00:27 EDT Krzysztof Kozlowski wrote:
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.

Quoted 7 lines

NAK

Drop fake tag. It is impossible to receive a review-tag from me on THE FIRST version. I almost never provide reviews out of mailing lists.

And since there is no changelog here and no versioning, this obviously is not v2 or v3.

That's because the patch was from another patchset[0]. Only this patch needed a rebase on the mmc tree, so I sent it separately. You reviewed it here [1].

Quoted 7 lines
Quoted 5 lines

[0]:
https://lore.kernel.org/all/010201919989e3de-60b56341-85e0-4869-89d1-3624
[email protected]/ [1]:
https://lore.kernel.org/all/m5ua5jnbv4u36glqt2qrps35asuqfycxedgjrfhodi5bv
s2r2h@xvy4qxt4gx74/

Hm, ok, changelog should explained this and the versioning should continue, including history of this patch.

Sorry about that, I'll send a v4 after this one with the corresponding changelog then.

Quoted 68 lines
Quoted 68 lines
Quoted 67 lines
Quoted 54 lines

---

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

diff --git a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml index 80d50178d2e3..84a667f0c526 100644

Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +15 -8
@@ -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,17 @@ allOf:
             - const: block
             - const: timer
 

Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml allOf: · line 116

Quoted 10 lines
Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +10 -0
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: rockchip,rk3576-dwcmshc
+
+    then:
+      properties:
+        power-domains:
+          minItems: 1

Why minItems? This does not look right. I don't get what you are trying to say here.

Quoted 5 lines
Quoted 2 lines

I'm saying that for the rockchip,rk3576-dwcmshc compatible, 1 power-domain node has to be set.

The top-level property already says this. You need to disallow it for other variants (:false).

Ok, something like this:

allOf:
- if:
properties:
compatible:
contains:
const: rockchip,rk3576-dwcmshc

then:
required:
- power-domains

else:
properties:
power-domains: false

Detlev.

#6 lore raw
Quoted 22 lines · Detlev Casanova
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +3 -0
+      properties:
+        power-domains:
+          minItems: 1
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Why minItems? This does not look right. I don't get what you are trying to say here.

I'm saying that for the rockchip,rk3576-dwcmshc compatible, 1 power-domain node has to be set.

The top-level property already says this. You need to disallow it for other variants (:false).

Ok, something like this:

allOf:
- if:
properties:
compatible:
contains:
const: rockchip,rk3576-dwcmshc

Quoted 7 lines

then:
required:
- power-domains

else:
properties:
power-domains: false

Yes, if they are required. Otherwise use "if: not:" and just disallow them.

Best regards,
Krzysztof