From patchwork Fri Jun 16 15:14:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13282881 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ECEFCEB64DA for ; Fri, 16 Jun 2023 15:18:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=LKPwLQqn1GugoninN69YxFcU1HCfWOMe4LxKrIfAv5I=; b=uNMgCVO5z6i7DG GvXk9vYgYH0pXjFol6sIC4k8I3O6++tPVc6/sXDSa0xrA4EXrsE15M8m/JXOiVfZh6o+Dt9meP97f 1smJ/yz4RghNbd2bWXnjqwOWpgm3jpkDx//g4RMDWwQKeJoLUBdSpJtOHP6hRzf/SpBS/jSxE0gan HeBmRHrzwMZiCc6nRtuIn6iABrRbU0NJ0pE0FL/GigRZ5FXQOVtbzII03qWJQ1ra7HW+AmAeU0Ctw 1jq90ygexBxEkFnW/IChAmwznsnyIe1j54ZpcRmxc4M/HTMBBw7ia/nR0Zlwn5DLIHvygNBfPVXs3 9fHecjAS7YOeD6Ko4w4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qABDS-000vUn-2k; Fri, 16 Jun 2023 15:18:22 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qABDP-000vTv-37 for linux-arm-kernel@lists.infradead.org; Fri, 16 Jun 2023 15:18:21 +0000 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6664a9f0b10so774628b3a.0 for ; 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=gwQSvbvakkf1BlV/qK7WB7djr+roH+PuIh3Y+aUroDFPgny7rC5rSwXixeQs3s9Lqk q1eGenUuaLnlb2V4K8CvhF6nKx2rwiWzO/NxzpAsLMAjDMAQUT9Bvfh3Eea3mAYaR0Pp vfWo/MWKzJanqMI37NzywHuYDgGRAF/J8o4Zj71JINOJjeQBRVUJE7lvevmTEK3TALod iNUb71cehuu6eX1tEXSKfFo9t2fwX9U4S8TXBd46aaBY8Hl3n7B7oWy1kSOAVabtaREG Gcx26p3EG42CQ9NkUH0K90hBEBiP3axew+xoDGxMORYWpsg0XBtZk5f5UayIHUL7IuK5 fd4Q== X-Gm-Message-State: AC+VfDy6y/KLAS1oNgblusMTSqK2nOuuPT1HDMEkkddTdXbvesLPnn2e M3PrZf53gLCdBL2MdjHzQq7EIA== X-Google-Smtp-Source: ACHHUZ4BIE6TbLK8kpe1owsqwPPBjFMHGvq1+gRfy4HufbUwKn/5NGiepHfgtjSj1AGPlndAamWF0w== 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 To: andersson@kernel.org Cc: amit.pundir@linaro.org, Will Deacon , sumit.semwal@linaro.org, linux-arm-msm@vger.kernel.org, konrad.dybcio@somainline.org, linux-arm-kernel@lists.infradead.org, Stephan Gerhold , Manivannan Sadhasivam , Nikita Travkin , Stephen Boyd , Sibi Sankar , Douglas Anderson , Andy Gross , Conor Dooley , Das Srinagesh , Konrad Dybcio , Krzysztof Kozlowski , Rob Herring , Robert Marko , 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230616_081820_052237_DD6B2917 X-CRM114-Status: GOOD ( 10.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Acked-by: Krzysztof Kozlowski --- 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