Skip to contentSkip to conversation

dt-bindings: memory-controller: st,stm32: Split off MC properties

PATCH Superseded Marek Vasut 2 participants 2 messages Sep 26, 2022

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: memory-controller: st,stm32: Split off MC properties

Split st,stm32-fmc2-ebi.yaml specific properties into st,stm32-fmc2-ebi-props.yaml , split memory-controller bus peripheral properties into mc-peripheral-props.yaml , reference the st,stm32-fmc2-ebi-props.yaml in mc-peripheral-props.yaml and reference the mc-peripheral-props.yaml in micrel,ks8851.yaml .

This way, the FMC2 controller properties in Micrel KSZ8851MLL ethernet controller node can be properly validated.

Fixes the following warning:

"
arch/arm/boot/dts/stm32mp153c-dhcor-drc-compact.dtb: ethernet@1,0: Unevaluated properties are not allowed ('bank-width', 'st,fmc2-ebi-cs-mux-enable', 'st,fmc2-ebi-cs-transaction-type', 'st,fmc2-ebi-cs-buswidth', 'st,fmc2-ebi-cs-address-setup-ns', 'st,fmc2-ebi-cs-address-hold-ns', 'st,fmc2-ebi-cs-bus-turnaround-ns', 'st,fmc2-ebi-cs-data-setup-ns', 'st,fmc2-ebi-cs-data-hold-ns', 'st,fmc2-ebi-cs-write-address-setup-ns', 'st,fmc2-ebi-cs-write-address-hold-ns', 'st,fmc2-ebi-cs-write-bus-turnaround-ns', 'st,fmc2-ebi-cs-write-data-setup-ns', 'st,fmc2-ebi-cs-write-data-hold-ns' were unexpected) "

---
Cc: Alexandre Torgue <[email protected]>
Cc: Christophe Kerello <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]
To: [email protected]

---
 .../mc-peripheral-props.yaml                  |  36 +++++
 .../st,stm32-fmc2-ebi-props.yaml              | 144 ++++++++++++++++++
 .../memory-controllers/st,stm32-fmc2-ebi.yaml | 137 -----------------
 .../bindings/net/micrel,ks8851.yaml           |   1 +
 4 files changed, 181 insertions(+), 137 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml
 create mode 100644 Documentation/devicetree/bindings/memory-controllers/st,stm32-fmc2-ebi-props.yaml
Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml new file +36 -0
new file mode 100644
index 0000000000000..442744a9b711d
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/memory-controllers/mc-peripheral-props.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Peripheral-specific properties for a Memory Controller bus.
+
+description:
+  Many MC controllers need to add properties to peripheral devices.
+  They could be common properties like reg or they could be controller
+  specific like delay in clock or data lines, etc. These properties need
+  to be defined in the peripheral node because they are per-peripheral
+  and there can be multiple peripherals attached to a controller. All
+  those properties are listed here. The controller specific properties
+  should go in their own separate schema that should be referenced
+  from here.
+
+maintainers:
+  - Marek Vasut <[email protected]>
+
+properties:
+  reg:
+    description: Bank number, base address and size of the device.
+
+  bank-width:
+    description: Bank width of the device, in bytes.
+
+required:
+  - reg
+
+# The controller specific properties go here.
+allOf:
+  - $ref: st,stm32-fmc2-ebi-props.yaml#
+
+additionalProperties: true
Documentation/devicetree/bindings/memory-controllers/st,stm32-fmc2-ebi-props.yaml new file +144 -0

144 lines not on this page · raw message

Documentation/devicetree/bindings/memory-controllers/st,stm32-fmc2-ebi.yaml +0 -137

143 lines not on this page · raw message

Documentation/devicetree/bindings/net/micrel,ks8851.yaml +1 -0
index 5aa7cf2eacb1a..b44d83554ef57 100644
@@ -44,6 +44,7 @@ required:
 
 allOf:
   - $ref: ethernet-controller.yaml#
+  - $ref: /schemas/memory-controllers/mc-peripheral-props.yaml#
   - if:
       properties:
         compatible:
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 41 lines · Marek Vasut

Split st,stm32-fmc2-ebi.yaml specific properties into st,stm32-fmc2-ebi-props.yaml , split memory-controller bus peripheral properties into mc-peripheral-props.yaml , reference the st,stm32-fmc2-ebi-props.yaml in mc-peripheral-props.yaml and reference the mc-peripheral-props.yaml in micrel,ks8851.yaml .

This way, the FMC2 controller properties in Micrel KSZ8851MLL ethernet controller node can be properly validated.

Fixes the following warning:

"
arch/arm/boot/dts/stm32mp153c-dhcor-drc-compact.dtb: ethernet@1,0: Unevaluated properties are not allowed ('bank-width', 'st,fmc2-ebi-cs-mux-enable', 'st,fmc2-ebi-cs-transaction-type', 'st,fmc2-ebi-cs-buswidth', 'st,fmc2-ebi-cs-address-setup-ns', 'st,fmc2-ebi-cs-address-hold-ns', 'st,fmc2-ebi-cs-bus-turnaround-ns', 'st,fmc2-ebi-cs-data-setup-ns', 'st,fmc2-ebi-cs-data-hold-ns', 'st,fmc2-ebi-cs-write-address-setup-ns', 'st,fmc2-ebi-cs-write-address-hold-ns', 'st,fmc2-ebi-cs-write-bus-turnaround-ns', 'st,fmc2-ebi-cs-write-data-setup-ns', 'st,fmc2-ebi-cs-write-data-hold-ns' were unexpected) "

---
Cc: Alexandre Torgue <[email protected]>
Cc: Christophe Kerello <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]
To: [email protected]

---
 .../mc-peripheral-props.yaml                  |  36 +++++
 .../st,stm32-fmc2-ebi-props.yaml              | 144 ++++++++++++++++++
 .../memory-controllers/st,stm32-fmc2-ebi.yaml | 137 -----------------
 .../bindings/net/micrel,ks8851.yaml           |   1 +
 4 files changed, 181 insertions(+), 137 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml
 create mode 100644 Documentation/devicetree/bindings/memory-controllers/st,stm32-fmc2-ebi-props.yaml
Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml new file +0 -0
new file mode 100644
index 0000000000000..442744a9b711d

Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml line 10

Quoted 10 lines
Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml new file +10 -0
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/memory-controllers/mc-peripheral-props.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Peripheral-specific properties for a Memory Controller bus.
+
+description:
+  Many MC controllers need to add properties to peripheral devices.

Memory Controller controllers?

Quoted 7 lines
Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml new file +7 -0
+  They could be common properties like reg or they could be controller
+  specific like delay in clock or data lines, etc. These properties need
+  to be defined in the peripheral node because they are per-peripheral
+  and there can be multiple peripherals attached to a controller. All
+  those properties are listed here. The controller specific properties
+  should go in their own separate schema that should be referenced
+  from here.

Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml line 27

Quoted 10 lines
Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml new file +10 -0
+
+maintainers:
+  - Marek Vasut <[email protected]>
+
+properties:
+  reg:
+    description: Bank number, base address and size of the device.
+
+  bank-width:
+    description: Bank width of the device, in bytes.

This needs a type and constraints (enum: [ 1, 2, 4 ]).

Other than that,

(I'm assuming Krzysztof takes this)