diff mbox series

[v2,1/3] dt-bindings: rockchip: Document rk809 support for rk817 audio codec

Message ID 20240116132102.3272682-2-tim@feathertop.org (mailing list archive)
State New, archived
Headers show
Series dt-bindings: rockchip: Add support for rk809 audio codec | expand

Commit Message

Tim Lunn Jan. 16, 2024, 1:21 p.m. UTC
Rockchip RK809 shares the same audio codec as the rk817 mfd, it is also
using the same rk817_codec driver. However it is missing from the
bindings.

Update dt-binding documentation for rk809 to include the audio codec
properties. This fixes the following warning from dtb check:

pmic@20: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clocks',
   'clock-names', 'clocks', 'codec' do not match any of the regexes:
   'pinctrl-[0-9]+'

Signed-off-by: Tim Lunn <tim@feathertop.org>
---

(no changes since v1)

 .../bindings/mfd/rockchip,rk809.yaml          | 30 ++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

Comments

Conor Dooley Jan. 16, 2024, 5:06 p.m. UTC | #1
On Wed, Jan 17, 2024 at 12:21:00AM +1100, Tim Lunn wrote:
> Rockchip RK809 shares the same audio codec as the rk817 mfd, it is also
> using the same rk817_codec driver. However it is missing from the
> bindings.
> 
> Update dt-binding documentation for rk809 to include the audio codec
> properties. This fixes the following warning from dtb check:
> 
> pmic@20: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clocks',
>    'clock-names', 'clocks', 'codec' do not match any of the regexes:
>    'pinctrl-[0-9]+'
> 
> Signed-off-by: Tim Lunn <tim@feathertop.org>
> ---
> 
> (no changes since v1)
> 
>  .../bindings/mfd/rockchip,rk809.yaml          | 30 ++++++++++++++++++-
>  1 file changed, 29 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> index 839c0521f1e5..bac2e751e2f2 100644
> --- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> @@ -12,7 +12,7 @@ maintainers:
>  
>  description: |
>    Rockchip RK809 series PMIC. This device consists of an i2c controlled MFD
> -  that includes regulators, an RTC, and power button.
> +  that includes regulators, an RTC, a power button, and an audio codec.
>  
>  properties:
>    compatible:
> @@ -93,6 +93,34 @@ properties:
>          unevaluatedProperties: false
>      unevaluatedProperties: false
>  
> +  clocks:
> +    description:
> +      The input clock for the audio codec.
> +
> +  clock-names:
> +    description:
> +      The clock name for the codec clock.
> +    items:
> +      - const: mclk

You have one clock only, why do you need to have clock-names?

Otherwise,
Acked-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

> +
> +  '#sound-dai-cells':
> +    description:
> +      Needed for the interpretation of sound dais.
> +    const: 0
> +
> +  codec:
> +    description: |
> +      The child node for the codec to hold additional properties. If no
> +      additional properties are required for the codec, this node can be
> +      omitted.
> +    type: object
> +    additionalProperties: false
> +    properties:
> +      rockchip,mic-in-differential:
> +        type: boolean
> +        description:
> +          Describes if the microphone uses differential mode.
> +
>  allOf:
>    - if:
>        properties:
> -- 
> 2.40.1
>
Krzysztof Kozlowski Jan. 17, 2024, 7:43 a.m. UTC | #2
On 16/01/2024 14:21, Tim Lunn wrote:
> Rockchip RK809 shares the same audio codec as the rk817 mfd, it is also
> using the same rk817_codec driver. However it is missing from the
> bindings.
> 
> Update dt-binding documentation for rk809 to include the audio codec
> properties. This fixes the following warning from dtb check:
> 
> pmic@20: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clocks',
>    'clock-names', 'clocks', 'codec' do not match any of the regexes:
>    'pinctrl-[0-9]+'
> 
> Signed-off-by: Tim Lunn <tim@feathertop.org>
> ---
> 
> (no changes since v1)
> 
>  .../bindings/mfd/rockchip,rk809.yaml          | 30 ++++++++++++++++++-
>  1 file changed, 29 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> index 839c0521f1e5..bac2e751e2f2 100644
> --- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> @@ -12,7 +12,7 @@ maintainers:
>  
>  description: |
>    Rockchip RK809 series PMIC. This device consists of an i2c controlled MFD
> -  that includes regulators, an RTC, and power button.
> +  that includes regulators, an RTC, a power button, and an audio codec.
>  
>  properties:
>    compatible:
> @@ -93,6 +93,34 @@ properties:
>          unevaluatedProperties: false
>      unevaluatedProperties: false
>  
> +  clocks:
> +    description:
> +      The input clock for the audio codec.

