2023-06-26 11:20:12

by Hal Feng

[permalink] [raw]
Subject: [PATCH v1 3/5] ASoC: dt-bindings: Add StarFive JH7110 PWM-DAC controller

Add bindings for the PWM-DAC controller on the JH7110
RISC-V SoC by StarFive Ltd.

Signed-off-by: Hal Feng <[email protected]>
---
.../sound/starfive,jh7110-pwmdac.yaml | 76 +++++++++++++++++++
1 file changed, 76 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/starfive,jh7110-pwmdac.yaml

diff --git a/Documentation/devicetree/bindings/sound/starfive,jh7110-pwmdac.yaml b/Documentation/devicetree/bindings/sound/starfive,jh7110-pwmdac.yaml
new file mode 100644
index 000000000000..91a4213f2bd8
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/starfive,jh7110-pwmdac.yaml
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/starfive,jh7110-pwmdac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 PWM-DAC Controller
+
+description: |
+ The PWM-DAC Controller uses PWM square wave generators plus RC filters to
+ form a DAC for audio play in StarFive JH7110 SoC. This audio play controller
+ supports 16 bit audio format, up to 48K sampling frequency , up to left
+ and right dual channels.
+
+maintainers:
+ - Hal Feng <[email protected]>
+
+allOf:
+ - $ref: dai-common.yaml#
+
+properties:
+ compatible:
+ const: starfive,jh7110-pwmdac
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: PWMDAC APB
+ - description: PWMDAC CORE
+
+ clock-names:
+ items:
+ - const: apb
+ - const: core
+
+ resets:
+ maxItems: 1
+ description: PWMDAC APB
+
+ dmas:
+ maxItems: 1
+ description: TX DMA Channel
+
+ dma-names:
+ const: tx
+
+ "#sound-dai-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - resets
+ - dmas
+ - dma-names
+ - "#sound-dai-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ pwmdac@100b0000 {
+ compatible = "starfive,jh7110-pwmdac";
+ reg = <0x100b0000 0x1000>;
+ clocks = <&syscrg 157>,
+ <&syscrg 158>;
+ clock-names = "apb", "core";
+ resets = <&syscrg 96>;
+ dmas = <&dma 22>;
+ dma-names = "tx";
+ #sound-dai-cells = <0>;
+ };
--
2.38.1



2023-06-26 16:27:18

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v1 3/5] ASoC: dt-bindings: Add StarFive JH7110 PWM-DAC controller

On 26/06/2023 13:09, Hal Feng wrote:
> Add bindings for the PWM-DAC controller on the JH7110
> RISC-V SoC by StarFive Ltd.
>
> Signed-off-by: Hal Feng <[email protected]>
> ---
> .../sound/starfive,jh7110-pwmdac.yaml | 76 +++++++++++++++++++
> 1 file changed, 76 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/starfive,jh7110-pwmdac.yaml
>
> diff --git a/Documentation/devicetree/bindings/sound/starfive,jh7110-pwmdac.yaml b/Documentation/devicetree/bindings/sound/starfive,jh7110-pwmdac.yaml
> new file mode 100644
> index 000000000000..91a4213f2bd8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/starfive,jh7110-pwmdac.yaml
> @@ -0,0 +1,76 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/starfive,jh7110-pwmdac.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: StarFive JH7110 PWM-DAC Controller
> +
> +description: |

Do not need '|' unless you need to preserve formatting.

> + The PWM-DAC Controller uses PWM square wave generators plus RC filters to
> + form a DAC for audio play in StarFive JH7110 SoC. This audio play controller
> + supports 16 bit audio format, up to 48K sampling frequency , up to left

No space before ,

> + and right dual channels.
> +
> +maintainers:
> + - Hal Feng <hal.feng@starfivetec


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

Best regards,
Krzysztof


2023-06-30 02:16:27

by Hal Feng

[permalink] [raw]
Subject: Re: [PATCH v1 3/5] ASoC: dt-bindings: Add StarFive JH7110 PWM-DAC controller

On Mon, 26 Jun 2023 17:36:20 +0200, Krzysztof Kozlowski wrote:
> On 26/06/2023 13:09, Hal Feng wrote:
>> Add bindings for the PWM-DAC controller on the JH7110
>> RISC-V SoC by StarFive Ltd.
>>
>> Signed-off-by: Hal Feng <[email protected]>
>> ---
>> .../sound/starfive,jh7110-pwmdac.yaml | 76 +++++++++++++++++++
>> 1 file changed, 76 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/sound/starfive,jh7110-pwmdac.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/sound/starfive,jh7110-pwmdac.yaml b/Documentation/devicetree/bindings/sound/starfive,jh7110-pwmdac.yaml
>> new file mode 100644
>> index 000000000000..91a4213f2bd8
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/sound/starfive,jh7110-pwmdac.yaml
>> @@ -0,0 +1,76 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/sound/starfive,jh7110-pwmdac.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: StarFive JH7110 PWM-DAC Controller
>> +
>> +description: |
>
> Do not need '|' unless you need to preserve formatting.

Got it. Will drop it later.

>
>> + The PWM-DAC Controller uses PWM square wave generators plus RC filters to
>> + form a DAC for audio play in StarFive JH7110 SoC. This audio play controller
>> + supports 16 bit audio format, up to 48K sampling frequency , up to left
>
> No space before ,

Will fix.

>
>> + and right dual channels.
>> +
>> +maintainers:
>> + - Hal Feng <hal.feng@starfivetec
>
>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>

Thanks for your review.

Best regards,
Hal