From patchwork Wed Jan 18 16:22:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 45374 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2433009wrn; Wed, 18 Jan 2023 08:29:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXvEquPr+3877YKvWtTb/fmN+QSdz/tckIru+7E+B0xJ2olz3mDRJ/PDY1isxU8f+Orei72Z X-Received: by 2002:a05:6a20:a00d:b0:9d:efbf:6623 with SMTP id p13-20020a056a20a00d00b0009defbf6623mr8938304pzj.49.1674059381393; Wed, 18 Jan 2023 08:29:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674059381; cv=none; d=google.com; s=arc-20160816; b=U7EHuXImtcFFwuifAxCYdYcjfb1CJn+R9bVrdIGeZk8dk6HXgeC2U+DTXDt/spde37 ZW7+gVd0yto6ogMBjSmk0RAUyGSu2w0v1LaVG8GaPile9TK1K2pD4UYyoX+PVPLF5pRR bBHl7C6bO1yOrysPH37fEA9dWeYIwqAKSY9sVkQAYYTHFvEzuTC8ohBaZq6JVEiHksBh g43V39j/q1Uy11PH0Gv/TlOep39YF9bVj9Qgwc3Ci8QLiKYKEPcuKZ2D77LCLrli5bhW gGV0U+/o1dKA89T1AqIGDFtcMZ/YCPbLGOuD0ZhbUPhBBwKj5FMIFktraQiz+bwcFmUH FXNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=OhbZjX/koZrX9iSh81WiUJwKhhql/MHhaB/Kr/N+S/w=; b=ZBE5YyGko8yFmdMP1LFoPvdoNaLTGjXHeBQWCD69fHRE3n/aZPkvMkpyXIKAYNrMNA uMAZhLIx2d8QEk6iz26LSuPnds0a8Dfk/c2Nb10l00PTG/jSPdzUV4QDx4DgaqQbGLkA aqGPouFTHQ36mwp5+DooYQaM9G+PERj+UDHMei7G+m07BS5HFihmUDvqzTtyKiEzFFsK RvHvpiSDeDRUhlqNLX67XdvACgLPFPDcqkxBN9UfGPXSMhiwGGlugH3C0RkRtXwJIQcZ LSkhWAJFzqCTPfuPFsCg+YO9ensxq8yvHxp9kB+lh9lOkBZ4UsKbfqDyPbd41OXqIpBZ kYKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="yr/9wmZi"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e18-20020a63ee12000000b004b6db45d035si23434613pgi.232.2023.01.18.08.29.29; Wed, 18 Jan 2023 08:29:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="yr/9wmZi"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229958AbjARQYl (ORCPT + 99 others); Wed, 18 Jan 2023 11:24:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229989AbjARQYU (ORCPT ); Wed, 18 Jan 2023 11:24:20 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3A2A589BC for ; Wed, 18 Jan 2023 08:22:44 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id f19-20020a1c6a13000000b003db0ef4dedcso1765485wmc.4 for ; Wed, 18 Jan 2023 08:22:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=OhbZjX/koZrX9iSh81WiUJwKhhql/MHhaB/Kr/N+S/w=; b=yr/9wmZiTzFYxxilRSLGpxIbrlCS5ZK5VyA5sRbddu88WfeakbJ267et7UfBOZhkzL C8PxREakRwiCY6uHFhdvZGYBckjHMeOpl0CGuJNamF9PdqUuaGtfD1hvcfBrXHpAWPxV Ghjuz9jwroP90wZodO67XTyqIBdEQfbismAZmoB9AiaF3MxmB3jyuwpMgNG8GuzbIq7y kiRN6B0ihQ5eMRnpv8sXsUH+2d31laYsXjzTyJf4GagN78tcei6oScCImsP+caau9QTx 8enV/4WUdaHkNOgXPglo2lh75rfgkH1nGRCo4In8aRyt6xGBAHnRAX0pLzWMT8aO2bDY 4a0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OhbZjX/koZrX9iSh81WiUJwKhhql/MHhaB/Kr/N+S/w=; b=lRsz6TbYM5+wq8RMPvZszS7MfYDOi3cnUs8UJW+Jh0+lMV9bxaX5L/tBgc04cPDLry yX8AZcv3pJPokITvwF8VfKAp8OVos7PtwLYqo4WzSkoLz85+MlG3JhAxMXTrQjoCxHmm 3QLePCTdmeuq1juVoNPAwzyNDnc/aVwRkEOpXj998Lm462ZBg9XkEXsdp1i4rOWGt6Dy AkUDSbtK0tSARfuS/T/1CXOEvq1K8RHPtajfDTpoOqrf5VEsKhkS4fKjZKZurd7a7zQD GNXVLIO2piDa25/FQ10YEW54hpZj4ghOYUEL/4ApmhCwUXBObbrB0qxZ1iXxbDxs8eyr Otrg== X-Gm-Message-State: AFqh2krSEp/OVFxDtR3YS3YlkOPNDtfsN2us3ixkqOGzf8oLOd0V9Il2 shsziT+7XkcwpZ8swOby7B2rvA== X-Received: by 2002:a05:600c:4910:b0:3d3:4406:8a3a with SMTP id f16-20020a05600c491000b003d344068a3amr7562958wmp.30.1674058963373; Wed, 18 Jan 2023 08:22:43 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id l23-20020a05600c1d1700b003db0dbbea53sm2744393wms.30.2023.01.18.08.22.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 08:22:42 -0800 (PST) From: Neil Armstrong Date: Wed, 18 Jan 2023 17:22:39 +0100 Subject: [PATCH v4 1/5] dt-bindings: remoteproc: qcom: adsp: move memory-region and firmware-name out of pas-common MIME-Version: 1.0 Message-Id: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-1-54154c08c0b7@linaro.org> References: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-0-54154c08c0b7@linaro.org> In-Reply-To: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-0-54154c08c0b7@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Manivannan Sadhasivam , Srinivas Kandagatla , Amol Maheshwari Cc: Alex Elder , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Abel Vesa , Neil Armstrong , Krzysztof Kozlowski X-Mailer: b4 0.11.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755378489780192864?= X-GMAIL-MSGID: =?utf-8?q?1755378489780192864?= Move memory-region and firmware-name definitions out of qcom,pas-common.yaml since they will be redefined differently for SM8550 PAS bindings documentation. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong --- Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml | 4 ++++ Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml | 8 -------- Documentation/devicetree/bindings/remoteproc/qcom,qcs404-pas.yaml | 8 ++++++++ Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml | 8 ++++++++ .../devicetree/bindings/remoteproc/qcom,sc8180x-pas.yaml | 8 ++++++++ .../devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml | 8 ++++++++ Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml | 8 ++++++++ Documentation/devicetree/bindings/remoteproc/qcom,sm6350-pas.yaml | 8 ++++++++ Documentation/devicetree/bindings/remoteproc/qcom,sm8150-pas.yaml | 8 ++++++++ Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml | 8 ++++++++ 10 files changed, 68 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml index d3bfc0f472a9..643ee787a81f 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml @@ -40,6 +40,10 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: Reference to the AOSS side-channel message RAM. + memory-region: + maxItems: 1 + description: Reference to the reserved-memory for the Hexagon core + required: - compatible diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml index 1d5e01c8d8bc..171ef85de193 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,pas-common.yaml @@ -52,14 +52,6 @@ properties: minItems: 1 maxItems: 3 - firmware-name: - $ref: /schemas/types.yaml#/definitions/string - description: Firmware name for the Hexagon core - - memory-region: - maxItems: 1 - description: Reference to the reserved-memory for the Hexagon core - qcom,smem-states: $ref: /schemas/types.yaml#/definitions/phandle-array description: States used by the AP to signal the Hexagon core diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,qcs404-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,qcs404-pas.yaml index 007349ef51ed..5efa0e5c0439 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,qcs404-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,qcs404-pas.yaml @@ -41,6 +41,14 @@ properties: power-domain-names: false smd-edge: false + memory-region: + minItems: 1 + description: Reference to the reserved-memory for the Hexagon core + + firmware-name: + $ref: /schemas/types.yaml#/definitions/string + description: Firmware name for the Hexagon core + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml index 6fd768609a66..5cefd2c58593 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sc7180-pas.yaml @@ -50,12 +50,20 @@ properties: - const: mx - const: mss + memory-region: + minItems: 1 + description: Reference to the reserved-memory for the Hexagon core + qcom,qmp: $ref: /schemas/types.yaml#/definitions/phandle description: Reference to the AOSS side-channel message RAM. smd-edge: false + firmware-name: + $ref: /schemas/types.yaml#/definitions/string + description: Firmware name for the Hexagon core + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc8180x-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc8180x-pas.yaml index 3026cfde5582..c1f8dd8d0e4c 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sc8180x-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sc8180x-pas.yaml @@ -37,6 +37,14 @@ properties: smd-edge: false + memory-region: + minItems: 1 + description: Reference to the reserved-memory for the Hexagon core + + firmware-name: + $ref: /schemas/types.yaml#/definitions/string + description: Firmware name for the Hexagon core + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml index c08274aaa6f8..f6fbc531dc28 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sc8280xp-pas.yaml @@ -37,6 +37,14 @@ properties: smd-edge: false + memory-region: + minItems: 1 + description: Reference to the reserved-memory for the Hexagon core + + firmware-name: + $ref: /schemas/types.yaml#/definitions/string + description: Firmware name for the Hexagon core + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml index cbeaa00ca4d4..c66e298462c7 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sdx55-pas.yaml @@ -45,12 +45,20 @@ properties: - const: cx - const: mss + memory-region: + minItems: 1 + description: Reference to the reserved-memory for the Hexagon core + qcom,qmp: $ref: /schemas/types.yaml#/definitions/phandle description: Reference to the AOSS side-channel message RAM. smd-edge: false + firmware-name: + $ref: /schemas/types.yaml#/definitions/string + description: Firmware name for the Hexagon core + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm6350-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm6350-pas.yaml index 911529400142..fee02fa800b5 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm6350-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm6350-pas.yaml @@ -35,8 +35,16 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: Reference to the AOSS side-channel message RAM. + memory-region: + minItems: 1 + description: Reference to the reserved-memory for the Hexagon core + smd-edge: false + firmware-name: + $ref: /schemas/types.yaml#/definitions/string + description: Firmware name for the Hexagon core + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8150-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8150-pas.yaml index b934252cf02b..2c085ac2c3fb 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8150-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8150-pas.yaml @@ -39,8 +39,16 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: Reference to the AOSS side-channel message RAM. + memory-region: + minItems: 1 + description: Reference to the reserved-memory for the Hexagon core + smd-edge: false + firmware-name: + $ref: /schemas/types.yaml#/definitions/string + description: Firmware name for the Hexagon core + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml index 853f97d6879f..af24f9a3cdf1 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8350-pas.yaml @@ -42,6 +42,14 @@ properties: smd-edge: false + memory-region: + minItems: 1 + description: Reference to the reserved-memory for the Hexagon core + + firmware-name: + $ref: /schemas/types.yaml#/definitions/string + description: Firmware name for the Hexagon core + required: - compatible - reg From patchwork Wed Jan 18 16:22:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 45375 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2433571wrn; Wed, 18 Jan 2023 08:30:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXtFLJKAwDoEu7Yel0s9PHetMS0KrLdTYd9JXqk6hf9VaYqfm9GwmYe4miAOMD+nJkGscMu1 X-Received: by 2002:a17:902:7b85:b0:193:3bf7:40e6 with SMTP id w5-20020a1709027b8500b001933bf740e6mr6343015pll.53.1674059441389; Wed, 18 Jan 2023 08:30:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674059441; cv=none; d=google.com; s=arc-20160816; b=ls2/zjZoInZzrYUCuP78ZuGN3ltDezZt9kfRtSYMK3LYGNafdz/PiXvB9l40oueP3d Lrk9kn1Q3kU7u73VP+7WYc5uiqSoA2syYGPk5/tf0J6GvGK2QTF2yq0nHqNmApNkDpV/ vDmM1ffDDKv+a1WZqqvkb/XuNHcR2LTicvBK5MWbUfHsCSL3QrUyL7j/UZMy7tpWS8Ss b1aY1Ff224d3jP6idwuLsxM0SmXS4dt+s/s8sgVyS47WaIJKYa1yelQQ3Hs6aj0UORk5 5jPKHpiOEt/Ln02gK7D8PhJlzbnfDrUsa/KpFdO91d4lgYt6PHW4eYOyCVeMwJsA/vgw 8oyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=vJhhwuYzq1Okb5/4x8Q7mNbhcHN2GG5v0qhyd4tEid4=; b=KmVc4DAsI02LXYB9kkqfEmR5gFWLOTQea3LHRMzzj9vKFrkRCU9HCFof0xbF63M9Vd 8aa3kaYw1IFRasOKKK6Mj6G2WgllhsyypUr0BXqKsiEhtyuhW6Tpxci78oTyap94SKL5 xI/2kpanYwDeSZcitsXcjHsqvHKHEFF65COVabvGRo0lk79bdo2uFUW+/MjvczfUqjB0 jBI1M4NkT990UhgT1lP0Lvv1FfWuD7v6L2VA+WdD/ZvPqt0OUIBox8EM7r3YuT0b5Olt 0hXYOCmt6wyvw+jsioDMDZ2/GLHbmnfwMhyB2bOUGdVpTxCrrZhP17EojC9OIAAFAc6O iTiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uwsUKsmC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q16-20020a17090311d000b00188f3bd383csi39194850plh.266.2023.01.18.08.30.20; Wed, 18 Jan 2023 08:30:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uwsUKsmC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S231162AbjARQYp (ORCPT + 99 others); Wed, 18 Jan 2023 11:24:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230087AbjARQYV (ORCPT ); Wed, 18 Jan 2023 11:24:21 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBE9C3F299 for ; Wed, 18 Jan 2023 08:22:45 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id f19-20020a1c6a13000000b003db0ef4dedcso1765521wmc.4 for ; Wed, 18 Jan 2023 08:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=vJhhwuYzq1Okb5/4x8Q7mNbhcHN2GG5v0qhyd4tEid4=; b=uwsUKsmC2V17s84crcW8TRooIA5Rn0Q1yi+v8X06HeswNhLV+psovM+vY86swB0Uja 9ZO2TwwtjqufNFDcMVjdgEJi7EnZ7AOcFyXHlph8/VV5ukGNydv2HgcJ+KqSjy+KKju6 Lot76QQigWhJLkhuMiXfAf5B/OA2VD8lc1rdymF/9/rLhhws44OPFhXcm53WcVthZSnU pX4+v80EZGi+3fYJkrMuZUNLcEqRvKLOHxe7AodCRSofeQq457Jj5/g/LSxRlWhgLrW/ JkWFA6Txm/zgl7bRB4ZJtuRUNyShMkXyvxy5RL1gqmxHA+UnmHImm5lrzPkyg3iaPZAa OcCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vJhhwuYzq1Okb5/4x8Q7mNbhcHN2GG5v0qhyd4tEid4=; b=jyjP+acFzs02iQ8nKjxJj+/2VRfPYVLz+DLWup46/ErKoJvWd12PRvhJ2eDsmGZX8q x+8F4qAoo/9eCByF3JtB7YT1sHFmRo2f7nk74XTZMT1pGOp/dTmS9Rf/Xc+g5SiZdK7V 58FzVIduMd1oTAHUL2gjuFWUCW4na7jmyvM2AyLNy0UjaqJGef7tve83toEw7kREXkOT K3OkDqSj04NSnkhYaZH3zk5ZrICNJqEUBmt+k94fXdnH6JtErRM0wGR0qeb81rEJwBmC OeaNDdBAnsorrCftTxA0ykWk/AU4SbjKLN5a0MGDfEGNVEKSTIRtjEgw57SxQEg56r9t /rxw== X-Gm-Message-State: AFqh2kpE5E/QBlvF2gZmaMGozf7YjCsgzZP4DLEtDs/VDUHkpvdpqsXw GCatyf6mCPAjUcYZRptRMdGRJQ== X-Received: by 2002:a05:600c:4191:b0:3d4:5741:af9b with SMTP id p17-20020a05600c419100b003d45741af9bmr15911084wmh.0.1674058964422; Wed, 18 Jan 2023 08:22:44 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id l23-20020a05600c1d1700b003db0dbbea53sm2744393wms.30.2023.01.18.08.22.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 08:22:44 -0800 (PST) From: Neil Armstrong Date: Wed, 18 Jan 2023 17:22:40 +0100 Subject: [PATCH v4 2/5] dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible MIME-Version: 1.0 Message-Id: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-2-54154c08c0b7@linaro.org> References: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-0-54154c08c0b7@linaro.org> In-Reply-To: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-0-54154c08c0b7@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Manivannan Sadhasivam , Srinivas Kandagatla , Amol Maheshwari Cc: Alex Elder , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Abel Vesa , Neil Armstrong , Krzysztof Kozlowski X-Mailer: b4 0.11.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755378552660729020?= X-GMAIL-MSGID: =?utf-8?q?1755378552660729020?= This documents the compatible for the component used to boot the aDSP, cDSP and MPSS on the SM8550 SoC. The SM8550 boot process on SM8550 now requires a secondary "Devicetree" firmware to be passed along the main Firmware, and the cDSP a new power domain named "NSP". A third memory domain for the DSM memory zone is also needed for the MPSS PAS bindings. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong --- .../bindings/remoteproc/qcom,sm8550-pas.yaml | 178 +++++++++++++++++++++ 1 file changed, 178 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml new file mode 100644 index 000000000000..ae612809e260 --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml @@ -0,0 +1,178 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/remoteproc/qcom,sm8550-pas.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm SM8550 Peripheral Authentication Service + +maintainers: + - Manivannan Sadhasivam + +description: + Qualcomm SM8550 SoC Peripheral Authentication Service loads and boots firmware + on the Qualcomm DSP Hexagon cores. + +properties: + compatible: + enum: + - qcom,sm8550-adsp-pas + - qcom,sm8550-cdsp-pas + - qcom,sm8550-mpss-pas + + reg: + maxItems: 1 + + clocks: + items: + - description: XO clock + + clock-names: + items: + - const: xo + + qcom,qmp: + $ref: /schemas/types.yaml#/definitions/phandle + description: Reference to the AOSS side-channel message RAM. + + smd-edge: false + + firmware-name: + $ref: /schemas/types.yaml#/definitions/string-array + items: + - description: Firmware name of the Hexagon core + - description: Firmware name of the Hexagon Devicetree + + memory-region: + minItems: 2 + items: + - description: Memory region for main Firmware authentication + - description: Memory region for Devicetree Firmware authentication + - description: DSM Memory region + +required: + - compatible + - reg + +allOf: + - $ref: /schemas/remoteproc/qcom,pas-common.yaml# + - if: + properties: + compatible: + enum: + - qcom,sm8550-adsp-pas + - qcom,sm8550-cdsp-pas + then: + properties: + interrupts: + maxItems: 5 + interrupt-names: + maxItems: 5 + memory-region: + maxItems: 2 + else: + properties: + interrupts: + minItems: 6 + interrupt-names: + minItems: 6 + memory-region: + minItems: 3 + + - if: + properties: + compatible: + enum: + - qcom,sm8550-adsp-pas + then: + properties: + power-domains: + items: + - description: LCX power domain + - description: LMX power domain + power-domain-names: + items: + - const: lcx + - const: lmx + + - if: + properties: + compatible: + enum: + - qcom,sm8550-cdsp-pas + then: + properties: + power-domains: + items: + - description: CX power domain + - description: MXC power domain + power-domain-names: + items: + - const: cx + - const: mxc + - if: + properties: + compatible: + enum: + - qcom,sm8550-mpss-pas + then: + properties: + power-domains: + items: + - description: CX power domain + - description: MXC power domain + - description: NSP power domain + power-domain-names: + items: + - const: cx + - const: mxc + - const: nsp + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + remoteproc@30000000 { + compatible = "qcom,sm8550-adsp-pas"; + reg = <0x030000000 0x100>; + + clocks = <&rpmhcc RPMH_CXO_CLK>; + clock-names = "xo"; + + interrupts-extended = <&pdc 6 IRQ_TYPE_EDGE_RISING>, + <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>, + <&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>, + <&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>, + <&smp2p_adsp_in 3 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "wdog", "fatal", "ready", + "handover", "stop-ack"; + + memory-region = <&adsp_mem>, <&dtb_adsp_mem>; + + firmware-name = "qcom/sm8550/adsp.mbn", + "qcom/sm8550/adsp_dtb.mbn"; + + power-domains = <&rpmhpd_sm8550_lcx>, + <&rpmhpd_sm8550_lmx>; + power-domain-names = "lcx", "lmx"; + + qcom,qmp = <&aoss_qmp>; + qcom,smem-states = <&smp2p_adsp_out 0>; + qcom,smem-state-names = "stop"; + + glink-edge { + interrupts-extended = <&ipcc IPCC_CLIENT_LPASS + IPCC_MPROC_SIGNAL_GLINK_QMP + IRQ_TYPE_EDGE_RISING>; + mboxes = <&ipcc IPCC_CLIENT_LPASS IPCC_MPROC_SIGNAL_GLINK_QMP>; + + label = "lpass"; + qcom,remote-pid = <2>; + + /* ... */ + }; + }; From patchwork Wed Jan 18 16:22:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 45376 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2433945wrn; Wed, 18 Jan 2023 08:31:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXu0RjkVE90E+3cVUvQ1mv8HIFXj84rX4K066vbYnYAvviaBx9dqik+I0WKiLR1WFX8cnDdY X-Received: by 2002:a17:903:2345:b0:193:3155:ebcf with SMTP id c5-20020a170903234500b001933155ebcfmr15002578plh.3.1674059475970; Wed, 18 Jan 2023 08:31:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674059475; cv=none; d=google.com; s=arc-20160816; b=eSWPJp6pEZFu0zPPq7IGhfkh+ZWgBydvS6QGbYbayHhVPxW+5HRqd/N3ZIuAI4oang Y9J9TM+SJDaQAb+F44wakePGfCruOcFWdhomi1c0EvzSjfxNDhtyLcoERHa52SlzhO5i T2XX+qeJQAl49Syr09eLifZiRjzciqgNyO3SdHWsLxPRW7TwfOu7uf7V+IbLTVk786vx nNP5MmsJJyWIhn+etW5wGY4mCND15OujYmwfJn2MB/rL+P1h2kuPCg7NBHFGynUAAaW0 iiuoXTu6m0i0m9nQ4H21yc+UDmVeU8lRPZIzFsxQ4er7w4eGBZQcqKIk86FXmxJEqNDh kHHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=7UDmILlFdDJxDbC08Q7YjwI+b8eG2TMyfC4v8otxDr8=; b=dQixX1Wn5DFOiWO5PduzqalkqEIuF9Tz6k3a0R8yLtIdBEk/TDHZv5N2UD7tyYrOaW 9vX/p9TMVTiVSsCJQIydk3NrHrHJC4acz23gaO7ocidr55zEvWJrGdoMRW6VaeRzJPko iTDJuwze6uinUCpbXPisE4fTHJAAKlQnE0vVDsmAbNUmXQyvU62U6enwVyu0vX8XVF/C YBVlV4K/z9K9cJk0ogYbr0JEBEr2rJtI7cwK2UgJfaEesQz9HD0TAs11sNxh+U2VwgHh nXjaLn0iGJRDDhjpvtGe4oAad0A5QbE1vrNADnPKvmvYaq1vSvrUiyzuvdjIWjh9pjwG PnjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qgGnz1Q6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 13-20020a170902e9cd00b0019305638dd4si19900544plk.75.2023.01.18.08.31.02; Wed, 18 Jan 2023 08:31:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qgGnz1Q6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229695AbjARQZC (ORCPT + 99 others); Wed, 18 Jan 2023 11:25:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230294AbjARQYX (ORCPT ); Wed, 18 Jan 2023 11:24:23 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FC2F589AF for ; Wed, 18 Jan 2023 08:22:47 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id k22-20020a05600c1c9600b003d1ee3a6289so1939755wms.2 for ; Wed, 18 Jan 2023 08:22:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=7UDmILlFdDJxDbC08Q7YjwI+b8eG2TMyfC4v8otxDr8=; b=qgGnz1Q6WPS+FyX3DMlX2rivJC1q62zonfADcdgI3i2pmzC+NGXO8O5yIOtl6gEu1i wRUpB2IL91CYtMcqYylYAWTE+dcXaK0jKVuRlR+Fj8H4xMciO9O7TFhDxQPUqJV9AabC PLQfSzoPtMhg/jvTz7ErB3oU5gj9C7TpeWHXjVl2xI6+LfxIq0stm2o4skCsROPG3cWT Zts00Eq5KlNQ9ZcTy4xTOLvyW1L2pwsp8b3Dd4whiYApPMNwtz/6vEiUex80apTsi7qX ZChCjTAvc6p6vzRaT2dCmqy2zvygZdvG6x1I8+o8m1GtNT+LU0ZvJLhCyD8yoTxxQ31S T0EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7UDmILlFdDJxDbC08Q7YjwI+b8eG2TMyfC4v8otxDr8=; b=OUUXj5PurllLCRTTibEOWC2CcsN8yDfqquOfzoILb2Flya3IbgCe9aD82zBFhiIFq8 iv/HVKCRqh5Jv45jnAvziU2B4q75Kzne9T9suvD8amKuLOmz8kSS56aZ5QaoUQsM1c0r ovoLP7QEsJGvnEId9kxHgPa4SSzoBhJjujPKPx6bMK5uN0oBCYUc497VDPMuJIjcNRbD kmKN7HW5tDx95DhrCXLDAMpX78v5hZ4EdH6nt655b2X+7yMFC8xTo7kKLxvpXZGDpj1H sZrgf1AoN+X/sKUVLOiQXD3PN+zuJXwQ2a+l11CKCGert9tMioArOCQVF9ZjZ5f8Md8s Vg/A== X-Gm-Message-State: AFqh2krdXboOhdugXxCjh8r5daDQ8hwb4ufSTuqY/O3YZqE+xAr3h2PP 49RTAOS4xn8j8J9aVwTZT59PXA== X-Received: by 2002:a05:600c:1712:b0:3d9:a145:91a with SMTP id c18-20020a05600c171200b003d9a145091amr7111434wmn.28.1674058965758; Wed, 18 Jan 2023 08:22:45 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id l23-20020a05600c1d1700b003db0dbbea53sm2744393wms.30.2023.01.18.08.22.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 08:22:45 -0800 (PST) From: Neil Armstrong Date: Wed, 18 Jan 2023 17:22:41 +0100 Subject: [PATCH v4 3/5] remoteproc: qcom_q6v5_pas: add support for dtb co-firmware loading MIME-Version: 1.0 Message-Id: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-3-54154c08c0b7@linaro.org> References: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-0-54154c08c0b7@linaro.org> In-Reply-To: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-0-54154c08c0b7@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Manivannan Sadhasivam , Srinivas Kandagatla , Amol Maheshwari Cc: Alex Elder , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Abel Vesa , Neil Armstrong , Krzysztof Kozlowski X-Mailer: b4 0.11.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755378588980480468?= X-GMAIL-MSGID: =?utf-8?q?1755378588980480468?= Starting from the SM8550 SoC, starting the aDSP, cDSP and MPSS will require loading a separate "Devicetree" firmware. In order to satisfy the load & authentication order required by the SM8550 SoC, the following is implemented: - "Devicetree" firmware request & load in dedicated memory - Q6V5 prepare - Power Domain & Clocks enable - "Devicetree" firmware authentication - Main firmware load in dedicated memory - Main firmware authentication - Q6V5 startup - "Devicetree" firmware metadata release - Main metadata release When booting older platforms, the "Devicetree" steps would be bypassed and the load & authentication order would still be valid. Signed-off-by: Neil Armstrong --- drivers/remoteproc/qcom_q6v5_pas.c | 134 +++++++++++++++++++++++++++++++++---- 1 file changed, 121 insertions(+), 13 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index f95e0229a6c1..3837a21820d6 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -35,7 +35,9 @@ struct adsp_data { int crash_reason_smem; const char *firmware_name; + const char *dtb_firmware_name; int pas_id; + int dtb_pas_id; unsigned int minidump_id; bool auto_boot; bool decrypt_shutdown; @@ -64,19 +66,28 @@ struct qcom_adsp { int proxy_pd_count; + const char *dtb_firmware_name; int pas_id; + int dtb_pas_id; unsigned int minidump_id; int crash_reason_smem; bool decrypt_shutdown; const char *info_name; + const struct firmware *firmware; + const struct firmware *dtb_firmware; + struct completion start_done; struct completion stop_done; phys_addr_t mem_phys; + phys_addr_t dtb_mem_phys; phys_addr_t mem_reloc; + phys_addr_t dtb_mem_reloc; void *mem_region; + void *dtb_mem_region; size_t mem_size; + size_t dtb_mem_size; struct qcom_rproc_glink glink_subdev; struct qcom_rproc_subdev smd_subdev; @@ -84,6 +95,7 @@ struct qcom_adsp { struct qcom_sysmon *sysmon; struct qcom_scm_pas_metadata pas_metadata; + struct qcom_scm_pas_metadata dtb_pas_metadata; }; static void adsp_minidump(struct rproc *rproc) @@ -158,6 +170,8 @@ static int adsp_unprepare(struct rproc *rproc) * here. */ qcom_scm_pas_metadata_release(&adsp->pas_metadata); + if (adsp->dtb_pas_id) + qcom_scm_pas_metadata_release(&adsp->dtb_pas_metadata); return 0; } @@ -167,20 +181,40 @@ static int adsp_load(struct rproc *rproc, const struct firmware *fw) struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; int ret; - ret = qcom_mdt_pas_init(adsp->dev, fw, rproc->firmware, adsp->pas_id, - adsp->mem_phys, &adsp->pas_metadata); - if (ret) - return ret; + /* Store firmware handle to be used in adsp_start() */ + adsp->firmware = fw; - ret = qcom_mdt_load_no_init(adsp->dev, fw, rproc->firmware, adsp->pas_id, - adsp->mem_region, adsp->mem_phys, adsp->mem_size, - &adsp->mem_reloc); - if (ret) - return ret; + if (adsp->dtb_pas_id) { + ret = request_firmware(&adsp->dtb_firmware, adsp->dtb_firmware_name, adsp->dev); + if (ret) { + dev_err(adsp->dev, "request_firmware failed for %s: %d\n", + adsp->dtb_firmware_name, ret); + return ret; + } - qcom_pil_info_store(adsp->info_name, adsp->mem_phys, adsp->mem_size); + ret = qcom_mdt_pas_init(adsp->dev, adsp->dtb_firmware, adsp->dtb_firmware_name, + adsp->dtb_pas_id, adsp->dtb_mem_phys, + &adsp->dtb_pas_metadata); + if (ret) + goto release_dtb_firmware; + + ret = qcom_mdt_load_no_init(adsp->dev, adsp->dtb_firmware, adsp->dtb_firmware_name, + adsp->dtb_pas_id, adsp->dtb_mem_region, + adsp->dtb_mem_phys, adsp->dtb_mem_size, + &adsp->dtb_mem_reloc); + if (ret) + goto release_dtb_metadata; + } return 0; + +release_dtb_metadata: + qcom_scm_pas_metadata_release(&adsp->dtb_pas_metadata); + +release_dtb_firmware: + release_firmware(adsp->dtb_firmware); + + return ret; } static int adsp_start(struct rproc *rproc) @@ -216,24 +250,55 @@ static int adsp_start(struct rproc *rproc) goto disable_cx_supply; } + if (adsp->dtb_pas_id) { + ret = qcom_scm_pas_auth_and_reset(adsp->dtb_pas_id); + if (ret) { + dev_err(adsp->dev, + "failed to authenticate dtb image and release reset\n"); + goto disable_px_supply; + } + } + + ret = qcom_mdt_pas_init(adsp->dev, adsp->firmware, rproc->firmware, adsp->pas_id, + adsp->mem_phys, &adsp->pas_metadata); + if (ret) + goto disable_px_supply; + + ret = qcom_mdt_load_no_init(adsp->dev, adsp->firmware, rproc->firmware, adsp->pas_id, + adsp->mem_region, adsp->mem_phys, adsp->mem_size, + &adsp->mem_reloc); + if (ret) + goto release_pas_metadata; + + qcom_pil_info_store(adsp->info_name, adsp->mem_phys, adsp->mem_size); + ret = qcom_scm_pas_auth_and_reset(adsp->pas_id); if (ret) { dev_err(adsp->dev, "failed to authenticate image and release reset\n"); - goto disable_px_supply; + goto release_pas_metadata; } ret = qcom_q6v5_wait_for_start(&adsp->q6v5, msecs_to_jiffies(5000)); if (ret == -ETIMEDOUT) { dev_err(adsp->dev, "start timed out\n"); qcom_scm_pas_shutdown(adsp->pas_id); - goto disable_px_supply; + goto release_pas_metadata; } qcom_scm_pas_metadata_release(&adsp->pas_metadata); + if (adsp->dtb_pas_id) + qcom_scm_pas_metadata_release(&adsp->dtb_pas_metadata); + + /* Remove pointer to the loaded firmware, only valid in adsp_load() & adsp_start() */ + adsp->firmware = NULL; return 0; +release_pas_metadata: + qcom_scm_pas_metadata_release(&adsp->pas_metadata); + if (adsp->dtb_pas_id) + qcom_scm_pas_metadata_release(&adsp->dtb_pas_metadata); disable_px_supply: if (adsp->px_supply) regulator_disable(adsp->px_supply); @@ -249,6 +314,9 @@ static int adsp_start(struct rproc *rproc) disable_irqs: qcom_q6v5_unprepare(&adsp->q6v5); + /* Remove pointer to the loaded firmware, only valid in adsp_load() & adsp_start() */ + adsp->firmware = NULL; + return ret; } @@ -282,6 +350,12 @@ static int adsp_stop(struct rproc *rproc) if (ret) dev_err(adsp->dev, "failed to shutdown: %d\n", ret); + if (adsp->dtb_pas_id) { + ret = qcom_scm_pas_shutdown(adsp->dtb_pas_id); + if (ret) + dev_err(adsp->dev, "failed to shutdown dtb: %d\n", ret); + } + handover = qcom_q6v5_unprepare(&adsp->q6v5); if (handover) qcom_pas_handover(&adsp->q6v5); @@ -458,6 +532,28 @@ static int adsp_alloc_memory_region(struct qcom_adsp *adsp) return -EBUSY; } + if (!adsp->dtb_pas_id) + return 0; + + node = of_parse_phandle(adsp->dev->of_node, "memory-region", 1); + if (!node) { + dev_err(adsp->dev, "no dtb memory-region specified\n"); + return -EINVAL; + } + + ret = of_address_to_resource(node, 0, &r); + if (ret) + return ret; + + adsp->dtb_mem_phys = adsp->dtb_mem_reloc = r.start; + adsp->dtb_mem_size = resource_size(&r); + adsp->dtb_mem_region = devm_ioremap_wc(adsp->dev, adsp->dtb_mem_phys, adsp->dtb_mem_size); + if (!adsp->dtb_mem_region) { + dev_err(adsp->dev, "unable to map dtb memory region: %pa+%zx\n", + &r.start, adsp->dtb_mem_size); + return -EBUSY; + } + return 0; } @@ -466,7 +562,7 @@ static int adsp_probe(struct platform_device *pdev) const struct adsp_data *desc; struct qcom_adsp *adsp; struct rproc *rproc; - const char *fw_name; + const char *fw_name, *dtb_fw_name = NULL; const struct rproc_ops *ops = &adsp_ops; int ret; @@ -483,6 +579,14 @@ static int adsp_probe(struct platform_device *pdev) if (ret < 0 && ret != -EINVAL) return ret; + if (desc->dtb_firmware_name) { + dtb_fw_name = desc->dtb_firmware_name; + ret = of_property_read_string_index(pdev->dev.of_node, "firmware-name", 1, + &dtb_fw_name); + if (ret < 0 && ret != -EINVAL) + return ret; + } + if (desc->minidump_id) ops = &adsp_minidump_ops; @@ -503,6 +607,10 @@ static int adsp_probe(struct platform_device *pdev) adsp->pas_id = desc->pas_id; adsp->info_name = desc->sysmon_name; adsp->decrypt_shutdown = desc->decrypt_shutdown; + if (dtb_fw_name) { + adsp->dtb_firmware_name = dtb_fw_name; + adsp->dtb_pas_id = desc->dtb_pas_id; + } platform_set_drvdata(pdev, adsp); ret = device_init_wakeup(adsp->dev, true); From patchwork Wed Jan 18 16:22:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 45378 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2434222wrn; Wed, 18 Jan 2023 08:31:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXvk+Tn4WmKlquyrrZI10e8atxxzyaWfWuFqKfW9ra1aPg/Wg4ETGfmIypcxH1StwT7v/kq/ X-Received: by 2002:a17:90a:a47:b0:229:46f0:6f6b with SMTP id o65-20020a17090a0a4700b0022946f06f6bmr7848628pjo.36.1674059503280; Wed, 18 Jan 2023 08:31:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674059503; cv=none; d=google.com; s=arc-20160816; b=mZVqJU7nthFPRDiyXv5adeeMHrwFrdIzzKmyXjS3G3Oyo5ti5xBslc7V78eJY2lmhy Eadt9MiI6Pk39z80DnD3BLZ4fpuLy0nN3ZmK64VA7Ucjxh9pRQqbI7wFzruAhpg1JWDz /c/NZysF+DEw6dw30UgH4BMiu98L4UG6mvXjt4rxVqghzNzPXXngmN26lkwrnglYaU6K FJNF2/JsS27ZlMXBmDeVtsKn0du2qYJ60Vw+DoCCaR+iLevGycdDclzapIvYfkuSOVmb f+SjKbWO22Dt8QoLpazYPatXtnV6677wkV0G6xqJp5hgiMTX/Avq0xXCeLqlWlRiW1fk XGxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=TGzHrMG3hr3Zooc6YVSDSOl6T9u3WLIHlDj6p+zw1Ms=; b=jvzP+YMfMPw2oGu2oj4o0XDTX5d7PI/ww1hqtOeK+5/+HG53HpGgRC1jlXjC9wUA6n gBBZqyiA6LY++cIH7bG6JrZ7b9sTN4XhhrcZeeG1EnIPcH0rh3gAnKuI64WsbeNq00SS WGmoMGxETQzY29Zc99xqZYRXM9opD45A1WVWQ7cUWLyffW+iV5HNL6ivBI4FxN2nFGWX Duy6iHy4h9h4J7FBMZsxEy/cdR76MclG/Wu7acN1fcAnLr5Y7SOBohKbkNqgVa4eB3By pUyoKSHDkuWsJYbjqTc2rzGYIeoAv54iW4dNugdLsT5kJ3K35CYC97V6CsV6RowKrD55 Q8Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DFgjwP8M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q90-20020a17090a4fe300b002294419acd5si2482015pjh.85.2023.01.18.08.31.31; Wed, 18 Jan 2023 08:31:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DFgjwP8M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229977AbjARQZJ (ORCPT + 99 others); Wed, 18 Jan 2023 11:25:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230203AbjARQYX (ORCPT ); Wed, 18 Jan 2023 11:24:23 -0500 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FA97589A1 for ; Wed, 18 Jan 2023 08:22:47 -0800 (PST) Received: by mail-wm1-x32d.google.com with SMTP id m5-20020a05600c4f4500b003db03b2559eso1935851wmq.5 for ; Wed, 18 Jan 2023 08:22:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=TGzHrMG3hr3Zooc6YVSDSOl6T9u3WLIHlDj6p+zw1Ms=; b=DFgjwP8Maa/fVHV9FbuWiKu4x2xgl0uzbDWsvLFSvNMmMhb2RGVJec6bEldAGMJfQq umfaaUbLB677DZwYQH4ln7K+C6cdw2RlYXCGVlRAqyLGtMPq8T7cEdhAO0BZiHIrlqyk h7hghN1USHxMUqpzY7N446Qd8cLwieI9MimHa8kXHnXbli1KTpFH4PUdpyXp9oWjlW+5 rIYPL3Xf5Gzhf1n6IdqQOaYYuGkItgyfWURCIQEu9tO2lhBD/5mKvtqUIfvfqrqUDZdU XEVfC1sGhBA1zgKqOVYcmeJ295hVG8Rx3HqJYEP0+RYKW/dQKrh4eGNZ3BjkqktkCfro 40YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TGzHrMG3hr3Zooc6YVSDSOl6T9u3WLIHlDj6p+zw1Ms=; b=765w6heFNWtWzPiJFlI6MIfFCUqo+5jF2FkQv6Mnp/1QfezpR9WBoRtbbWExQPw0wb rUjsQEEbnzgaSprGRcBe3ID/h5uxFMP+x6Fh2KDxz5sayTo5P49vwd6ubPMsuPucyBre /IuZ2llaSn/x6dKzvs2DVGDqdnU8MvVQNxZQHg6fpNShUpaQJmvqmygwHe/BX/p6Gljg B1oCv4DTdTymgHcOJTz50oZqAD+4YRaxh8H+Q0jm34HohZVwxs/+E8oPnDexLv9lJ1kw g8Nq4GBY5F7R2+gKsz8ADN502P1+leCn9b3vBrNQLTyRB+hdXfbV9RwAyJcE7U0DRDqy 82bg== X-Gm-Message-State: AFqh2koTYh1wdAq8q+L7HAkHISE+WDDhQoDwCSk46DezLdFiuwnFdVLk ZkWJyL74h3dUMjJoWU+9W23f6Q== X-Received: by 2002:a05:600c:198a:b0:3d9:cb4c:af5a with SMTP id t10-20020a05600c198a00b003d9cb4caf5amr7555794wmq.33.1674058966810; Wed, 18 Jan 2023 08:22:46 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id l23-20020a05600c1d1700b003db0dbbea53sm2744393wms.30.2023.01.18.08.22.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 08:22:46 -0800 (PST) From: Neil Armstrong Date: Wed, 18 Jan 2023 17:22:42 +0100 Subject: [PATCH v4 4/5] remoteproc: qcom_q6v5_pas: add support for assigning memory to firmware MIME-Version: 1.0 Message-Id: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-4-54154c08c0b7@linaro.org> References: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-0-54154c08c0b7@linaro.org> In-Reply-To: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-0-54154c08c0b7@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Manivannan Sadhasivam , Srinivas Kandagatla , Amol Maheshwari Cc: Alex Elder , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Abel Vesa , Neil Armstrong , Krzysztof Kozlowski X-Mailer: b4 0.11.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755378618032851733?= X-GMAIL-MSGID: =?utf-8?q?1755378618032851733?= Starting with SM8550, the DSM memory must now be shared to the firmware by the APPS process instead of beeing defined in the carveout memory reserved for MPSS. In order to handle that, add a region_assign_idx in adsp_data to specify with index of memory-region must be assigned to the MPSS via the qcom_scm_assign_mem() call at probe time. Signed-off-by: Neil Armstrong --- drivers/remoteproc/qcom_q6v5_pas.c | 71 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 3837a21820d6..445020f8baf8 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -48,6 +48,8 @@ struct adsp_data { const char *ssr_name; const char *sysmon_name; int ssctl_id; + + int region_assign_idx; }; struct qcom_adsp { @@ -84,10 +86,15 @@ struct qcom_adsp { phys_addr_t dtb_mem_phys; phys_addr_t mem_reloc; phys_addr_t dtb_mem_reloc; + phys_addr_t region_assign_phys; void *mem_region; void *dtb_mem_region; size_t mem_size; size_t dtb_mem_size; + size_t region_assign_size; + + int region_assign_idx; + int region_assign_perms; struct qcom_rproc_glink glink_subdev; struct qcom_rproc_subdev smd_subdev; @@ -557,6 +564,64 @@ static int adsp_alloc_memory_region(struct qcom_adsp *adsp) return 0; } +static int adsp_assign_memory_region(struct qcom_adsp *adsp) +{ + struct qcom_scm_vmperm perm; + struct device_node *node; + struct resource r; + int ret; + + if (!adsp->region_assign_idx) + return 0; + + node = of_parse_phandle(adsp->dev->of_node, "memory-region", adsp->region_assign_idx); + if (!node) { + dev_err(adsp->dev, "missing shareable memory-region\n"); + return -EINVAL; + } + + ret = of_address_to_resource(node, 0, &r); + if (ret) + return ret; + + perm.vmid = QCOM_SCM_VMID_MSS_MSA; + perm.perm = QCOM_SCM_PERM_RW; + + adsp->region_assign_phys = r.start; + adsp->region_assign_size = resource_size(&r); + adsp->region_assign_perms = BIT(QCOM_SCM_VMID_HLOS); + + ret = qcom_scm_assign_mem(adsp->region_assign_phys, + adsp->region_assign_size, + &adsp->region_assign_perms, + &perm, 1); + if (ret < 0) { + dev_err(adsp->dev, "assign memory failed\n"); + return ret; + } + + return 0; +} + +static void adsp_unassign_memory_region(struct qcom_adsp *adsp) +{ + struct qcom_scm_vmperm perm; + int ret; + + if (!adsp->region_assign_idx) + return; + + perm.vmid = QCOM_SCM_VMID_HLOS; + perm.perm = QCOM_SCM_PERM_RW; + + ret = qcom_scm_assign_mem(adsp->region_assign_phys, + adsp->region_assign_size, + &adsp->region_assign_perms, + &perm, 1); + if (ret < 0) + dev_err(adsp->dev, "unassign memory failed\n"); +} + static int adsp_probe(struct platform_device *pdev) { const struct adsp_data *desc; @@ -607,6 +672,7 @@ static int adsp_probe(struct platform_device *pdev) adsp->pas_id = desc->pas_id; adsp->info_name = desc->sysmon_name; adsp->decrypt_shutdown = desc->decrypt_shutdown; + adsp->region_assign_idx = desc->region_assign_idx; if (dtb_fw_name) { adsp->dtb_firmware_name = dtb_fw_name; adsp->dtb_pas_id = desc->dtb_pas_id; @@ -621,6 +687,10 @@ static int adsp_probe(struct platform_device *pdev) if (ret) goto free_rproc; + ret = adsp_assign_memory_region(adsp); + if (ret) + goto free_rproc; + ret = adsp_init_clock(adsp); if (ret) goto free_rproc; @@ -673,6 +743,7 @@ static int adsp_remove(struct platform_device *pdev) rproc_del(adsp->rproc); qcom_q6v5_deinit(&adsp->q6v5); + adsp_unassign_memory_region(adsp); qcom_remove_glink_subdev(adsp->rproc, &adsp->glink_subdev); qcom_remove_sysmon_subdev(adsp->sysmon); qcom_remove_smd_subdev(adsp->rproc, &adsp->smd_subdev); From patchwork Wed Jan 18 16:22:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 45377 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2434087wrn; Wed, 18 Jan 2023 08:31:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXuiFB3dpPwg6MfJweNQlbeiWhe1tjXTNyaWGrZHGwu2kmBJtL9KMC+wuUwz+WHLk4VaLcBK X-Received: by 2002:a17:90a:f612:b0:225:e88c:33c2 with SMTP id bw18-20020a17090af61200b00225e88c33c2mr7637434pjb.7.1674059491047; Wed, 18 Jan 2023 08:31:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674059491; cv=none; d=google.com; s=arc-20160816; b=rD8p3mfh64xrjqgx6fL2Ba44fCOyc7XZUYQ3umFD+67+81UlSLu5IydxGyH0Sz6Y6U Rl9oHEmOVYNUWXL8zP/H6zuegSjcPq/9VwYiE554K5fokjYoiVWDHKV9z8YXkjbVm+s8 sZ8v+oC22m76ry4VyT9+K6z/XJrgG6q2UxeNBlE9YWl9cX+12NYQROyyT36E0S1gmLU9 JP5JTUKtoJW/8VuL5O8qtUtuG+Tn3jcFmtDSbaEfE134KrKv4b8QnlQPngbcmM3KFz0Y /Geg5rAUhLKWMg/I7AQc9q5Ljvxx+SRyi2YFkJUDc8ibc37fAtpA+HCzd6uAOJOUN3Ux 8Caw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=lqnfHCYygowMSX7A3WvGQbm7TCkDCHNHV0hd4pSc8Q0=; b=Dl/PIJDZlnH9/gMSjcNLP9VEoYBIzBV+sLU0AIuo3oBSQh76W9j71nPgrAEAr4QrZs 5IJ6k5udDmFCzvRNwPpBVzs5C/qJMZt5O0bWYJNwDrp8MCZMgTn8nQIcN0FAAcuzUaV/ /NyUfIpAhY7v5X+p5dHyimX5QWu/NlVrRS8p7DPkCqinouRhv10MW+E/VopB/rFaCmcd GlPu2WAyYmPBP6N5EyyXQIL1afgiXfXBUbx3wSq+ijt3sMdS0aJO1QjH4D1aKYg/XKPo AKP0c8aAdgtFwXbdysqIGWWWH+gGGmA2QbAFFIC5x4xq/thQmeWi/TQ5buVzKsJbrWDe 7FtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XAQcuiso; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k190-20020a636fc7000000b0046fb2a57348si38353444pgc.84.2023.01.18.08.31.18; Wed, 18 Jan 2023 08:31:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XAQcuiso; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229622AbjARQZP (ORCPT + 99 others); Wed, 18 Jan 2023 11:25:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230357AbjARQY0 (ORCPT ); Wed, 18 Jan 2023 11:24:26 -0500 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 454A05895B for ; Wed, 18 Jan 2023 08:22:49 -0800 (PST) Received: by mail-wm1-x333.google.com with SMTP id c10-20020a05600c0a4a00b003db0636ff84so1970428wmq.0 for ; Wed, 18 Jan 2023 08:22:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=lqnfHCYygowMSX7A3WvGQbm7TCkDCHNHV0hd4pSc8Q0=; b=XAQcuisoFpq12ir2wdVDYU4xF9CUwVRzGGAPMmaSSxXUvKXblbAK4uQxvYytWhVLjA Z1yeK3yCw/DZqHfoBH6Aswd6N44ziqoirVkhV6pTw0IElPRbbpmsPoCEjK2ls1PF6vKy ZBun27S1fpW3iiRFSLAGbNZQou9OBjOeZOy1Jw4vJfhWWbbrAVrXawXkWwGMVA70qJZO ETt0oJqplC3GFw7P061xDioU0w0RPdBiqajKSp1rYyGtS8IP8XMbumQJZtFazucDhuLr uNzDPdglxLv1/3kt2KK47rggn7kr6c7xopGhHyzsmqMXLQH71Crx+ZNFuBdXnM6wDdFi FCCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lqnfHCYygowMSX7A3WvGQbm7TCkDCHNHV0hd4pSc8Q0=; b=D1OA4BKbakoJdvcHXEc7AJsbMMwASXz/FlPC1sIPHBtMYijDohDPB2lyiJb3eMvpns yr7FEgfDSMW4zX+KqK/5yZ4hM+IDPn+6drtrZg0ov2Q5wEGM1V3kjjijiMgVi8t1jLVL LCKHlD3aSIvr4813KWa1uWi/2Yb5Q+qFIM7RKd0eIVVzfyqFCdCJiShS4Q3zWhK+96WU sm2ktZMjKosN3gZ2GjxL5vB2wxepZ4KzFDwXTIWNY2cm7NFhqH3tZG6KJPswvJ3FoStn FzynoXT1V4q/tbBavaprxag6f6A9f815M9hDeuiRXET+JUe/Cg2fnJLcxusydtrDxcU8 Y/Mw== X-Gm-Message-State: AFqh2koWMeBM4tOqsARw+bzeFllLdXECsGlGw+/Vn2mh+e1SguRk6IMH JAR328FjyU9cttWC1hezf8Omqg== X-Received: by 2002:a05:600c:4f12:b0:3d0:7415:c5a9 with SMTP id l18-20020a05600c4f1200b003d07415c5a9mr3277473wmq.21.1674058967803; Wed, 18 Jan 2023 08:22:47 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id l23-20020a05600c1d1700b003db0dbbea53sm2744393wms.30.2023.01.18.08.22.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 08:22:47 -0800 (PST) From: Neil Armstrong Date: Wed, 18 Jan 2023 17:22:43 +0100 Subject: [PATCH v4 5/5] remoteproc: qcom_q6v5_pas: add sm8550 adsp, cdsp & mpss compatible & data MIME-Version: 1.0 Message-Id: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-5-54154c08c0b7@linaro.org> References: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-0-54154c08c0b7@linaro.org> In-Reply-To: <20221114-narmstrong-sm8550-upstream-remoteproc-v4-0-54154c08c0b7@linaro.org> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Manivannan Sadhasivam , Srinivas Kandagatla , Amol Maheshwari Cc: Alex Elder , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Abel Vesa , Neil Armstrong , Krzysztof Kozlowski X-Mailer: b4 0.11.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755378604680642153?= X-GMAIL-MSGID: =?utf-8?q?1755378604680642153?= This adds the compatible & data for the aDSP, cDSP and MPSS found in the SM8550 SoC. This platform requires the "Devicetree" firmware to be loaded along the main firmware. The MPSS DSM memory to be assigned to the MPSS subsystem is the third memory-region entry as defined in the bindings. Signed-off-by: Neil Armstrong --- drivers/remoteproc/qcom_q6v5_pas.c | 63 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 445020f8baf8..abe47c990082 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -1101,6 +1101,66 @@ static const struct adsp_data sm8450_mpss_resource = { .ssctl_id = 0x12, }; +static const struct adsp_data sm8550_adsp_resource = { + .crash_reason_smem = 423, + .firmware_name = "adsp.mdt", + .dtb_firmware_name = "adsp_dtb.mdt", + .pas_id = 1, + .dtb_pas_id = 0x24, + .minidump_id = 5, + .auto_boot = false, + .proxy_pd_names = (char*[]){ + "lcx", + "lmx", + NULL + }, + .load_state = "adsp", + .ssr_name = "lpass", + .sysmon_name = "adsp", + .ssctl_id = 0x14, +}; + +static const struct adsp_data sm8550_cdsp_resource = { + .crash_reason_smem = 601, + .firmware_name = "cdsp.mdt", + .dtb_firmware_name = "cdsp_dtb.mdt", + .pas_id = 18, + .dtb_pas_id = 0x25, + .minidump_id = 7, + .auto_boot = false, + .proxy_pd_names = (char*[]){ + "cx", + "mxc", + "nsp", + NULL + }, + .load_state = "cdsp", + .ssr_name = "cdsp", + .sysmon_name = "cdsp", + .ssctl_id = 0x17, +}; + +static const struct adsp_data sm8550_mpss_resource = { + .crash_reason_smem = 421, + .firmware_name = "modem.mdt", + .dtb_firmware_name = "modem_dtb.mdt", + .pas_id = 4, + .dtb_pas_id = 0x26, + .minidump_id = 3, + .auto_boot = false, + .decrypt_shutdown = true, + .proxy_pd_names = (char*[]){ + "cx", + "mss", + NULL + }, + .load_state = "modem", + .ssr_name = "mpss", + .sysmon_name = "modem", + .ssctl_id = 0x12, + .region_assign_idx = 2, +}; + static const struct of_device_id adsp_of_match[] = { { .compatible = "qcom,msm8226-adsp-pil", .data = &adsp_resource_init}, { .compatible = "qcom,msm8953-adsp-pil", .data = &msm8996_adsp_resource}, @@ -1142,6 +1202,9 @@ static const struct of_device_id adsp_of_match[] = { { .compatible = "qcom,sm8450-cdsp-pas", .data = &sm8350_cdsp_resource}, { .compatible = "qcom,sm8450-slpi-pas", .data = &sm8350_slpi_resource}, { .compatible = "qcom,sm8450-mpss-pas", .data = &sm8450_mpss_resource}, + { .compatible = "qcom,sm8550-adsp-pas", .data = &sm8550_adsp_resource}, + { .compatible = "qcom,sm8550-cdsp-pas", .data = &sm8550_cdsp_resource}, + { .compatible = "qcom,sm8550-mpss-pas", .data = &sm8550_mpss_resource}, { }, }; MODULE_DEVICE_TABLE(of, adsp_of_match);