All of lore.kernel.org
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <20230616081440.v2.1.Ie79b5f0ed45739695c9970df121e11d724909157@changeid> (raw)

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(+)

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
 
-- 
2.41.0.162.gfafddb0af9-goog


WARNING: multiple messages have this Message-ID (diff)
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	[thread overview]
Message-ID: <20230616081440.v2.1.Ie79b5f0ed45739695c9970df121e11d724909157@changeid> (raw)

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(+)

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
 
-- 
2.41.0.162.gfafddb0af9-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2023-06-16 15:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16 15:14 Douglas Anderson [this message]
2023-06-16 15:14 ` [PATCH v2 1/4] dt-bindings: firmware: qcom,scm: Document that SCM can be dma-coherent Douglas Anderson
2023-06-16 15:14 ` [PATCH v2 2/4] arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for IDP Douglas Anderson
2023-06-16 15:14   ` Douglas Anderson
2023-06-16 15:14 ` [PATCH v2 3/4] arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for trogdor Douglas Anderson
2023-06-16 15:14   ` Douglas Anderson
2023-06-16 15:14 ` [PATCH v2 4/4] arm64: dts: qcom: sc7280: Mark SCM as dma-coherent for chrome devices Douglas Anderson
2023-06-16 15:14   ` Douglas Anderson
2023-06-18  8:07 ` [PATCH v2 1/4] dt-bindings: firmware: qcom,scm: Document that SCM can be dma-coherent Krzysztof Kozlowski
2023-06-18  8:07   ` Krzysztof Kozlowski
2023-06-19 10:00   ` Konrad Dybcio
2023-06-19 10:00     ` Konrad Dybcio
2023-06-19 10:01     ` Krzysztof Kozlowski
2023-06-19 10:01       ` Krzysztof Kozlowski
2023-06-19 10:01 ` Krzysztof Kozlowski
2023-06-19 10:01   ` Krzysztof Kozlowski
2023-06-21 16:56 ` Doug Anderson
2023-06-21 16:56   ` Doug Anderson
2023-06-22 20:38 ` (subset) " Bjorn Andersson
2023-06-22 20:38   ` Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230616081440.v2.1.Ie79b5f0ed45739695c9970df121e11d724909157@changeid \
    --to=dianders@chromium.org \
    --cc=agross@kernel.org \
    --cc=amit.pundir@linaro.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=nikita@trvn.ru \
    --cc=quic_gurus@quicinc.com \
    --cc=quic_sibis@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=robimarko@gmail.com \
    --cc=stephan@gerhold.net \
    --cc=sumit.semwal@linaro.org \
    --cc=swboyd@chromium.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.