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: 109206 Return-Path: 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 + 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 ); 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 ; Fri, 16 Jun 2023 08:18:19 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-65311774e52so753610b3a.3 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=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 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-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: 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?= 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 From patchwork Fri Jun 16 15:14:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 109207 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1437189vqr; Fri, 16 Jun 2023 08:46:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Oe0ypwaZc/bRlT8QhuasEg8XhS/pcdniWkcOXlVhC0CrHblsPWS+6qoYfjBCctsLx/Lxf X-Received: by 2002:a05:6358:1a94:b0:12f:2815:fecd with SMTP id gm20-20020a0563581a9400b0012f2815fecdmr111325rwb.9.1686930388887; Fri, 16 Jun 2023 08:46:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686930388; cv=none; d=google.com; s=arc-20160816; b=EBTpKSMvrt2O6gcGxawM5ffVn87NXgm1ZREPLbBVT1lk7y6VkCuWqNKWmeTtdo/nzQ cklekPODXX1E8OOddtcGv02qFKRAaLGuqe5kBkDo3rdwEaI+DBcxYb6eybawCf+1AAbY LVSuSzjml3Xil0cjV1T5CGeLVWBv4WmmmHs9pe98ZOmHnlf3+Q/8qaaE6/gkhHyveqwb 7RKTPAw61ZOGQGUof1ehwMqUZ+bmpIr1eLr08Tb9vn6bQ2bQZqyHYh+B1+IuyEdCs9D4 VTZ5DW5Jso9v/fzSKmfcVsYk4grONFadiJtEJ4so63AgLrnyj/4M5aJVfESsVUfBwYTO /UPg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C5Nhe0vFqRJeb1rQZmWBqjIq4WANx09DJJT4hbC9des=; b=vSXRRtLPnM9FNsllSeRp5G5rQOmLPjV2qa+yPlat3TxbOCw2wgV0gZ030wdgwfIGQw RNhhuS8LpPoz7AH+GlFUoMV4TVk9DF0BvEdkc9eBETzgiBmmxB5YhuEIH0sDKKpPkdhy h7RDKdQMyRZzrIT/e/i4S34rWaHyDAb0cpXa/48UR23g1y5EcGw6VWh7487ukZBSGraZ EbkoHBj4SmOs8JjHm6jxPe+PxWL4L6iO5NATRsy4hgq0b9kl6m5wU7VKExBTw0pr56Ip 4O4Xh23DzhYXQSD+z+y0RNDT/MrJUgOntKWrAKGGOnxJ4Lq3DxiJpqtRZ62MR59HZeTp nKxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Qwpecvfl; 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 m4-20020a6545c4000000b0053f2fc4379csi3424157pgr.391.2023.06.16.08.46.01; Fri, 16 Jun 2023 08:46:28 -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=Qwpecvfl; 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 S1345929AbjFPPS1 (ORCPT + 99 others); Fri, 16 Jun 2023 11:18:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345728AbjFPPSX (ORCPT ); Fri, 16 Jun 2023 11:18:23 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7438330FE for ; Fri, 16 Jun 2023 08:18:21 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-666eba6f3d6so58951b3a.3 for ; Fri, 16 Jun 2023 08:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1686928701; x=1689520701; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C5Nhe0vFqRJeb1rQZmWBqjIq4WANx09DJJT4hbC9des=; b=QwpecvflqoGMWutvgaPcnPls7DoObDDt0d0vjpKsZE6NG1fUoWbpGIAIbISWoE12o9 Hls8pUslxLD0pUrP38RxhYHlsV2zpEWl+Sff4pDuzEc6iMzkP9epITtxGOCV6uGHqKYH wpa74oTP7DJWe/n7NZp3wgbzqYdIg9kCTuHro= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686928701; x=1689520701; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C5Nhe0vFqRJeb1rQZmWBqjIq4WANx09DJJT4hbC9des=; b=g89cKlUNJH7pVUjc0KTq92C60AhxZpJYIhh2Hc2vw0dmoujYVMnqTSrXauFtz52BSg 3w2vVucZj+phc5XxiiA9qQFCEb0XrP+AxG47wA5+KXOa9GrHNIj9rrf5fx7OLkQpVLVW iRmJIQARsq95KFauef8kmIbnA4fvpzMw/qK1tZ3izj5LylzHX6EosLy7Az/V7DH4UGX3 Q/O7tTEdWvHE61lm/68km4KnkLl4X+EWhrqP7ZOywR+CcO8kFGLuIQKjty1R5GwivbtK 5D29xq8hLwLG+X9kGrWyLdL9WRsxC93fTuG5ujZPo1PzsBisuf5r681GgOWRPqQeZnet 2+QA== X-Gm-Message-State: AC+VfDwPvgtvUVEaRq0h2KaHlLQfG1KkG443rL/pRFqvcXXy4wVF1RIy ehj/lruG6yxmzeQzyb4GQ9dnKw== X-Received: by 2002:a05:6a00:1392:b0:651:3e9d:2a05 with SMTP id t18-20020a056a00139200b006513e9d2a05mr2713555pfg.19.1686928700957; Fri, 16 Jun 2023 08:18:20 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jun 2023 08:18:20 -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 , Konrad Dybcio , Krzysztof Kozlowski , Rob Herring , Sibi Sankar , cros-qcom-dts-watchers@chromium.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for IDP Date: Fri, 16 Jun 2023 08:14:39 -0700 Message-ID: <20230616081440.v2.2.I3c17d546d553378aa8a0c68c3fe04bccea7cba17@changeid> X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog In-Reply-To: <20230616081440.v2.1.Ie79b5f0ed45739695c9970df121e11d724909157@changeid> References: <20230616081440.v2.1.Ie79b5f0ed45739695c9970df121e11d724909157@changeid> MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768874719401991598?= X-GMAIL-MSGID: =?utf-8?q?1768874719401991598?= sc7180-idp is, for most intents and purposes, a trogdor device. Specifically, sc7180-idp is designed to run the same style of firmware as trogdor devices. This can be seen from the fact that IDP has the same "Reserved memory changes" in its device tree that trogdor has. Recently it was realized that we need to mark SCM as dma-coherent to match what trogdor's style of firmware (based on TF-A) does [1]. That means we need this dma-coherent tag on IDP as well. Without this, on newer versions of Linux, specifically those with commit 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()"""), WiFi will fail to work. At bootup you'll see: qcom_scm firmware:scm: Assign memory protection call failed -22 qcom_rmtfs_mem 94600000.memory: assign memory failed qcom_rmtfs_mem: probe of 94600000.memory failed with error -22 [1] https://lore.kernel.org/r/20230615145253.1.Ic62daa649b47b656b313551d646c4de9a7da4bd4@changeid Fixes: 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()""") Fixes: f5ab220d162c ("arm64: dts: qcom: sc7180: Add remoteproc enablers") Signed-off-by: Douglas Anderson --- I realized that this needed to be in IDP as well and that the IDP patch actually needed to come _before_ the trogdor one given the order that things landed upstream. I still left most of the description of the problem in the trogdor patch, though. Hopefully that's OK. Changes in v2: - sc7180-IDP patch added for v2. arch/arm64/boot/dts/qcom/sc7180-idp.dts | 5 +++++ arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180-idp.dts b/arch/arm64/boot/dts/qcom/sc7180-idp.dts index 9f052270e090..299ef5dc225a 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-idp.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-idp.dts @@ -393,6 +393,11 @@ &remoteproc_mpss { qcom,spare-regs = <&tcsr_regs_2 0xb3e4>; }; +&scm { + /* TF-A firmware maps memory cached so mark dma-coherent to match. */ + dma-coherent; +}; + &sdhc_1 { status = "okay"; diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi index f479cab8ab45..a65be760d1a7 100644 --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi @@ -369,7 +369,7 @@ CLUSTER_SLEEP_0: cluster-sleep-0 { }; firmware { - scm { + scm: scm { compatible = "qcom,scm-sc7180", "qcom,scm"; }; }; From patchwork Fri Jun 16 15:14:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 109204 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1432917vqr; Fri, 16 Jun 2023 08:39:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6yCzqUt2MqfdZxSCdwcWt8mm1phT0fnRJISGoasLtPf3D0KcGefY6XyMyDtFO7LYsyRdAt X-Received: by 2002:a17:902:82c5:b0:1b0:6c3:e851 with SMTP id u5-20020a17090282c500b001b006c3e851mr2193139plz.18.1686929991200; Fri, 16 Jun 2023 08:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686929991; cv=none; d=google.com; s=arc-20160816; b=rJ7/xiHZ/u92KQ2+rX6kZ1eZ72AKh9W9Ffdo4IQR/65MgatebGchch8QhQ1uAmuckr AJgUiXH/osPJLQer1gq3My4thuabHLu/1jkORFfYUO6p6DXgSMGHkCdwTkdBdZaWkDh1 F/p+B8+NoJdMKHUHFKMbIKnomGGjpvpAA+DDZsQP2DkNwjoVyqbhmcyIwdin25NbjiAP pWaQNOK1V+WEsUVyRsMR5bYvRWAjCCXMq7QAP0T3zrckGPWJI4lwlby8gy+ijB40bzKO nohpvqF0I1NVCl51hvofV2tW72Y//GEGItDWNRd0ZvKpV7CV5b5GayerpdLI4UbRrGVh lIiw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4bzr12EWQk1Ia1QIrIwm9/FyosBVEjDXlJSMbab2hS4=; b=pxGZX0GGlzlLxx+zl1r6OgmzIMcueyKZv4jODwv2lkdftAN0lMOCbL4U3tXYi0teho E1cAuG1/1XN9vkbmk1WXqf9pIXSb1SYRDErb3MdAIqcidQUlDBTeT13NXKE/af3GpSEi c0+K09xe9/Gg2qVwWkBU/hv0jFhsr/dBSVfRSpGhNQai8wrYoRyr1HitR1EdLp8muLfx eQnORQIPCEdwlW0MpATzwcTcZtAUiDELFqLVSngAY+7YOw9Yez+DmBHvAG80YRc+daE2 XF6d67YdvsNJBjyzTe4t0RWWy5GNddB49l77p3/Oeq1QTI0CHL8nWFXpCkw9caCFurqg WRbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LUUemacR; 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 w11-20020a170902ca0b00b001ab039a411csi9631453pld.17.2023.06.16.08.39.36; Fri, 16 Jun 2023 08:39:51 -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=LUUemacR; 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 S1345937AbjFPPS3 (ORCPT + 99 others); Fri, 16 Jun 2023 11:18:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345596AbjFPPSZ (ORCPT ); Fri, 16 Jun 2023 11:18:25 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C087930FF for ; Fri, 16 Jun 2023 08:18:23 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-666aa1b79a3so775320b3a.3 for ; Fri, 16 Jun 2023 08:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1686928703; x=1689520703; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4bzr12EWQk1Ia1QIrIwm9/FyosBVEjDXlJSMbab2hS4=; b=LUUemacRAYGTnOP8agRg8L7wFh3FfgjT5qcwrPkVa2r7X32BpPmPLJs+wZcR7Cuj1d LRkHyFDtzuJGJ1WRqyRW1P+Sg8ebz6yvixHJPDQeiDczvn7dK6E3rVErs+O41nJNWW8l w5XzPugEJUYOu7KbDIOLAkAKN92EWh4EMk6iE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686928703; x=1689520703; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4bzr12EWQk1Ia1QIrIwm9/FyosBVEjDXlJSMbab2hS4=; b=aECKcs7yE1abGKs6rzy8jGim14YjEqHQXvghoVepciDbINwx1Oq6Spd1SkLPJY4da5 S8egi9YGXw/Wuu/FGtZwFpuGCVRMDonJobDLjzfNlASUaK9l339ZMrWj3JO+qnN4zJXD vvv9wUFZDI5wACrocKH53fW1qYDXLBDZLDiIRt1L8op3P7h3faiwTo4gIUMXtYJ/lJ9X Bd2Slj6T2wax7Fxdon1cKE31UYG0Rtn5tuDsff5bAF5o4X5crKJgNW+a2fgekbMP0RbL ZdmVln6FxI++CMhHLAnj6ChV/E3tOExq82sISiEpVDCEpFXF/AP8Ww++xsg3YWkH0ZrP M3dA== X-Gm-Message-State: AC+VfDwjKpGeKO4Nz3IpMVegijzTKEOi6qt+qv54B9FwOPTZuHZtYiDY QUIf1a99QOkQr0v5UXDs02uCKw== X-Received: by 2002:a05:6a00:995:b0:664:2f24:5578 with SMTP id u21-20020a056a00099500b006642f245578mr2788544pfg.13.1686928703185; Fri, 16 Jun 2023 08:18:23 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jun 2023 08:18:22 -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 , Konrad Dybcio , Andy Gross , Conor Dooley , Krzysztof Kozlowski , Rob Clark , Rob Herring , cros-qcom-dts-watchers@chromium.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/4] arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for trogdor Date: Fri, 16 Jun 2023 08:14:40 -0700 Message-ID: <20230616081440.v2.3.Ic62daa649b47b656b313551d646c4de9a7da4bd4@changeid> X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog In-Reply-To: <20230616081440.v2.1.Ie79b5f0ed45739695c9970df121e11d724909157@changeid> References: <20230616081440.v2.1.Ie79b5f0ed45739695c9970df121e11d724909157@changeid> MIME-Version: 1.0 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=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?1768874302945973976?= X-GMAIL-MSGID: =?utf-8?q?1768874302945973976?= 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. Apparently Qualcomm's normal TZ implementation maps the memory as non-cacheable. Let's add the "dma-coherent" attribute to the SCM for trogdor. Adding "dma-coherent" like this fixes WiFi on sc7180-trogdor devices. WiFi was broken as of commit 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()"""). Specifically at bootup we'd get: qcom_scm firmware:scm: Assign memory protection call failed -22 qcom_rmtfs_mem 94600000.memory: assign memory failed qcom_rmtfs_mem: probe of 94600000.memory failed with error -22 From discussion on the mailing lists [2] and over IRC [3], it was determined that we should always have been tagging the SCM as dma-coherent on trogdor but that the old "invalidate" happened to make things work most of the time. Tagging it properly like this is a much more robust solution. [1] https://chromium.googlesource.com/chromiumos/third_party/arm-trusted-firmware/+/refs/heads/firmware-trogdor-13577.B/plat/qti/common/src/qti_syscall.c [2] https://lore.kernel.org/r/20230614165904.1.I279773c37e2c1ed8fbb622ca6d1397aea0023526@changeid [3] https://oftc.irclog.whitequark.org/linux-msm/2023-06-15 Fixes: 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()""") Fixes: 7ec3e67307f8 ("arm64: dts: qcom: sc7180-trogdor: add initial trogdor and lazor dt") Reviewed-by: Konrad Dybcio Signed-off-by: Douglas Anderson --- Changes in v2: - Add comment in dts. - Moved scm node out of pinctrl section to the proper place. arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi index ca6920de7ea8..1472e7f10831 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi @@ -892,6 +892,11 @@ &remoteproc_mpss { qcom,spare-regs = <&tcsr_regs_2 0xb3e4>; }; +&scm { + /* TF-A firmware maps memory cached so mark dma-coherent to match. */ + dma-coherent; +}; + &sdhc_1 { status = "okay"; From patchwork Fri Jun 16 15:14:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 109221 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1445228vqr; Fri, 16 Jun 2023 09:00:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6qyxxg5FsrWX3Vyd80d4x1x1kNUa/cMfPnm/yHSM2AkJrNCt6IJeG8qGknKA7xhtiTjClS X-Received: by 2002:a05:6a20:918b:b0:114:6993:5a3b with SMTP id v11-20020a056a20918b00b0011469935a3bmr3125106pzd.13.1686931250690; Fri, 16 Jun 2023 09:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686931250; cv=none; d=google.com; s=arc-20160816; b=DVgcdxKP650JVS2rMCbCGWwV6TgDgwnuo+e764zM0IhHV2FcgahsSsJBfl6iFOBa4e N/4iARzJURqxPeAEIE6S9TMfOLaC5qw15j8NZiONLMVSNaMwCfdmwwkfZPjRLwasTeCH r6oq/lIyuxYW0lD6Sa67+6x3iRteTQk9DHURTc3gPkxy1G2rr7DBDRrN3CZEQXZpSmTI cGqh6U9TXtGcD0f/XBvGm+U6cjCgfUgrxGspcUrARZHgGkpC/W8lgoEGwI1ktpHBjO4s 6M39583EjWEwMVXKR0OKKcl9FyDX4WEwXqTrRO8x2eORcuRrm8C/4NIhceG5EwlwVqiS zGBw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VIqsH2Iv+JcyNkylOi9qtvbVK2jAXhmRaUsdt3ONyh4=; b=Muv8vzVUFQ1srRwpxO8BdcUtRmjB0Q/OErta/j34e0t7O8oO5EaQ1VLM2ncPOh4lwO h8XM9Vsoe1nX1C8plSzECUWShDj9ZWQbu0WeM8iL15qoHsYAjzn2RWb0v2dm88GWagld I9LmX4tj5l8izK7mguXenlI0iHMgE1OtOgLV5CkvMBxpF/uqfw60QIds8HDVu00AGZC3 rM/rQtxCr2yhKrFweh9YxiMBAB+QrFZ/3XX7lmCtVb4LbaBQAu0ope6P86jxLAvGgdyG cPNwUckDJzEAc3TGhBeNtovMvQ0pMIYT1QU/WLYb18pA1VZCAaV5yNjn2UB0U7heI1RP iTTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GpPAIZit; 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 t14-20020aa7946e000000b0066009c432d2si3082464pfq.226.2023.06.16.09.00.35; Fri, 16 Jun 2023 09:00:50 -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=GpPAIZit; 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 S1345962AbjFPPSm (ORCPT + 99 others); Fri, 16 Jun 2023 11:18:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345923AbjFPPS1 (ORCPT ); Fri, 16 Jun 2023 11:18:27 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF6A030FF for ; Fri, 16 Jun 2023 08:18:25 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-6667a0811a2so771571b3a.0 for ; Fri, 16 Jun 2023 08:18:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1686928705; x=1689520705; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VIqsH2Iv+JcyNkylOi9qtvbVK2jAXhmRaUsdt3ONyh4=; b=GpPAIZitPXFRSuOZt2/v1lUUx6zLZ+8adsfg0EcyOH/0Zb2pls1gvbR0yXhpS2nQ1a udqKcrhHiCVT91HKPEz/QAZXyFMGjBypbLotzvurvYwRmhTXSWW3LGdCQpSqQeFArnhE XS9LKJvRnA+C8924skamWh5ZKpxdrCWSQLz04= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686928705; x=1689520705; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VIqsH2Iv+JcyNkylOi9qtvbVK2jAXhmRaUsdt3ONyh4=; b=Vden27sIY54XmRWG67esiJ3qrzv9+slQXZOTahC13XGaNbH8pUD0ij/ue3AphgpQWj 6vNIZhRMRBxDB4Oo0b0IoO6KhrecxOVgg2Hh0ejcUyRHkb+Sk6Zm8xWCvx4DOobvMa07 eYfowmUNtZNDonXrEkCkxhpzMjSInkBcHUXO4dwFoiiy5fMG+MO9k25zJlLnc9iWB7qr poHjwOq7z+fEqVv06VFOjNtAsWqDv/oK+dRFQVEywiXWSR8Ggeei8SXSyR3Idq4HnpnX f5J3DOtR7w0n958HqkzhX9dbK1htcyFBGKAR+WKeMP6rBVK0/s9w/tFvrIbF9kQf4Cby 5EIg== X-Gm-Message-State: AC+VfDwOZvVSvv4MxQLgWPxnywd2epnx6bizWaHy0QWkrMx4/ee8m7DN hZmxcvMDHylHfMBeMpPVseFiJA== X-Received: by 2002:a05:6a20:158a:b0:114:7637:3451 with SMTP id h10-20020a056a20158a00b0011476373451mr2561868pzj.37.1686928705404; Fri, 16 Jun 2023 08:18:25 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jun 2023 08:18:24 -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 , Konrad Dybcio , Krzysztof Kozlowski , Rajendra Nayak , Rob Herring , cros-qcom-dts-watchers@chromium.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/4] arm64: dts: qcom: sc7280: Mark SCM as dma-coherent for chrome devices Date: Fri, 16 Jun 2023 08:14:41 -0700 Message-ID: <20230616081440.v2.4.I21dc14a63327bf81c6bb58fe8ed91dbdc9849ee2@changeid> X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog In-Reply-To: <20230616081440.v2.1.Ie79b5f0ed45739695c9970df121e11d724909157@changeid> References: <20230616081440.v2.1.Ie79b5f0ed45739695c9970df121e11d724909157@changeid> MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768875622970101673?= X-GMAIL-MSGID: =?utf-8?q?1768875622970101673?= Just like for sc7180 devices using the Chrome bootflow (AKA trogdor and IDP), sc7280 devices using the Chrome bootflow also need their firmware marked dma-coherent. On sc7280 this wasn't causing WiFi to fail to startup, since WiFi works differently there. However, on sc7280 devices we were still getting the message at bootup after commit 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()"""): qcom_scm firmware:scm: Assign memory protection call failed -22 qcom_rmtfs_mem 9c900000.memory: assign memory failed qcom_rmtfs_mem: probe of 9c900000.memory failed with error -22 We should mark SCM properly just like we did for trogdor. Fixes: 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()""") Fixes: 7a1f4e7f740d ("arm64: dts: qcom: sc7280: Add basic dts/dtsi files for sc7280 soc") Signed-off-by: Douglas Anderson --- I marked this as "Fixes" for the patch that first added the SCM node to sc7280. Given all the reorganization of the files it wouldn't be all that easy to really backport it to there, but that should be OK. Things seemed to work fine before commit 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()""") anyway. Changes in v2: - sc7280 patch new for v2. arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi | 5 +++++ arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi b/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi index f562e4d2b655..2e1cd219fc18 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi @@ -79,6 +79,11 @@ &remoteproc_wpss { firmware-name = "ath11k/WCN6750/hw1.0/wpss.mdt"; }; +&scm { + /* TF-A firmware maps memory cached so mark dma-coherent to match. */ + dma-coherent; +}; + &wifi { status = "okay"; diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi index 2fd1d3c0eb34..36f0bb9b3cbb 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -656,7 +656,7 @@ memory@80000000 { }; firmware { - scm { + scm: scm { compatible = "qcom,scm-sc7280", "qcom,scm"; }; };