From patchwork Wed Nov 30 10:29:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 27728 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp843692wrr; Wed, 30 Nov 2022 02:30:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf5NfoUeuOOXr9iz1TFBMqXd0ak5UIpyOKjyYdaJDgdz5fvy8GqbWT6jsv4bJ9kg8PZlGG0B X-Received: by 2002:a17:90a:6c26:b0:218:f02a:f08f with SMTP id x35-20020a17090a6c2600b00218f02af08fmr35706393pjj.1.1669804240604; Wed, 30 Nov 2022 02:30:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669804240; cv=none; d=google.com; s=arc-20160816; b=WivR/c/9nPKSSI/vxWo6DbmiTGwPfA0H2BzdUKJWnWDO61LizPUaS9+kuMvj14IbwB +qOzd+Xe5ciAl4FuALSYbwt4yEkSpHsOqkj9T+wgsDQpsOnYmoT+4EfaEnkowfRK6+4/ lPnw1ZLrtxvzURJ/Lp8FaFtlBA9KXCBHkAg6OzAOmiFkYxBOXSZgD1BKj/q6xL6zIFEt Wu8Wr0jHhidy+tZIYZ5Zh1vU1B5NFkE0Iy89TiUl7TQYj4v7/QE94eh8pePo2zhYHKTx FIHxe8qiiNr9KmDkm8goaLTWclvdCbisjPZgjMrkkxZ8Bhpn9JgRmUeOixZNKKfEP3t7 2IYQ== 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=GUly8uO1OUcoSESV+o668Tkb+5x4qUzBcDjwS5bQlu4=; b=fWqF4sUg3dnYH+4kLIqZM1g9MDyT0B5ekUNoQr1/l7JPQdjw6HrWoxdG/NLXPSNf+T kVbYk29hWRXaXjuT4FMB+NKP6MBXM1INCpbxO4kRsSF+pPUJaIweqsP3NxJjtMKkEZoL PGMJh64UQLFy8uGWkJN6MEjN5/9jzm1IrKnSv5+pyDDosTy/PI1u7UrXb0cB0m4JD3ww 8nDISBGohBwSneO6c0ra1PGJ+asATC9k1fo7mEAmMqt9UC4+fwEppEOAzCJROcsplJdA q1tDTdBJek2UgJawDEiV2BVCS5Z8Mkc6LJVFAzepHmTjyuKHy5G2jIQICulo/PKSCYeX sB+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DpGnu9Ri; 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 y9-20020a17090aa40900b00212c3779154si1199176pjp.118.2022.11.30.02.30.26; Wed, 30 Nov 2022 02:30:40 -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=DpGnu9Ri; 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 S235443AbiK3KaK (ORCPT + 99 others); Wed, 30 Nov 2022 05:30:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235763AbiK3K3w (ORCPT ); Wed, 30 Nov 2022 05:29:52 -0500 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CB4241998 for ; Wed, 30 Nov 2022 02:29:50 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id h11so19064628wrw.13 for ; Wed, 30 Nov 2022 02:29:50 -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=GUly8uO1OUcoSESV+o668Tkb+5x4qUzBcDjwS5bQlu4=; b=DpGnu9RiLDPXokOHiRJbzfYmhxSLBYxs4raUKOaeN5We2r/7Ri6mlowpQXH7sYkJGy iedrXr3Wga6/tGDzdfD7LzVbCQ7fTWKPoZU15r7KuT5t1oZWMyOpjgA7hnd9BW4m59Dc taa/PZ46vhNchtBuqA0CEQcsObPOOqyxrc+Sn08kStEYh60IQ0YExPjwgyuUTPBfeBhJ M/uSK88oMjqdwslpdQYwSjp/e+5nVph6Oc9GVaeICy3sgeHiiKuJBlrtKOqMLBo/7gS5 f4bdVapvGjB48voqGDt5ngAzsjCI7XW+bgjCNrTcRE8U46Xti+hR53D8NJmIpz048Jvf Kr5w== 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=GUly8uO1OUcoSESV+o668Tkb+5x4qUzBcDjwS5bQlu4=; b=Zsl5lBG0x0LWJJCj2MlEmA7IB1FdYifAxmO42cnaYhKxe6+CSTzUCrJbkkcsOimIjt vzLuLe4V+S/dGjs3ZPcbOE8s4ozfqdkFPvdgBvvSeSOUbA4N/5avRjTV/z/1Eb+6vtS0 3i3tXZaz5KM8V8NF3yC4JL1/7fFwGkrlOq+vAY/iq7qfr5o4Livec1/CZxyS++QIzWtu ICQ+7msX07VH+ENHRRsTD73M3J+q+gRMEI6cbBk1fF6Prn19JTGd8YrQN0TDIJM6HfT+ 8DNoRcveHeA2zh665ED9Z6Iapt3K6xpIySjw5b0ByDhUfFcEBHTZcu3LKTqjdywq8mWT q1Jw== X-Gm-Message-State: ANoB5pmmCQXWV/Lc3OlglJplIpB0fI3m+8xkXzA0O8hXNMkGUVMjGgUx poGiTj00GBw1JudPN6jYUO6v4DNWY8+q+ODN X-Received: by 2002:a5d:504d:0:b0:242:246c:2f89 with SMTP id h13-20020a5d504d000000b00242246c2f89mr3815458wrt.108.1669804188683; Wed, 30 Nov 2022 02:29:48 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id j33-20020a05600c1c2100b003b4ff30e566sm4313570wms.3.2022.11.30.02.29.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 02:29:48 -0800 (PST) From: Neil Armstrong Date: Wed, 30 Nov 2022 11:29:45 +0100 Subject: [PATCH v2 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-v2-1-12bc22255474@linaro.org> References: <20221114-narmstrong-sm8550-upstream-remoteproc-v2-0-12bc22255474@linaro.org> In-Reply-To: <20221114-narmstrong-sm8550-upstream-remoteproc-v2-0-12bc22255474@linaro.org> To: Rob Herring , Bjorn Andersson , Krzysztof Kozlowski , Konrad Dybcio , Amol Maheshwari , Srinivas Kandagatla , Manivannan Sadhasivam , Mathieu Poirier , Andy Gross Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Neil Armstrong , Abel Vesa , linux-remoteproc@vger.kernel.org X-Mailer: b4 0.10.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?1750916651407087092?= X-GMAIL-MSGID: =?utf-8?q?1750916651407087092?= Move memory-region and firmware-name definitions out of qcom,pas-common.yaml since they will be redefined differently for SM8550 PAS bindings documentation. 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 9af2db72b337..5b55a22182ce 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml @@ -39,6 +39,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 Nov 30 10:29:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 27727 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp843655wrr; Wed, 30 Nov 2022 02:30:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf5DlTQ1YIFJTVjV+rlLMR1MNjI5i4OIn4Fu1IV6+l1QMw9gl9VJxNZ4tACyjaSsv2deh14a X-Received: by 2002:a17:90b:3d90:b0:212:de1c:a007 with SMTP id pq16-20020a17090b3d9000b00212de1ca007mr72195484pjb.30.1669804237987; Wed, 30 Nov 2022 02:30:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669804237; cv=none; d=google.com; s=arc-20160816; b=Sler910WMqsYN79WY8SieNzzYTLZqFtXj0Mg9KsWxBbpUrHlu087O9fvYUoZLicJxG LjMWHkLg+4DgsF1E11KiCOYrUkr8iUJOG3fSAuEa9qw8i1/BDSucvLGvTaJsXoDvbPFM f/IJtsLUZsw3ZFtx42FMltuBuXBrY6DXXG+Oj9nOH5uCd2M3nS4Aaj0qBkPVWs9KgdG1 OAtAqFx8lcJ0H3lcyqrNsHxj5VjVPhR9jDryiT9/ducyMfFGKiBYYZLpvH45JEfVQXfU mS9ugbPj8JI/vRHl2EzW9wO43JaIM0DvMuZKKXTFL2lbfExSnplsr2VM+5tkxFROh46m WCMQ== 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=fOlQTs4BeJdJIZ8+9JnI4IeWM1eTgBEDEciqtN1gR1w=; b=EcqbnvRP7lLO7UO2i7lAcoS40Rjf9m31hC4c5aAExj3hZFu1raiqdsBWlsWsfSxsWp 7eOOYUKNWSZM3dMVJzSf6NcY9VlYA1yphoNo6zc0AGCKyXhsMF7YhPWceSXu3yWWrAmf y2ZD9l8A+ZV+c/REYgUU7PN3ULTCSg3JbX6i8xqbJVm1LFBWhiJjdPK9HJR8FHCwHvWT arelXOJfnW/f9CyGr2lPw0Jzc8+2MjbqhMjRn49SOQi4K7mDBxwwo5U7O4t+HRvdSo/I C8H2VbC7THpKyoAUP2kcvIrXbKf7qOfQhmMkiSYbt+Mjr3y8UmGnDxrNZ/v9RAMm5l8I l5Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AyMCzPSa; 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 h29-20020a63385d000000b0042adcc66b1asi963815pgn.22.2022.11.30.02.30.25; Wed, 30 Nov 2022 02:30:37 -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=AyMCzPSa; 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 S235923AbiK3KaF (ORCPT + 99 others); Wed, 30 Nov 2022 05:30:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235769AbiK3K3w (ORCPT ); Wed, 30 Nov 2022 05:29:52 -0500 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 291583E0B9 for ; Wed, 30 Nov 2022 02:29:51 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id bs21so26342632wrb.4 for ; Wed, 30 Nov 2022 02:29:51 -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=fOlQTs4BeJdJIZ8+9JnI4IeWM1eTgBEDEciqtN1gR1w=; b=AyMCzPSakgnC/cgoqR6abpP721IhzXUCsUed19mkRJnH8EUO57j12Z1hAM+MC5eSnr 07nB4DnylCUEf3R3uHdN5ZvATcLDnlO8dnWP1eDZ5x6eNqzmwDEyctKAxAtGi2AEiaqY uNDvHs5v06naSp9WefF9ZoyMzEHZwMAVmbbjvj9mFli6BppMQmLZQrLiH+QR8Wkn9QVt C9kcHzJ7P0vnmY81ybgom+nMisJADE615S7yKFdhsS4v8ur1bZ3M6JekpEd8VimEuEzj RuKYHiOg2xnncWZZmnYkpA9eHhJ8tY24T3TAxB/wjNK1YSeNeRNuBVpffwpJboqpqT81 KO7A== 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=fOlQTs4BeJdJIZ8+9JnI4IeWM1eTgBEDEciqtN1gR1w=; b=jOmeU/xf1yJDfGfik4NBwVmWRCzuKQznZlYwzFjQC80CYA2NvssHbqwdpyPvcUnCRp 8WsWONIAenD3l8TNmRfzSWtTv+nipR80iDG5+6/WOOoXqaabgMArSP0HfFEn1uWM/hUI DSCqUb5Zn6jMLl2V/iqbIO2So1PqDt8lurXLH3/Ot5WeIiL+Xmz0DpGi6Swhj7fJLqVP HHz0RcqPgR3JHwCH+i0ZlnKgOpwL765reUHeDOq4yH5ZjIY6eLlPXA6OREjTnTNj5KQ7 Kt+1KEgB5zooeaogHII+gUdhzsFOVZm/CyCeL3rU3nNXvIndKatnx41yPG2mbf+a/AGw f4xQ== X-Gm-Message-State: ANoB5pn+ZYLM0TN4LGo4e6YIPUC6C+pKVnOT7vRQrR4KVgrocxHldx+W PW99weD3OZUak6nlz7L0/2srzFeGo57sX90G X-Received: by 2002:a5d:4e49:0:b0:242:d4f:961 with SMTP id r9-20020a5d4e49000000b002420d4f0961mr12288577wrt.474.1669804189620; Wed, 30 Nov 2022 02:29:49 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id j33-20020a05600c1c2100b003b4ff30e566sm4313570wms.3.2022.11.30.02.29.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 02:29:49 -0800 (PST) From: Neil Armstrong Date: Wed, 30 Nov 2022 11:29:46 +0100 Subject: [PATCH v2 2/5] dt-bindings: remoteproc: qcom: adsp: document sm8550 adsp, cdsp & mpss compatible MIME-Version: 1.0 Message-Id: <20221114-narmstrong-sm8550-upstream-remoteproc-v2-2-12bc22255474@linaro.org> References: <20221114-narmstrong-sm8550-upstream-remoteproc-v2-0-12bc22255474@linaro.org> In-Reply-To: <20221114-narmstrong-sm8550-upstream-remoteproc-v2-0-12bc22255474@linaro.org> To: Rob Herring , Bjorn Andersson , Krzysztof Kozlowski , Konrad Dybcio , Amol Maheshwari , Srinivas Kandagatla , Manivannan Sadhasivam , Mathieu Poirier , Andy Gross Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Neil Armstrong , Abel Vesa , linux-remoteproc@vger.kernel.org X-Mailer: b4 0.10.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?1750916648869768970?= X-GMAIL-MSGID: =?utf-8?q?1750916648869768970?= 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. Signed-off-by: Neil Armstrong --- .../bindings/remoteproc/qcom,sm8550-pas.yaml | 195 +++++++++++++++++++++ 1 file changed, 195 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..ac1c02ee780c --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml @@ -0,0 +1,195 @@ +# 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-mpss-pas + then: + properties: + power-domains: + items: + - description: CX power domain + - description: MSS power domain + power-domain-names: + items: + - const: cx + - const: mss + + - 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: + contains: + enum: + - qcom,sm8550-cdsp-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 Nov 30 10:29:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 27730 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp843947wrr; Wed, 30 Nov 2022 02:31:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf55ZpyxHYFiuEyRe3Ql1B9OHPGRzHDG4gN8Kwh80P69a6KquCyGvpG+IuYSxYyDB7f7JqKK X-Received: by 2002:a17:902:a605:b0:189:680e:c2e5 with SMTP id u5-20020a170902a60500b00189680ec2e5mr25478053plq.51.1669804270632; Wed, 30 Nov 2022 02:31:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669804270; cv=none; d=google.com; s=arc-20160816; b=UZ3RE45sf4Djyh8VRSNY7s1iIGDd9ucsUOgWrSYvlmXuuPhvQ5laLGwmPDPjkgSQdQ yslPhwlV/+eaHd81+8n7s0WbsEqCGUgNog9g2FaaphvFLSyH1LCm37/3KupoSX8jAHEy lkMUbv4wcWWCbRHMC+IYDPCutBaJsEFlFX9i968TD+QvbEaR56itNaGZCJ3RtHl7nRnq D+yYCv67PqTFHj62czKjeFjxze4s/6avJBr5jHmmcN7o8P24xcxO1cdp5kpo67F/YGuf /jrk2bZrx1oHLFDsSKU5/t1vYN1p66PGpImTlO1ApYdjWk3l6H/f5c5nfgusivSM/PbA CyrA== 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=F81FRtQTN8/7lBiZFQTJl8otEU1xztcn6GaL7O0kwpk=; b=rwL3M56omd+RQx1dnk8678jgCTAcvaMk1QiJwnjo8ylSCo6l7qzBZVBnuEl+F0y4GV 1yECcpUUxpa4rc9Zr5pnlsyl/XrvQngbNXVeP4I636iIrgZh5k4JpuzSRtSMcLCfMyb3 Q1kTUv9Y3FQTaqeDeD5YUEZYZDv7mY3LZEbfEVGRJGcoa5Vx9KpZZp1qxG45NWXMtRj2 6nfGrc/8I2HY7dk5E1NuOyzOfXwPDAtgU/2GFliE2U7L2PC1jVJyIWCPSzOe1W6+BvYX 97NVevCds3DBhz75Ec8iDb6MpEr1bdW69cAbxR2Ai2Cwv2cMKReSpUrNz5PsX0XBNpz+ 5Osg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="G28/KdJO"; 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 p18-20020a170902e35200b00188fd934f6fsi883734plc.162.2022.11.30.02.30.57; Wed, 30 Nov 2022 02:31:10 -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="G28/KdJO"; 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 S236083AbiK3KaT (ORCPT + 99 others); Wed, 30 Nov 2022 05:30:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235584AbiK3K3y (ORCPT ); Wed, 30 Nov 2022 05:29:54 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AD1542193 for ; Wed, 30 Nov 2022 02:29:52 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id bx10so14269996wrb.0 for ; Wed, 30 Nov 2022 02:29:52 -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=F81FRtQTN8/7lBiZFQTJl8otEU1xztcn6GaL7O0kwpk=; b=G28/KdJOjCg9+UIxofyjQV/U1xXgNCB4PJE7EMnOT0Crr+89VmtVf9IabZWFXVtC/S wPZcQIOFfeq8BQOdMdK5bsQmqGuwjhwW4SLsuYlJ/xvI+Lm4Npm5TFWxcEnJLnwfA+fb c7cLJ12el+y+ir9ivUbe9uy6ejDvbIOyq9/yyfdzLawA/FC+AUJWAVES6NcQuhXWPFG/ CFtqkRMi1f3q8eVrBzCqoLngcD/Y4ao2cWVpWBb2LIKLWbxhdrdBGBK2VOixDCSgjPPn Az0bp9YhOPnoFGQPBK1t2cO47Kb7fLaNqxb6nioB75ltmLYiQhzk+aBVURQ91O+/zo0F 7w3Q== 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=F81FRtQTN8/7lBiZFQTJl8otEU1xztcn6GaL7O0kwpk=; b=tjI0vWDRIvfYm2NMwQItl2dH0+N1UKLT/QYvJyyBtVDXLqwhAt+3F43AHEMUDMdoEA QGYTWEzdchkqv02zasM4nRACdjf5VURJjJJLa8gWG3lXLUp88SAbQ2oScUQOTsC1xWZS R0K3C5f2nJ8n8u+R5jUrLkLnnPpQwlfIWW6N/56ssD5QXCqr6e79bvm80mZ2Elz8mLff 9eQXofqI3sPIMfB5b6MZmLb3H41ka6I4F8cnIw88ZaVh9FEgT+SIzFgwP8WaHa59MB5E SAxvWvIJ2PKhKouJi/Yk1MtJ7bGJTB7QvO4g1nKicQaPmiKBrFPPyl3CAjxH9A0C3ueQ lVlA== X-Gm-Message-State: ANoB5pmHVPyjcigJfvlPRt7CGURUMklt8h6Dz/b4W22it/utfpC6LnoW 5JemfaoW+nepxiNZcfxR2V5lUjpzkq9v/+xt X-Received: by 2002:adf:f84f:0:b0:236:7805:48d3 with SMTP id d15-20020adff84f000000b00236780548d3mr36727248wrq.644.1669804190602; Wed, 30 Nov 2022 02:29:50 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id j33-20020a05600c1c2100b003b4ff30e566sm4313570wms.3.2022.11.30.02.29.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 02:29:50 -0800 (PST) From: Neil Armstrong Date: Wed, 30 Nov 2022 11:29:47 +0100 Subject: [PATCH v2 3/5] remoteproc: qcom_q6v5_pas: add support for dtb co-firmware loading MIME-Version: 1.0 Message-Id: <20221114-narmstrong-sm8550-upstream-remoteproc-v2-3-12bc22255474@linaro.org> References: <20221114-narmstrong-sm8550-upstream-remoteproc-v2-0-12bc22255474@linaro.org> In-Reply-To: <20221114-narmstrong-sm8550-upstream-remoteproc-v2-0-12bc22255474@linaro.org> To: Rob Herring , Bjorn Andersson , Krzysztof Kozlowski , Konrad Dybcio , Amol Maheshwari , Srinivas Kandagatla , Manivannan Sadhasivam , Mathieu Poirier , Andy Gross Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Neil Armstrong , Abel Vesa , linux-remoteproc@vger.kernel.org X-Mailer: b4 0.10.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?1750916683140886735?= X-GMAIL-MSGID: =?utf-8?q?1750916683140886735?= 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 6afd0941e552..4fe09c7f25bd 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 has_aggre2_clk; bool auto_boot; @@ -65,20 +67,29 @@ 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 has_aggre2_clk; 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; @@ -86,6 +97,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) @@ -160,6 +172,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; } @@ -169,20 +183,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) @@ -218,24 +252,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); @@ -251,6 +316,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; } @@ -284,6 +352,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); @@ -461,6 +535,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; } @@ -469,7 +565,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; @@ -486,6 +582,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; @@ -507,6 +611,10 @@ static int adsp_probe(struct platform_device *pdev) adsp->has_aggre2_clk = desc->has_aggre2_clk; 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 Nov 30 10:29:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 27729 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp843940wrr; Wed, 30 Nov 2022 02:31:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf6ynzkKem8WnLKMRTeoPAFyE+zE5Blhgs/xkazT90vVb1GgTbHU75WpJnebmAPXyaHk2dr1 X-Received: by 2002:a17:902:6b08:b0:189:81da:ee15 with SMTP id o8-20020a1709026b0800b0018981daee15mr17194355plk.58.1669804270229; Wed, 30 Nov 2022 02:31:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669804270; cv=none; d=google.com; s=arc-20160816; b=J8KF8fgOtgKbubedUJcLjGfxqM8JH0uLupf5KtGQu+LDNMinBjmvi3jFpO4smaZFMV TSpNZUYa5CJCWsmGW2s/hrSlHnnqmcxRz1r6s2bTAfL1nqWP+ZP4E0KrdATDDWUAhNrG vei9eNexTnb6pWdjWCL/Flq5AwyWcDgBZ8xR3HKvrRffBoVADIkrQgMutdKkFv/BB+Pw epNOcYyYo22ddTHRxeCSZD1trEf0EwfI0C9UhR/nVW3SiRJ/HrYvEqYvrUJIR1w84Udo XXEq+ocgN8YLM0lePZH3kBD88WaOKnQ0hFR2h5SrugZM4/00lMduN9IunYlJaCvhXaj5 ILAA== 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=Ki/VVnDlL+U9t3meGshSmXYJAvv54FtfX28ZlG2oSI0=; b=zpeJxtfy9p02CCvLZas4NX6UQ7544u3Eioeos2cxPhcgkLj1VYPcbfMCNtZ7efyUrp NFybq9QvwivACISnbJNM+3BIvzaZJZu31Gcnr/WzT7OhcLYSI1PJ9Tq/MaM1BaTMvTID sEkykKND0mjcJ80ZBGn4CtHz/gLmOMvuo4v40gozWBwDFeYsI4TOCDUx/nC4FqltMJnu JvW0ilDWQoIIKbHmLaKUf2MDcIByZ9sVDBemldAemVlhaly/R+fptXP9z46+RckWzSVa RFvkgyOEWyq1E6/EZg61bBEOTEzfyUOExat08PBaoi19MIgP05Zf1PSe4G3mdK0svkM2 zhPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XUiR3oyX; 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 a63-20020a639042000000b00476caa56d0esi964285pge.739.2022.11.30.02.30.57; Wed, 30 Nov 2022 02:31:10 -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=XUiR3oyX; 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 S235785AbiK3KaW (ORCPT + 99 others); Wed, 30 Nov 2022 05:30:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235698AbiK3K37 (ORCPT ); Wed, 30 Nov 2022 05:29:59 -0500 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1991040476 for ; Wed, 30 Nov 2022 02:29:53 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id ja4-20020a05600c556400b003cf6e77f89cso1250399wmb.0 for ; Wed, 30 Nov 2022 02:29:53 -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=Ki/VVnDlL+U9t3meGshSmXYJAvv54FtfX28ZlG2oSI0=; b=XUiR3oyX5qybgh2JXg2kRmIFchG4vbo8qeDrD51TO05JOy5O+XTsPFNRZmFz0AjHzm hPtr+12NrSLd0NPH+QntRYFEa1eGKfCqEv2GzRhYohiX/crLHTTa6oW4cHkMhzqFx0U4 IKwT/5TVbwpOec7XpmD5iw/T8SIBAO6khbyhzFex359DlFnC7mKhtLqdq443MA3+Pv7C Lvx8LGgV2taDrZa4++CuStSq5Xarbv+XZ5fEy7atG0JENztUhfUnVPWWCV2bMJ2kB8/0 6rLMyXEulM1R5+ArXQjUgZV/lC1a0ur+2bO/I2MQJCc5bhJBwGRlmser2hT5d5kP6wsL MlLA== 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=Ki/VVnDlL+U9t3meGshSmXYJAvv54FtfX28ZlG2oSI0=; b=IrSZuiC50PbQVGArXwjhmCbfaQMCiTAaa8LTJpAG4oZeZz2kFjb21Ufkc9zuvGf383 LbLyQr0ThNxjhD8LrZCp8b40mtl7U5ogxhn9MYOODByUHnnvZvb/ZJgBqArxafb3XqdM DX6o7CGREuDWqyhxPCyO0AknWBUcAu1KFK4mAxKfdqKHfUO5lm+RtJxQeRRSwnPrW4Ru cHX3A/w8gDdIKxoPqt0EsZdXJONK0dFjZaKSLqL/C5Fk4Pa+qkbwzy9zgEO/iEMUn9Uj OtyJquSmTpggKhtS4WmTNU9P7J6BPixlPVvW5CWyppjumDGGISzEExvXUzw8Z30L6im/ CBOw== X-Gm-Message-State: ANoB5pkUUlK12hfbxH/DwBr/kKDpAEEcfbaU4sErOfwJ6KFsAYmL3SWq lJK480NItE5dvh/BOSnBW6R3vnXEaKyNv9AZ X-Received: by 2002:a1c:790d:0:b0:3cf:935a:aaab with SMTP id l13-20020a1c790d000000b003cf935aaaabmr37712282wme.159.1669804191619; Wed, 30 Nov 2022 02:29:51 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id j33-20020a05600c1c2100b003b4ff30e566sm4313570wms.3.2022.11.30.02.29.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 02:29:51 -0800 (PST) From: Neil Armstrong Date: Wed, 30 Nov 2022 11:29:48 +0100 Subject: [PATCH v2 4/5] remoteproc: qcom_q6v5_pas: add support for assigning memory to firmware MIME-Version: 1.0 Message-Id: <20221114-narmstrong-sm8550-upstream-remoteproc-v2-4-12bc22255474@linaro.org> References: <20221114-narmstrong-sm8550-upstream-remoteproc-v2-0-12bc22255474@linaro.org> In-Reply-To: <20221114-narmstrong-sm8550-upstream-remoteproc-v2-0-12bc22255474@linaro.org> To: Rob Herring , Bjorn Andersson , Krzysztof Kozlowski , Konrad Dybcio , Amol Maheshwari , Srinivas Kandagatla , Manivannan Sadhasivam , Mathieu Poirier , Andy Gross Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Neil Armstrong , Abel Vesa , linux-remoteproc@vger.kernel.org X-Mailer: b4 0.10.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?1750916682763994203?= X-GMAIL-MSGID: =?utf-8?q?1750916682763994203?= 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 4fe09c7f25bd..d6a288432b6c 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -49,6 +49,8 @@ struct adsp_data { const char *ssr_name; const char *sysmon_name; int ssctl_id; + + int region_assign_idx; }; struct qcom_adsp { @@ -86,10 +88,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; @@ -560,6 +567,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; @@ -611,6 +676,7 @@ static int adsp_probe(struct platform_device *pdev) adsp->has_aggre2_clk = desc->has_aggre2_clk; 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; @@ -625,6 +691,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; @@ -676,6 +746,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 Nov 30 10:29:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 27731 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp844000wrr; Wed, 30 Nov 2022 02:31:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Y7ZMBcrpsJyeI69yfNa/Vv5cO/cnYdtg2NxKQIfcIKye7ecyyHYXbyFiWVYAxXTRCU9ug X-Received: by 2002:a17:903:2498:b0:189:7e2f:d64e with SMTP id p24-20020a170903249800b001897e2fd64emr19015635plw.162.1669804278729; Wed, 30 Nov 2022 02:31:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669804278; cv=none; d=google.com; s=arc-20160816; b=Jrz3lCCXyyzn0zH/plGQptvPSU8yQfix0/Cz5TiOAeiHZwJRbOWKH/6WWSfVKvmVv4 1Cd7bBTzjv9aNPXNVwRQDfMvIDA34kQD+R82OyV3O41z0a45sgOwGvrxCcqTTr6s7L2D eXG8Brg0GgU7XVH0v/6boqR95K4+pznwifYq8gf2xDltIx5ThJ0fVZeX9DGsQtlUzzJ5 TO//t3/FXurLsMtKPG9Tc89YVbsBAqHUNXeFOQDSwhPpnHE0kR9BPfWfbNKPILQnAmyC CL6CTTtr+ktesfZYfL4Qu836a1Y4M6I3yhKRi8mQjCzWvbbwcDhUpIZLT5r36DWPMpmF 4Oaw== 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=hH3Pz0smggYd5Ax4I5h47Equ8+9UzMYchJCtdBeu9ys=; b=tMnTLRhtam6+hZ3QI/9Giljs1HugBvZxfyecpwl/rTaST6e2juiTNpwJ+chYqQeA2Q hHDr+0RClsKEBnUAmXINHU2RpnZx6QT2poecyCeBkPFkWKdFaGDq+b0bafvFsxkkSqWV qPmgoIukwbpomNtZ8b5z1XTxS+Q9K71Y55Kj4+y0I5/YzUJ3TeewoncOYad7JcFs6E6M SgoHM/V0kFRNv3oLGlpzf6xDD4Jb9RvaHnFy8yEyfJ8Y2s8hQgsSemfMN5aGT6KkA3zK lPt7AAKUzdRMpfNPER0qplbtciWB7ye8+gSQSSJwY/nr43kcuQo2c4lKoCMiLY0fV9Vf cf3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P6uwJQqB; 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 my7-20020a17090b4c8700b00200b5c30f73si1317093pjb.106.2022.11.30.02.31.06; Wed, 30 Nov 2022 02:31:18 -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=P6uwJQqB; 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 S235975AbiK3Ka0 (ORCPT + 99 others); Wed, 30 Nov 2022 05:30:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235891AbiK3KaB (ORCPT ); Wed, 30 Nov 2022 05:30:01 -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 09EAB4298E for ; Wed, 30 Nov 2022 02:29:54 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id j5-20020a05600c410500b003cfa9c0ea76so1033214wmi.3 for ; Wed, 30 Nov 2022 02:29:53 -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=hH3Pz0smggYd5Ax4I5h47Equ8+9UzMYchJCtdBeu9ys=; b=P6uwJQqBH3BDY5Ux5eTfJ5iv5+9MQOunOqdPlKSC9wcTUklVlPgw3iE2pN5sueXSSK PHyqDkaSYYI7/H4/GHRGM91vTSoLBcHj8uN9bHLMDhkWdn22RTJvCHdFjIOwG92B+nQ2 7qlCgZQyKyFkwAszmmN+h3FATyMEqxTgSBoVb10WpM48az3hk9FpH3MqgL3BumS3XiSN 6qcRaSzk0KpaQBoZErXe+0q/piLtTsIyqalWGiu7Fb2TGIbe/KqnlAwryl72zcYK5anT qEA0/WPnbfWcUnsxcqMF7C65SZ+ZopgdbDbEktmCfgzP7uYlzE/sW28YXturU6uFJu0E OB7g== 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=hH3Pz0smggYd5Ax4I5h47Equ8+9UzMYchJCtdBeu9ys=; b=jwMji3gExPkOZ/wS4jZB9mCqQS6V/B8XgvPB+X7jZt/E53Ko7LZg0xvqvOux4gWhHM +mugFjTTdBJ/ek6SV9hqnQ7fU9TgO4Fx4gCfSDmmYh9I+ieGJm4vWPors039IokpeJM1 4QkLErKkgVSmk7LdH4mwKTC+ObWB68i7gnw/6oxM3MOggqwfjpHX18T44KAVkoQ/Pb6B XvH4h1hM/pvp9A0qS/7kuwqHUB1GU4LyEjKsxlBJG2lW7lvG0jzMzslf9hb8zhIbNGas WZmHKjZo6ZBSYnBO/lov48SVQXZbluRsGTeiPUNoC/GHogjNfVGzWTH5Idhd9xsJQbrD fFFw== X-Gm-Message-State: ANoB5pmglsHTwIsxbdhFmxZgJwvEF9hQoUtI2KwOlQlaDd9lxDu4yPcR b6ta7y7MXQ+XsPVmh0PS9yClVyfxt7vh1FQd X-Received: by 2002:a1c:7715:0:b0:3cf:d18d:3bfe with SMTP id t21-20020a1c7715000000b003cfd18d3bfemr46928326wmi.203.1669804192554; Wed, 30 Nov 2022 02:29:52 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id j33-20020a05600c1c2100b003b4ff30e566sm4313570wms.3.2022.11.30.02.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 02:29:52 -0800 (PST) From: Neil Armstrong Date: Wed, 30 Nov 2022 11:29:49 +0100 Subject: [PATCH v2 5/5] remoteproc: qcom_q6v5_pas: add sm8550 adsp, cdsp & mpss compatible & data MIME-Version: 1.0 Message-Id: <20221114-narmstrong-sm8550-upstream-remoteproc-v2-5-12bc22255474@linaro.org> References: <20221114-narmstrong-sm8550-upstream-remoteproc-v2-0-12bc22255474@linaro.org> In-Reply-To: <20221114-narmstrong-sm8550-upstream-remoteproc-v2-0-12bc22255474@linaro.org> To: Rob Herring , Bjorn Andersson , Krzysztof Kozlowski , Konrad Dybcio , Amol Maheshwari , Srinivas Kandagatla , Manivannan Sadhasivam , Mathieu Poirier , Andy Gross Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Neil Armstrong , Abel Vesa , linux-remoteproc@vger.kernel.org X-Mailer: b4 0.10.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?1750916691293068784?= X-GMAIL-MSGID: =?utf-8?q?1750916691293068784?= 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 | 66 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index d6a288432b6c..2a29ffad83eb 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -1125,6 +1125,69 @@ 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, + .has_aggre2_clk = false, + .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, + .has_aggre2_clk = false, + .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, + .has_aggre2_clk = false, + .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,msm8974-adsp-pil", .data = &adsp_resource_init}, @@ -1165,6 +1228,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);