Nothing improved here. Implement the feedback.

Don't send the patchsets more than once per day, so reviewers can
actually review it.

Best regards,
Krzysztof
Tim Lunn Jan. 17, 2024, 9:22 a.m. UTC | #3
On 1/17/24 04:06, Conor Dooley wrote:
> On Wed, Jan 17, 2024 at 12:21:00AM +1100, Tim Lunn wrote:
>> Rockchip RK809 shares the same audio codec as the rk817 mfd, it is also
>> using the same rk817_codec driver. However it is missing from the
>> bindings.
>>
>> Update dt-binding documentation for rk809 to include the audio codec
>> properties. This fixes the following warning from dtb check:
>>
>> pmic@20: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clocks',
>>     'clock-names', 'clocks', 'codec' do not match any of the regexes:
>>     'pinctrl-[0-9]+'
>>
>> Signed-off-by: Tim Lunn<tim@feathertop.org>
>> ---
>>
>> (no changes since v1)
>>
>>   .../bindings/mfd/rockchip,rk809.yaml          | 30 ++++++++++++++++++-
>>   1 file changed, 29 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
>> index 839c0521f1e5..bac2e751e2f2 100644
>> --- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
>> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
>> @@ -12,7 +12,7 @@ maintainers:
>>   
>>   description: |
>>     Rockchip RK809 series PMIC. This device consists of an i2c controlled MFD
>> -  that includes regulators, an RTC, and power button.
>> +  that includes regulators, an RTC, a power button, and an audio codec.
>>   
>>   properties:
>>     compatible:
>> @@ -93,6 +93,34 @@ properties:
>>           unevaluatedProperties: false
>>       unevaluatedProperties: false
>>   
>> +  clocks:
>> +    description:
>> +      The input clock for the audio codec.
>> +
>> +  clock-names:
>> +    description:
>> +      The clock name for the codec clock.
>> +    items:
>> +      - const: mclk
> You have one clock only, why do you need to have clock-names?
This is just documenting the existing rk817 codec driver, which is using 
the name to get the clock:

devm_clk_get(pdev->dev.parent, "mclk");

