Peios Learn
Documentation

Peios

Peios Peios Kernel Universal Directory Project

Developer Tools

Trail Acta Provium clackatoo CAF GCSL Pekit

Applications

Framewright

Standards and Conventions

Standards and Conventions Peios Specifications
Peios Kernel

Soundwire bindings

Single-page view · as markdown

Qualcomm SoundWire Controller

Peios Kernel / Hardware and drivers / Device-tree binding reference / Soundwire bindings

Schema identifier ($id): "http://devicetree.org/schemas/soundwire/qcom,soundwire.yaml#"

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

Maintainers (maintainers): "Srinivas Kandagatla <srinivas.kandagatla@linaro.org>", "Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>"

The Qualcomm SoundWire controller along with its board specific bus parameters.

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Allowed values (enum): "qcom,soundwire-v1.3.0", "qcom,soundwire-v1.5.0", "qcom,soundwire-v1.5.1", "qcom,soundwire-v1.6.0", "qcom,soundwire-v1.7.0", "qcom,soundwire-v2.0.0", "qcom,soundwire-v3.1.0"

Rule 2

Array item rules (items)

Item 1

Allowed values (enum): "qcom,soundwire-v2.1.0", "qcom,soundwire-v2.2.0"

Item 2

Exact value (const): "qcom,soundwire-v2.0.0"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

specify the SoundWire controller core.

Item 2

specify the Soundwire controller wake IRQ.

interrupt-names — not listed as required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

Exact value (const): "core"

Item 2

Exact value (const): "wakeup"

clocks — required here #

Array item rules (items) #

Item 1

iface clock

clock-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "iface"

resets — not listed as required here #

Array item rules (items) #

Item 1

SWR_AUDIO_CGCR RESET

reset-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "swr_audio_cgcr"

#sound-dai-cells — required here #

Exact value (const): 1

#address-cells — required here #

Exact value (const): 2

#size-cells — required here #

Exact value (const): 0

wakeup-source — not listed as required here #

true — No constraints added by this property rule.

qcom,din-ports — not listed as required here #

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

count of data in ports

Deprecated (deprecated): true

qcom,dout-ports — not listed as required here #

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

count of data out ports

Deprecated (deprecated): true

qcom,ports-word-length — not listed as required here #

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

Size of payload channel sample. Value of 0xff indicates that this option is not implemented or applicable for the respective data port. More info in MIPI Alliance SoundWire 1.0 Specifications.

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 16

qcom,ports-sinterval-low — not listed as required here #

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

Sample interval (only lowest byte) of each data port. Out ports followed by In ports. Used for Sample Interval calculation. Value of 0xff indicates that this option is not implemented or applicable for the respective data port. More info in MIPI Alliance SoundWire 1.0 Specifications.

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 16

qcom,ports-sinterval — not listed as required here #

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

Sample interval of each data port. Out ports followed by In ports. Used for Sample Interval calculation. Value of 0xffff indicates that this option is not implemented or applicable for the respective data port. More info in MIPI Alliance SoundWire 1.0 Specifications.

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 16

qcom,ports-offset1 — required here #

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

Payload transport window offset1 of each data port. Out ports followed by In ports. Value of 0xff indicates that this option is not implemented or applicable for the respective data port. More info in MIPI Alliance SoundWire 1.0 Specifications.

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 16

qcom,ports-offset2 — required here #

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

Payload transport window offset2 of each data port. Out ports followed by In ports. Value of 0xff indicates that this option is not implemented or applicable for the respective data port. More info in MIPI Alliance SoundWire 1.0 Specifications.

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 16

qcom,ports-lane-control — not listed as required here #

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

Identify which data lane the data port uses. Out ports followed by In ports. Value of 0xff indicates that this option is not implemented or applicable for the respective data port. More info in MIPI Alliance SoundWire 1.0 Specifications.

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 16

qcom,ports-block-pack-mode — not listed as required here #

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

Indicate the block packing mode. 0 to indicate Blocks are per Channel 1 to indicate Blocks are per Port. Out ports followed by In ports. Value of 0xff indicates that this option is not implemented or applicable for the respective data port. More info in MIPI Alliance SoundWire 1.0 Specifications.

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 16

Array item rules (items) #

Exactly one of these rules must match (oneOf)

Rule 1

Minimum value (minimum): 0

Maximum value (maximum): 1

Rule 2

Exact value (const): 255

qcom,ports-hstart — not listed as required here #

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

Identifying lowerst numbered column in SoundWire Frame, i.e. left edge of the Transport sub-frame for each port. Out ports followed by In ports. Value of 0xff indicates that this option is not implemented or applicable for the respective data port. More info in MIPI Alliance SoundWire 1.0 Specifications.

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 16

Array item rules (items) #

Exactly one of these rules must match (oneOf)

Rule 1

Minimum value (minimum): 0

Maximum value (maximum): 15

Rule 2

Exact value (const): 255

qcom,ports-hstop — not listed as required here #

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

Identifying highest numbered column in SoundWire Frame, i.e. the right edge of the Transport sub-frame for each port. Out ports followed by In ports. Value of 0xff indicates that this option is not implemented or applicable for the respective data port. More info in MIPI Alliance SoundWire 1.0 Specifications.

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 16

Array item rules (items) #

Exactly one of these rules must match (oneOf)

Rule 1

Minimum value (minimum): 0

Maximum value (maximum): 15

Rule 2

Exact value (const): 255

qcom,ports-block-group-count — not listed as required here #

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

In range 1 to 4 to indicate how many sample intervals are combined into a payload. Out ports followed by In ports. Value of 0xff indicates that this option is not implemented or applicable for the respective data port. More info in MIPI Alliance SoundWire 1.0 Specifications.

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 16

Array item rules (items) #

Exactly one of these rules must match (oneOf)

Rule 1

Minimum value (minimum): 0

Maximum value (maximum): 4

Rule 2

Exact value (const): 255

label — not listed as required here #

Maximum number of items (maxItems): 1

Required in this object (required): "compatible", "reg", "interrupts", "clocks", "clock-names", "#sound-dai-cells", "#address-cells", "#size-cells", "qcom,ports-offset1", "qcom,ports-offset2"

Exactly one of these rules must match (oneOf) #

Rule 1 #

Required in this object (required): "qcom,ports-sinterval-low"

Rule 2 #

Required in this object (required): "qcom,ports-sinterval"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): soundwire-controller.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h>

soundwire@3210000 {
    compatible = "qcom,soundwire-v1.6.0";
    reg = <0x03210000 0x2000>;

    interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
                 <&pdc 130 IRQ_TYPE_LEVEL_HIGH>;

    interrupt-names = "core", "wakeup";

    clocks = <&lpass_rx_macro>;
    clock-names = "iface";

    resets = <&lpass_audiocc LPASS_AUDIO_SWR_RX_CGCR>;
    reset-names = "swr_audio_cgcr";

    qcom,ports-word-length =        /bits/ 8 <0x01 0x07 0x04 0xff 0xff>;
    qcom,ports-sinterval-low =      /bits/ 8 <0x03 0x3f 0x1f 0x03 0x03>;
    qcom,ports-offset1 =            /bits/ 8 <0x00 0x00 0x0b 0x01 0x01>;
    qcom,ports-offset2 =            /bits/ 8 <0x00 0x00 0x0b 0x00 0x00>;
    qcom,ports-lane-control =       /bits/ 8 <0x01 0x00 0x00 0x00 0x00>;
    qcom,ports-block-pack-mode =    /bits/ 8 <0xff 0x00 0x01 0xff 0xff>;
    qcom,ports-hstart =             /bits/ 8 <0xff 0x03 0xff 0xff 0xff>;
    qcom,ports-hstop =              /bits/ 8 <0xff 0x06 0xff 0xff 0xff>;
    qcom,ports-block-group-count =  /bits/ 8 <0xff 0xff 0xff 0xff 0x00>;

    #sound-dai-cells = <1>;
    #address-cells = <2>;
    #size-cells = <0>;

    codec@0,4 {
        compatible = "sdw20217010d00";
        reg = <0 4>;
        qcom,rx-port-mapping = <1 2 3 4 5>;
    };
};

Source notes #

Annotations retained from the schema source

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

SoundWire Controller Common Properties

Peios Kernel / Hardware and drivers / Device-tree binding reference / Soundwire bindings

Schema identifier ($id): "http://devicetree.org/schemas/soundwire/soundwire-controller.yaml#"

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

Maintainers (maintainers): "Srinivas Kandagatla <srinivas.kandagatla@linaro.org>", "Vinod Koul <vkoul@kernel.org>"

SoundWire busses can be described with a node for the SoundWire controller device and a set of child nodes for each SoundWire slave on the bus.

Properties and child nodes (properties) #

$nodename — not listed as required here #

String pattern (pattern): "^soundwire(@.*)?$"

#address-cells — required here #

Exact value (const): 2

#size-cells — required here #

Exact value (const): 0

Properties matching a name pattern (patternProperties) #

^.*@[0-9a-f],[0-9a-f]$ — name matches this regular expression #

Value type (type): "object"

Properties and child nodes (properties) #

compatible — required here

String pattern (pattern): "^sdw[0-9a-f]{1}[0-9a-f]{4}[0-9a-f]{4}[0-9a-f]{2}$"

Is the textual representation of SoundWire Enumeration address. compatible string should contain SoundWire Version ID, Manufacturer ID, Part ID and Class ID in order and shall be in lower-case hexadecimal with leading zeroes. Valid sizes of these fields are Version ID is 1 nibble, number '0x1' represents SoundWire 1.0 and '0x2' represents SoundWire 1.1 and so on. MFD is 4 nibbles PID is 4 nibbles CID is 2 nibbles More Information on detail of encoding of these fields can be found in MIPI Alliance DisCo & SoundWire 1.0 Specifications.

reg — required here

Maximum number of items (maxItems): 1

Link ID followed by Instance ID of SoundWire Device Address.

Required in this object (required): "compatible", "reg"

Required in this object (required): "#address-cells", "#size-cells"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

true

Allowed by this rule.

Examples (examples) #

soundwire@c2d0000 {
    #address-cells = <2>;
    #size-cells = <0>;
    reg = <0x0c2d0000 0x2000>;

    speaker@0,1 {
        compatible = "sdw10217201000";
        reg = <0 1>;
        powerdown-gpios = <&wcdpinctrl 2 0>;
        #thermal-sensor-cells = <0>;
        #sound-dai-cells = <0>;
    };

    speaker@0,2 {
        compatible = "sdw10217201000";
        reg = <0 2>;
        powerdown-gpios = <&wcdpinctrl 2 0>;
        #thermal-sensor-cells = <0>;
        #sound-dai-cells = <0>;
    };
};

Source notes #

Annotations retained from the schema source

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

Peios Learn — documentation for Peios software.

Built with Trail.