public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: mtd: st,spear600-smi: convert to DT schema
@ 2026-02-25 15:02 Akhila YS
  2026-03-09 14:51 ` Miquel Raynal
  0 siblings, 1 reply; 3+ messages in thread
From: Akhila YS @ 2026-02-25 15:02 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-mtd, devicetree, linux-kernel, Akhila YS

Convert STMicroelectronics SPEAr600 Serial Memory Interface (SMI)
Controller binding to YAML format.

Signed-off-by: Akhila YS <akhilayalmati@gmail.com>
---
Changes in v2:
- Removed allOf ref as it is misleading the existing node.
- Defined pattern properties for the child node.
- Link to v1: https://lore.kernel.org/r/20260122-spear-v1-1-fd44bc79695b@gmail.com
---
 .../devicetree/bindings/mtd/spear_smi.txt          | 29 --------
 .../devicetree/bindings/mtd/st,spear600-smi.yaml   | 83 ++++++++++++++++++++++
 2 files changed, 83 insertions(+), 29 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/spear_smi.txt b/Documentation/devicetree/bindings/mtd/spear_smi.txt
deleted file mode 100644
index c41873e92d26..000000000000
--- a/Documentation/devicetree/bindings/mtd/spear_smi.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-* SPEAr SMI
-
-Required properties:
-- compatible : "st,spear600-smi"
-- reg : Address range of the mtd chip
-- #address-cells, #size-cells : Must be present if the device has sub-nodes
-  representing partitions.
-- interrupts: Should contain the STMMAC interrupts
-- clock-rate : Functional clock rate of SMI in Hz
-
-Optional properties:
-- st,smi-fast-mode : Flash supports read in fast mode
-
-Example:
-
-	smi: flash@fc000000 {
-		compatible = "st,spear600-smi";
-		#address-cells = <1>;
-		#size-cells = <1>;
-		reg = <0xfc000000 0x1000>;
-		interrupt-parent = <&vic1>;
-		interrupts = <12>;
-		clock-rate = <50000000>;	/* 50MHz */
-
-		flash@f8000000 {
-			st,smi-fast-mode;
-			...
-		};
-	};
diff --git a/Documentation/devicetree/bindings/mtd/st,spear600-smi.yaml b/Documentation/devicetree/bindings/mtd/st,spear600-smi.yaml
new file mode 100644
index 000000000000..189bc111b470
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/st,spear600-smi.yaml
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/st,spear600-smi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics SPEAr600 Serial Memory Interface (SMI) Controller
+
+maintainers:
+  - Richard Weinberger <richard@nod.at>
+
+description:
+  The SPEAr600 Serial Memory Interface (SMI) is a dedicated serial flash
+  controller supporting up to four chip selects for serial NOR flashes
+  connected in parallel. The controller is memory-mapped and the attached
+  flash devices appear in the CPU address space.The driver
+  (drivers/mtd/devices/spear_smi.c) probes the attached flashes
+  dynamically by sending commands (e.g., RDID) to each bank.
+  Flash sub nodes describe the memory range and optional per-flash
+  properties.
+
+properties:
+  compatible:
+    const: st,spear600-smi
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+  clock-rate:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Functional clock rate of the SMI controller in Hz.
+
+patternProperties:
+  "^flash@[0-9a-f]+$":
+    type: object
+
+    properties:
+      reg:
+        maxItems: 1
+
+      st,smi-fast-mode:
+        type: boolean
+        description:
+          Indicates that the attached flash supports fast read mode.
+
+    required:
+      - reg
+
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - clock-rate
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    flash@fc000000 {
+        compatible = "st,spear600-smi";
+        #address-cells = <1>;
+        #size-cells = <1>;
+        reg = <0xfc000000 0x1000>;
+        interrupt-parent = <&vic1>;
+        interrupts = <12>;
+        clock-rate = <50000000>;  /* 50 MHz */
+
+        flash@f8000000 {
+            reg = <0xf8000000 0x1000>;
+            st,smi-fast-mode;
+        };
+    };
+...

---
base-commit: cc3aa43b44bdb43dfbac0fcb51c56594a11338a8
change-id: 20260122-spear-e599dc4e7e32

Best regards,
-- 
Akhila YS <akhilayalmati@gmail.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] dt-bindings: mtd: st,spear600-smi: convert to DT schema
  2026-02-25 15:02 [PATCH v2] dt-bindings: mtd: st,spear600-smi: convert to DT schema Akhila YS
@ 2026-03-09 14:51 ` Miquel Raynal
  2026-03-10 15:09   ` Akhila YS
  0 siblings, 1 reply; 3+ messages in thread
From: Miquel Raynal @ 2026-03-09 14:51 UTC (permalink / raw)
  To: Akhila YS
  Cc: Richard Weinberger, Vignesh Raghavendra, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-mtd, devicetree,
	linux-kernel

Hello Akhila,

On 25/02/2026 at 15:02:50 GMT, Akhila YS <akhilayalmati@gmail.com> wrote:

> Convert STMicroelectronics SPEAr600 Serial Memory Interface (SMI)
> Controller binding to YAML format.
>
> Signed-off-by: Akhila YS <akhilayalmati@gmail.com>

Gasp :-) Good to see that you actually did fix the issues. Thanks for
doing that. But you've been sending a v2 for a patch that has already
landed in Torvalds' tree. In this case, there are only 2 possibilities:
- sending a revert of the former patch and then this one
- sending fixes like I did
In no case we can just apply this one as-is.

As it's been reviewed already by Rob, I'll take the 3 fixes that I
proposed.

[...]

> +  clock-rate:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: Functional clock rate of the SMI controller in Hz.

This clock property (which I did not address in my series) is apparently
not used anywhere upstream. This is a very legacy property, and my
feeling is that it has not been useful for quite some time already (due
to the CCF being able to provide a proper clock tree now). Hence we have
two choices: considering that it does not need to be described at all in
the yaml bindings because it is (very) deprecated property, we might
want to just drop it off. Otherwise you may send a patch specifically
for this addition, however in this case you need to flag it deprecated,
I believe.

Thanks,
Miquèl

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] dt-bindings: mtd: st,spear600-smi: convert to DT schema
  2026-03-09 14:51 ` Miquel Raynal
