diff mbox series

[v2] ASoC: dt-bindings: fsl, micfil: Convert format to json-schema

Message ID 1656294613-27867-1-git-send-email-shengjiu.wang@nxp.com
State Superseded
Headers show
Series [v2] ASoC: dt-bindings: fsl, micfil: Convert format to json-schema | expand

Commit Message

Shengjiu Wang June 27, 2022, 1:50 a.m. UTC
Convert the NXP MICFIL binding to DT schema format using json-schema.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
changes in v2
- add decription of interrupts.

 .../devicetree/bindings/sound/fsl,micfil.txt  | 33 --------
 .../devicetree/bindings/sound/fsl,micfil.yaml | 77 +++++++++++++++++++
 2 files changed, 77 insertions(+), 33 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/fsl,micfil.txt
 create mode 100644 Documentation/devicetree/bindings/sound/fsl,micfil.yaml

Comments

Rob Herring June 27, 2022, 1:31 p.m. UTC | #1
On Mon, 27 Jun 2022 09:50:13 +0800, Shengjiu Wang wrote:
> Convert the NXP MICFIL binding to DT schema format using json-schema.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
> changes in v2
> - add decription of interrupts.
> 
>  .../devicetree/bindings/sound/fsl,micfil.txt  | 33 --------
>  .../devicetree/bindings/sound/fsl,micfil.yaml | 77 +++++++++++++++++++
>  2 files changed, 77 insertions(+), 33 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/fsl,micfil.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/fsl,micfil.yaml
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/


audio-controller@30080000: clock-names: ['ipg_clk', 'ipg_clk_app', 'pll8k', 'pll11k', 'clkext3'] is too long
	arch/arm64/boot/dts/freescale/imx8mm-beacon-kit.dtb
	arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dtb
	arch/arm64/boot/dts/freescale/imx8mm-ddr4-evk.dtb
	arch/arm64/boot/dts/freescale/imx8mm-emcon-avari.dtb
	arch/arm64/boot/dts/freescale/imx8mm-evk.dtb
	arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-ctouch2.dtb
	arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-edimm2.2.dtb
	arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dtb
	arch/arm64/boot/dts/freescale/imx8mm-mx8menlo.dtb
	arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dtb
	arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dtb
	arch/arm64/boot/dts/freescale/imx8mm-var-som-symphony.dtb
	arch/arm64/boot/dts/freescale/imx8mm-venice-gw71xx-0x.dtb
	arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx-0x.dtb
	arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x.dtb
	arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dtb
	arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dtb
	arch/arm64/boot/dts/freescale/imx8mm-venice-gw7903.dtb
	arch/arm64/boot/dts/freescale/imx8mm-verdin-nonwifi-dahlia.dtb
	arch/arm64/boot/dts/freescale/imx8mm-verdin-nonwifi-dev.dtb
	arch/arm64/boot/dts/freescale/imx8mm-verdin-wifi-dahlia.dtb
	arch/arm64/boot/dts/freescale/imx8mm-verdin-wifi-dev.dtb
	arch/arm64/boot/dts/freescale/imx8mn-beacon-kit.dtb
	arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2.dtb
	arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dtb
	arch/arm64/boot/dts/freescale/imx8mn-ddr3l-evk.dtb
	arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dtb
	arch/arm64/boot/dts/freescale/imx8mn-evk.dtb
	arch/arm64/boot/dts/freescale/imx8mn-tqma8mqnl-mba8mx.dtb
	arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dtb
	arch/arm64/boot/dts/freescale/imx8mn-venice-gw7902.dtb

audio-controller@30080000: clocks: [[2, 183], [2, 182], [2, 38], [2, 39], [2, 6]] is too long
	arch/arm64/boot/dts/freescale/imx8mn-beacon-kit.dtb
	arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2.dtb
	arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dtb
	arch/arm64/boot/dts/freescale/imx8mn-ddr3l-evk.dtb
	arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dtb
	arch/arm64/boot/dts/freescale/imx8mn-evk.dtb
	arch/arm64/boot/dts/freescale/imx8mn-tqma8mqnl-mba8mx.dtb
	arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dtb
	arch/arm64/boot/dts/freescale/imx8mn-venice-gw7902.dtb