Thus i dont think clock-names can  be removed in this case? atleast not 
without patching the driver as well?
> Otherwise,
> Acked-by: Conor Dooley<conor.dooley@microchip.com>
>
> Cheers,
> Conor.
>
>> +
>> +  '#sound-dai-cells':
>> +    description:
>> +      Needed for the interpretation of sound dais.
>> +    const: 0
>> +
>> +  codec:
>> +    description: |
>> +      The child node for the codec to hold additional properties. If no
>> +      additional properties are required for the codec, this node can be
>> +      omitted.
>> +    type: object
>> +    additionalProperties: false
>> +    properties:
>> +      rockchip,mic-in-differential:
>> +        type: boolean
>> +        description:
>> +          Describes if the microphone uses differential mode.
>> +
>>   allOf:
>>     - if:
>>         properties:
>> -- 
>> 2.40.1
>>
Krzysztof Kozlowski Jan. 17, 2024, 9:22 a.m. UTC | #4
On 17/01/2024 10:19, Tim Lunn wrote:
> 
> On 1/17/24 04:06, Conor Dooley wrote:
>> On Wed, Jan 17, 2024 at 12:21:00AM +1100, Tim Lunn wrote:
>>> Rockchip RK809 shares the same audio codec as the rk817 mfd, it is also
>>> using the same rk817_codec driver. However it is missing from the
>>> bindings.
>>>
>>> Update dt-binding documentation for rk809 to include the audio codec
>>> properties. This fixes the following warning from dtb check:
>>>
>>> pmic@20: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clocks',
>>>     'clock-names', 'clocks', 'codec' do not match any of the regexes:
>>>     'pinctrl-[0-9]+'
>>>
>>> Signed-off-by: Tim Lunn<tim@feathertop.org>
>>> ---
>>>
>>> (no changes since v1)
>>>
>>>   .../bindings/mfd/rockchip,rk809.yaml          | 30 ++++++++++++++++++-
>>>   1 file changed, 29 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
>>> index 839c0521f1e5..bac2e751e2f2 100644
>>> --- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
>>> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
>>> @@ -12,7 +12,7 @@ maintainers:
>>>   
>>>   description: |
>>>     Rockchip RK809 series PMIC. This device consists of an i2c controlled MFD
>>> -  that includes regulators, an RTC, and power button.
>>> +  that includes regulators, an RTC, a power button, and an audio codec.
>>>   
>>>   properties:
>>>     compatible:
>>> @@ -93,6 +93,34 @@ properties:
>>>           unevaluatedProperties: false
>>>       unevaluatedProperties: false
>>>   
>>> +  clocks:
>>> +    description:
>>> +      The input clock for the audio codec.
>>> +
>>> +  clock-names:
>>> +    description:
>>> +      The clock name for the codec clock.
>>> +    items:
>>> +      - const: mclk
>> You have one clock only, why do you need to have clock-names?
> This is just documenting the existing rk817 codec driver, which is using 
> the name to get the clock:
> 
> devm_clk_get(pdev->dev.parent, "mclk");
> 
> Thus i dont think clock-names can  be removed in this case? atleast not 
> without patching the driver as well?
>>

Your commit msg claims this is for existing driver using rk817_codec. So
what about rk817? It does not use clocks?

