2024-04-11 10:29:51

by Shengjiu Wang

[permalink] [raw]
Subject: [PATCH v4 0/2] convert imx-audio-spdif.txt to YAML

convert imx-audio-spdif.txt to YAML

changes in v4:
- change the enmu to const
- add more comments in commit message for second patch

changes in v3:
- change file name to fsl,imx-audio-spdif.yaml
- change example name back to sound-spdif
- exchange the fallback and specific compatible string
- update anyOf content

changes in v2:
- change file name to imx-spdif.yaml
- remove |
- add anyof for spdif-in and spdif-out requirement
- change example name to sound

Shengjiu Wang (2):
ASoC: dt-bindings: imx-audio-spdif: convert to YAML
ARM: dts: imx6: exchange fallback and specific compatible string

.../bindings/sound/fsl,imx-audio-spdif.yaml | 66 +++++++++++++++++++
.../bindings/sound/imx-audio-spdif.txt | 36 ----------
.../boot/dts/nxp/imx/imx6qdl-sabreauto.dtsi | 4 +-
arch/arm/boot/dts/nxp/imx/imx6sx-sdb.dtsi | 4 +-
4 files changed, 70 insertions(+), 40 deletions(-)
create mode 100644 Documentation/devicetree/bindings/sound/fsl,imx-audio-spdif.yaml
delete mode 100644 Documentation/devicetree/bindings/sound/imx-audio-spdif.txt

--
2.34.1



2024-04-11 10:37:15

by Shengjiu Wang

[permalink] [raw]
Subject: [PATCH v4 1/2] ASoC: dt-bindings: imx-audio-spdif: convert to YAML

Convert the imx-audio-spdif binding to YAML.

When testing dtbs_check, found below compatible strings
are not listed in document:

fsl,imx-sabreauto-spdif
fsl,imx6sx-sdb-spdif

So add them in yaml file to pass the test.

Signed-off-by: Shengjiu Wang <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/sound/fsl,imx-audio-spdif.yaml | 66 +++++++++++++++++++
.../bindings/sound/imx-audio-spdif.txt | 36 ----------
2 files changed, 66 insertions(+), 36 deletions(-)
create mode 100644 Documentation/devicetree/bindings/sound/fsl,imx-audio-spdif.yaml
delete mode 100644 Documentation/devicetree/bindings/sound/imx-audio-spdif.txt

diff --git a/Documentation/devicetree/bindings/sound/fsl,imx-audio-spdif.yaml b/Documentation/devicetree/bindings/sound/fsl,imx-audio-spdif.yaml
new file mode 100644
index 000000000000..5fc543d02ecb
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/fsl,imx-audio-spdif.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/fsl,imx-audio-spdif.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale i.MX audio complex with S/PDIF transceiver
+
+maintainers:
+ - Shengjiu Wang <[email protected]>
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - fsl,imx-sabreauto-spdif
+ - fsl,imx6sx-sdb-spdif
+ - const: fsl,imx-audio-spdif
+ - enum:
+ - fsl,imx-audio-spdif
+
+ model:
+ $ref: /schemas/types.yaml#/definitions/string
+ description: User specified audio sound card name
+
+ spdif-controller:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: The phandle of the i.MX S/PDIF controller
+
+ spdif-out:
+ type: boolean
+ description:
+ If present, the transmitting function of S/PDIF will be enabled,
+ indicating there's a physical S/PDIF out connector or jack on the
+ board or it's connecting to some other IP block, such as an HDMI
+ encoder or display-controller.
+
+ spdif-in:
+ type: boolean
+ description:
+ If present, the receiving function of S/PDIF will be enabled,
+ indicating there is a physical S/PDIF in connector/jack on the board.
+
+required:
+ - compatible
+ - model
+ - spdif-controller
+
+anyOf:
+ - required:
+ - spdif-in
+ - required:
+ - spdif-out
+
+additionalProperties: false
+
+examples:
+ - |
+ sound-spdif {
+ compatible = "fsl,imx-audio-spdif";
+ model = "imx-spdif";
+ spdif-controller = <&spdif>;
+ spdif-out;
+ spdif-in;
+ };
diff --git a/Documentation/devicetree/bindings/sound/imx-audio-spdif.txt b/Documentation/devicetree/bindings/sound/imx-audio-spdif.txt
deleted file mode 100644
index da84a442ccea..000000000000
--- a/Documentation/devicetree/bindings/sound/imx-audio-spdif.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-Freescale i.MX audio complex with S/PDIF transceiver
-
-Required properties:
-
- - compatible : "fsl,imx-audio-spdif"
-
- - model : The user-visible name of this sound complex
-
- - spdif-controller : The phandle of the i.MX S/PDIF controller
-
-
-Optional properties:
-
- - spdif-out : This is a boolean property. If present, the
- transmitting function of S/PDIF will be enabled,
- indicating there's a physical S/PDIF out connector
- or jack on the board or it's connecting to some
- other IP block, such as an HDMI encoder or
- display-controller.
-
- - spdif-in : This is a boolean property. If present, the receiving
- function of S/PDIF will be enabled, indicating there
- is a physical S/PDIF in connector/jack on the board.
-
-* Note: At least one of these two properties should be set in the DT binding.
-
-
-Example:
-
-sound-spdif {
- compatible = "fsl,imx-audio-spdif";
- model = "imx-spdif";
- spdif-controller = <&spdif>;
- spdif-out;
- spdif-in;
-};
--
2.34.1


