Message ID | 20230616081440.v2.1.Ie79b5f0ed45739695c9970df121e11d724909157@changeid |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1436659vqr; Fri, 16 Jun 2023 08:45:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4yWqJnkOie417L3aahbMhuD/Q9+RfWdhsaMJEp9MX+7vN2sZAOcMAmGOUrMbLd0v48+ie1 X-Received: by 2002:a05:6359:b82:b0:12f:1116:b9e1 with SMTP id gf2-20020a0563590b8200b0012f1116b9e1mr1845847rwb.9.1686930359435; Fri, 16 Jun 2023 08:45:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686930359; cv=none; d=google.com; s=arc-20160816; b=AEKOaIW72pZVoUwDbFTQjaGZCcGf1u2u3dzeVIb3DgF++MZ140WTvRKy0rPylwohaq o47WhuoSWb6C+aWNs8wPF/cFtI2pj7Po7jx4YsFWYIot1jZo9/X5vF8zU1raB+X1bhAc r8eRr7Tz4pKvWBe4kmtDPlwA0kNfnKqJssueHkZtsni6NfU60tWKujvLcUnvPZuSPu4e 7y2WnSeaCHpKdAgae21Gxul7e0oXb2kOWSw3YNslVfAP8VtchhqFpc29Nc0Lef+wO4b5 S1r3Edb7CLNC0fAzuvDKkuQ7YNmS5Md53Y8/J23D6sfNPktnzF2/SRfxJs83uO9kwQPr oP7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=JjK5uSBUBCtKUiHKGw2fDzcH80L9Te7xYyX5HYmSKZk=; b=PMD7nIXD1qiPBOC3FGnslVE5XlxGLjhJbAVuKLixsT4rK3lVDBULtqYmBSeZWhjndB D27vv31QF/1ywJJqC5R+qHZDDIV9eKzQILj3MQGN+sYjVzUOXqGkwTF0Zc4PrhZvPSdD ViOAPo3SLIee9BW6sfr5rn4QpvETw67hzVoY9s2QqrQOyEJ83up6a20wHEkAbf4At2aS oAAO5F9myIihvyJEx3g4QaeOhP2TbGX9n509gDXuhjWHog03haqtKt54b1xToJ8PnQUt 1xtZdhuCl2BisvmBjKYMNEcQSLD5EoFqn7MOUXrLa/NGkRXpPfW9dOoWdjj1RvoTnKLN aZiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Gazntjz7; 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=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z12-20020a63e10c000000b005538b4e729csi35874pgh.171.2023.06.16.08.45.44; Fri, 16 Jun 2023 08:45:59 -0700 (PDT) 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=@chromium.org header.s=google header.b=Gazntjz7; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345911AbjFPPSX (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Fri, 16 Jun 2023 11:18:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242043AbjFPPSU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 16 Jun 2023 11:18:20 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EAFA30FF for <linux-kernel@vger.kernel.org>; Fri, 16 Jun 2023 08:18:19 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-65311774e52so753610b3a.3 for <linux-kernel@vger.kernel.org>; Fri, 16 Jun 2023 08:18:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1686928699; x=1689520699; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JjK5uSBUBCtKUiHKGw2fDzcH80L9Te7xYyX5HYmSKZk=; b=Gazntjz7fU9vAVPqqzRdDRac27cecBITu2YvqyJ/AerXxYtOfZN2wz718g7xcI3NJj iGK8DZvU6z1+Z3BId6izQhVmrGv1ygnshSs9Q09cAXjmSoRXh1OzSNajVzmt9kbmlqwM zgNgQpgihqEhJaCqPN565bpB2w/NQFTyfXs2o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686928699; x=1689520699; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JjK5uSBUBCtKUiHKGw2fDzcH80L9Te7xYyX5HYmSKZk=; b=JlcVbiUm9BUg2eGVgfY/QGapnU1ts8E1V1rx9Cn491XHbWt2Wq6EUEH65KjjjQtbz1 zb/7l3HE2ggfZvKMyFSWD7pBb3o3iu7xOngL6H8l3S4k2/LpT+s7SqMbv2WcOZIgcOc0 PdP6DdD7UibQdVTvKk9vAVxMmhgTRmDxG94Pcp+pCFF/nbvC900NLcvtIsX43KGVmr9j BR6XqJNCbMDwCx+t6suKShWs1rTK2n4k/gqiFTbbiSXnGLIbhFZWxWq4tkU8gFiyAaBR IjU405hXEASSKrCTLPjz/xGnm6JNnl/IbXban/m48Xze8zDjHl2bt1+6QWIwBmrlqHQW EpTg== X-Gm-Message-State: AC+VfDynz7KvPLf4oSkDJtXrs2qLphzePm631nzTXSg4ymP39+QA1d/Q 6mcmSYXdmOI/NyCMm6K8oK9JPg== X-Received: by 2002:a05:6a21:7890:b0:11f:1aa2:666b with SMTP id bf16-20020a056a21789000b0011f1aa2666bmr1412485pzc.32.1686928698728; Fri, 16 Jun 2023 08:18:18 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:3cfa:2bcd:1a5:27ce]) by smtp.gmail.com with ESMTPSA id a12-20020aa780cc000000b0063d24fcc2besm4593656pfn.125.2023.06.16.08.18.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jun 2023 08:18:18 -0700 (PDT) From: Douglas Anderson <dianders@chromium.org> To: andersson@kernel.org Cc: amit.pundir@linaro.org, Will Deacon <will@kernel.org>, sumit.semwal@linaro.org, linux-arm-msm@vger.kernel.org, konrad.dybcio@somainline.org, linux-arm-kernel@lists.infradead.org, Stephan Gerhold <stephan@gerhold.net>, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>, Nikita Travkin <nikita@trvn.ru>, Stephen Boyd <swboyd@chromium.org>, Sibi Sankar <quic_sibis@quicinc.com>, Douglas Anderson <dianders@chromium.org>, Andy Gross <agross@kernel.org>, Conor Dooley <conor+dt@kernel.org>, Das Srinagesh <quic_gurus@quicinc.com>, Konrad Dybcio <konrad.dybcio@linaro.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Rob Herring <robh+dt@kernel.org>, Robert Marko <robimarko@gmail.com>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] dt-bindings: firmware: qcom,scm: Document that SCM can be dma-coherent Date: Fri, 16 Jun 2023 08:14:38 -0700 Message-ID: <20230616081440.v2.1.Ie79b5f0ed45739695c9970df121e11d724909157@changeid> X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768874688844635612?= X-GMAIL-MSGID: =?utf-8?q?1768874688844635612?= |
Series |
[v2,1/4] dt-bindings: firmware: qcom,scm: Document that SCM can be dma-coherent
|
|
Commit Message
Doug Anderson
June 16, 2023, 3:14 p.m. UTC
Trogdor devices use firmware backed by TF-A instead of Qualcomm's
normal TZ. On TF-A we end up mapping memory as cacheable. Specifically,
you can see in Trogdor's TF-A code [1] in qti_sip_mem_assign() that we
call qti_mmap_add_dynamic_region() with MT_RO_DATA. This translates
down to MT_MEMORY instead of MT_NON_CACHEABLE or MT_DEVICE.
Let's allow devices like trogdor to be described properly by allowing
"dma-coherent" in the SCM node.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
Changes in v2:
- Bindings change new for v2.
Documentation/devicetree/bindings/firmware/qcom,scm.yaml | 2 ++
1 file changed, 2 insertions(+)
Comments
On 16/06/2023 17:14, Douglas Anderson wrote: > Trogdor devices use firmware backed by TF-A instead of Qualcomm's > normal TZ. On TF-A we end up mapping memory as cacheable. Specifically, > you can see in Trogdor's TF-A code [1] in qti_sip_mem_assign() that we > call qti_mmap_add_dynamic_region() with MT_RO_DATA. This translates > down to MT_MEMORY instead of MT_NON_CACHEABLE or MT_DEVICE. > > Let's allow devices like trogdor to be described properly by allowing > "dma-coherent" in the SCM node. > > Signed-off-by: Douglas Anderson <dianders@chromium.org 2 Best regards, Krzysztof
On 18.06.2023 10:07, Krzysztof Kozlowski wrote: > On 16/06/2023 17:14, Douglas Anderson wrote: >> Trogdor devices use firmware backed by TF-A instead of Qualcomm's >> normal TZ. On TF-A we end up mapping memory as cacheable. Specifically, >> you can see in Trogdor's TF-A code [1] in qti_sip_mem_assign() that we >> call qti_mmap_add_dynamic_region() with MT_RO_DATA. This translates >> down to MT_MEMORY instead of MT_NON_CACHEABLE or MT_DEVICE. >> >> Let's allow devices like trogdor to be described properly by allowing >> "dma-coherent" in the SCM node. >> >> Signed-off-by: Douglas Anderson <dianders@chromium.org > > 2 Forgot to press alt or something Konrad > > Best regards, > Krzysztof >
On 16/06/2023 17:14, Douglas Anderson wrote: > Trogdor devices use firmware backed by TF-A instead of Qualcomm's > normal TZ. On TF-A we end up mapping memory as cacheable. Specifically, > you can see in Trogdor's TF-A code [1] in qti_sip_mem_assign() that we > call qti_mmap_add_dynamic_region() with MT_RO_DATA. This translates > down to MT_MEMORY instead of MT_NON_CACHEABLE or MT_DEVICE. > > Let's allow devices like trogdor to be described properly by allowing > "dma-coherent" in the SCM node. > > Signed-off-by: Douglas Anderson <dianders@chromium.org> > --- Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On 19/06/2023 12:00, Konrad Dybcio wrote: > On 18.06.2023 10:07, Krzysztof Kozlowski wrote: >> On 16/06/2023 17:14, Douglas Anderson wrote: >>> Trogdor devices use firmware backed by TF-A instead of Qualcomm's >>> normal TZ. On TF-A we end up mapping memory as cacheable. Specifically, >>> you can see in Trogdor's TF-A code [1] in qti_sip_mem_assign() that we >>> call qti_mmap_add_dynamic_region() with MT_RO_DATA. This translates >>> down to MT_MEMORY instead of MT_NON_CACHEABLE or MT_DEVICE. >>> >>> Let's allow devices like trogdor to be described properly by allowing >>> "dma-coherent" in the SCM node. >>> >>> Signed-off-by: Douglas Anderson <dianders@chromium.org >> >> 2 > Forgot to press alt or something D'oh! Best regards, Krzysztof
Bjorn, On Fri, Jun 16, 2023 at 8:18 AM Douglas Anderson <dianders@chromium.org> wrote: > > Trogdor devices use firmware backed by TF-A instead of Qualcomm's > normal TZ. On TF-A we end up mapping memory as cacheable. Specifically, > you can see in Trogdor's TF-A code [1] in qti_sip_mem_assign() that we > call qti_mmap_add_dynamic_region() with MT_RO_DATA. This translates > down to MT_MEMORY instead of MT_NON_CACHEABLE or MT_DEVICE. > > Let's allow devices like trogdor to be described properly by allowing > "dma-coherent" in the SCM node. > > Signed-off-by: Douglas Anderson <dianders@chromium.org> > --- > > Changes in v2: > - Bindings change new for v2. > > Documentation/devicetree/bindings/firmware/qcom,scm.yaml | 2 ++ > 1 file changed, 2 insertions(+) Without this series v6.4 will have a regression where WiFi / LTE won't work at all on trogdor devices. Any chance you can send up a "Fixes" pull request with the 4 patches in it? ...or I could try to convince someone on the SoC tree to land them directly? Thanks! -Doug
On Fri, 16 Jun 2023 08:14:38 -0700, Douglas Anderson wrote: > Trogdor devices use firmware backed by TF-A instead of Qualcomm's > normal TZ. On TF-A we end up mapping memory as cacheable. Specifically, > you can see in Trogdor's TF-A code [1] in qti_sip_mem_assign() that we > call qti_mmap_add_dynamic_region() with MT_RO_DATA. This translates > down to MT_MEMORY instead of MT_NON_CACHEABLE or MT_DEVICE. > > Let's allow devices like trogdor to be described properly by allowing > "dma-coherent" in the SCM node. > > [...] Applied, thanks! [1/4] dt-bindings: firmware: qcom,scm: Document that SCM can be dma-coherent commit: c0877829ada0406233aee5bd54f6813db79d5f1f [2/4] arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for IDP commit: 9a5f0b11e49e27f0a01a73c31d05df4a95bea3fa [3/4] arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for trogdor commit: a54b7fa6b9ab6b4ecb7d9aba6b1a0ce1bcc961e3 [4/4] arm64: dts: qcom: sc7280: Mark SCM as dma-coherent for chrome devices commit: 7b59e8ae92fe089fed8ff1b23e53442ae5b204c9 Best regards,
diff --git a/Documentation/devicetree/bindings/firmware/qcom,scm.yaml b/Documentation/devicetree/bindings/firmware/qcom,scm.yaml index 367d04ad1923..83381f3a1341 100644 --- a/Documentation/devicetree/bindings/firmware/qcom,scm.yaml +++ b/Documentation/devicetree/bindings/firmware/qcom,scm.yaml @@ -71,6 +71,8 @@ properties: minItems: 1 maxItems: 3 + dma-coherent: true + interconnects: maxItems: 1