ASoC: dt-bindings: wm8904: Convert to dtschema

Convert the WM8904 audio CODEC bindings to DT schema.

Compared to the original binding #sound-dai-cells and the missing power
supplies are added. The latter are all required as described in the
datasheet.

Datasheet: https://statics.cirrus.com/pubs/proDatasheet/WM8904_Rev4.1.pdf
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230719121918.247397-1-francesco@dolcini.it
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Francesco Dolcini 2023-07-19 14:19:18 +02:00 committed by Mark Brown
parent 65bc25b8d0
commit 83759352fd
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 74 additions and 33 deletions

View File

@ -0,0 +1,74 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/wlf,wm8904.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Wolfson WM8904/WM8912 audio codecs
maintainers:
- patches@opensource.cirrus.com
description: |
Pins on the device (for linking into audio routes):
IN1L, IN1R, IN2L, IN2R, IN3L, IN3R, HPOUTL, HPOUTR, LINEOUTL, LINEOUTR,
MICBIAS
properties:
compatible:
enum:
- wlf,wm8904
- wlf,wm8912
reg:
maxItems: 1
"#sound-dai-cells":
const: 0
clocks:
maxItems: 1
clock-names:
const: mclk
AVDD-supply: true
CPVDD-supply: true
DBVDD-supply: true
DCVDD-supply: true
MICVDD-supply: true
required:
- compatible
- reg
- clocks
- clock-names
- AVDD-supply
- CPVDD-supply
- DBVDD-supply
- DCVDD-supply
- MICVDD-supply
allOf:
- $ref: dai-common.yaml#
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@1a {
compatible = "wlf,wm8904";
reg = <0x1a>;
clocks = <&pck0>;
clock-names = "mclk";
AVDD-supply = <&reg_1p8v>;
CPVDD-supply = <&reg_1p8v>;
DBVDD-supply = <&reg_1p8v>;
DCVDD-supply = <&reg_1p8v>;
MICVDD-supply = <&reg_1p8v>;
};
};

View File

@ -1,33 +0,0 @@
WM8904 audio CODEC
This device supports I2C only.
Required properties:
- compatible: "wlf,wm8904" or "wlf,wm8912"
- reg: the I2C address of the device.
- clock-names: "mclk"
- clocks: reference to
<Documentation/devicetree/bindings/clock/clock-bindings.txt>
Pins on the device (for linking into audio routes):
* IN1L
* IN1R
* IN2L
* IN2R
* IN3L
* IN3R
* HPOUTL
* HPOUTR
* LINEOUTL
* LINEOUTR
* MICBIAS
Examples:
codec: wm8904@1a {
compatible = "wlf,wm8904";
reg = <0x1a>;
clocks = <&pck0>;
clock-names = "mclk";
};