Skip to contentSkip to conversation

dt-bindings: mtd: arasan: Add ZynqMP props

PATCH Superseded Rob Herring (Arm) 3 participants 5 messages Sep 22 – Sep 25

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Rob Herring (Arm)

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: mtd: arasan: Add ZynqMP props

ZynqMP NAND controller nodes contain "num-cs" and "power-domains" properties. Add num-cs with a range of one to two chip selects and allow one power-domain.

Assisted-by LLM
---
 .../devicetree/bindings/mtd/arasan,nand-controller.yaml   | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml +8 -0
index b90d3b48c2f2..4262996dd51e 100644
@@ -35,6 +35,14 @@ properties:
   interrupts:
     maxItems: 1
 
+  num-cs:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+    maximum: 2
+
+  power-domains:
+    maxItems: 1
+
 required:
   - compatible
   - reg
Signature · 1 line
2.53.0
maintainer
#1 lore raw

Hi Rob,

Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml properties: · line 41

Quoted 4 lines
Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml +4 -0
+  num-cs:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+    maximum: 2

I am not sure I get what is the purpose of this property. It looks like a downstream property resurfacing. We expect one DT subnode per chip, so I don't see the need for num-cs, we just need to count the children nodes. For me, the correct fix is to drop num-cs from the upstream DT. The only real use for it would be if the hardware could be synthesized differently, with a single CS instead of 2, but I don't think it's the case here.

Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml properties: · line 44

Quoted 3 lines
Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml +3 -0
+
+  power-domains:
+    maxItems: 1

This one, even though we don't actively use it in Linux, it may serve a real purpose.

Thanks,
Miquèl

author maintainer
#2 lore raw
Quoted 7 lines · Miquel Raynal

Hi Rob,

Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml properties: · line 41

Quoted 4 lines
Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml +4 -0
+  num-cs:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+    maximum: 2
Quoted 7 lines

I am not sure I get what is the purpose of this property. It looks like a downstream property resurfacing. We expect one DT subnode per chip, so I don't see the need for num-cs, we just need to count the children nodes. For me, the correct fix is to drop num-cs from the upstream DT. The only real use for it would be if the hardware could be synthesized differently, with a single CS instead of 2, but I don't think it's the case here.

Indeed.

Quoted 6 lines

Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml properties: · line 44

Quoted 3 lines
Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml +3 -0
+
+  power-domains:
+    maxItems: 1

This one, even though we don't actively use it in Linux, it may serve a real purpose.

The driver core takes care of 'power-domains', so how is it not used?

Rob

maintainer
#3 lore raw
Quoted 18 lines · Rob Herring
Quoted 7 lines · Miquel Raynal

Hi Rob,

Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml properties: · line 41

Quoted 4 lines
Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml +4 -0
+  num-cs:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+    maximum: 2
Quoted 7 lines

I am not sure I get what is the purpose of this property. It looks like a downstream property resurfacing. We expect one DT subnode per chip, so I don't see the need for num-cs, we just need to count the children nodes. For me, the correct fix is to drop num-cs from the upstream DT. The only real use for it would be if the hardware could be synthesized differently, with a single CS instead of 2, but I don't think it's the case here.

Indeed.

Quoted 8 lines
Quoted 6 lines

Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml properties: · line 44

Quoted 3 lines
Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml +3 -0
+
+  power-domains:
+    maxItems: 1

This one, even though we don't actively use it in Linux, it may serve a real purpose.

The driver core takes care of 'power-domains', so how is it not used?

Yes, it is probably useful. I am pretty sure I did not use that property when I tested the driver, but the controller was either already set up by the Bootloader or in a domain enabled by another device. In both cases, it is worth adding.

reviewer
#4 lore raw
Quoted 27 lines · Miquel Raynal
Quoted 25 lines · Rob Herring
Quoted 7 lines · Miquel Raynal

Hi Rob,

Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml properties: · line 41

Quoted 4 lines
Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml +4 -0
+  num-cs:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+    maximum: 2
Quoted 7 lines

I am not sure I get what is the purpose of this property. It looks like a downstream property resurfacing. We expect one DT subnode per chip, so I don't see the need for num-cs, we just need to count the children nodes. For me, the correct fix is to drop num-cs from the upstream DT. The only real use for it would be if the hardware could be synthesized differently, with a single CS instead of 2, but I don't think it's the case here.

Indeed.

Quoted 6 lines

Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml properties: · line 44

Quoted 3 lines
Documentation/devicetree/bindings/mtd/arasan,nand-controller.yaml +3 -0
+
+  power-domains:
+    maxItems: 1

This one, even though we don't actively use it in Linux, it may serve a real purpose.

Quoted 6 lines
Quoted 1 line

The driver core takes care of 'power-domains', so how is it not used?

Yes, it is probably useful. I am pretty sure I did not use that property when I tested the driver, but the controller was either already set up by the Bootloader or in a domain enabled by another device. In both cases, it is worth adding.

It shouldn't be a problem to list it. We have never used it but obviously there is power domain.

Thanks,
Michal