audio-controller@30080000: clocks: [[2, 216], [2, 203], [2, 38], [2, 39], [2, 6]] is too long
	arch/arm64/boot/dts/freescale/imx8mm-beacon-kit.dtb
	arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dtb
	arch/arm64/boot/dts/freescale/imx8mm-ddr4-evk.dtb
	arch/arm64/boot/dts/freescale/imx8mm-emcon-avari.dtb
	arch/arm64/boot/dts/freescale/imx8mm-evk.dtb
	arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-ctouch2.dtb
	arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-edimm2.2.dtb
	arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dtb
	arch/arm64/boot/dts/freescale/imx8mm-mx8menlo.dtb
	arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dtb
	arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dtb
	arch/arm64/boot/dts/freescale/imx8mm-var-som-symphony.dtb
	arch/arm64/boot/dts/freescale/imx8mm-venice-gw71xx-0x.dtb
	arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx-0x.dtb
	arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x.dtb
	arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dtb
	arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dtb
	arch/arm64/boot/dts/freescale/imx8mm-venice-gw7903.dtb
	arch/arm64/boot/dts/freescale/imx8mm-verdin-nonwifi-dahlia.dtb
	arch/arm64/boot/dts/freescale/imx8mm-verdin-nonwifi-dev.dtb
	arch/arm64/boot/dts/freescale/imx8mm-verdin-wifi-dahlia.dtb
	arch/arm64/boot/dts/freescale/imx8mm-verdin-wifi-dev.dtb
Shengjiu Wang June 28, 2022, 3:20 a.m. UTC | #2
On Mon, Jun 27, 2022 at 9:31 PM Rob Herring <robh@kernel.org> wrote:

> On Mon, 27 Jun 2022 09:50:13 +0800, Shengjiu Wang wrote:
> > Convert the NXP MICFIL binding to DT schema format using json-schema.
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
> > changes in v2
> > - add decription of interrupts.
> >
> >  .../devicetree/bindings/sound/fsl,micfil.txt  | 33 --------
> >  .../devicetree/bindings/sound/fsl,micfil.yaml | 77 +++++++++++++++++++
> >  2 files changed, 77 insertions(+), 33 deletions(-)
> >  delete mode 100644
> Documentation/devicetree/bindings/sound/fsl,micfil.txt
> >  create mode 100644
> Documentation/devicetree/bindings/sound/fsl,micfil.yaml
> >
>
> Running 'make dtbs_check' with the schema in this patch gives the
> following warnings. Consider if they are expected or the schema is
> incorrect. These may not be new warnings.
>
> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> This will change in the future.
>
> Full log is available here: https://patchwork.ozlabs.org/patch/
>
>
> audio-controller@30080000: clock-names: ['ipg_clk', 'ipg_clk_app',
> 'pll8k', 'pll11k', 'clkext3'] is too long
>         arch/arm64/boot/dts/freescale/imx8mm-beacon-kit.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-ddr4-evk.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-emcon-avari.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-evk.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-ctouch2.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-edimm2.2.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-mx8menlo.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-var-som-symphony.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-venice-gw71xx-0x.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx-0x.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-venice-gw7903.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-verdin-nonwifi-dahlia.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-verdin-nonwifi-dev.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-verdin-wifi-dahlia.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-verdin-wifi-dev.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-beacon-kit.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-ddr3l-evk.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-evk.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-tqma8mqnl-mba8mx.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-venice-gw7902.dtb
>
> audio-controller@30080000: clocks: [[2, 183], [2, 182], [2, 38], [2, 39],
> [2, 6]] is too long
>         arch/arm64/boot/dts/freescale/imx8mn-beacon-kit.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2pro.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-ddr3l-evk.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-evk.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-tqma8mqnl-mba8mx.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-var-som-symphony.dtb
>         arch/arm64/boot/dts/freescale/imx8mn-venice-gw7902.dtb
>
> audio-controller@30080000: clocks: [[2, 216], [2, 203], [2, 38], [2, 39],
> [2, 6]] is too long
>         arch/arm64/boot/dts/freescale/imx8mm-beacon-kit.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-ddr4-evk.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-emcon-avari.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-evk.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-ctouch2.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-icore-mx8mm-edimm2.2.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-kontron-n801x-s.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-mx8menlo.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-tqma8mqml-mba8mx.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-var-som-symphony.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-venice-gw71xx-0x.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx-0x.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-venice-gw73xx-0x.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-venice-gw7901.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-venice-gw7902.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-venice-gw7903.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-verdin-nonwifi-dahlia.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-verdin-nonwifi-dev.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-verdin-wifi-dahlia.dtb
>         arch/arm64/boot/dts/freescale/imx8mm-verdin-wifi-dev.dtb
>
> I will fix this issue in v3.

