2024-01-16 13:21:34

by Tim Lunn

[permalink] [raw]
Subject: [PATCH v2 0/3] dt-bindings: rockchip: Add support for rk809 audio codec

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.

This series documents the audio codec properties in rockchip,rk809.yaml
bindings and updates example.

Changes in v2:
- Fix vcc-supply warning detected by dt_binding bot
- Fix missing include and pinctrl for codec example

Tim Lunn (3):
dt-bindings: rockchip: Document rk809 support for rk817 audio codec
dt-bindings: rockchip: rk809 fix existing example
dt-bindings: rockchip: Update rk809 example with audio codec
properties

.../bindings/mfd/rockchip,rk809.yaml | 46 ++++++++++++++++---
1 file changed, 39 insertions(+), 7 deletions(-)

--
2.40.1



2024-01-16 13:21:43

by Tim Lunn

[permalink] [raw]
Subject: [PATCH v2 1/3] dt-bindings: rockchip: Document rk809 support for rk817 audio codec

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 <[email protected]>
---

(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
+
+ '#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


2024-01-16 13:21:53

by Tim Lunn

[permalink] [raw]
Subject: [PATCH v2 2/3] dt-bindings: rockchip: rk809 fix existing example

Fix typo in the example specifying wrong compatible string for rk809.
Remove additional vccX-supply properties that dont exist on rk809.

Signed-off-by: Tim Lunn <[email protected]>

---

Changes in v2:
- Fix vcc-supply warning detected by dt_binding bot

Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
index bac2e751e2f2..9b9d670708ce 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
@@ -154,8 +154,8 @@ examples:
#address-cells = <1>;
#size-cells = <0>;

- rk808: pmic@1b {
- compatible = "rockchip,rk808";
+ rk809: pmic@1b {
+ compatible = "rockchip,rk809";
reg = <0x1b>;
#clock-cells = <1>;
clock-output-names = "xin32k", "rk808-clkout2";
@@ -174,9 +174,6 @@ examples:
vcc7-supply = <&vcc_sysin>;
vcc8-supply = <&vcc3v3_sys>;
vcc9-supply = <&vcc_sysin>;
- vcc10-supply = <&vcc_sysin>;
- vcc11-supply = <&vcc_sysin>;
- vcc12-supply = <&vcc3v3_sys>;

regulators {
vdd_center: DCDC_REG1 {
--
2.40.1


2024-01-16 13:22:09

by Tim Lunn

[permalink] [raw]
Subject: [PATCH v2 3/3] dt-bindings: rockchip: Update rk809 example with audio codec properties

Update the example provided to include the properties for using
rk817 audio codec.

Signed-off-by: Tim Lunn <[email protected]>

---

Changes in v2:
- Fix missing include and pinctrl for codec example

.../devicetree/bindings/mfd/rockchip,rk809.yaml | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
index 9b9d670708ce..fee8338b230b 100644
--- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
+++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
@@ -147,6 +147,7 @@ additionalProperties: false

examples:
- |
+ #include <dt-bindings/clock/px30-cru.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
@@ -161,10 +162,13 @@ examples:
clock-output-names = "xin32k", "rk808-clkout2";
interrupt-parent = <&gpio3>;
interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
+ clock-names = "mclk";
+ clocks = <&cru SCLK_I2S1_OUT>;
pinctrl-names = "default";
- pinctrl-0 = <&pmic_int_l_pin>;
+ pinctrl-0 = <&pmic_int_l_pin>, <&i2s1_2ch_mclk>;
rockchip,system-power-controller;
wakeup-source;
+ #sound-dai-cells = <0>;

vcc1-supply = <&vcc_sysin>;
vcc2-supply = <&vcc_sysin>;
@@ -309,5 +313,8 @@ examples:
};
};
};
+ rk817_codec: codec {
+ rockchip,mic-in-differential;
+ };
};
};
--
2.40.1