2024-04-11 10:48:03

by Shengjiu Wang

[permalink] [raw]
Subject: [PATCH v4 2/2] ARM: dts: imx6: exchange fallback and specific compatible string

Exchange fallback and specific compatible string for spdif sound card.
The specific compatble string need to be in first place, the fallback
compatbile string need to be in the end.

Signed-off-by: Shengjiu Wang <[email protected]>
---
arch/arm/boot/dts/nxp/imx/imx6qdl-sabreauto.dtsi | 4 ++--
arch/arm/boot/dts/nxp/imx/imx6sx-sdb.dtsi | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-sabreauto.dtsi
index 68e97180d33e..51517e27418c 100644
--- a/arch/arm/boot/dts/nxp/imx/imx6qdl-sabreauto.dtsi
+++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-sabreauto.dtsi
@@ -144,8 +144,8 @@ sound-cs42888 {
};

sound-spdif {
- compatible = "fsl,imx-audio-spdif",
- "fsl,imx-sabreauto-spdif";
+ compatible = "fsl,imx-sabreauto-spdif",
+ "fsl,imx-audio-spdif";
model = "imx-spdif";
spdif-controller = <&spdif>;
spdif-in;
diff --git a/arch/arm/boot/dts/nxp/imx/imx6sx-sdb.dtsi b/arch/arm/boot/dts/nxp/imx/imx6sx-sdb.dtsi
index c6e85e4a0883..67872c16372a 100644
--- a/arch/arm/boot/dts/nxp/imx/imx6sx-sdb.dtsi
+++ b/arch/arm/boot/dts/nxp/imx/imx6sx-sdb.dtsi
@@ -184,8 +184,8 @@ panel_in: endpoint {
};

sound-spdif {
- compatible = "fsl,imx-audio-spdif",
- "fsl,imx6sx-sdb-spdif";
+ compatible = "fsl,imx6sx-sdb-spdif",
+ "fsl,imx-audio-spdif";
model = "imx-spdif";
spdif-controller = <&spdif>;
spdif-out;
--
2.34.1


2024-04-12 11:38:58

by Mark Brown

[permalink] [raw]
Subject: Re: (subset) [PATCH v4 0/2] convert imx-audio-spdif.txt to YAML

On Thu, 11 Apr 2024 18:11:43 +0800, Shengjiu Wang wrote:
> convert imx-audio-spdif.txt to YAML
>
> changes in v4:
> - change the enmu to const
> - add more comments in commit message for second patch
>
> changes in v3:
> - change file name to fsl,imx-audio-spdif.yaml
> - change example name back to sound-spdif
> - exchange the fallback and specific compatible string
> - update anyOf content
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: dt-bindings: imx-audio-spdif: convert to YAML
commit: 62bef5df35a87d0f8464b1a8837540988cfaf5db

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark