[PATCH 1/2] ASoC: es8311: dt-bindings: add everest es8311 codec

Matteo Martelli posted 2 patches 1 year, 7 months ago
There is a newer version of this series
[PATCH 1/2] ASoC: es8311: dt-bindings: add everest es8311 codec
Posted by Matteo Martelli 1 year, 7 months ago
Add DT bindings documentation for the Everest-semi ES8311 codec.

Everest-semi ES8311 codec is a low-power mono audio codec with I2S audio
interface and I2C control.

Signed-off-by: Matteo Martelli <matteomartelli3@gmail.com>
---
 .../bindings/sound/everest,es8311.yaml        | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/everest,es8311.yaml

diff --git a/Documentation/devicetree/bindings/sound/everest,es8311.yaml b/Documentation/devicetree/bindings/sound/everest,es8311.yaml
new file mode 100644
index 000000000000..54fb58b9ab58
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/everest,es8311.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/everest,es8311.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Everest ES8311 audio CODEC
+
+maintainers:
+  - Matteo Martelli <matteomartelli3@gmail.com>
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    const: everest,es8311
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: clock for master clock (MCLK)
+
+  clock-names:
+    items:
+      - const: mclk
+
+  "#sound-dai-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - "#sound-dai-cells"
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      es8316: codec@18 {
+        compatible = "everest,es8311";
+        reg = <0x18>;
+        clocks = <&clks 10>;
+        clock-names = "mclk";
+        #sound-dai-cells = <0>;
+      };
+    };
-- 
2.44.0
Re: [PATCH 1/2] ASoC: es8311: dt-bindings: add everest es8311 codec
Posted by Krzysztof Kozlowski 1 year, 7 months ago
On 10/05/2024 15:00, Matteo Martelli wrote:
> Add DT bindings documentation for the Everest-semi ES8311 codec.
> 
> Everest-semi ES8311 codec is a low-power mono audio codec with I2S audio
> interface and I2C control.
> 
> Signed-off-by: Matteo Martelli <matteomartelli3@gmail.com>
> ---
>  .../bindings/sound/everest,es8311.yaml        | 52 +++++++++++++++++++
>  1 file changed, 52 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/everest,es8311.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/everest,es8311.yaml b/Documentation/devicetree/bindings/sound/everest,es8311.yaml
> new file mode 100644
> index 000000000000..54fb58b9ab58
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/everest,es8311.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/everest,es8311.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Everest ES8311 audio CODEC

This looks exactly like es8316, except of later added port. Are you sure
you are not planning to add port later, which would make both schemas
identical?

Best regards,
Krzysztof
Re: [PATCH 1/2] ASoC: es8311: dt-bindings: add everest es8311 codec
Posted by matteomartelli3@gmail.com 1 year, 7 months ago
On Monday, 13 May 2024 10.53.57 CEST Krzysztof Kozlowski wrote:
> On 10/05/2024 15:00, Matteo Martelli wrote:
> > Add DT bindings documentation for the Everest-semi ES8311 codec.
> > 
> > Everest-semi ES8311 codec is a low-power mono audio codec with I2S audio
> > interface and I2C control.
> > 
> > Signed-off-by: Matteo Martelli <matteomartelli3@gmail.com>
> > ---
> >  .../bindings/sound/everest,es8311.yaml        | 52 +++++++++++++++++++
> >  1 file changed, 52 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/sound/everest,es8311.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/sound/everest,es8311.yaml b/Documentation/devicetree/bindings/sound/everest,es8311.yaml
> > new file mode 100644
> > index 000000000000..54fb58b9ab58
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/sound/everest,es8311.yaml
> > @@ -0,0 +1,52 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/sound/everest,es8311.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Everest ES8311 audio CODEC
> 
> This looks exactly like es8316, except of later added port. Are you sure
> you are not planning to add port later, which would make both schemas
> identical?

I did not pay enough attention to audio-graph-port property which is in
fact supported and could be added as well. Thus the es8311.yaml would be
identical to es8316.yaml. My guess is that I should just add the
"everest,es8311" compatible string to the existing es8316.yaml even if the
two drivers are separate (like for instance mediatek,mt8186-clock.yaml). Is
this correct?
If that's the case:
* should the evereset,es8316.yaml file be renamed to evereset,es831x.yaml?
* should I also add myself to the maintainers list of that schema?

> Best regards,
> Krzysztof
> 
> 

