Wolfson WM1811/WM8994/WM8958 audio codecs

Schema identifier ($id): "http://devicetree.org/schemas/sound/wlf,wm8994.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Krzysztof Kozlowski <krzk@kernel.org>", "patches@opensource.cirrus.com"

These devices support both I2C and SPI (configured with pin strapping on the board).

Pins on the device (for linking into audio routes): IN1LN, IN1LP, IN2LN, IN2LP:VXRN, IN1RN, IN1RP, IN2RN, IN2RP:VXRP, SPKOUTLP, SPKOUTLN, SPKOUTRP, SPKOUTRN, HPOUT1L, HPOUT1R, HPOUT2P, HPOUT2N, LINEOUT1P, LINEOUT1N, LINEOUT2P, LINEOUT2N.

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "wlf,wm1811", "wlf,wm8994", "wlf,wm8958"

reg — required here #

Maximum number of items (maxItems): 1

clocks — not listed as required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

clock-names — not listed as required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

Exact value (const): "MCLK1"

Item 2

Exact value (const): "MCLK2"

gpio-controller — not listed as required here #

true — No constraints added by this property rule.

#gpio-cells — not listed as required here #

Exact value (const): 2

interrupts — not listed as required here #

Maximum number of items (maxItems): 1

interrupt-controller — not listed as required here #

true — No constraints added by this property rule.

#interrupt-cells — not listed as required here #

Exact value (const): 2

The first cell is the IRQ number. The second cell is the flags, encoded as the trigger masks.

AVDD1-supply — not listed as required here #

true — No constraints added by this property rule.

AVDD2-supply — required here #

true — No constraints added by this property rule.

CPVDD-supply — required here #

true — No constraints added by this property rule.

DBVDD-supply — not listed as required here #

true — No constraints added by this property rule.

DBVDD1-supply — not listed as required here #

true — No constraints added by this property rule.

DBVDD2-supply — not listed as required here #

true — No constraints added by this property rule.

DBVDD3-supply — not listed as required here #

true — No constraints added by this property rule.

DCVDD-supply — not listed as required here #

true — No constraints added by this property rule.

LDO1VDD-supply — not listed as required here #

true — No constraints added by this property rule.

LDO2VDD-supply — not listed as required here #

true — No constraints added by this property rule.

SPKVDD1-supply — required here #

true — No constraints added by this property rule.

SPKVDD2-supply — required here #

true — No constraints added by this property rule.

#sound-dai-cells — not listed as required here #

Exact value (const): 0

wlf,gpio-cfg — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array

Maximum number of items (maxItems): 11

A list of GPIO configuration register values. If absent, no configuration of these registers is performed. If any value is over 0xffff then the register will be left as default. If present 11 values must be supplied.

wlf,micbias-cfg — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array

Maximum number of items (maxItems): 2

Two MICBIAS register values for WM1811 or WM8958. If absent the register defaults will be used.

wlf,ldo1ena-gpios — not listed as required here #

Maximum number of items (maxItems): 1

Control of LDO1ENA input to device.

wlf,ldo2ena-gpios — not listed as required here #

Maximum number of items (maxItems): 1

Control of LDO2ENA input to device.

wlf,lineout1-se — not listed as required here #

Value type (type): "boolean"

LINEOUT1 is in single ended mode.

wlf,lineout2-se — not listed as required here #

Value type (type): "boolean"

INEOUT2 is in single ended mode.

wlf,lineout1-feedback — not listed as required here #

Value type (type): "boolean"

LINEOUT1 has common mode feedback connected.

wlf,lineout2-feedback — not listed as required here #

Value type (type): "boolean"

LINEOUT2 has common mode feedback connected.

wlf,ldoena-always-driven — not listed as required here #

Value type (type): "boolean"

LDOENA is always driven.

wlf,spkmode-pu — not listed as required here #

Value type (type): "boolean"

Enable the internal pull-up resistor on the SPKMODE pin.

wlf,csnaddr-pd — not listed as required here #

Value type (type): "boolean"

Enable the internal pull-down resistor on the CS/ADDR pin.

Required in this object (required): "compatible", "reg", "AVDD2-supply", "CPVDD-supply", "SPKVDD1-supply", "SPKVDD2-supply"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): dai-common.yaml#

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "wlf,wm1811", "wlf,wm8958"

When the condition matches (then) #

Properties and child nodes (properties)

DBVDD-supply — not listed as required here

false — Not permitted by this property rule.

LDO2VDD-supply — not listed as required here

false — Not permitted by this property rule.

Required in this object (required): "DBVDD1-supply", "DBVDD2-supply", "DBVDD3-supply"

When the condition does not match (else) #

Properties and child nodes (properties)

DBVDD1-supply — not listed as required here

false — Not permitted by this property rule.

DBVDD2-supply — not listed as required here

false — Not permitted by this property rule.

DBVDD3-supply — not listed as required here

false — Not permitted by this property rule.

Required in this object (required): "DBVDD-supply"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/gpio/gpio.h>

i2c {
    #address-cells = <1>;
    #size-cells = <0>;

    audio-codec@1a {
        compatible = "wlf,wm1811";
        reg = <0x1a>;
        clocks = <&i2s0 0>;
        clock-names = "MCLK1";

        AVDD2-supply = <&main_dc_reg>;
        CPVDD-supply = <&main_dc_reg>;
        DBVDD1-supply = <&main_dc_reg>;
        DBVDD2-supply = <&main_dc_reg>;
        DBVDD3-supply = <&main_dc_reg>;
        LDO1VDD-supply = <&main_dc_reg>;
        SPKVDD1-supply = <&main_dc_reg>;
        SPKVDD2-supply = <&main_dc_reg>;

        wlf,ldo1ena-gpios = <&gpb0 0 GPIO_ACTIVE_HIGH>;
        wlf,ldo2ena-gpios = <&gpb0 1 GPIO_ACTIVE_HIGH>;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause

Edit this page