best regards
wang shengjiu
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/fsl,micfil.txt b/Documentation/devicetree/bindings/sound/fsl,micfil.txt
deleted file mode 100644
index 1ea05d4996c7..000000000000
--- a/Documentation/devicetree/bindings/sound/fsl,micfil.txt
+++ /dev/null
@@ -1,33 +0,0 @@ 
-NXP MICFIL Digital Audio Interface (MICFIL).
-
-The MICFIL digital interface provides a 16-bit audio signal from a PDM
-microphone bitstream in a configurable output sampling rate.
-
-Required properties:
-
-  - compatible		: Compatible list, contains "fsl,imx8mm-micfil"
-			  or "fsl,imx8mp-micfil"
-
-  - reg			: Offset and length of the register set for the device.
-
-  - interrupts		: Contains the micfil interrupts.
-
-  - clocks		: Must contain an entry for each entry in clock-names.
-
-  - clock-names		: Must include the "ipg_clk" for register access and
-			  "ipg_clk_app" for internal micfil clock.
-
-  - dmas		: Generic dma devicetree binding as described in
-			  Documentation/devicetree/bindings/dma/dma.txt.
-
-Example:
-micfil: micfil@30080000 {
-	compatible = "fsl,imx8mm-micfil";
-	reg = <0x0 0x30080000 0x0 0x10000>;
-	interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
-		     <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
-	clocks = <&clk IMX8MM_CLK_PDM_IPG>,
-		 <&clk IMX8MM_CLK_PDM_ROOT>;
-	clock-names = "ipg_clk", "ipg_clk_app";
-	dmas = <&sdma2 24 26 0x80000000>;
-};
diff --git a/Documentation/devicetree/bindings/sound/fsl,micfil.yaml b/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
new file mode 100644
index 000000000000..bf24faed7a4d
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
@@ -0,0 +1,77 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/fsl,micfil.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP MICFIL Digital Audio Interface (MICFIL)
+
+maintainers:
+  - Shengjiu Wang <shengjiu.wang@nxp.com>
+
+description: |
+  The MICFIL digital interface provides a 16-bit or 24-bit audio signal
+  from a PDM microphone bitstream in a configurable output sampling rate.
+
+properties:
+  compatible:
+    enum:
+      - fsl,imx8mm-micfil
+      - fsl,imx8mp-micfil
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    items:
+      - description: Digital Microphone interface interrupt
+      - description: Digital Microphone interface error interrupt
+      - description: voice activity detector event interrupt
+      - description: voice activity detector error interrupt
+
+  dmas:
+    items:
+      - description: DMA controller phandle and request line for RX
+
+  dma-names:
+    items:
+      - const: rx
+
+  clocks:
+    items:
+      - description: The ipg clock for register access
+      - description: internal micfil clock
+
+  clock-names:
+    items:
+      - const: ipg_clk
+      - const: ipg_clk_app
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - dmas
+  - dma-names
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/imx8mm-clock.h>
+    micfil: audio-controller@30080000 {
+        compatible = "fsl,imx8mm-micfil";
+        reg = <0x30080000 0x10000>;
+        interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
+                     <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&clk IMX8MM_CLK_PDM_IPG>,
+                 <&clk IMX8MM_CLK_PDM_ROOT>;
+        clock-names = "ipg_clk", "ipg_clk_app";
+        dmas = <&sdma2 24 25 0>;
+        dma-names = "rx";
+    };