2022-10-21 19:15:43

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH 0/3] Add missing dt-binding properties to rt5682(s)


This series adds the missing sound-dai-cells to rt5682s and supplies for
both rt5682s and rt5682.


Nícolas F. R. A. Prado (3):
ASoC: dt-bindings: realtek,rt5682s: Add #sound-dai-cells
ASoC: dt-bindings: realtek,rt5682s: Add AVDD and MICVDD supplies
ASoC: dt-bindings: rt5682: Add AVDD, MICVDD and VBAT supplies

.../devicetree/bindings/sound/realtek,rt5682s.yaml | 7 +++++++
Documentation/devicetree/bindings/sound/rt5682.txt | 6 ++++++
2 files changed, 13 insertions(+)

--
2.38.1


2022-10-21 19:16:04

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH 2/3] ASoC: dt-bindings: realtek,rt5682s: Add AVDD and MICVDD supplies

The rt5682s codec can have two supplies: AVDD and MICVDD. Add properties
for them.

Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---

Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
index ea53a55015c4..ca1037e76f96 100644
--- a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
+++ b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
@@ -90,6 +90,10 @@ properties:
"#sound-dai-cells":
const: 0

+ AVDD-supply: true
+
+ MICVDD-supply: true
+
additionalProperties: false

required:
--
2.38.1

2022-10-21 19:16:11

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH 3/3] ASoC: dt-bindings: rt5682: Add AVDD, MICVDD and VBAT supplies

The rt5682 codec can have three supplies: AVDD, MICVDD and VBAT. Add
properties for them.

Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
---

Documentation/devicetree/bindings/sound/rt5682.txt | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/rt5682.txt b/Documentation/devicetree/bindings/sound/rt5682.txt
index c5f2b8febcee..5ccf4eaf12a9 100644
--- a/Documentation/devicetree/bindings/sound/rt5682.txt
+++ b/Documentation/devicetree/bindings/sound/rt5682.txt
@@ -48,6 +48,12 @@ Optional properties:

- #sound-dai-cells: Should be set to '<0>'.

+- AVDD-supply: phandle to the regulator supplying AVDD
+
+- MICVDD-supply: phandle to the regulator supplying MICVDD
+
+- VBAT-supply: phandle to the regulator supplying VBAT
+
Pins on the device (for linking into audio routes) for RT5682:

* DMIC L1
--
2.38.1

2022-10-21 19:37:40

by David Heidelberg

[permalink] [raw]
Subject: Re: [PATCH 2/3] ASoC: dt-bindings: realtek,rt5682s: Add AVDD and MICVDD supplies

Reviewed-by: David Heidelberg <[email protected]>

On 21/10/2022 21:09, Nícolas F. R. A. Prado wrote:
> The rt5682s codec can have two supplies: AVDD and MICVDD. Add properties
> for them.
>
> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
> ---
>
> Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
> index ea53a55015c4..ca1037e76f96 100644
> --- a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
> +++ b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
> @@ -90,6 +90,10 @@ properties:
> "#sound-dai-cells":
> const: 0
>
> + AVDD-supply: true
> +
> + MICVDD-supply: true
> +
> additionalProperties: false
>
> required:


Attachments:
OpenPGP_0x69F567861C1EC014.asc (695.00 B)
OpenPGP public key
OpenPGP_signature (235.00 B)
OpenPGP digital signature
Download all attachments

2022-10-21 19:57:49

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: [PATCH 1/3] ASoC: dt-bindings: realtek,rt5682s: Add #sound-dai-cells

The rt5682s codec can be pointed to through a sound-dai property to be
used as part of a machine sound driver. dtc expects #sound-dai-cells to
be defined in the codec's node in those cases, so add it in the
dt-binding and set it to 0.

Signed-off-by: Nícolas F. R. A. Prado <[email protected]>

---

Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
index ca5b8987b749..ea53a55015c4 100644
--- a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
+++ b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
@@ -87,6 +87,9 @@ properties:
maxItems: 2
description: Name given for DAI word clock and bit clock outputs.

+ "#sound-dai-cells":
+ const: 0
+
additionalProperties: false

required:
--
2.38.1

2022-10-22 16:51:01

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/3] ASoC: dt-bindings: realtek,rt5682s: Add AVDD and MICVDD supplies

On 21/10/2022 15:09, Nícolas F. R. A. Prado wrote:
> The rt5682s codec can have two supplies: AVDD and MICVDD. Add properties
> for them.
>
> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
> ---
>
> Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
> index ea53a55015c4..ca1037e76f96 100644
> --- a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
> +++ b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
> @@ -90,6 +90,10 @@ properties:
> "#sound-dai-cells":
> const: 0
>
> + AVDD-supply: true
> +
> + MICVDD-supply: true
> +

How about keeping some order in the list of properties?


Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2022-10-22 16:52:24

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 3/3] ASoC: dt-bindings: rt5682: Add AVDD, MICVDD and VBAT supplies

On 21/10/2022 15:09, Nícolas F. R. A. Prado wrote:
> The rt5682 codec can have three supplies: AVDD, MICVDD and VBAT. Add
> properties for them.
>
> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
> ---
>
> Documentation/devicetree/bindings/sound/rt5682.txt | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/rt5682.txt b/Documentation/devicetree/bindings/sound/rt5682.txt
> index c5f2b8febcee..5ccf4eaf12a9 100644
> --- a/Documentation/devicetree/bindings/sound/rt5682.txt
> +++ b/Documentation/devicetree/bindings/sound/rt5682.txt
> @@ -48,6 +48,12 @@ Optional properties:
>
> - #sound-dai-cells: Should be set to '<0>'.
>
> +- AVDD-supply: phandle to the regulator supplying AVDD
> +
> +- MICVDD-supply: phandle to the regulator supplying MICVDD
> +
> +- VBAT-supply: phandle to the regulator supplying VBAT

Lowercase.

Best regards,
Krzysztof

2022-10-22 16:54:00

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/3] ASoC: dt-bindings: realtek,rt5682s: Add AVDD and MICVDD supplies

On 21/10/2022 15:09, Nícolas F. R. A. Prado wrote:
> The rt5682s codec can have two supplies: AVDD and MICVDD. Add properties
> for them.
>
> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
> ---
>
> Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
> index ea53a55015c4..ca1037e76f96 100644
> --- a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
> +++ b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
> @@ -90,6 +90,10 @@ properties:
> "#sound-dai-cells":
> const: 0
>
> + AVDD-supply: true
> +
> + MICVDD-supply: true

Ach, unacked. Please use lowercase names.

Best regards,
Krzysztof

2022-10-22 17:25:13

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/3] ASoC: dt-bindings: realtek,rt5682s: Add #sound-dai-cells

On 21/10/2022 15:09, Nícolas F. R. A. Prado wrote:
> The rt5682s codec can be pointed to through a sound-dai property to be
> used as part of a machine sound driver. dtc expects #sound-dai-cells to
> be defined in the codec's node in those cases, so add it in the
> dt-binding and set it to 0.

Drop the entire last sentence, it's not really relevant to the problem.
What if we name compiler not dtc, but ctd? It's redundant and actually
forces reader to read unrelated stuff, instead of focusing on the root
problem - this is a DAI provider.

Acked-by: Krzysztof Kozlowski <[email protected]>


Best regards,
Krzysztof

2022-10-24 16:36:13

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: Re: [PATCH 2/3] ASoC: dt-bindings: realtek,rt5682s: Add AVDD and MICVDD supplies

On Sat, Oct 22, 2022 at 12:39:56PM -0400, Krzysztof Kozlowski wrote:
> On 21/10/2022 15:09, N?colas F. R. A. Prado wrote:
> > The rt5682s codec can have two supplies: AVDD and MICVDD. Add properties
> > for them.
> >
> > Signed-off-by: N?colas F. R. A. Prado <[email protected]>
> > ---
> >
> > Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
> > index ea53a55015c4..ca1037e76f96 100644
> > --- a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
> > +++ b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
> > @@ -90,6 +90,10 @@ properties:
> > "#sound-dai-cells":
> > const: 0
> >
> > + AVDD-supply: true
> > +
> > + MICVDD-supply: true
> > +
>
> How about keeping some order in the list of properties?

The current properties don't seem to follow any particular order and keeping the
supplies grouped together seemed reasonable. What ordering do you suggest?

Thanks,
N?colas

2022-10-24 18:07:09

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 3/3] ASoC: dt-bindings: rt5682: Add AVDD, MICVDD and VBAT supplies

On 24/10/2022 12:00, Nícolas F. R. A. Prado wrote:
> On Sat, Oct 22, 2022 at 12:41:01PM -0400, Krzysztof Kozlowski wrote:
>> On 21/10/2022 15:09, Nícolas F. R. A. Prado wrote:
>>> The rt5682 codec can have three supplies: AVDD, MICVDD and VBAT. Add
>>> properties for them.
>>>
>>> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
>>> ---
>>>
>>> Documentation/devicetree/bindings/sound/rt5682.txt | 6 ++++++
>>> 1 file changed, 6 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/sound/rt5682.txt b/Documentation/devicetree/bindings/sound/rt5682.txt
>>> index c5f2b8febcee..5ccf4eaf12a9 100644
>>> --- a/Documentation/devicetree/bindings/sound/rt5682.txt
>>> +++ b/Documentation/devicetree/bindings/sound/rt5682.txt
>>> @@ -48,6 +48,12 @@ Optional properties:
>>>
>>> - #sound-dai-cells: Should be set to '<0>'.
>>>
>>> +- AVDD-supply: phandle to the regulator supplying AVDD
>>> +
>>> +- MICVDD-supply: phandle to the regulator supplying MICVDD
>>> +
>>> +- VBAT-supply: phandle to the regulator supplying VBAT
>>
>> Lowercase.
>
> Actually looks like there's already a DT using these properties before the
> binding was added:
>
> arm64/boot/dts/qcom/sc7180-trogdor.dtsi
>
> In this case should we keep them uppercase for compatibility or carry on with
> the name changes and also update the DT? (the driver also uses uppercase names)

Driver seems to use them as well, then uppercase is fine. But you need
to describe it in commit msg, that you document existing usage, not
adding new properties.

Best regards,
Krzysztof

2022-10-24 18:35:59

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/3] ASoC: dt-bindings: realtek,rt5682s: Add AVDD and MICVDD supplies

On 24/10/2022 11:06, Nícolas F. R. A. Prado wrote:
> On Sat, Oct 22, 2022 at 12:39:56PM -0400, Krzysztof Kozlowski wrote:
>> On 21/10/2022 15:09, Nícolas F. R. A. Prado wrote:
>>> The rt5682s codec can have two supplies: AVDD and MICVDD. Add properties
>>> for them.
>>>
>>> Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
>>> ---
>>>
>>> Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
>>> index ea53a55015c4..ca1037e76f96 100644
>>> --- a/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
>>> +++ b/Documentation/devicetree/bindings/sound/realtek,rt5682s.yaml
>>> @@ -90,6 +90,10 @@ properties:
>>> "#sound-dai-cells":
>>> const: 0
>>>
>>> + AVDD-supply: true
>>> +
>>> + MICVDD-supply: true
>>> +
>>
>> How about keeping some order in the list of properties?
>
> The current properties don't seem to follow any particular order and keeping the
> supplies grouped together seemed reasonable. What ordering do you suggest?

That's true... :/

Best regards,
Krzysztof

2022-10-24 20:59:09

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: Re: [PATCH 3/3] ASoC: dt-bindings: rt5682: Add AVDD, MICVDD and VBAT supplies

On Sat, Oct 22, 2022 at 12:41:01PM -0400, Krzysztof Kozlowski wrote:
> On 21/10/2022 15:09, N?colas F. R. A. Prado wrote:
> > The rt5682 codec can have three supplies: AVDD, MICVDD and VBAT. Add
> > properties for them.
> >
> > Signed-off-by: N?colas F. R. A. Prado <[email protected]>
> > ---
> >
> > Documentation/devicetree/bindings/sound/rt5682.txt | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/sound/rt5682.txt b/Documentation/devicetree/bindings/sound/rt5682.txt
> > index c5f2b8febcee..5ccf4eaf12a9 100644
> > --- a/Documentation/devicetree/bindings/sound/rt5682.txt
> > +++ b/Documentation/devicetree/bindings/sound/rt5682.txt
> > @@ -48,6 +48,12 @@ Optional properties:
> >
> > - #sound-dai-cells: Should be set to '<0>'.
> >
> > +- AVDD-supply: phandle to the regulator supplying AVDD
> > +
> > +- MICVDD-supply: phandle to the regulator supplying MICVDD
> > +
> > +- VBAT-supply: phandle to the regulator supplying VBAT
>
> Lowercase.

Actually looks like there's already a DT using these properties before the
binding was added:

arm64/boot/dts/qcom/sc7180-trogdor.dtsi

In this case should we keep them uppercase for compatibility or carry on with
the name changes and also update the DT? (the driver also uses uppercase names)


Also noticed that dai-cells should actually be 1. Will fix in next version.

Thanks,
N?colas