* [PATCH] dt-bindings: mfd: atmel,at91sam9260-smc: Convert to DT schema
@ 2026-12-04 21:31 Shaunak Datar
2026-12-04 21:41 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Shaunak Datar @ 2026-12-04 21:31 UTC (permalink / raw)
To: lee, robh, krzk+dt, conor+dt
Cc: nicolas.ferre, alexandre.belloni, claudiu.beznea, devicetree, mfd,
linux-arm-kernel, Shaunak Datar
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dt-bindings: mfd: atmel,at91sam9260-smc: Convert to DT schema
2026-12-04 21:31 [PATCH] dt-bindings: mfd: atmel,at91sam9260-smc: Convert to DT schema Shaunak Datar
@ 2026-12-04 21:41 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-12-04 21:41 UTC (permalink / raw)
To: Shaunak Datar; +Cc: devicetree, mfd, robh, conor+dt, lee
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] dt-bindings: mfd: list clocks before interrupts in
at91sam9260-smc schema
- [Low] dt-bindings: mfd: require HSMC properties for sama5d2/sama5d3
SMC variants
--
commit d92963d3fbeffd353c3324e4b88214ffe84f51da
Author: Shaunak Datar <shaunakkdatar@gmail.com>
dt-bindings: mfd: atmel,at91sam9260-smc: Convert to DT schema
This patch converts the legacy Atmel SMC text binding to DT schema YAML
and documents the HSMC properties and child node used on SAMA5 SoCs.
> 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 0000000000000..1c439b7081e03
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/atmel,at91sam9260-smc.yaml
> @@ -0,0 +1,105 @@
[ ... ]
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
[Severity: Low]
Should clocks be listed before interrupts here, in the allOf block, and
in the smc@ffffc000 example?
DT binding schemas and DTS examples follow the canonical order of
compatible, reg, clocks, interrupts.
[ ... ]
> +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
[Severity: Low]
Should this allOf conditional include an else branch requiring clocks,
interrupts, #address-cells, #size-cells, and ranges for the SAMA5
variants?
Without it, atmel,sama5d2-smc and atmel,sama5d3-smc nodes missing these
properties still pass dtbs_check, even though they require simple-mfd and
atmel_hsmc_nand_controller_init() fails probe with -ENXIO if the
interrupt is absent.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204213115.366227-1-shaunakkdatar@gmail.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-04 21:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 21:31 [PATCH] dt-bindings: mfd: atmel,at91sam9260-smc: Convert to DT schema Shaunak Datar
2026-12-04 21:41 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox