All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaunak Datar <shaunakkdatar@gmail.com>
To: lee@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org
Cc: nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com,
	claudiu.beznea@tuxon.dev, devicetree@vger.kernel.org,
	mfd@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	Shaunak Datar <shaunakkdatar@gmail.com>
Subject: [PATCH] dt-bindings: mfd: atmel,at91sam9260-smc: Convert to DT schema
Date: Sat,  5 Dec 2026 03:01:15 +0530	[thread overview]
Message-ID: <20261204213115.366227-1-shaunakkdatar@gmail.com> (raw)

Convert the Atmel SMC binding to DT Schema format.

Changes during conversion:
- Add the "atmel,at91sam9260-smc" fallback for sam9x60, as used in DTS
- Add "simple-mfd", interrupts, clocks, #address-cells, #size-cells,
  ranges and the ecc-engine child node, as used on sama5 SoCs

Signed-off-by: Shaunak Datar <shaunakkdatar@gmail.com>
---
 .../bindings/mfd/atmel,at91sam9260-smc.yaml   | 105 ++++++++++++++++++
 .../devicetree/bindings/mfd/atmel-smc.txt     |  22 ----
 2 files changed, 105 insertions(+), 22 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/atmel,at91sam9260-smc.yaml
 delete mode 100644 Documentation/devicetree/bindings/mfd/atmel-smc.txt

diff --git a/Documentation/devicetree/bindings/mfd/atmel,at91sam9260-smc.yaml b/Documentation/devicetree/bindings/mfd/atmel,at91sam9260-smc.yaml
new file mode 100644
index 000000000000..1c439b7081e0
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/atmel,at91sam9260-smc.yaml
@@ -0,0 +1,105 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/atmel,at91sam9260-smc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip AT91 Static Memory Controller (SMC)
+
+maintainers:
+  - Nicolas Ferre <nicolas.ferre@microchip.com>
+
+description:
+  The SMC registers are used to configure Atmel EBI (External Bus Interface)
+  to interface with standard memory devices (NAND, NOR, SRAM or specialized
+  devices like FPGAs).
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: atmel,at91sam9260-smc
+          - const: syscon
+      - items:
+          - enum:
+              - microchip,sam9x60-smc
+              - microchip,sam9x7-smc
+          - const: atmel,at91sam9260-smc
+          - const: syscon
+      - items:
+          - enum:
+              - atmel,sama5d2-smc
+              - atmel,sama5d3-smc
+          - const: syscon
+          - const: simple-mfd
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+  ranges: true
+
+patternProperties:
+  "^ecc-engine@[0-9a-f]+$":
+    type: object
+    description: PMECC engine (still a .txt binding, mtd/atmel-nand.txt)
+    additionalProperties: true
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: atmel,at91sam9260-smc
+    then:
+      properties:
+        interrupts: false
+        clocks: false
+        "#address-cells": false
+        "#size-cells": false
+        ranges: false
+      patternProperties:
+        "^ecc-engine@[0-9a-f]+$": false
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/clock/at91.h>
+
+    smc@ffffc000 {
+        compatible = "atmel,sama5d3-smc", "syscon", "simple-mfd";
+        reg = <0xffffc000 0x1000>;
+        interrupts = <5 IRQ_TYPE_LEVEL_HIGH 6>;
+        clocks = <&pmc PMC_TYPE_PERIPHERAL 5>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges;
+
+        ecc-engine@ffffc070 {
+            compatible = "atmel,at91sam9g45-pmecc";
+            reg = <0xffffc070 0x490>,
+                  <0xffffc500 0x100>;
+        };
+    };
+  - |
+    smc@ffffec00 {
+        compatible = "atmel,at91sam9260-smc", "syscon";
+        reg = <0xffffec00 0x200>;
+    };
diff --git a/Documentation/devicetree/bindings/mfd/atmel-smc.txt b/Documentation/devicetree/bindings/mfd/atmel-smc.txt
deleted file mode 100644
index fd62add38a79..000000000000
--- a/Documentation/devicetree/bindings/mfd/atmel-smc.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-* Device tree bindings for Atmel SMC (Static Memory Controller)
-
-The SMC registers are used to configure Atmel EBI (External Bus Interface)
-to interface with standard memory devices (NAND, NOR, SRAM or specialized
-devices like FPGAs).
-
-Required properties:
-- compatible:		Should be one of the following
-			"atmel,at91sam9260-smc", "syscon"
-			"atmel,sama5d3-smc", "syscon"
-			"atmel,sama5d2-smc", "syscon"
-			"microchip,sam9x60-smc", "syscon"
-			"microchip,sam9x7-smc", "atmel,at91sam9260-smc", "syscon"
-- reg:			Contains offset/length value of the SMC memory
-			region.
-
-Example:
-
-smc: smc@ffffc000 {
-	compatible = "atmel,sama5d3-smc", "syscon";
-	reg = <0xffffc000 0x1000>;
-};
-- 
2.53.0


             reply	other threads:[~2026-12-04 21:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 21:31 Shaunak Datar [this message]
2026-12-04 21:41 ` [PATCH] dt-bindings: mfd: atmel,at91sam9260-smc: Convert to DT schema sashiko-bot
2026-12-05 14:21 ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261204213115.366227-1-shaunakkdatar@gmail.com \
    --to=shaunakkdatar@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mfd@lists.linux.dev \
    --cc=nicolas.ferre@microchip.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.