Message ID | 1668165992-6493-6-git-send-email-wangweidong.a@awinic.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | ASoC: codecs: Add Awinic AW883XX audio amplifier driver | expand |
On 11/11/2022 12:26, wangweidong.a@awinic.com wrote: > From: Weidong Wang <wangweidong.a@awinic.com> > > Add a DT schema for describing Awinic AW883xx audio amplifiers. They are > controlled using I2C. > > Signed-off-by: Weidong Wang <wangweidong.a@awinic.com> > --- > .../devicetree/bindings/sound/awinic,aw883xx.yaml | 60 ++++++++++++++++++++++ > 1 file changed, 60 insertions(+) > create mode 100644 Documentation/devicetree/bindings/sound/awinic,aw883xx.yaml > > diff --git a/Documentation/devicetree/bindings/sound/awinic,aw883xx.yaml b/Documentation/devicetree/bindings/sound/awinic,aw883xx.yaml > new file mode 100644 > index 0000000..1c0c726 > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/awinic,aw883xx.yaml > @@ -0,0 +1,60 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/awinic,aw883xx.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Awinic AW883xx Smart Audio Amplifier > + > +maintainers: > + - Stephan Gerhold <stephan@gerhold.net> > + > +description: > + The Awinic AW883XX is an I2S/TDM input, high efficiency > + digital Smart K audio amplifier with an integrated 10.25V > + smart boost convert. > + > +allOf: > + - $ref: name-prefix.yaml# > + > +properties: > + compatible: > + const: awinic,aw883xx_smartpa > + > + reg: > + maxItems: 1 > + > + reset-gpio: reset-gpios > + maxItems: 1 > + > + irq-gpio: irq-gpios > + maxItems: 1 You also need here description > + > + sound-channel: > + maxItems: 1 What's this? Does not look like a standard property. You need type and description (and sometimes also vendor prefix...). > + > + sound-name-prefix: true > + > +required: > + - compatible > + - reg > + - reset-gpio > + - irq-gpio > + - sound-channel > + > +additionalProperties: false > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + aw883xx_smartpa@34 { Node names should be generic, so codec or amplifier https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + compatible = "awinic,aw883xx_smartpa"; > + reg = <0x34>; > + reset-gpio = <&ap_gpio 92 0>; > + irq-gpio = <&ap_gpio 93 0>; Use defines for flags. > + sound-channel = <0>; > + }; > + }; Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/sound/awinic,aw883xx.yaml b/Documentation/devicetree/bindings/sound/awinic,aw883xx.yaml new file mode 100644 index 0000000..1c0c726 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/awinic,aw883xx.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/awinic,aw883xx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Awinic AW883xx Smart Audio Amplifier + +maintainers: + - Stephan Gerhold <stephan@gerhold.net> + +description: + The Awinic AW883XX is an I2S/TDM input, high efficiency + digital Smart K audio amplifier with an integrated 10.25V + smart boost convert. + +allOf: + - $ref: name-prefix.yaml# + +properties: + compatible: + const: awinic,aw883xx_smartpa + + reg: + maxItems: 1 + + reset-gpio: + maxItems: 1 + + irq-gpio: + maxItems: 1 + + sound-channel: + maxItems: 1 + + sound-name-prefix: true + +required: + - compatible + - reg + - reset-gpio + - irq-gpio + - sound-channel + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + aw883xx_smartpa@34 { + compatible = "awinic,aw883xx_smartpa"; + reg = <0x34>; + reset-gpio = <&ap_gpio 92 0>; + irq-gpio = <&ap_gpio 93 0>; + sound-channel = <0>; + }; + };