@ 2026-03-10 15:09   ` Akhila YS
  0 siblings, 0 replies; 3+ messages in thread
From: Akhila YS @ 2026-03-10 15:09 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-mtd, devicetree,
	linux-kernel


On 09-03-2026 20:21, Miquel Raynal wrote:
> Hello Akhila,
>
> On 25/02/2026 at 15:02:50 GMT, Akhila YS <akhilayalmati@gmail.com> wrote:
>
>> Convert STMicroelectronics SPEAr600 Serial Memory Interface (SMI)
>> Controller binding to YAML format.
>>
>> Signed-off-by: Akhila YS <akhilayalmati@gmail.com>
> Gasp :-) Good to see that you actually did fix the issues. Thanks for
> doing that. But you've been sending a v2 for a patch that has already
> landed in Torvalds' tree. In this case, there are only 2 possibilities:
> - sending a revert of the former patch and then this one
> - sending fixes like I did
> In no case we can just apply this one as-is.
>
> As it's been reviewed already by Rob, I'll take the 3 fixes that I
> proposed.


Okay, sure not an issue miquel.

>
> [...]
>
>> +  clock-rate:
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>> +    description: Functional clock rate of the SMI controller in Hz.
> This clock property (which I did not address in my series) is apparently
> not used anywhere upstream. This is a very legacy property, and my
> feeling is that it has not been useful for quite some time already (due
> to the CCF being able to provide a proper clock tree now). Hence we have
> two choices: considering that it does not need to be described at all in
> the yaml bindings because it is (very) deprecated property, we might
> want to just drop it off. Otherwise you may send a patch specifically
> for this addition, however in this case you need to flag it deprecated,
> I believe.


Okay.

>
> Thanks,
> Miquèl

-- 
Best Regards,
Akhila.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-10 15:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-25 15:02 [PATCH v2] dt-bindings: mtd: st,spear600-smi: convert to DT schema Akhila YS
2026-03-09 14:51 ` Miquel Raynal
2026-03-10 15:09   ` Akhila YS

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox