summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/sound/wlf,wm8903.yaml
diff options
context:
space:
mode:
authorDavid Heidelberg <david@ixit.cz>2021-10-28 15:46:38 +0300
committerMark Brown <broonie@kernel.org>2021-11-16 02:33:54 +0300
commit5ecc573d0c542c0f95497ba4586a6226814e4e18 (patch)
treedddd5d95d4a7385db34ef0030fb39289c927da02 /Documentation/devicetree/bindings/sound/wlf,wm8903.yaml
parent3c8a3ad4019126f06016ab0128dde11817502f52 (diff)
downloadlinux-5ecc573d0c542c0f95497ba4586a6226814e4e18.tar.xz
ASoC: wm8903: Convert txt bindings to yaml
Convert the Wolfson WM8903 Ultra-Low Power Stereo CODEC Device Tree binding documentation to json-schema. Signed-off-by: David Heidelberg <david@ixit.cz> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211028124639.38420-1-david@ixit.cz Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/devicetree/bindings/sound/wlf,wm8903.yaml')
-rw-r--r--Documentation/devicetree/bindings/sound/wlf,wm8903.yaml116
1 files changed, 116 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/sound/wlf,wm8903.yaml b/Documentation/devicetree/bindings/sound/wlf,wm8903.yaml
new file mode 100644
index 000000000000..7105ed5fd6c7
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/wlf,wm8903.yaml
@@ -0,0 +1,116 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/sound/wlf,wm8903.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: WM8903 audio codec
+
+description: |
+ This device supports I2C only.
+ Pins on the device (for linking into audio routes):
+ * IN1L
+ * IN1R
+ * IN2L
+ * IN2R
+ * IN3L
+ * IN3R
+ * DMICDAT
+ * HPOUTL
+ * HPOUTR
+ * LINEOUTL
+ * LINEOUTR
+ * LOP
+ * LON
+ * ROP
+ * RON
+ * MICBIAS
+
+maintainers:
+ - patches@opensource.cirrus.com
+
+properties:
+ compatible:
+ const: wlf,wm8903
+
+ reg:
+ maxItems: 1
+
+ gpio-controller: true
+ '#gpio-cells':
+ const: 2
+
+ interrupts:
+ maxItems: 1
+
+ micdet-cfg:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0
+ description: Default register value for R6 (Mic Bias).
+
+ micdet-delay:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 100
+ description: The debounce delay for microphone detection in mS.
+
+ gpio-cfg:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description: |
+ minItems: 5
+ maxItems: 5
+ A list of GPIO configuration register values.
+ If absent, no configuration of these registers is performed.
+ If any entry has the value 0xffffffff, that GPIO's
+ configuration will not be modified.
+
+ AVDD-supply:
+ description: Analog power supply regulator on the AVDD pin.
+
+ CPVDD-supply:
+ description: Charge pump supply regulator on the CPVDD pin.
+
+ DBVDD-supply:
+ description: Digital buffer supply regulator for the DBVDD pin.
+
+ DCVDD-supply:
+ description: Digital core supply regulator for the DCVDD pin.
+
+
+required:
+ - compatible
+ - reg
+ - gpio-controller
+ - '#gpio-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ wm8903: codec@1a {
+ compatible = "wlf,wm8903";
+ reg = <0x1a>;
+ interrupts = <347>;
+
+ AVDD-supply = <&fooreg_a>;
+ CPVDD-supply = <&fooreg_b>;
+ DBVDD-supply = <&fooreg_c>;
+ DCVDD-supply = <&fooreg_d>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ micdet-cfg = <0>;
+ micdet-delay = <100>;
+ gpio-cfg = <
+ 0x0600 /* DMIC_LR, output */
+ 0x0680 /* DMIC_DAT, input */
+ 0x0000 /* GPIO, output, low */
+ 0x0200 /* Interrupt, output */
+ 0x01a0 /* BCLK, input, active high */
+ >;
+ };
+ };