diff mbox series

[3/4] ASoC: dt-bindings: Add bindings for Richtek rt9123p

Message ID 61a77673fabc4f9109b05c19fad4ef1087eccfa5.1743774849.git.cy_huang@richtek.com (mailing list archive)
State New
Headers show
Series ASoC: Add Richtek rt9123 and rt9123p support | expand

Commit Message

ChiYuan Huang April 4, 2025, 2:22 p.m. UTC
From: ChiYuan Huang <cy_huang@richtek.com>

Document the ASoC Richtek rt9123p.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
---
 .../bindings/sound/richtek,rt9123p.yaml       | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/richtek,rt9123p.yaml

Comments

Rob Herring (Arm) April 4, 2025, 8:07 p.m. UTC | #1
On Fri, Apr 04, 2025 at 10:22:13PM +0800, cy_huang@richtek.com wrote:
> From: ChiYuan Huang <cy_huang@richtek.com>
> 
> Document the ASoC Richtek rt9123p.
> 
> Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
> ---
>  .../bindings/sound/richtek,rt9123p.yaml       | 50 +++++++++++++++++++
>  1 file changed, 50 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/richtek,rt9123p.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/richtek,rt9123p.yaml b/Documentation/devicetree/bindings/sound/richtek,rt9123p.yaml
> new file mode 100644
> index 000000000000..836cd369a68c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/richtek,rt9123p.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/richtek,rt9123p.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Richtek RT9123P Audio Amplifier
> +
> +maintainers:
> +  - ChiYuan Huang <cy_huang@richtek.com>
> +
> +description:
> +  RT9123P is a RT9123 variant which does not support I2C control.
> +
> +allOf:
> +  - $ref: dai-common.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - richtek,rt9123p
> +
> +  '#sound-dai-cells':
> +    const: 0
> +
> +  enable-gpios:
> +    maxItems: 1
> +
> +  enable-delay:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Delay time for 'ENABLE' pin changes intended to make I2S clocks ready to
> +      prevent speaker pop noise. The unit is in millisecond.
> +    default: 0

Ah, it is documented. But my questions need to be addressed (in the 
patch).

> +
> +required:
> +  - compatible
> +  - '#sound-dai-cells'
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    amplifier {
> +        compatible = "richtek,rt9123p";
> +        enable-gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
> +        #sound-dai-cells = <0>;
> +    };
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/richtek,rt9123p.yaml b/Documentation/devicetree/bindings/sound/richtek,rt9123p.yaml
new file mode 100644
index 000000000000..836cd369a68c
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/richtek,rt9123p.yaml
@@ -0,0 +1,50 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/richtek,rt9123p.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Richtek RT9123P Audio Amplifier
+
+maintainers:
+  - ChiYuan Huang <cy_huang@richtek.com>
+
+description:
+  RT9123P is a RT9123 variant which does not support I2C control.
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - richtek,rt9123p
+
+  '#sound-dai-cells':
+    const: 0
+
+  enable-gpios:
+    maxItems: 1
+
+  enable-delay:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Delay time for 'ENABLE' pin changes intended to make I2S clocks ready to
+      prevent speaker pop noise. The unit is in millisecond.
+    default: 0
+
+required:
+  - compatible
+  - '#sound-dai-cells'
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    amplifier {
+        compatible = "richtek,rt9123p";
+        enable-gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
+        #sound-dai-cells = <0>;
+    };