diff mbox series

[v2,1/2] ASoC: dt-bindings: rt9120: Add initial bindings

Message ID 1633398092-19953-1-git-send-email-u0084500@gmail.com
State Superseded, archived
Headers show
Series [v2,1/2] ASoC: dt-bindings: rt9120: Add initial bindings | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 1 warnings, 58 lines checked
robh/dt-meta-schema success
robh/dtbs-check success

Commit Message

ChiYuan Huang Oct. 5, 2021, 1:41 a.m. UTC
From: ChiYuan Huang <cy_huang@richtek.com>

Add initial bindings for Richtek rt9120 audio amplifier.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
---
Very appoligized. I forget to migrate this line from my test 5.10 kernel.
Without this line will cause sound card codec link fail.
Please use the patch v2 to review the bindings and source code.

V2
- Add missing #sound-dai-cells property.

---
 .../devicetree/bindings/sound/richtek,rt9120.yaml  | 58 ++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/richtek,rt9120.yaml

Comments

Mark Brown Oct. 5, 2021, 11:55 a.m. UTC | #1
On Tue, Oct 05, 2021 at 09:41:31AM +0800, cy_huang wrote:

> Very appoligized. I forget to migrate this line from my test 5.10 kernel.
> Without this line will cause sound card codec link fail.
> Please use the patch v2 to review the bindings and source code.

Sorry, saw v1 before I saw this but I guess the issues still apply - a
quick check seems like it.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/richtek,rt9120.yaml b/Documentation/devicetree/bindings/sound/richtek,rt9120.yaml
new file mode 100644
index 00000000..6d16795
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/richtek,rt9120.yaml
@@ -0,0 +1,58 @@ 
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/richtek,rt9120.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Richtek RT9120 Class-D audio amplifier
+
+maintainers:
+  - ChiYuan Huang <cy_huang@richtek.com>
+
+description: |
+  The RT9120 is a high efficiency, I2S-input, stereo audio power amplifier
+  delivering 2*20W into 8 Ohm BTL speaker loads. It supports the wide input
+  voltage  range from 4.5V to 26.4V to meet the need on most common
+  applications like as TV, monitors. home entertainment, electronic music
+  equipment.
+
+properties:
+  compatible:
+    enum:
+      - richtek,rt9120
+
+  reg:
+    description: I2C device address
+    maxItems: 1
+
+  pwdnn-gpios:
+    description: GPIO used for power down, low active
+    maxItems: 1
+
+  richtek,use-dvdd-1p8v:
+    description: Indicate DVDD 1P8V is used, default for 3P3V or 5V design
+    type: boolean
+
+  '#sound-dai-cells':
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - '#sound-dai-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      rt9120@1a {
+        compatible = "richtek,rt9120";
+        reg = <0x1a>;
+        #sound-dai-cells = <0>;
+        pwdnn-gpios = <&gpio26 2 0>;
+        richtek,use-dvdd-1p8v;
+      };
+    };