diff mbox series

[V1,5/5] ASoC: dt-bindings: Add schema for "awinic,aw88261"

Message ID 20230717115845.297991-6-wangweidong.a@awinic.com (mailing list archive)
State Superseded
Headers show
Series ASoC: codecs: Add Awinic AW88261 audio amplifier driver | expand

Commit Message

wangweidong.a@awinic.com July 17, 2023, 11:58 a.m. UTC
From: Weidong Wang <wangweidong.a@awinic.com>

Add a DT schema for describing Awinic aw88261 audio amplifiers. They are
controlled using I2C.

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
---
 .../bindings/sound/awinic,aw88261.yaml        | 53 +++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/awinic,aw88261.yaml

Comments

Krzysztof Kozlowski July 17, 2023, 8:23 p.m. UTC | #1
On 17/07/2023 13:58, wangweidong.a@awinic.com wrote:
> From: Weidong Wang <wangweidong.a@awinic.com>
> 
> Add a DT schema for describing Awinic aw88261 audio amplifiers. They are
> controlled using I2C.
> 
> Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>

...

> +  compatible:
> +    const: awinic,aw88261
> +
> +  reg:
> +    maxItems: 1
> +
> +  '#sound-dai-cells':
> +    const: 0
> +
> +  reset-gpios:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - '#sound-dai-cells'
> +  - reset-gpios

I don't see any differences against AW88395. Add the compatible to that
schema.

Best regards,
Krzysztof
wangweidong.a@awinic.com July 19, 2023, 3:02 a.m. UTC | #2
Hi, Krzysztof,
Thank you very much for your advice.

On 18/07/2023 16:24, krzysztof.kozlowski@linaro.org wrote:
> On 17/07/2023 13:58, wangweidong.a@awinic.com wrote:
>> From: Weidong Wang <wangweidong.a@awinic.com>
>> 
>> Add a DT schema for describing Awinic aw88261 audio amplifiers. They are
>> controlled using I2C.
>> 
>> Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>

...

>> +  compatible:
>> +    const: awinic,aw88261
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  '#sound-dai-cells':
>> +    const: 0
>> +
>> +  reset-gpios:
>> +    maxItems: 1
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - '#sound-dai-cells'
>> +  - reset-gpios

> I don't see any differences against AW88395. Add the compatible to that
> schema.

I will add "awinic,aw88261" to the awinic,aw88395.yaml

Best regards,
Weidong Wang
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/awinic,aw88261.yaml b/Documentation/devicetree/bindings/sound/awinic,aw88261.yaml
new file mode 100644
index 000000000000..a0f3e3418c1e
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/awinic,aw88261.yaml
@@ -0,0 +1,53 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/awinic,aw88261.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Awinic AW88261 Smart Audio Amplifier
+
+maintainers:
+  - Weidong Wang <wangweidong.a@awinic.com>
+
+description:
+  The Awinic AW88261 is an I2S/TDM input, high efficiency
+  digital Smart K audio amplifier with an integrated 10.25V
+  smart boost convert.
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    const: awinic,aw88261
+
+  reg:
+    maxItems: 1
+
+  '#sound-dai-cells':
+    const: 0
+
+  reset-gpios:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - '#sound-dai-cells'
+  - reset-gpios
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        audio-codec@34 {
+            compatible = "awinic,aw88261";
+            reg = <0x34>;
+            #sound-dai-cells = <0>;
+            reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+        };
+    };