* [PATCH] ASoC: dt-bindings: sound: atmel_ac97c: Convert to DT schema
@ 2026-05-24 18:33 Manish Baing
2026-05-24 18:48 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Manish Baing @ 2026-05-24 18:33 UTC (permalink / raw)
To: claudiu.beznea, andrei.simion, lgirdwood, broonie, robh, krzk+dt,
conor+dt, nicolas.ferre, alexandre.belloni
Cc: linux-sound, devicetree, linux-arm-kernel, linux-kernel,
manishbaing2789
Convert the Atmel AC97 controller binding from text
format to YAML schema.
Signed-off-by: Manish Baing <manishbaing2789@gmail.com>
---
.../sound/atmel,at91sam9263-ac97c.yaml | 60 +++++++++++++++++++
.../devicetree/bindings/sound/atmel_ac97c.txt | 20 -------
2 files changed, 60 insertions(+), 20 deletions(-)
create mode 100644 Documentation/devicetree/bindings/sound/atmel,at91sam9263-ac97c.yaml
delete mode 100644 Documentation/devicetree/bindings/sound/atmel_ac97c.txt
diff --git a/Documentation/devicetree/bindings/sound/atmel,at91sam9263-ac97c.yaml b/Documentation/devicetree/bindings/sound/atmel,at91sam9263-ac97c.yaml
new file mode 100644
index 000000000000..870532927164
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/atmel,at91sam9263-ac97c.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/atmel,at91sam9263-ac97c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Atmel AC97 Controller
+
+maintainers:
+ - Nicolas Ferre <nicolas.ferre@microchip.com>
+ - Alexandre Belloni <alexandre.belloni@bootlin.com>
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ const: atmel,at91sam9263-ac97c
+
+ reg:
+ maxItems: 1
+ description: Address and length of the register set for the device.
+
+ interrupts:
+ maxItems: 1
+ description: Should contain the AC97 interrupt.
+
+ ac97-gpios:
+ minItems: 3
+ maxItems: 4
+ description: |
+ AC97 link GPIOs- sync, sdata_out, reset, and optional sdata_in.
+ The driver primarily uses the reset pin.
+
+ pinctrl-0: true
+
+ pinctrl-names:
+ const: default
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - ac97-gpios
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/gpio/gpio.h>
+
+ sound@fffa0000 {
+ compatible = "atmel,at91sam9263-ac97c";
+ reg = <0xfffa0000 0x4000>;
+ interrupts = <18 IRQ_TYPE_LEVEL_HIGH 5>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ac97>;
+ ac97-gpios = <&pioB 0 0>, <&pioB 2 0>, <&pioC 29 GPIO_ACTIVE_LOW>;
+ };
diff --git a/Documentation/devicetree/bindings/sound/atmel_ac97c.txt b/Documentation/devicetree/bindings/sound/atmel_ac97c.txt
deleted file mode 100644
index b151bd902ce3..000000000000
--- a/Documentation/devicetree/bindings/sound/atmel_ac97c.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-* Atmel AC97 controller
-
-Required properties:
- - compatible: "atmel,at91sam9263-ac97c"
- - reg: Address and length of the register set for the device
- - interrupts: Should contain AC97 interrupt
- - ac97-gpios: Please refer to soc-ac97link.txt, only ac97-reset is used
-Optional properties:
- - pinctrl-names, pinctrl-0: Please refer to pinctrl-bindings.txt
-
-Example:
-sound@fffa0000 {
- compatible = "atmel,at91sam9263-ac97c";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_ac97>;
- reg = <0xfffa0000 0x4000>;
- interrupts = <18 IRQ_TYPE_LEVEL_HIGH 5>;
-
- ac97-gpios = <&pioB 0 0 &pioB 2 0 &pioC 29 GPIO_ACTIVE_LOW>;
-};
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: dt-bindings: sound: atmel_ac97c: Convert to DT schema
2026-05-24 18:33 [PATCH] ASoC: dt-bindings: sound: atmel_ac97c: Convert to DT schema Manish Baing
@ 2026-05-24 18:48 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-05-24 18:48 UTC (permalink / raw)
To: Manish Baing; +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The YAML schema omits the `clocks` and `clock-names` properties, causing validation failures for existing valid device trees.
- [Medium] The `ac97-gpios` property is incorrectly placed in the `required` list of the schema, which will break validation for existing device trees.
--
commit 1b5d0ed3017fc9e1dbdb1e38381500e3cc380fb7
Author: Manish Baing <manishbaing2789@gmail.com>
ASoC: dt-bindings: sound: atmel_ac97c: Convert to DT schema
This commit converts the Atmel AC97 controller device tree binding from
plain text format to a YAML schema.
> diff --git a/Documentation/devicetree/bindings/sound/atmel,at91sam9263-ac97c.yaml b/Documentation/devicetree/bindings/sound/atmel,at91sam9263-ac97c.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/atmel,at91sam9263-ac97c.yaml
> @@ -0,0 +1,60 @@
[ ... ]
> +properties:
> + compatible:
> + const: atmel,at91sam9263-ac97c
> +
> + reg:
> + maxItems: 1
> + description: Address and length of the register set for the device.
> +
> + interrupts:
> + maxItems: 1
> + description: Should contain the AC97 interrupt.
> +
> + ac97-gpios:
> + minItems: 3
> + maxItems: 4
> + description: |
> + AC97 link GPIOs- sync, sdata_out, reset, and optional sdata_in.
> + The driver primarily uses the reset pin.
> +
> + pinctrl-0: true
> +
> + pinctrl-names:
> + const: default
[Severity: Medium]
The driver (sound/atmel/ac97c.c) unconditionally requires a peripheral clock
via clk_get(&pdev->dev, "ac97_clk"). Existing device trees such as
arch/arm/boot/dts/microchip/at91sam9263.dtsi define clocks and clock-names.
Since unevaluatedProperties is set to false below, won't make dtbs_check
flag these valid properties as errors? Should clocks and clock-names be
added to the schema?
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - ac97-gpios
[Severity: Medium]
Is it correct to make ac97-gpios mandatory here?
The driver appears to treat the reset GPIO as optional, and existing device
trees like at91sam9263.dtsi do not define it. Will making it strictly
required cause validation failures for existing hardware configurations?
> +
> +unevaluatedProperties: false
> +
> +examples:
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260524183337.111657-1-manishbaing2789@gmail.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-24 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-24 18:33 [PATCH] ASoC: dt-bindings: sound: atmel_ac97c: Convert to DT schema Manish Baing
2026-05-24 18:48 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox