diff mbox series

[06/11] ASoC: dt-bindings: ti,pcm3168a: Convert to json-schema

Message ID 87mt7qpylw.wl-kuninori.morimoto.gx@renesas.com
State Superseded
Headers show
Series ASoC: dt-bindings: audio-graph-port related update | expand

Commit Message

Kuninori Morimoto Dec. 14, 2022, 1:23 a.m. UTC
From: Geert Uytterhoeven <geert+renesas@glider.be>

Convert the Texas Instruments PCM3168A Audio Codec Device Tree binding
documentation to json-schema.

Add missing properties.
Drop unneeded pinctrl properties from example.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../devicetree/bindings/sound/ti,pcm3168a.txt |  56 ----------
 .../bindings/sound/ti,pcm3168a.yaml           | 100 ++++++++++++++++++
 2 files changed, 100 insertions(+), 56 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/ti,pcm3168a.txt
 create mode 100644 Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml

Comments

Geert Uytterhoeven Dec. 15, 2022, 11:03 a.m. UTC | #1
Hi Morimoto-san,

On Wed, Dec 14, 2022 at 2:23 AM Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> From: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Convert the Texas Instruments PCM3168A Audio Codec Device Tree binding
> documentation to json-schema.
>
> Add missing properties.
> Drop unneeded pinctrl properties from example.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thanks for your patch!

You forgot to list the changes you made to my patch:
  - Refer to audio-graph-port.yaml instead of describing ports and
    port@[01] subnodes explicitly.

> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
> @@ -0,0 +1,100 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/ti,pcm3168a.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments PCM3168A Audio Codec
> +
> +maintainers:
> +  - Damien Horsley <Damien.Horsley@imgtec.com>

For v2, I had planned

    -+  - Damien Horsley <Damien.Horsley@imgtec.com>
    ++  - Jaroslav Kysela <perex@perex.cz>
    ++  - Takashi Iwai <tiwai@suse.com>

as Damien's address bounces.

Or perhaps you want to become the maintainer?

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Mark Brown Dec. 15, 2022, 11:47 a.m. UTC | #2
On Thu, Dec 15, 2022 at 12:03:02PM +0100, Geert Uytterhoeven wrote:
> On Wed, Dec 14, 2022 at 2:23 AM Kuninori Morimoto

> > +maintainers:
> > +  - Damien Horsley <Damien.Horsley@imgtec.com>

> For v2, I had planned

>     -+  - Damien Horsley <Damien.Horsley@imgtec.com>
>     ++  - Jaroslav Kysela <perex@perex.cz>
>     ++  - Takashi Iwai <tiwai@suse.com>

> as Damien's address bounces.

I wouldn't do that, I gather the maintainers for DT bindings are
supposed to be people who know and care about the specific binding in
particular.
Geert Uytterhoeven Dec. 15, 2022, 12:10 p.m. UTC | #3
Hi Mark,

On Thu, Dec 15, 2022 at 12:47 PM Mark Brown <broonie@kernel.org> wrote:
> On Thu, Dec 15, 2022 at 12:03:02PM +0100, Geert Uytterhoeven wrote:
> > On Wed, Dec 14, 2022 at 2:23 AM Kuninori Morimoto
> > > +maintainers:
> > > +  - Damien Horsley <Damien.Horsley@imgtec.com>
>
> > For v2, I had planned
>
> >     -+  - Damien Horsley <Damien.Horsley@imgtec.com>
> >     ++  - Jaroslav Kysela <perex@perex.cz>
> >     ++  - Takashi Iwai <tiwai@suse.com>
>
> > as Damien's address bounces.
>
> I wouldn't do that, I gather the maintainers for DT bindings are
> supposed to be people who know and care about the specific binding in
> particular.

Sure.  But how can they (still) care, if we cannot reach them?
There's no email message from Damien to be found during the past
7 years.


Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Kuninori Morimoto Dec. 15, 2022, 11:48 p.m. UTC | #4
Hi Geert

> You forgot to list the changes you made to my patch:
>  - Refer to audio-graph-port.yaml instead of describing ports and
>   port@[01] subnodes explicitly.

Oops, thank you for pointing it. It was my fault.
One note is that the port@x which it can use is depends on its connection style.
Not only [01]. I will fix it.

> > Sure.  But how can they (still) care, if we cannot reach them?
> > There's no email message from Damien to be found during the past
> > 7 years.
> 
> The most sensible thing seems to be to allow bindings with no maintainer
> TBH.

Hmm.. so I will keep current maintainer, so far.
We can update it later if need ?

BTH Mark, this patch is included in this patch-set, but it can be
stand alone patch if other patch-set were accepted.
Is is possible to post this v2 patch as [1/1] ? or do I need [PATCH v2 11/11] ?

Thank you for your help !!

Best regards
---
Kuninori Morimoto
Kuninori Morimoto Dec. 16, 2022, 12:01 a.m. UTC | #5
Hi Geert

> > You forgot to list the changes you made to my patch:
> >  - Refer to audio-graph-port.yaml instead of describing ports and
> >   port@[01] subnodes explicitly.
> 
> Oops, thank you for pointing it. It was my fault.
> One note is that the port@x which it can use is depends on its connection style.
> Not only [01]. I will fix it.

Grr, my fault again.
pcm3168a port are indeed fixed.

Thank you for your help !!

Best regards
---
Kuninori Morimoto
Mark Brown Dec. 16, 2022, 1:49 p.m. UTC | #6
On Thu, Dec 15, 2022 at 11:48:29PM +0000, Kuninori Morimoto wrote:

> BTH Mark, this patch is included in this patch-set, but it can be
> stand alone patch if other patch-set were accepted.
> Is is possible to post this v2 patch as [1/1] ? or do I need [PATCH v2 11/11] ?

Just posting it as 1/1 is best - for both patch number and series
version the numbering only makes sense within a single series, you can
just drop this patch from v2 of the main series and send it separately
as just a standalone patch.
Rob Herring Dec. 16, 2022, 4:39 p.m. UTC | #7
On Thu, Dec 15, 2022 at 01:10:44PM +0100, Geert Uytterhoeven wrote:
> Hi Mark,
> 
> On Thu, Dec 15, 2022 at 12:47 PM Mark Brown <broonie@kernel.org> wrote:
> > On Thu, Dec 15, 2022 at 12:03:02PM +0100, Geert Uytterhoeven wrote:
> > > On Wed, Dec 14, 2022 at 2:23 AM Kuninori Morimoto
> > > > +maintainers:
> > > > +  - Damien Horsley <Damien.Horsley@imgtec.com>
> >
> > > For v2, I had planned
> >
> > >     -+  - Damien Horsley <Damien.Horsley@imgtec.com>
> > >     ++  - Jaroslav Kysela <perex@perex.cz>
> > >     ++  - Takashi Iwai <tiwai@suse.com>
> >
> > > as Damien's address bounces.
> >
> > I wouldn't do that, I gather the maintainers for DT bindings are
> > supposed to be people who know and care about the specific binding in
> > particular.
> 
> Sure.  But how can they (still) care, if we cannot reach them?
> There's no email message from Damien to be found during the past
> 7 years.

Then put someone that would care if the binding is deleted. As this is 
used on Renesas board(s), I can think of a few candidates.

Rob
Geert Uytterhoeven Dec. 19, 2022, 8:43 a.m. UTC | #8
Hi Rob,

CC Peter

On Fri, Dec 16, 2022 at 5:39 PM Rob Herring <robh@kernel.org> wrote:
> On Thu, Dec 15, 2022 at 01:10:44PM +0100, Geert Uytterhoeven wrote:
> > On Thu, Dec 15, 2022 at 12:47 PM Mark Brown <broonie@kernel.org> wrote:
> > > On Thu, Dec 15, 2022 at 12:03:02PM +0100, Geert Uytterhoeven wrote:
> > > > On Wed, Dec 14, 2022 at 2:23 AM Kuninori Morimoto
> > > > > +maintainers:
> > > > > +  - Damien Horsley <Damien.Horsley@imgtec.com>
> > >
> > > > For v2, I had planned
> > >
> > > >     -+  - Damien Horsley <Damien.Horsley@imgtec.com>
> > > >     ++  - Jaroslav Kysela <perex@perex.cz>
> > > >     ++  - Takashi Iwai <tiwai@suse.com>
> > >
> > > > as Damien's address bounces.
> > >
> > > I wouldn't do that, I gather the maintainers for DT bindings are
> > > supposed to be people who know and care about the specific binding in
> > > particular.
> >
> > Sure.  But how can they (still) care, if we cannot reach them?
> > There's no email message from Damien to be found during the past
> > 7 years.
>
> Then put someone that would care if the binding is deleted. As this is
> used on Renesas board(s), I can think of a few candidates.

Or perhaps someone from TI? ;-)
This is a TI component, and also used on a TI K3 board...

/me weaseling out...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Geert Uytterhoeven Dec. 19, 2022, 8:45 a.m. UTC | #9
Oops, Peter is no longer at TI...

On Mon, Dec 19, 2022 at 9:43 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> CC Peter
>
> On Fri, Dec 16, 2022 at 5:39 PM Rob Herring <robh@kernel.org> wrote:
> > On Thu, Dec 15, 2022 at 01:10:44PM +0100, Geert Uytterhoeven wrote:
> > > On Thu, Dec 15, 2022 at 12:47 PM Mark Brown <broonie@kernel.org> wrote:
> > > > On Thu, Dec 15, 2022 at 12:03:02PM +0100, Geert Uytterhoeven wrote:
> > > > > On Wed, Dec 14, 2022 at 2:23 AM Kuninori Morimoto
> > > > > > +maintainers:
> > > > > > +  - Damien Horsley <Damien.Horsley@imgtec.com>
> > > >
> > > > > For v2, I had planned
> > > >
> > > > >     -+  - Damien Horsley <Damien.Horsley@imgtec.com>
> > > > >     ++  - Jaroslav Kysela <perex@perex.cz>
> > > > >     ++  - Takashi Iwai <tiwai@suse.com>
> > > >
> > > > > as Damien's address bounces.
> > > >
> > > > I wouldn't do that, I gather the maintainers for DT bindings are
> > > > supposed to be people who know and care about the specific binding in
> > > > particular.
> > >
> > > Sure.  But how can they (still) care, if we cannot reach them?
> > > There's no email message from Damien to be found during the past
> > > 7 years.
> >
> > Then put someone that would care if the binding is deleted. As this is
> > used on Renesas board(s), I can think of a few candidates.
>
> Or perhaps someone from TI? ;-)
> This is a TI component, and also used on a TI K3 board...
>
> /me weaseling out...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Péter Ujfalusi Dec. 19, 2022, 3:34 p.m. UTC | #10
Hi Geert,

On 19/12/2022 10:45, Geert Uytterhoeven wrote:
> Oops, Peter is no longer at TI...

Yup.

> 
> On Mon, Dec 19, 2022 at 9:43 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> CC Peter
>>
>> On Fri, Dec 16, 2022 at 5:39 PM Rob Herring <robh@kernel.org> wrote:
>>> On Thu, Dec 15, 2022 at 01:10:44PM +0100, Geert Uytterhoeven wrote:
>>>> On Thu, Dec 15, 2022 at 12:47 PM Mark Brown <broonie@kernel.org> wrote:
>>>>> On Thu, Dec 15, 2022 at 12:03:02PM +0100, Geert Uytterhoeven wrote:
>>>>>> On Wed, Dec 14, 2022 at 2:23 AM Kuninori Morimoto
>>>>>>> +maintainers:
>>>>>>> +  - Damien Horsley <Damien.Horsley@imgtec.com>
>>>>>
>>>>>> For v2, I had planned
>>>>>
>>>>>>      -+  - Damien Horsley <Damien.Horsley@imgtec.com>
>>>>>>      ++  - Jaroslav Kysela <perex@perex.cz>
>>>>>>      ++  - Takashi Iwai <tiwai@suse.com>
>>>>>
>>>>>> as Damien's address bounces.
>>>>>
>>>>> I wouldn't do that, I gather the maintainers for DT bindings are
>>>>> supposed to be people who know and care about the specific binding in
>>>>> particular.
>>>>
>>>> Sure.  But how can they (still) care, if we cannot reach them?
>>>> There's no email message from Damien to be found during the past
>>>> 7 years.
>>>
>>> Then put someone that would care if the binding is deleted. As this is
>>> used on Renesas board(s), I can think of a few candidates.
>>
>> Or perhaps someone from TI? ;-)
>> This is a TI component, and also used on a TI K3 board...

Can it go w/o a Maintainer? ;)
The driver is (close to) feature complete and only needs framework 
change updates.
I don't particularly care about this driver as such. Yes, the j721e EVM 
uses it (which I still maintain along with the TI audio stack).

Unfortunately I don't know anyone at TI who could be assigned...

Nikita did a fix quite recently to the driver.
Nikita, are you interested?
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/ti,pcm3168a.txt b/Documentation/devicetree/bindings/sound/ti,pcm3168a.txt
deleted file mode 100644
index a02ecaab5183..000000000000
--- a/Documentation/devicetree/bindings/sound/ti,pcm3168a.txt
+++ /dev/null
@@ -1,56 +0,0 @@ 
-Texas Instruments pcm3168a DT bindings
-
-This driver supports both SPI and I2C bus access for this codec
-
-Required properties:
-
-  - compatible: "ti,pcm3168a"
-
-  - clocks : Contains an entry for each entry in clock-names
-
-  - clock-names : Includes the following entries:
-	"scki"	The system clock
-
-  - VDD1-supply : Digital power supply regulator 1 (+3.3V)
-
-  - VDD2-supply : Digital power supply regulator 2 (+3.3V)
-
-  - VCCAD1-supply : ADC power supply regulator 1 (+5V)
-
-  - VCCAD2-supply : ADC power supply regulator 2 (+5V)
-
-  - VCCDA1-supply : DAC power supply regulator 1 (+5V)
-
-  - VCCDA2-supply : DAC power supply regulator 2 (+5V)
-
-For required properties on SPI/I2C, consult SPI/I2C device tree documentation
-
-Optional properties:
-
-  - reset-gpios : Optional reset gpio line connected to RST pin of the codec.
-		  The RST line is low active:
-		  RST = low: device power-down
-		  RST = high: device is enabled
-
-Examples:
-
-i2c0: i2c0@0 {
-
-	...
-
-	pcm3168a: audio-codec@44 {
-		compatible = "ti,pcm3168a";
-		reg = <0x44>;
-		reset-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
-		clocks = <&clk_core CLK_AUDIO>;
-		clock-names = "scki";
-		VDD1-supply = <&supply3v3>;
-		VDD2-supply = <&supply3v3>;
-		VCCAD1-supply = <&supply5v0>;
-		VCCAD2-supply = <&supply5v0>;
-		VCCDA1-supply = <&supply5v0>;
-		VCCDA2-supply = <&supply5v0>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&dac_clk_pin>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml b/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
new file mode 100644
index 000000000000..cb8ce6c6baf5
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
@@ -0,0 +1,100 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/ti,pcm3168a.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments PCM3168A Audio Codec
+
+maintainers:
+  - Damien Horsley <Damien.Horsley@imgtec.com>
+
+description:
+  The Texas Instruments PCM3168A is a 24-bit Multi-channel Audio CODEC with
+  96/192kHz sampling rate, supporting both SPI and I2C bus access.
+
+properties:
+  compatible:
+    const: ti,pcm3168a
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: System clock input
+
+  clock-names:
+    items:
+      - const: scki
+
+  reset-gpios:
+    items:
+      - description: |
+          GPIO line connected to the active-low RST pin of the codec.
+            RST = low: device power-down
+            RST = high: device is enabled
+
+  "#sound-dai-cells":
+    enum: [0, 1]
+
+  VDD1-supply:
+    description: Digital power supply regulator 1 (+3.3V)
+
+  VDD2-supply:
+    description: Digital power supply regulator 2 (+3.3V)
+
+  VCCAD1-supply:
+    description: ADC power supply regulator 1 (+5V)
+
+  VCCAD2-supply:
+    description: ADC power supply regulator 2 (+5V)
+
+  VCCDA1-supply:
+    description: DAC power supply regulator 1 (+5V)
+
+  VCCDA2-supply:
+    description: DAC power supply regulator 2 (+5V)
+
+  ports:
+    $ref: audio-graph-port.yaml#/definitions/ports
+
+  port:
+    $ref: audio-graph-port.yaml#
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - VDD1-supply
+  - VDD2-supply
+  - VCCAD1-supply
+  - VCCAD2-supply
+  - VCCDA1-supply
+  - VCCDA2-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        pcm3168a: audio-codec@44 {
+            compatible = "ti,pcm3168a";
+            reg = <0x44>;
+            reset-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+            clocks = <&clk_core 42>;
+            clock-names = "scki";
+            VDD1-supply = <&supply3v3>;
+            VDD2-supply = <&supply3v3>;
+            VCCAD1-supply = <&supply5v0>;
+            VCCAD2-supply = <&supply5v0>;
+            VCCDA1-supply = <&supply5v0>;
+            VCCDA2-supply = <&supply5v0>;
+        };
+    };