2024-01-16 17:07:49

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] dt-bindings: rockchip: Document rk809 support for rk817 audio codec

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 <[email protected]>
> ---
>
> (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 <[email protected]>

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
>


Attachments:
(No filename) (2.44 kB)
signature.asc (235.00 B)
Download all attachments

2024-01-16 17:07:50

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] dt-bindings: rockchip: rk809 fix existing example

On Wed, Jan 17, 2024 at 12:21:01AM +1100, Tim Lunn wrote:
> Fix typo in the example specifying wrong compatible string for rk809.
> Remove additional vccX-supply properties that dont exist on rk809.
>
> Signed-off-by: Tim Lunn <[email protected]>

Acked-by: Conor Dooley <[email protected]>

A fixes tag would be nice too I suppose. Not worth resending for IMO
since b4 will pick it up if you reply with one.

Thanks,
Conor.


Attachments:
(No filename) (449.00 B)
signature.asc (235.00 B)
Download all attachments

2024-01-16 17:16:56

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v2 3/3] dt-bindings: rockchip: Update rk809 example with audio codec properties

On Wed, Jan 17, 2024 at 12:21:02AM +1100, Tim Lunn wrote:
> Update the example provided to include the properties for using
> rk817 audio codec.
>
> Signed-off-by: Tim Lunn <[email protected]>
>
> ---
>
> Changes in v2:
> - Fix missing include and pinctrl for codec example
>
> .../devicetree/bindings/mfd/rockchip,rk809.yaml | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> index 9b9d670708ce..fee8338b230b 100644
> --- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> @@ -147,6 +147,7 @@ additionalProperties: false
>
> examples:
> - |
> + #include <dt-bindings/clock/px30-cru.h>
> #include <dt-bindings/pinctrl/rockchip.h>
> #include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/gpio/gpio.h>
> @@ -161,10 +162,13 @@ examples:
> clock-output-names = "xin32k", "rk808-clkout2";
> interrupt-parent = <&gpio3>;
> interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
> + clock-names = "mclk";
> + clocks = <&cru SCLK_I2S1_OUT>;
> pinctrl-names = "default";
> - pinctrl-0 = <&pmic_int_l_pin>;
> + pinctrl-0 = <&pmic_int_l_pin>, <&i2s1_2ch_mclk>;
> rockchip,system-power-controller;
> wakeup-source;
> + #sound-dai-cells = <0>;
>
> vcc1-supply = <&vcc_sysin>;
> vcc2-supply = <&vcc_sysin>;
> @@ -309,5 +313,8 @@ examples:
> };
> };
> };

Blank line here please.
I'd squash this with the patch adding the codec as an allowed property
though.

Thanks,
Conor.

> + rk817_codec: codec {
> + rockchip,mic-in-differential;
> + };
> };
> };
> --
> 2.40.1
>


Attachments:
(No filename) (2.00 kB)
signature.asc (235.00 B)
Download all attachments

2024-01-16 20:51:18

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] dt-bindings: rockchip: Add support for rk809 audio codec

On Wed, Jan 17, 2024 at 12:20:59AM +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.
>
> This series documents the audio codec properties in rockchip,rk809.yaml
> bindings and updates example.
>
> Changes in v2:
> - Fix vcc-supply warning detected by dt_binding bot
> - Fix missing include and pinctrl for codec example

I just reviewed v1. Please apply those comments. And wait a bit between
sending new versions.

Rob

2024-01-17 07:43:31

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] dt-bindings: rockchip: rk809 fix existing example

