Unverified Commit 98378140 authored by Mark Brown's avatar Mark Brown
Browse files

Merge series "ASoC: qcom: Add AudioReach support" from Srinivas Kandagatla...

Merge series "ASoC: qcom: Add AudioReach support" from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:

Hi Mark,

This version is a respin of v10 fixing a build error in 12/17 patch.

QCOM SoC relevant non-audio patches in this series has been merged into
the Qualcomm drivers-for-5.16 tree, as this series depends those patches
an immutable tag is available at:
https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git tags/20210927135559.738-6-srinivas.kandagatla@linaro.org

This patchset adds ASoC driver support to configure signal processing
framework ("AudioReach") which is integral part of Qualcomm next
generation audio SDK and will be deployed on upcoming Qualcomm chipsets.
It makes use of ASoC Topology to load graphs on to the DSP which is then
managed by APM (Audio Processing Manager) service to prepare/start/stop.

Here is simplified high-level block diagram of AudioReach:

 ___________________________________________________________
|                 CPU (Application Processor)               |
|  +---------+          +---------+         +----------+    |
|  |  q6apm  |          |  q6apm  |         |  q6apm   |    |
|  |   dais  | <------> |         | <-----> |lpass-dais|    |
|  +---------+          +---------+         +----------+    |
|                            ^  ^                           |
|                            |  |           +---------+     |
|  +---------+               v  +---------->|topology |     |
|  | q6prm   |          +---------+         |         |     |
|  |         |<-------->|   GPR   |         +---------+     |
|  +---------+          +---------+                         |
|       ^                    ^                              |
|       |                    |                              |
|  +----------+              |                              |
|  |   q6prm  |              |                              |
|  |lpass-clks|              |                              |
|  +----------+              |                              |
|____________________________|______________________________|
                             |
                             | RPMSG (IPC over GLINK)
 ____________________________|______________________________
|                            |                              |
|    +-----------------------+                              |
|    |                       |                              |
|    v                       v              q6 (Audio DSP)  |
|+-----+    +----------------------------------+            |
|| PRM |    | APM (Audio Processing Manager)   |            |
|+-----+    |  . Graph Management              |            |
|           |  . Command Handing               |            |
|           |  . Event Management              |            |
|           |  ...                             |            |
|           +----------------------------------+            |
|                            ^                              |
|____________________________|______________________________|
                             |
                             |   LPASS AIF
 ____________________________|______________________________
|                            |            Audio I/O         |
|                            v                              |
|    +--------------------------------------------------+   |
|    |                Audio devices                     |   |
|    | CODEC | HDMI-TX | PCM  | SLIMBUS | I2S |MI2S |...|   |
|    |                                                  |   |
|    +--------------------------------------------------+   |
|___________________________________________________________|

AudioReach has constructs of sub-graph, container and modules.
Each sub-graph can have N containers and each Container can have N Modules
and connections between them can be linear or non-linear.
An audio function can be realized with one or many connected
sub-graphs. There are also control/event paths between modules that can
be wired up while building graph to achieve various control mechanism
between modules. These concepts of Sub-Graph, Containers and Modules
are represented in ASoC topology.

Here is simple I2S graph with a Write Shared Memory and a
Volume control module within a single Subgraph (1) with one Container (1)
and 5 modules.

  ____________________________________________________________
 |                        Sub-Graph [1]                       |
 |  _______________________________________________________   |
 | |                       Container [1]                   |  |
 | | [WR_SH] -> [PCM DEC] -> [PCM CONV] -> [VOL]-> [I2S-EP]|  |
 | |_______________________________________________________|  |
 |____________________________________________________________|

For now this graph is split into two subgraphs to achieve dpcm like below:
 ________________________________________________    _________________
|                Sub-Graph [1]                   |  |  Sub-Graph [2]  |
|  ____________________________________________  |  |  _____________  |
| |              Container [1]                 | |  | |Container [2]| |
| | [WR_SH] -> [PCM DEC] -> [PCM CONV] -> [VOL]| |  | |   [I2S-EP]  | |
| |____________________________________________| |  | |_____________| |
|________________________________________________|  |_________________|

                                                      _________________
                                                    |  Sub-Graph [3]  |
                                                    |  _____________  |
                                                    | |Container [3]| |
                                                    | |  [DMA-EP]   | |
                                                    | |_____________| |
                                                    |_________________|

