[PATCH v2 4/7] ASoC: dt-bindings: Add Google Chameleon v3 audio codec

Paweł Anikiel posted 7 patches 2 years, 7 months ago
[PATCH v2 4/7] ASoC: dt-bindings: Add Google Chameleon v3 audio codec
Posted by Paweł Anikiel 2 years, 7 months ago
Add binding for google,chv3-codec device.

Signed-off-by: Paweł Anikiel <pan@semihalf.com>
---
 .../bindings/sound/google,chv3-codec.yaml     | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/google,chv3-codec.yaml

diff --git a/Documentation/devicetree/bindings/sound/google,chv3-codec.yaml b/Documentation/devicetree/bindings/sound/google,chv3-codec.yaml
new file mode 100644
index 000000000000..5329dc140b1c
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/google,chv3-codec.yaml
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/google,chv3-codec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Google Chameleon v3 audio codec
+
+maintainers:
+  - Paweł Anikiel <pan@semihalf.com>
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    const: google,chv3-codec
+
+  "#sound-dai-cells":
+    const: 0
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    audio-codec {
+        compatible = "google,chv3-codec";
+    };
-- 
2.40.1.521.gf1e218fcd8-goog

Re: [PATCH v2 4/7] ASoC: dt-bindings: Add Google Chameleon v3 audio codec
Posted by Krzysztof Kozlowski 2 years, 7 months ago
On 08/05/2023 13:30, Paweł Anikiel wrote:
> Add binding for google,chv3-codec device.
> 
> Signed-off-by: Paweł Anikiel <pan@semihalf.com>
> ---
>  .../bindings/sound/google,chv3-codec.yaml     | 31 +++++++++++++++++++
>  1 file changed, 31 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/google,chv3-codec.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/google,chv3-codec.yaml b/Documentation/devicetree/bindings/sound/google,chv3-codec.yaml
> new file mode 100644
> index 000000000000..5329dc140b1c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/google,chv3-codec.yaml
> @@ -0,0 +1,31 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/google,chv3-codec.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Google Chameleon v3 audio codec
> +
> +maintainers:
> +  - Paweł Anikiel <pan@semihalf.com>
> +
> +allOf:
> +  - $ref: dai-common.yaml#
> +
> +properties:
> +  compatible:
> +    const: google,chv3-codec
> +
> +  "#sound-dai-cells":
> +    const: 0

No supplies? How do you get power?

> +
> +required:
> +  - compatible
> +
> +additionalProperties: false

unevaluatedProperties: false, because you might want to use name-prefix.

> +
> +examples:
> +  - |
> +    audio-codec {
> +        compatible = "google,chv3-codec";

Extend the example with dai-cells.

> +    };

Best regards,
Krzysztof

Re: [PATCH v2 4/7] ASoC: dt-bindings: Add Google Chameleon v3 audio codec
Posted by Mark Brown 2 years, 7 months ago
On Tue, May 09, 2023 at 08:18:15AM +0200, Krzysztof Kozlowski wrote:
> On 08/05/2023 13:30, Paweł Anikiel wrote:

> > +  "#sound-dai-cells":
> > +    const: 0

> No supplies? How do you get power?

My understanding is that this is deployed to a FPGA so the power would
be going into the FPGA.  In general a memory mapped I2S controller like
this will be part of a larger SoC of some kind.
Re: [PATCH v2 4/7] ASoC: dt-bindings: Add Google Chameleon v3 audio codec
Posted by Paweł Anikiel 2 years, 7 months ago
On Tue, May 9, 2023 at 11:54 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Tue, May 09, 2023 at 08:18:15AM +0200, Krzysztof Kozlowski wrote:
> > On 08/05/2023 13:30, Paweł Anikiel wrote:
>
> > > +  "#sound-dai-cells":
> > > +    const: 0
>
> > No supplies? How do you get power?
>
> My understanding is that this is deployed to a FPGA so the power would
> be going into the FPGA.  In general a memory mapped I2S controller like
> this will be part of a larger SoC of some kind.

Yes, both the codec and i2s controller are implemented in the FPGA
part of the Arria 10 SoC.

Regards,
Paweł
Re: [PATCH v2 4/7] ASoC: dt-bindings: Add Google Chameleon v3 audio codec
Posted by Rob Herring 2 years, 7 months ago
On Mon, 08 May 2023 13:30:34 +0200, Paweł Anikiel wrote:
> Add binding for google,chv3-codec device.
> 
> Signed-off-by: Paweł Anikiel <pan@semihalf.com>
> ---
>  .../bindings/sound/google,chv3-codec.yaml     | 31 +++++++++++++++++++
>  1 file changed, 31 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/google,chv3-codec.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.example.dtb: camera-sensor@3c: port:endpoint:data-lanes: [[1]] is too short
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/rockchip-isp1.example.dtb: camera@3c: port:endpoint:data-lanes: [[1]] is too short
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000: Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected)
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml

doc reference errors (make refcheckdocs):
Documentation/usb/gadget_uvc.rst: Documentation/userspace-api/media/v4l/pixfmt-packed.yuv.rst
MAINTAINERS: Documentation/devicetree/bindings/pwm/pwm-apple.yaml

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230508113037.137627-5-pan@semihalf.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.