On 16/01/2024 14:21, Tim Lunn wrote:
> Fix typo in the example specifying wrong compatible string for rk809.
> Remove additional vccX-supply properties that dont exist on rk809.
>
> Signed-off-by: Tim Lunn <[email protected]>
>
> ---
>
> Changes in v2:
> - Fix vcc-supply warning detected by dt_binding bot
>
> Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> index bac2e751e2f2..9b9d670708ce 100644
> --- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
> @@ -154,8 +154,8 @@ examples:
> #address-cells = <1>;
> #size-cells = <0>;
>
> - rk808: pmic@1b {
> - compatible = "rockchip,rk808";
> + rk809: pmic@1b {

Drop label.

Best regards,
Krzysztof


2024-01-17 07:43:33

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] dt-bindings: rockchip: Document rk809 support for rk817 audio codec

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 <[email protected]>
> ---
>
> (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


2024-01-17 09:23:29

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] dt-bindings: rockchip: Document rk809 support for rk817 audio codec

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<[email protected]>
>>> ---
>>>
>>> (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


2024-01-17 09:30:03

by Tim Lunn

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] dt-bindings: rockchip: rk809 fix existing example


On 1/17/24 04:07, Conor Dooley wrote:
> On Wed, Jan 17, 2024 at 12:21:01AM +1100, Tim Lunn wrote:
>> Fix typo in the example specifying wrong compatible string for rk809.
>> Remove additional vccX-supply properties that dont exist on rk809.
>>
>> Signed-off-by: Tim Lunn <[email protected]>
Fixes: 6c38ca03406e ("dt-bindings: mfd: rk808: Convert bindings to yaml")
> Acked-by: Conor Dooley <[email protected]>
>
> A fixes tag would be nice too I suppose. Not worth resending for IMO
> since b4 will pick it up if you reply with one.
>
> Thanks,
> Conor.

2024-01-17 09:31:49

by Tim Lunn

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] dt-bindings: rockchip: Document rk809 support for rk817 audio codec


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<[email protected]>
>> ---
>>
>> (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<[email protected]>
>
> 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
>>

2024-01-17 09:43:02

by Tim Lunn

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] dt-bindings: rockchip: Add support for rk809 audio codec


On 1/17/24 06:52, Rob Herring wrote:
> On Wed, Jan 17, 2024 at 12:20:59AM +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.
>>
>> This series documents the audio codec properties in rockchip,rk809.yaml
>> bindings and updates example.
>>
>> Changes in v2:
>> - Fix vcc-supply warning detected by dt_binding bot
>> - Fix missing include and pinctrl for codec example
> I just reviewed v1. Please apply those comments. And wait a bit between
> sending new versions.
>
Sorry about that, first series was broken as per bot response, but will
wait longer in future.

Regards
   Tim
>
> Rob

2024-01-17 10:03:58

by Tim Lunn

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] dt-bindings: rockchip: Document rk809 support for rk817 audio codec


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<[email protected]>
>>>> ---
>>>>
>>>> (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
>

2024-01-17 10:04:39

by Tim Lunn

[permalink] [raw]
Subject: Re: [PATCH v2 2/3] dt-bindings: rockchip: rk809 fix existing example

Hi Krzysztof,

On 1/17/24 18:43, Krzysztof Kozlowski wrote:
> On 16/01/2024 14:21, Tim Lunn wrote:
>> Fix typo in the example specifying wrong compatible string for rk809.
>> Remove additional vccX-supply properties that dont exist on rk809.
>>
>> Signed-off-by: Tim Lunn <[email protected]>
>>
>> ---
>>
>> Changes in v2:
>> - Fix vcc-supply warning detected by dt_binding bot
>>
>> Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml | 7 ++-----
>> 1 file changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
>> index bac2e751e2f2..9b9d670708ce 100644
>> --- a/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
>> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml
>> @@ -154,8 +154,8 @@ examples:
>> #address-cells = <1>;
>> #size-cells = <0>;
>>
>> - rk808: pmic@1b {
>> - compatible = "rockchip,rk808";
>> + rk809: pmic@1b {
> Drop label.
>
Yep, will fix.
> Best regards,
> Krzysztof
>

2024-01-17 15:29:54

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] dt-bindings: rockchip: Document rk809 support for rk817 audio codec

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<[email protected]>
> > > > > ---
> > > > >
> > > > > (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.


Attachments:
(No filename) (3.25 kB)
signature.asc (235.00 B)
Download all attachments

2024-01-18 15:21:44

by Chris Morgan

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] dt-bindings: rockchip: Document rk809 support for rk817 audio codec

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 <[email protected]>
> > ---
> >
> > (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 <[email protected]>
>
> 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
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-rockchip