Thanks for your support,
Matteo Martelli
Re: [PATCH 1/2] ASoC: es8311: dt-bindings: add everest es8311 codec
Posted by Rob Herring 1 year, 7 months ago
On Mon, May 13, 2024 at 05:38:16PM +0200, matteomartelli3@gmail.com wrote:
> On Monday, 13 May 2024 10.53.57 CEST Krzysztof Kozlowski wrote:
> > On 10/05/2024 15:00, Matteo Martelli wrote:
> > > Add DT bindings documentation for the Everest-semi ES8311 codec.
> > > 
> > > Everest-semi ES8311 codec is a low-power mono audio codec with I2S audio
> > > interface and I2C control.
> > > 
> > > Signed-off-by: Matteo Martelli <matteomartelli3@gmail.com>
> > > ---
> > >  .../bindings/sound/everest,es8311.yaml        | 52 +++++++++++++++++++
> > >  1 file changed, 52 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/sound/everest,es8311.yaml
> > > 
> > > diff --git a/Documentation/devicetree/bindings/sound/everest,es8311.yaml b/Documentation/devicetree/bindings/sound/everest,es8311.yaml
> > > new file mode 100644
> > > index 000000000000..54fb58b9ab58
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/sound/everest,es8311.yaml
> > > @@ -0,0 +1,52 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/sound/everest,es8311.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Everest ES8311 audio CODEC
> > 
> > This looks exactly like es8316, except of later added port. Are you sure
> > you are not planning to add port later, which would make both schemas
> > identical?
> 
> I did not pay enough attention to audio-graph-port property which is in
> fact supported and could be added as well. Thus the es8311.yaml would be
> identical to es8316.yaml. My guess is that I should just add the
> "everest,es8311" compatible string to the existing es8316.yaml even if the
> two drivers are separate (like for instance mediatek,mt8186-clock.yaml). Is
> this correct?

Yes.

> If that's the case:
> * should the evereset,es8316.yaml file be renamed to evereset,es831x.yaml?

No.

> * should I also add myself to the maintainers list of that schema?

That's up to you. Do you want to be CCed on future changes to it?

Rob
Re: [PATCH 1/2] ASoC: es8311: dt-bindings: add everest es8311 codec
Posted by matteomartelli3@gmail.com 1 year, 7 months ago
On Monday, 13 May 2024 20.44.04 CEST Rob Herring wrote:
> On Mon, May 13, 2024 at 05:38:16PM +0200, matteomartelli3@gmail.com wrote:
> > On Monday, 13 May 2024 10.53.57 CEST Krzysztof Kozlowski wrote:
> > > On 10/05/2024 15:00, Matteo Martelli wrote:
> > > > Add DT bindings documentation for the Everest-semi ES8311 codec.
> > > > 
> > > > Everest-semi ES8311 codec is a low-power mono audio codec with I2S audio
> > > > interface and I2C control.
> > > > 
> > > > Signed-off-by: Matteo Martelli <matteomartelli3@gmail.com>
> > > > ---
> > > >  .../bindings/sound/everest,es8311.yaml        | 52 +++++++++++++++++++
> > > >  1 file changed, 52 insertions(+)
> > > >  create mode 100644 Documentation/devicetree/bindings/sound/everest,es8311.yaml
> > > > 
> > > > diff --git a/Documentation/devicetree/bindings/sound/everest,es8311.yaml b/Documentation/devicetree/bindings/sound/everest,es8311.yaml
> > > > new file mode 100644
> > > > index 000000000000..54fb58b9ab58
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/sound/everest,es8311.yaml
> > > > @@ -0,0 +1,52 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > +%YAML 1.2
> > > > +---
> > > > +$id: http://devicetree.org/schemas/sound/everest,es8311.yaml#
> > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > +
> > > > +title: Everest ES8311 audio CODEC
> > > 
> > > This looks exactly like es8316, except of later added port. Are you sure
> > > you are not planning to add port later, which would make both schemas
> > > identical?
> > 
> > I did not pay enough attention to audio-graph-port property which is in
> > fact supported and could be added as well. Thus the es8311.yaml would be
> > identical to es8316.yaml. My guess is that I should just add the
> > "everest,es8311" compatible string to the existing es8316.yaml even if the
> > two drivers are separate (like for instance mediatek,mt8186-clock.yaml). Is
> > this correct?
> 
> Yes.
> 
> > If that's the case:
> > * should the evereset,es8316.yaml file be renamed to evereset,es831x.yaml?
> 
> No.
> 
> > * should I also add myself to the maintainers list of that schema?
> 
> That's up to you. Do you want to be CCed on future changes to it?

Yes.

> Rob
> 

Thanks for your feedbacks, I will fix it in patch version 2 as discussed.

Matteo Martelli