This patchset adds very minimal support for AudioReach which includes
supporting sub-graphs containing CODEC DMA ports and simple PCM
Decoder/Encoder and Logger Modules. Additional capabilities will
be built over time to expose features offered by AudioReach.

This patchset is Tested on SM8250 SoC based Qualcomm Robotics Platform RB5
and SM9250 MTP with WSA881X Smart Speaker Amplifiers, DMICs connected via
VA Macro and WCD938x Codec connected via TX and RX Macro and HDMI audio
via I2S.

First 10 Patches are mostly reorganization existing Old QDSP Audio
Framework code and bindings so that we could reuse them on AudioReach.

ASoC topology graphs for DragonBoard RB5 and SM8250 MTP are available at
https://git.linaro.org/people/srinivas.kandagatla/audioreach-topology.git/
and Qualcomm AudioReach DSP headers are available at:
https://source.codeaurora.org/quic/la/platform/vendor/opensource/arspf-headers

Note: There is one false positive warning in this patchset:
audioreach.c:80:45: warning: array of flexible structures

Thanks,
srini

Changes since v10:
- fix build error during arm64 defconfig build reported by Mark in 12/17 patch
for audioreach_tplg_init symbol

Srinivas Kandagatla (17):
  ASoC: dt-bindings: move LPASS dai related bindings out of q6afe
  ASoC: dt-bindings: move LPASS clocks related bindings out of q6afe
  ASoC: dt-bindings: rename q6afe.h to q6dsp-lpass-ports.h
  ASoC: qdsp6: q6afe-dai: move lpass audio ports to common file
  ASoC: qdsp6: q6afe-clocks: move audio-clocks to common file
  ASoC: dt-bindings: q6dsp: add q6apm-lpass-dai compatible
  ASoC: dt-bindings: lpass-clocks: add q6prm clocks compatible
  ASoC: dt-bindings: add q6apm digital audio stream bindings
  ASoC: qdsp6: audioreach: add basic pkt alloc support
  ASoC: qdsp6: audioreach: add q6apm support
  ASoC: qdsp6: audioreach: add module configuration command helpers
  ASoC: qdsp6: audioreach: add Kconfig and Makefile
  ASoC: qdsp6: audioreach: add topology support
  ASoC: qdsp6: audioreach: add q6apm-dai support
  ASoC: qdsp6: audioreach: add q6apm lpass dai support
  ASoC: qdsp6: audioreach: add q6prm support
  ASoC: qdsp6: audioreach: add support for q6prm-clocks

 .../devicetree/bindings/sound/qcom,q6afe.txt  |  181 ---
 .../bindings/sound/qcom,q6apm-dai.yaml        |   53 +
 .../sound/qcom,q6dsp-lpass-clocks.yaml        |   77 ++
 .../sound/qcom,q6dsp-lpass-ports.yaml         |  205 +++
 include/dt-bindings/sound/qcom,q6afe.h        |  203 +--
 .../sound/qcom,q6dsp-lpass-ports.h            |  208 +++
 include/uapi/sound/snd_ar_tokens.h            |  208 +++
 sound/soc/qcom/Kconfig                        |   22 +
 sound/soc/qcom/qdsp6/Makefile                 |   11 +-
 sound/soc/qcom/qdsp6/audioreach.c             | 1130 +++++++++++++++++
 sound/soc/qcom/qdsp6/audioreach.h             |  726 +++++++++++
 sound/soc/qcom/qdsp6/q6afe-clocks.c           |  187 +--
 sound/soc/qcom/qdsp6/q6afe-dai.c              |  687 +---------
 sound/soc/qcom/qdsp6/q6apm-dai.c              |  416 ++++++
 sound/soc/qcom/qdsp6/q6apm-lpass-dais.c       |  260 ++++
 sound/soc/qcom/qdsp6/q6apm.c                  |  822 ++++++++++++
 sound/soc/qcom/qdsp6/q6apm.h                  |  152 +++
 sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c     |  186 +++
 sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.h     |   30 +
 sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c      |  627 +++++++++
 sound/soc/qcom/qdsp6/q6dsp-lpass-ports.h      |   22 +
 sound/soc/qcom/qdsp6/q6prm-clocks.c           |   85 ++
 sound/soc/qcom/qdsp6/q6prm.c                  |  202 +++
 sound/soc/qcom/qdsp6/q6prm.h                  |   78 ++
 sound/soc/qcom/qdsp6/topology.c               | 1113 ++++++++++++++++
 25 files changed, 6664 insertions(+), 1227 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml
 create mode 100644 include/dt-bindings/sound/qcom,q6dsp-lpass-ports.h
 create mode 100644 include/uapi/sound/snd_ar_tokens.h
 create mode 100644 sound/soc/qcom/qdsp6/audioreach.c
 create mode 100644 sound/soc/qcom/qdsp6/audioreach.h
 create mode 100644 sound/soc/qcom/qdsp6/q6apm-dai.c
 create mode 100644 sound/soc/qcom/qdsp6/q6apm-lpass-dais.c
 create mode 100644 sound/soc/qcom/qdsp6/q6apm.c
 create mode 100644 sound/soc/qcom/qdsp6/q6apm.h
 create mode 100644 sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c
 create mode 100644 sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.h
 create mode 100644 sound/soc/qcom/qdsp6/q6dsp-lpass-ports.c
 create mode 100644 sound/soc/qcom/qdsp6/q6dsp-lpass-ports.h
 create mode 100644 sound/soc/qcom/qdsp6/q6prm-clocks.c
 create mode 100644 sound/soc/qcom/qdsp6/q6prm.c
 create mode 100644 sound/soc/qcom/qdsp6/q6prm.h
 create mode 100644 sound/soc/qcom/qdsp6/topology.c

--
2.21.0
parents 4bf74f8e d0756868
Loading
Loading
Loading
Loading
+0 −134
Original line number Diff line number Diff line
Qualcomm APR (Asynchronous Packet Router) binding

This binding describes the Qualcomm APR. APR is a IPC protocol for
communication between Application processor and QDSP. APR is mainly
used for audio/voice services on the QDSP.

- compatible:
	Usage: required
	Value type: <stringlist>
	Definition: must be "qcom,apr-v<VERSION-NUMBER>", example "qcom,apr-v2"

- qcom,apr-domain
	Usage: required
	Value type: <u32>
	Definition: Destination processor ID.
	Possible values are :
			1 - APR simulator
			2 - PC
			3 - MODEM
			4 - ADSP
			5 - APPS
			6 - MODEM2
			7 - APPS2

= APR SERVICES
Each subnode of the APR node represents service tied to this apr. The name
of the nodes are not important. The properties of these nodes are defined
by the individual bindings for the specific service
- All APR services MUST contain the following property:

- reg
	Usage: required
	Value type: <u32>
	Definition: APR Service ID
	Possible values are :
			3 - DSP Core Service
			4 - Audio Front End Service.
			5 - Voice Stream Manager Service.
			6 - Voice processing manager.
			7 - Audio Stream Manager Service.
			8 - Audio Device Manager Service.
			9 - Multimode voice manager.
			10 - Core voice stream.
			11 - Core voice processor.
			12 - Ultrasound stream manager.
			13 - Listen stream manager.

- qcom,protection-domain
	Usage: optional
	Value type: <stringlist>
	Definition: Must list the protection domain service name and path
		    that the particular apr service has a dependency on.
	Possible values are :
			"avs/audio", "msm/adsp/audio_pd".
			"kernel/elf_loader", "msm/modem/wlan_pd".
			"tms/servreg", "msm/adsp/audio_pd".
			"tms/servreg", "msm/modem/wlan_pd".
			"tms/servreg", "msm/slpi/sensor_pd".

= EXAMPLE
The following example represents a QDSP based sound card on a MSM8996 device
which uses apr as communication between Apps and QDSP.

	apr {
		compatible = "qcom,apr-v2";
		qcom,apr-domain = <APR_DOMAIN_ADSP>;

		apr-service@3 {
			compatible = "qcom,q6core";
			reg = <APR_SVC_ADSP_CORE>;
		};

		apr-service@4 {
			compatible = "qcom,q6afe";
			reg = <APR_SVC_AFE>;

			dais {
				#sound-dai-cells = <1>;
				dai@1 {
					reg = <HDMI_RX>;
				};
			};
		};

		apr-service@7 {
			compatible = "qcom,q6asm";
			reg = <APR_SVC_ASM>;
			...
		};

		apr-service@8 {
			compatible = "qcom,q6adm";
			reg = <APR_SVC_ADM>;
			...
		};
	};

= EXAMPLE 2
The following example represents a QDSP based sound card with protection domain
dependencies specified. Here some of the apr services are dependent on services
running on protection domain hosted on ADSP/SLPI remote processors while others
have no such dependency.

	apr {
		compatible = "qcom,apr-v2";
		qcom,glink-channels = "apr_audio_svc";
		qcom,apr-domain = <APR_DOMAIN_ADSP>;

		apr-service@3 {
			compatible = "qcom,q6core";
			reg = <APR_SVC_ADSP_CORE>;
		};

		q6afe: apr-service@4 {
			compatible = "qcom,q6afe";
			reg = <APR_SVC_AFE>;
			qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
			...
		};

		q6asm: apr-service@7 {
			compatible = "qcom,q6asm";
			reg = <APR_SVC_ASM>;
			qcom,protection-domain = "tms/servreg", "msm/slpi/sensor_pd";
			...
		};

		q6adm: apr-service@8 {
			compatible = "qcom,q6adm";
			reg = <APR_SVC_ADM>;
			qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
			...
		};
	};
+177 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/soc/qcom/qcom,apr.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Qualcomm APR/GPR (Asynchronous/Generic Packet Router) binding

maintainers:
  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

description: |
  This binding describes the Qualcomm APR/GPR, APR/GPR is a IPC protocol for
  communication between Application processor and QDSP. APR/GPR is mainly
  used for audio/voice services on the QDSP.

properties:
  compatible:
    enum:
      - qcom,apr-v2
      - qcom,gpr

  qcom,apr-domain:
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [1, 2, 3, 4, 5, 6, 7]
    description:
      Selects the processor domain for apr
        1 = APR simulator
        2 = PC Domain
        3 = Modem Domain
        4 = ADSP Domain
        5 = Application processor Domain
        6 = Modem2 Domain
        7 = Application Processor2 Domain
    deprecated: true

  qcom,domain:
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 1
    maximum: 7
    description:
      Selects the processor domain for apr
        1 = APR simulator
        2 = PC Domain
        3 = Modem Domain
        4 = ADSP Domain
        5 = Application processor Domain
        6 = Modem2 Domain
        7 = Application Processor2 Domain
      Selects the processor domain for gpr
        1 = Modem Domain
        2 = Audio DSP Domain
        3 = Application Processor Domain

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

#APR/GPR Services
patternProperties:
  "^service@[1-9a-d]$":
    type: object
    description:
      APR/GPR node's client devices use subnodes for desired static port services.

    properties:
      compatible:
        enum:
          - qcom,q6core
          - qcom,q6asm
          - qcom,q6afe
          - qcom,q6adm
          - qcom,q6apm
          - qcom,q6prm

      reg:
        minimum: 1
        maximum: 13
        description:
          APR Service ID
            3 = DSP Core Service
            4 = Audio  Front End Service.
            5 = Voice Stream Manager Service.
            6 = Voice processing manager.
            7 = Audio Stream Manager Service.
            8 = Audio Device Manager Service.
            9 = Multimode voice manager.
            10 = Core voice stream.
            11 = Core voice processor.
            12 = Ultrasound stream manager.
            13 = Listen stream manager.
          GPR Service ID
            1 = Audio Process Manager Service
            2 = Proxy Resource Manager Service.
            3 = AMDB Service.
            4 = Voice processing manager.

      qcom,protection-domain:
        $ref: /schemas/types.yaml#/definitions/string-array
        description: protection domain service name and path for apr service
          possible values are
          "avs/audio", "msm/adsp/audio_pd".
          "kernel/elf_loader", "msm/modem/wlan_pd".
          "tms/servreg", "msm/adsp/audio_pd".
          "tms/servreg", "msm/modem/wlan_pd".
          "tms/servreg", "msm/slpi/sensor_pd".

      '#address-cells':
        const: 1

      '#size-cells':
        const: 0

    patternProperties:
      "^.*@[0-9a-f]+$":
        type: object
        description:
          Service based devices like clock controllers or digital audio interfaces.

    additionalProperties: false

required:
  - compatible
  - qcom,domain

additionalProperties: false

examples:
  - |
    #include <dt-bindings/soc/qcom,apr.h>
    apr {
        compatible = "qcom,apr-v2";
        qcom,domain = <APR_DOMAIN_ADSP>;
        #address-cells = <1>;
        #size-cells = <0>;

        q6core: service@3 {
          compatible = "qcom,q6core";
          reg = <APR_SVC_ADSP_CORE>;
          qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
        };

        q6afe: service@4 {
          compatible = "qcom,q6afe";
          reg = <APR_SVC_AFE>;
          qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
        };

        q6asm: service@7 {
          compatible = "qcom,q6asm";
          reg = <APR_SVC_ASM>;
          qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
        };

        q6adm: service@8 {
          compatible = "qcom,q6adm";
          reg = <APR_SVC_ADM>;
          qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
        };
    };

  - |
    #include <dt-bindings/soc/qcom,gpr.h>
    gpr {
        compatible = "qcom,gpr";
        qcom,domain = <GPR_DOMAIN_ID_ADSP>;
        #address-cells = <1>;
        #size-cells = <0>;

        service@1 {
          compatible = "qcom,q6apm";
          reg = <GPR_APM_MODULE_IID>;
          qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
        };
    };
+0 −181
Original line number Diff line number Diff line
@@ -12,190 +12,9 @@ used by all apr services. Must contain the following properties.
		  from DSP.
		  example "qcom,q6afe"

= AFE DAIs (Digital Audio Interface)
"dais" subnode of the AFE node. It represents afe dais, each afe dai is a
subnode of "dais" representing board specific dai setup.
"dais" node should have following properties followed by dai children.

- compatible:
	Usage: required
	Value type: <stringlist>
	Definition: must be "qcom,q6afe-dais"

- #sound-dai-cells
	Usage: required
	Value type: <u32>
	Definition: Must be 1

- #address-cells
	Usage: required
	Value type: <u32>
	Definition: Must be 1

- #size-cells
	Usage: required
	Value type: <u32>
	Definition: Must be 0

== AFE DAI is subnode of "dais" and represent a dai, it includes board specific
configuration of each dai. Must contain the following properties.

- reg
	Usage: required
	Value type: <u32>
	Definition: Must be dai id

- qcom,sd-lines
	Usage: required for mi2s interface
	Value type: <prop-encoded-array>
	Definition: Must be list of serial data lines used by this dai.
	should be one or more of the 0-3 sd lines.

 - qcom,tdm-sync-mode:
	Usage: required for tdm interface
	Value type: <prop-encoded-array>
	Definition: Synchronization mode.
		0 - Short sync bit mode
		1 - Long sync mode
		2 - Short sync slot mode

 - qcom,tdm-sync-src:
	Usage: required for tdm interface
	Value type: <prop-encoded-array>
	Definition: Synchronization source.
		0 - External source
		1 - Internal source

 - qcom,tdm-data-out:
	Usage: required for tdm interface
	Value type: <prop-encoded-array>
	Definition: Data out signal to drive with other masters.
		0 - Disable
		1 - Enable

 - qcom,tdm-invert-sync:
	Usage: required for tdm interface
	Value type: <prop-encoded-array>
	Definition: Invert the sync.
		0 - Normal
		1 - Invert

 - qcom,tdm-data-delay:
	Usage: required for tdm interface
	Value type: <prop-encoded-array>
	Definition: Number of bit clock to delay data
		with respect to sync edge.
		0 - 0 bit clock cycle
		1 - 1 bit clock cycle
		2 - 2 bit clock cycle

 - qcom,tdm-data-align:
	Usage: required for tdm interface
	Value type: <prop-encoded-array>
	Definition: Indicate how data is packed
		within the slot. For example, 32 slot width in case of
		sample bit width is 24.
		0 - MSB
		1 - LSB

= AFE CLOCKSS
"clocks" subnode of the AFE node. It represents q6afe clocks
"clocks" node should have following properties.
- compatible:
	Usage: required
	Value type: <stringlist>
	Definition: must be "qcom,q6afe-clocks"

- #clock-cells:
	Usage: required
	Value type: <u32>
	Definition: Must be 2. Clock Id followed by
		below valid clock coupling attributes.
		1 - for no coupled clock
		2 - for dividend of the coupled clock
		3 - for divisor of the coupled clock
		4 - for inverted and no couple clock

= EXAMPLE

apr-service@4 {
	compatible = "qcom,q6afe";
	reg = <APR_SVC_AFE>;

	dais {
		compatible = "qcom,q6afe-dais";
		#sound-dai-cells = <1>;
		#address-cells = <1>;
		#size-cells = <0>;

		dai@1 {
			reg = <HDMI_RX>;
		};

		dai@24 {
			reg = <PRIMARY_TDM_RX_0>;
			qcom,tdm-sync-mode = <1>:
			qcom,tdm-sync-src = <1>;
			qcom,tdm-data-out = <0>;
			qcom,tdm-invert-sync = <1>;
			qcom,tdm-data-delay = <1>;
			qcom,tdm-data-align = <0>;

		};

		dai@25 {
			reg = <PRIMARY_TDM_TX_0>;
			qcom,tdm-sync-mode = <1>:
			qcom,tdm-sync-src = <1>;
			qcom,tdm-data-out = <0>;
			qcom,tdm-invert-sync = <1>;
			qcom,tdm-data-delay <1>:
			qcom,tdm-data-align = <0>;
		};

		dai@16 {
			reg = <PRIMARY_MI2S_RX>;
			qcom,sd-lines = <0 2>;
		};

		dai@17 {
			reg = <PRIMARY_MI2S_TX>;
			qcom,sd-lines = <1>;
		};

		dai@18 {
			reg = <SECONDARY_MI2S_RX>;
			qcom,sd-lines = <0 3>;
		};

		dai@19 {
			reg = <SECONDARY_MI2S_TX>;
			qcom,sd-lines = <1>;
		};

		dai@20 {
			reg = <TERTIARY_MI2S_RX>;
			qcom,sd-lines = <1 3>;
		};

		dai@21 {
			reg = <TERTIARY_MI2S_TX>;
			qcom,sd-lines = <0>;
		};

		dai@22 {
			reg = <QUATERNARY_MI2S_RX>;
			qcom,sd-lines = <0>;
		};

		dai@23 {
			reg = <QUATERNARY_MI2S_TX>;
			qcom,sd-lines = <1>;
		};
	};

	clocks {
		compatible = "qcom,q6afe-clocks";
		#clock-cells = <2>;
	};
};
+53 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/sound/qcom,q6apm-dai.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Qualcomm Audio Process Manager Digital Audio Interfaces binding

maintainers:
  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

description: |
  This binding describes the Qualcomm APM DAIs in DSP

properties:
  compatible:
    const: qcom,q6apm-dais

  reg:
    maxItems: 1

  iommus:
    maxItems: 1

required:
  - compatible
  - iommus
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/soc/qcom,gpr.h>
    gpr {
        compatible = "qcom,gpr";
        #address-cells = <1>;
        #size-cells = <0>;
        qcom,domain = <GPR_DOMAIN_ID_ADSP>;
        service@1 {
          compatible = "qcom,q6apm";
          reg = <1>;

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

          apm-dai@1 {
            compatible = "qcom,q6apm-dais";
            iommus = <&apps_smmu 0x1801 0x0>;
            reg = <1>;
          };
        };
    };
+77 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/sound/qcom,q6dsp-lpass-clocks.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Qualcomm DSP LPASS Clock Controller binding

maintainers:
  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

description: |
  This binding describes the Qualcomm DSP Clock Controller

properties:
  compatible:
    enum:
      - qcom,q6afe-clocks
      - qcom,q6prm-lpass-clocks

  reg:
    maxItems: 1

  '#clock-cells':
    const: 2
    description:
      Clock Id is followed by clock coupling attributes.
        1 = for no coupled clock
        2 = for dividend of the coupled clock
        3 = for divisor of the coupled clock
        4 = for inverted and no couple clock

required:
  - compatible
  - reg
  - "#clock-cells"

additionalProperties: false

examples:
  - |
    #include <dt-bindings/soc/qcom,apr.h>
    #include <dt-bindings/sound/qcom,q6afe.h>
    apr {
        #address-cells = <1>;
        #size-cells = <0>;
        apr-service@4 {
            reg = <APR_SVC_AFE>;
            #address-cells = <1>;
            #size-cells = <0>;
            clock-controller@2 {
              compatible = "qcom,q6afe-clocks";
              reg = <2>;
              #clock-cells = <2>;
            };
        };
      };

  - |
    #include <dt-bindings/soc/qcom,gpr.h>
    gpr {
        compatible = "qcom,gpr";
        qcom,domain = <GPR_DOMAIN_ID_ADSP>;
        #address-cells = <1>;
        #size-cells = <0>;
        service@2 {
            reg = <GPR_PRM_MODULE_IID>;
            compatible = "qcom,q6prm";
            #address-cells = <1>;
            #size-cells = <0>;
            clock-controller@2 {
              compatible = "qcom,q6prm-lpass-clocks";
              reg = <2>;
              #clock-cells = <2>;
            };
        };
      };
Loading