Skip to contentSkip to conversation

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

PATCH Applied Marek Vasut 2 participants 2 messages Sep 28, 2022 – Oct 18, 2022

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

PATCH v3 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]
---
V2: - Depends on bugfix [PATCH] dt-bindings: memory-controller: st,stm32: Fix st,fmc2_ebi-cs-write-address-setup-ns
- Replace MC controllers with Memory Controllers
- Add type uint32 and enum 1,2,4 to bank-width prop
- Add RB from Rob
V3: - Add ref: mc-peripheral-props.yaml# to patternProperties with great
explanation by Krzysztof (big thanks!)

---
 .../mc-peripheral-props.yaml                  |  38 +++++
 .../st,stm32-fmc2-ebi-props.yaml              | 144 ++++++++++++++++++
 .../memory-controllers/st,stm32-fmc2-ebi.yaml | 138 +----------------
 .../bindings/net/micrel,ks8851.yaml           |   1 +
 4 files changed, 184 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 +38 -0
new file mode 100644
index 0000000000000..53ae995462db7
@@ -0,0 +1,38 @@
+# 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 Memory 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:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Bank width of the device, in bytes.
+    enum: [1, 2, 4]
+
+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 +1 -137

144 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
#1 lore raw
Quoted 9 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.

[...]

Applied, thanks!

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

      https://git.kernel.org/krzk/linux-mem-ctrl/c/895af530081df499c6308488eabf166a2f1deab8

Best regards,

Signature · 1 line
Krzysztof Kozlowski <[email protected]>