Best regards,
Krzysztof
Tim Lunn Jan. 17, 2024, 9:58 a.m. UTC | #5
On 1/17/24 20:22, Krzysztof Kozlowski wrote:
> On 17/01/2024 10:19, Tim Lunn wrote:
>> On 1/17/24 04:06, Conor Dooley wrote:
>>> On Wed, Jan 17, 2024 at 12:21:00AM +1100, Tim Lunn wrote:
>>>> Rockchip RK809 shares the same audio codec as the rk817 mfd, it is also
>>>> using the same rk817_codec driver. However it is missing from the
>>>> bindings.
>>>>
>>>> Update dt-binding documentation for rk809 to include the audio codec
>>>> properties. This fixes the following warning from dtb check:
>>>>
>>>> pmic@20: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clocks',
>>>>      'clock-names', 'clocks', 'codec' do not match any of the regexes:
>>>>      'pinctrl-[0-9]+'
>>>>
>>>> Signed-off-by: Tim Lunn<tim@feathertop.org>
>>>> ---
>>>>
>>>> (no changes since v1)
>>>>
>>>>    .../bindings/mfd/rockchip,rk809.yaml          | 30 ++++++++++++++++++-
>>>>    1 file changed, 29 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
>>>> index 839c0521f1e5..bac2e751e2f2 100644
>>>> --- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
>>>> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
>>>> @@ -12,7 +12,7 @@ maintainers:
>>>>    
>>>>    description: |
>>>>      Rockchip RK809 series PMIC. This device consists of an i2c controlled MFD
>>>> -  that includes regulators, an RTC, and power button.
>>>> +  that includes regulators, an RTC, a power button, and an audio codec.
>>>>    
>>>>    properties:
>>>>      compatible:
>>>> @@ -93,6 +93,34 @@ properties:
>>>>            unevaluatedProperties: false
>>>>        unevaluatedProperties: false
>>>>    
>>>> +  clocks:
>>>> +    description:
>>>> +      The input clock for the audio codec.
>>>> +
>>>> +  clock-names:
>>>> +    description:
>>>> +      The clock name for the codec clock.
>>>> +    items:
>>>> +      - const: mclk
>>> You have one clock only, why do you need to have clock-names?
>> This is just documenting the existing rk817 codec driver, which is using
>> the name to get the clock:
>>
>> devm_clk_get(pdev->dev.parent, "mclk");
>>
>> Thus i dont think clock-names can  be removed in this case? atleast not
>> without patching the driver as well?
> Your commit msg claims this is for existing driver using rk817_codec. So
> what about rk817? It does not use clocks?
>
rk817 uses exactly the same properties as what I included here. i.e it 
includes both clocks and clock-names.
My point above was that I dont think I can just remove the clock-names 
property as Conor suggested? I could be wrong though.
>
> Best regards,
> Krzysztof
>
Conor Dooley Jan. 17, 2024, 3:29 p.m. UTC | #6
On Wed, Jan 17, 2024 at 08:58:56PM +1100, Tim Lunn wrote:
> 
> On 1/17/24 20:22, Krzysztof Kozlowski wrote:
> > On 17/01/2024 10:19, Tim Lunn wrote:
> > > On 1/17/24 04:06, Conor Dooley wrote:
> > > > On Wed, Jan 17, 2024 at 12:21:00AM +1100, Tim Lunn wrote:
> > > > > Rockchip RK809 shares the same audio codec as the rk817 mfd, it is also
> > > > > using the same rk817_codec driver. However it is missing from the
> > > > > bindings.
> > > > > 
> > > > > Update dt-binding documentation for rk809 to include the audio codec
> > > > > properties. This fixes the following warning from dtb check:
> > > > > 
> > > > > pmic@20: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clocks',
> > > > >      'clock-names', 'clocks', 'codec' do not match any of the regexes:
> > > > >      'pinctrl-[0-9]+'
> > > > > 
> > > > > Signed-off-by: Tim Lunn<tim@feathertop.org>
> > > > > ---
> > > > > 
> > > > > (no changes since v1)
> > > > > 
> > > > >    .../bindings/mfd/rockchip,rk809.yaml          | 30 ++++++++++++++++++-
> > > > >    1 file changed, 29 insertions(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> > > > > index 839c0521f1e5..bac2e751e2f2 100644
> > > > > --- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> > > > > +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> > > > > @@ -12,7 +12,7 @@ maintainers:
> > > > >    description: |
> > > > >      Rockchip RK809 series PMIC. This device consists of an i2c controlled MFD
> > > > > -  that includes regulators, an RTC, and power button.
> > > > > +  that includes regulators, an RTC, a power button, and an audio codec.
> > > > >    properties:
> > > > >      compatible:
> > > > > @@ -93,6 +93,34 @@ properties:
> > > > >            unevaluatedProperties: false
> > > > >        unevaluatedProperties: false
> > > > > +  clocks:
> > > > > +    description:
> > > > > +      The input clock for the audio codec.
> > > > > +
> > > > > +  clock-names:
> > > > > +    description:
> > > > > +      The clock name for the codec clock.
> > > > > +    items:
> > > > > +      - const: mclk
> > > > You have one clock only, why do you need to have clock-names?
> > > This is just documenting the existing rk817 codec driver, which is using
> > > the name to get the clock:
> > > 
> > > devm_clk_get(pdev->dev.parent, "mclk");
> > > 
> > > Thus i dont think clock-names can  be removed in this case? atleast not
> > > without patching the driver as well?
> > Your commit msg claims this is for existing driver using rk817_codec. So
> > what about rk817? It does not use clocks?
> > 
> rk817 uses exactly the same properties as what I included here. i.e it
> includes both clocks and clock-names.
> My point above was that I dont think I can just remove the clock-names
> property as Conor suggested? I could be wrong though.

You can't remove it from the rk817 binding, but that doesn't mean you
should add it here. If the rk817 only has one clock too, then the driver
could be modified to not rely on the clock names at all. I'd be inclined
to allow it here since that makes the binding compatible with the
existing driver for the other device.
Chris Morgan Jan. 18, 2024, 3:21 p.m. UTC | #7
On Tue, Jan 16, 2024 at 05:06:34PM +0000, Conor Dooley wrote:
> On Wed, Jan 17, 2024 at 12:21:00AM +1100, Tim Lunn wrote:
> > Rockchip RK809 shares the same audio codec as the rk817 mfd, it is also
> > using the same rk817_codec driver. However it is missing from the
> > bindings.
> > 
> > Update dt-binding documentation for rk809 to include the audio codec
> > properties. This fixes the following warning from dtb check:
> > 
> > pmic@20: '#sound-dai-cells', 'assigned-clock-parents', 'assigned-clocks',
> >    'clock-names', 'clocks', 'codec' do not match any of the regexes:
> >    'pinctrl-[0-9]+'
> > 
> > Signed-off-by: Tim Lunn <tim@feathertop.org>
> > ---
> > 
> > (no changes since v1)
> > 
> >  .../bindings/mfd/rockchip,rk809.yaml          | 30 ++++++++++++++++++-
> >  1 file changed, 29 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> > index 839c0521f1e5..bac2e751e2f2 100644
> > --- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> > @@ -12,7 +12,7 @@ maintainers:
> >  
> >  description: |
> >    Rockchip RK809 series PMIC. This device consists of an i2c controlled MFD
> > -  that includes regulators, an RTC, and power button.
> > +  that includes regulators, an RTC, a power button, and an audio codec.
> >  
> >  properties:
> >    compatible:
> > @@ -93,6 +93,34 @@ properties:
> >          unevaluatedProperties: false
> >      unevaluatedProperties: false
> >  
> > +  clocks:
> > +    description:
> > +      The input clock for the audio codec.
> > +
> > +  clock-names:
> > +    description:
> > +      The clock name for the codec clock.
> > +    items:
> > +      - const: mclk
> 
> You have one clock only, why do you need to have clock-names?
> 
> Otherwise,
> Acked-by: Conor Dooley <conor.dooley@microchip.com>
> 
> Cheers,
> Conor.

The codec driver currently looks for a clock named "mclk".

Thank you,
Chris.

> 
> > +
> > +  '#sound-dai-cells':
> > +    description:
> > +      Needed for the interpretation of sound dais.
> > +    const: 0
> > +
> > +  codec:
> > +    description: |
> > +      The child node for the codec to hold additional properties. If no
> > +      additional properties are required for the codec, this node can be
> > +      omitted.
> > +    type: object
> > +    additionalProperties: false
> > +    properties:
> > +      rockchip,mic-in-differential:
> > +        type: boolean
> > +        description:
> > +          Describes if the microphone uses differential mode.
> > +
> >  allOf:
> >    - if:
> >        properties:
> > -- 
> > 2.40.1
> > 



> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
index 839c0521f1e5..bac2e751e2f2 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
@@ -12,7 +12,7 @@  maintainers:
 
 description: |
   Rockchip RK809 series PMIC. This device consists of an i2c controlled MFD
-  that includes regulators, an RTC, and power button.
+  that includes regulators, an RTC, a power button, and an audio codec.
 
 properties:
   compatible:
@@ -93,6 +93,34 @@  properties:
         unevaluatedProperties: false
     unevaluatedProperties: false
 
+  clocks:
+    description:
+      The input clock for the audio codec.
+
+  clock-names:
+    description:
+      The clock name for the codec clock.
+    items:
+      - const: mclk
+
+  '#sound-dai-cells':
+    description:
+      Needed for the interpretation of sound dais.
+    const: 0
+
+  codec:
+    description: |
+      The child node for the codec to hold additional properties. If no
+      additional properties are required for the codec, this node can be
+      omitted.
+    type: object
+    additionalProperties: false
+    properties:
+      rockchip,mic-in-differential:
+        type: boolean
+        description:
+          Describes if the microphone uses differential mode.
+
 allOf:
   - if:
       properties: