From patchwork Fri Sep 3 11:20:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 506506 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp906418jai; Fri, 3 Sep 2021 04:21:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxai5WPyurMA+QcLXeyRCOROtW23oOe5Qofn20RIo0H5t6Kakl/hr8ySzwQZuzgQUHOoMMn X-Received: by 2002:a5d:8acf:: with SMTP id e15mr2633663iot.184.1630668099729; Fri, 03 Sep 2021 04:21:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630668099; cv=none; d=google.com; s=arc-20160816; b=ULnGG6khiJo3WEI9gmSIRF6LTKKYiAMXpVgfa1EJsQ9eiYSaoKZIFGb1OIb4nO7mRR Y9YNN3ksJhyDXM8PwhO27afBsh1bcc/QyGHIN/sM6yGkraLTkoLKxESa5NVQHK7+BKYP LRAGnn9l/N9U030xsfZwYETibVn3JdKmJgvWI4JityR9MM8ckdPR3CClaJ4E5gED1/VX MZ44hyPoz+rv7OhflUiDF5tZLXVOIG4K0dHaG1b4Dpik8RiCjBdUOJ95DB4UznFXP+bF 9HkHGRExDjcM7/gPkzrPRVATri9KK5tUNgn/vfU3OQvJaOYyrbUZBeKiRUHXJN8AgW+T hr/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OdrRqNefaVNOxdAxmMezDhPAaaw5EYxGuh+OQAKyC64=; b=C43QK0KrnC6nPJfqVwmm8cE8JJF+X+XtUpcw7YiyWa+eLkmGJJWgWnOvgsHCLVp3vo XH2D0mSAcwyfZUxkMwA1kNnwss1PSYwZ7ZoG94/R+QzPlt//ul/BxpahXf17oRHKM1pm Xb9NfrTLRfO1m9+RaiZpHjSG7/gG4TzppJ9FR8MQrw7BSNF6GozW5/cFnLu8pvpbin/D eCarN+41p03JkflHRy2MOAwjpXzKbCcg/C6zwdN5jZF7oyRErgI9JtlO7YA+xAq6o8Lx UIRilTd6Kz5bvEddCr1QW782bDUPaQZgJQ5yF4nXLhBxAv6WzdIHvFToftGtDZqJOgCH Z+OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MZf9jgL4; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j9si175389ile.176.2021.09.03.04.21.39; Fri, 03 Sep 2021 04:21:39 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MZf9jgL4; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348974AbhICLWh (ORCPT + 6 others); Fri, 3 Sep 2021 07:22:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348992AbhICLWd (ORCPT ); Fri, 3 Sep 2021 07:22:33 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 073EBC061757 for ; Fri, 3 Sep 2021 04:21:34 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id t15so7735285wrg.7 for ; Fri, 03 Sep 2021 04:21:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OdrRqNefaVNOxdAxmMezDhPAaaw5EYxGuh+OQAKyC64=; b=MZf9jgL44KooCVu8mMN7VD6E1sqJrRR4Un6fBlmbXSgAkooyoNJIxfm2rLMbfZ45Bx 1X4asN6/0tFW9Ii3P0KYRXheEEfgljB1ObgQAp5RGuxJpjIxKHH1IqDC/jkdZXJSsA4g pV5bsYYARP9T18adRSZn4l03mwsVLe2JENWTwRWjvaI7puKxGAUY7iazmae4oHfvyVo8 KX5agr5iZSnoIt7bbvPfjPJ7TRLYudyvGViOu5ptcFWjun2iwi7RLtOaLJ4lrn+NP0GB 0HHk+OQrJGo1IVsjlg6aUZPJLLZF1F33r4WPse5BzXn4JcS/ip0eY/p1QqeyWNXip/e+ AOsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OdrRqNefaVNOxdAxmMezDhPAaaw5EYxGuh+OQAKyC64=; b=hr4gXxCL1FsV8+2apTGUp1v8+Zdc8wA8AzblCjcxRJNXPEfjr/VwHesFjDEMBZMDOX E6XuCN79Tm1/hC4KsvAL7uvxJ0nqjZfgTI2ufmJpP7/9KOJyU3soRmTQ+1+vuvO3sZxv 8hJdZauwo1I3totwZKdWwR8CMx2qwsPIHImMXe+cJ+LCR8t+8qfWQRnwlx8inE+vgkpn qO4YdfHFUv6zmOr8nrucrE0Y9IO+EfsNtpwKovFHuoWf4A1ubwbw6BgnK1mKNao+dQFi c0wkla5wbYIITcI5C0yAc1OHTFdr1CE1d1GnG/+8Yy8qE9bxnb2Y7kE6GcgXpZUX1Ivl 6sLw== X-Gm-Message-State: AOAM531F7oSLYy2XrrrPdVqpi4zndzWBBv/ztsvnQG7nzbJ/As3QzhaQ zJ/4r4g0BkZgfEmIETeMpPr+up0dTj0CwQ== X-Received: by 2002:adf:eb8d:: with SMTP id t13mr3530333wrn.4.1630668092515; Fri, 03 Sep 2021 04:21:32 -0700 (PDT) Received: from srini-hackbox.lan (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.gmail.com with ESMTPSA id f20sm3881877wmb.32.2021.09.03.04.21.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 04:21:31 -0700 (PDT) From: Srinivas Kandagatla To: bjorn.andersson@linaro.org, broonie@kernel.org, robh@kernel.org Cc: plai@codeaurora.org, tiwai@suse.de, devicetree@vger.kernel.org, perex@perex.cz, alsa-devel@alsa-project.org, lgirdwood@gmail.com, bgoswami@codeaurora.org, Srinivas Kandagatla Subject: [PATCH v5 01/21] soc: dt-bindings: qcom: apr: convert to yaml Date: Fri, 3 Sep 2021 12:20:12 +0100 Message-Id: <20210903112032.25834-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210903112032.25834-1-srinivas.kandagatla@linaro.org> References: <20210903112032.25834-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert APR bindings to yaml format so that we could add new bindings support. All the dsp services bindings are now part of apr bindings instead of adding them to audio bindings. Signed-off-by: Srinivas Kandagatla --- .../devicetree/bindings/soc/qcom/qcom,apr.txt | 134 ------------------ .../bindings/soc/qcom/qcom,apr.yaml | 128 +++++++++++++++++ 2 files changed, 128 insertions(+), 134 deletions(-) delete mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml -- 2.21.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt deleted file mode 100644 index 2e2f6dc351c0..000000000000 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt +++ /dev/null @@ -1,134 +0,0 @@ -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: - Definition: must be "qcom,apr-v", example "qcom,apr-v2" - -- qcom,apr-domain - Usage: required - Value type: - 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: - 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: - 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-service@3 { - compatible = "qcom,q6core"; - reg = ; - }; - - apr-service@4 { - compatible = "qcom,q6afe"; - reg = ; - - dais { - #sound-dai-cells = <1>; - dai@1 { - reg = ; - }; - }; - }; - - apr-service@7 { - compatible = "qcom,q6asm"; - reg = ; - ... - }; - - apr-service@8 { - compatible = "qcom,q6adm"; - reg = ; - ... - }; - }; - -= 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-service@3 { - compatible = "qcom,q6core"; - reg = ; - }; - - q6afe: apr-service@4 { - compatible = "qcom,q6afe"; - reg = ; - qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; - ... - }; - - q6asm: apr-service@7 { - compatible = "qcom,q6asm"; - reg = ; - qcom,protection-domain = "tms/servreg", "msm/slpi/sensor_pd"; - ... - }; - - q6adm: apr-service@8 { - compatible = "qcom,q6adm"; - reg = ; - qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; - ... - }; - }; diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml new file mode 100644 index 000000000000..133e9c6cd961 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml @@ -0,0 +1,128 @@ +# 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 (Asynchronous Packet Router) binding + +maintainers: + - Srinivas Kandagatla + +description: | + 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. + +properties: + compatible: + enum: + - qcom,apr-v2 + + 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 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + +#APR Services +patternProperties: + "^service@[3-9a-d]$": + type: object + description: + APR node's client devices use subnodes for desired static port services. + + properties: + compatible: + enum: + - qcom,q6core + - qcom,q6asm + - qcom,q6afe + - qcom,q6adm + + reg: + enum: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 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. + + 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 + + additionalProperties: false + +required: + - compatible + - qcom,apr-domain + +additionalProperties: false + +examples: + - | + #include + apr { + compatible = "qcom,apr-v2"; + qcom,apr-domain = ; + #address-cells = <1>; + #size-cells = <0>; + + q6core: service@3 { + compatible = "qcom,q6core"; + reg = ; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + }; + + q6afe: service@4 { + compatible = "qcom,q6afe"; + reg = ; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + }; + + q6asm: service@7 { + compatible = "qcom,q6asm"; + reg = ; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + }; + + q6adm: service@8 { + compatible = "qcom,q6adm"; + reg = ; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + }; + };