diff mbox series

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

Message ID 20240510131238.1319333-2-matteomartelli3@gmail.com (mailing list archive)
State Superseded
Headers show
Series ASoC: codecs: add support for everest-semi es8311 codec | expand

Commit Message

Matteo Martelli May 10, 2024, 1 p.m. UTC
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

Comments

Krzysztof Kozlowski May 13, 2024, 8:53 a.m. UTC | #1
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
Matteo Martelli May 13, 2024, 3:38 p.m. UTC | #2
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
Rob Herring (Arm) May 13, 2024, 6:44 p.m. UTC | #3
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
Matteo Martelli May 14, 2024, 10:34 a.m. UTC | #4
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
diff mbox series

Patch

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>;
+      };
+    };