From patchwork Mon Dec 5 10:08:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 29626 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2164605wrr; Mon, 5 Dec 2022 02:18:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf49E6OkipTv3nXvjWmi9zTnihZnivGG2+1LGR5qTAbLSEzx9bbwj+sK1rYMv8bYT+xldbtC X-Received: by 2002:a05:6a00:f8a:b0:56c:2576:9d2a with SMTP id ct10-20020a056a000f8a00b0056c25769d2amr65500988pfb.60.1670235505449; Mon, 05 Dec 2022 02:18:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670235505; cv=none; d=google.com; s=arc-20160816; b=LFCfmfLhnq8c98OhlhVCEibTXdFw3gmfgZS3gQPXkHPbd0S6hgCUfBnM+RuY7B6n2l podh4+68+ggEaJv1yytTwg7hL3kh84g+c0Rqy4+YI8bkdpquDKLMbMERzg5EoxJjPQRX dSN3e5YtJVl7K90/I9EVCXFfwhkc6DLUkn/KA/WiyuyigHoq6p7aTFdBf8C9QYS2hnfi aasC3taZIF1Kr+sBa27BeYvBuj7KVaFWclMQCohvSkI3/qida4tpAkLJO62d96Ek3S9n Kgfx/zBxYkXALh7wTCgZkk4RtM/ybMAYxCryEi8NxII5dfrY2/fT32QQj5ib/zLF+KcC 17NQ== 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=apvZBYE2lgismTw9RWGcCoT1NWhC81NmViVQcjG0LvU=; b=qFBOFjwj0pJjhpbb1wcSqpCPC5r3X8InwXN7OT3cPkkfkX5WDP4o9OgIxBSZSbsS63 vB6HPxflh6MDd0ilJWm7YjlmX49zcvo1nRev8UYo0kIwGbfuRIG8ujuOGWEPEbggy/ax AYviI14Woz+kKasZ1A6Bmuv63APrX+B8i9ki8SnECGiwawFpLaVnaaaHTqdPSYW76Dg+ qMN0lzbaFEFZLnGjVCjbqe2aB/Trf7WEw0XYmZUZBhnVHvAcCcPshdAot1U3C0gs6CZM ocYA/sd3G2QaaWZvz6umDrL07KaPrLxqpLiU6sCvBcm1LVNyALsl0FY3ZSEdTOSkVpl+ mWLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=s8AB7kPv; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v2-20020a170902d68200b0018962fa3890si13507371ply.601.2022.12.05.02.18.11; Mon, 05 Dec 2022 02:18:25 -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=@kernel.org header.s=k20201202 header.b=s8AB7kPv; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231579AbiLEKKi (ORCPT + 99 others); Mon, 5 Dec 2022 05:10:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230123AbiLEKKc (ORCPT ); Mon, 5 Dec 2022 05:10:32 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02738183B5; Mon, 5 Dec 2022 02:10:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A7865B80E60; Mon, 5 Dec 2022 10:10:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55EF1C433B5; Mon, 5 Dec 2022 10:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670235029; bh=YMlE6nWRDtF//ri9V9yKEVsMMR4A33b7UQugBFmOK7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s8AB7kPviA+CsoLJTDlHHp0Ikx1yznlxLrVS43pQzT6D0sdKkbEiZSEJUKp1LxALF xhXyEboNzeqWBEGRw9vJNejXBVR8/WZdHC33robFiJkSzYiaPTj8SzOMURYnpByu8I SWBJzKWg97UAmcJcIkpgL7IJ3KGxVw6IpAbpW5a3dra0dft/XyFwV8fGfM0LpnAZ5/ gfG80lxdQQGyksTrtMAVZ6qGR5VnFztHvu10tvT/pGaUNfiG+16Nkhc1XxJU8ekw4k 0OIUa/GHTE12Wx95wkPARz7k6WL+ny+ZN01swZZnzc5VBx1misR6YMTe+6MMZPClFi BpPO/wLhiUXvQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1p28Qk-0007c8-AI; Mon, 05 Dec 2022 11:10:34 +0100 From: Johan Hovold To: Bjorn Andersson , Alim Akhtar , Avri Altman Cc: Andy Gross , Konrad Dybcio , Bart Van Assche , Rob Herring , Krzysztof Kozlowski , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 1/2] dt-bindings: ufs: qcom: allow 'dma-coherent' property Date: Mon, 5 Dec 2022 11:08:36 +0100 Message-Id: <20221205100837.29212-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221205100837.29212-1-johan+linaro@kernel.org> References: <20221205100837.29212-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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?1751368865535945543?= X-GMAIL-MSGID: =?utf-8?q?1751368865535945543?= UFS controllers may be cache coherent and must be marked as such in the devicetree to avoid data corruption. This is specifically needed on recent Qualcomm platforms like SC8280XP. Signed-off-by: Johan Hovold Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson --- Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml index f2d6298d926c..1f1d286749c0 100644 --- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml @@ -44,6 +44,8 @@ properties: minItems: 8 maxItems: 11 + dma-coherent: true + interconnects: minItems: 2 maxItems: 2 From patchwork Mon Dec 5 10:08:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 29627 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2164660wrr; Mon, 5 Dec 2022 02:18:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf7XxEsE+w48MFMnOKQMl9IFouWMshHiECJ2ozNkbAMFT8oMM6kES/b1hHKk3C4I22kU9bxp X-Received: by 2002:aa7:86c9:0:b0:565:c122:b63 with SMTP id h9-20020aa786c9000000b00565c1220b63mr63949687pfo.49.1670235515691; Mon, 05 Dec 2022 02:18:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670235515; cv=none; d=google.com; s=arc-20160816; b=PPfpdr3aWyTT1JEZbbmKyKErL8fKwoiYBIjkkioE1On5YhSzoJDE5IEbEs0RcIxp8B ZRruCkVHq6iY6JHZYfI8l7r4yZhUt0Yv3rcY23t3foEbcOKgQpGqbjt+L+d13NIWq2BO TfMwMoWNmgCXStFg1au/ac9bZV/yCyZ91DjMbioCl+dx+nCxALCdDZTkpMipX6EWQlYP u+0NO/ScNgljaTuKZSIOkSgs7AuAl0xXDDo31U3uthPMW8ZAiCEOQTEI7FIP0ZBz6fUW qmavnSO9qAZyDH8iD1DueflIq9WwxmsdS8ITKrfwj0A0zUTgr+cUoZz03z9tdMIYiEOf 1Oow== 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=EPGcM+B7mhPXAehoUxCpyEhmAPereTC8B3da8np1WnE=; b=bg9CeWTFgeXOWTPbtaMeIIBY5yZxSSu7PzW2gJje5y8uuOxggEuV4msfngqY0StKvA 8AT7WzVqy/DyNhUSiSwJ6ofltXzQEVDmgbcKj5BtXCHXl29rNSZmdFgey/oKeBNN4Fd3 b4oWCiyUDb5kL5cEJyfEigvHivyPJrIPRZxoXdDE1URDgFFzle0gNniYZ6DEiuGWNLVR /KM7VAe39H6KWsVi4r8Q0w+P5931MXI9u3BRaO21ph7fFr6cGjcZuYcbqKbuUJWFUKJK UXTJnI7DRcN5QRjod8tzC2onLkB5OnHpb7Txm3SJjm0NjEtIWJPRqGpbzmO5m9jMgZXc k9Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=it3VXqPN; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 203-20020a6300d4000000b0045f98453934si14631027pga.872.2022.12.05.02.18.22; Mon, 05 Dec 2022 02:18:35 -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=@kernel.org header.s=k20201202 header.b=it3VXqPN; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231609AbiLEKKl (ORCPT + 99 others); Mon, 5 Dec 2022 05:10:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230148AbiLEKKc (ORCPT ); Mon, 5 Dec 2022 05:10:32 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01E60183B4; Mon, 5 Dec 2022 02:10:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9A900B80E5E; Mon, 5 Dec 2022 10:10:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F25AC433D6; Mon, 5 Dec 2022 10:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670235029; bh=IEH5+SklrZeRvcXZ7x5oYjnP26+lXJJ2RNphQwvxjSM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=it3VXqPNUYO6b3CpFHhBT/sPrSRTn45NGpy3vOHKBgv70rhrrMK10Yb/M6oPvTUsV xIZTgKbm4BoDhrygucNiU+qxsJzo34op+S9z0SHdqA15Zy4JQx0zJrK37jcjOWwVbl i2R4p8MtGE7lQD2lQAPsAdx8j1Nc55kfSSzQ3hztdmwfMH+o/hvdh9bM51mwudHxi/ F8XqCAFNW+rJd4Yivw2TPNZbY60iEIg/ZRDbM+QutZcFhczQrn7OSIBroVEfE9kkF3 uO5T6rAzwrY1R6Ysp3uWGPpUUYGuyLgeBsQ32eW5xnlQEhrmxYNOwUK/PV9wSqdCTj eruE5i/wBahBw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1p28Qk-0007cA-DB; Mon, 05 Dec 2022 11:10:34 +0100 From: Johan Hovold To: Bjorn Andersson , Alim Akhtar , Avri Altman Cc: Andy Gross , Konrad Dybcio , Bart Van Assche , Rob Herring , Krzysztof Kozlowski , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH 2/2] arm64: dts: qcom: sc8280xp: fix UFS DMA coherency Date: Mon, 5 Dec 2022 11:08:37 +0100 Message-Id: <20221205100837.29212-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221205100837.29212-1-johan+linaro@kernel.org> References: <20221205100837.29212-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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?1751368851311348676?= X-GMAIL-MSGID: =?utf-8?q?1751368876243073093?= The SC8280XP UFS controllers are cache coherent and must be marked as such in the devicetree to avoid potential data corruption. Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Cc: stable@vger.kernel.org # 6.0 Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi index c4947c563099..23d1f51527aa 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -1430,6 +1430,7 @@ ufs_mem_hc: ufs@1d84000 { required-opps = <&rpmhpd_opp_nom>; iommus = <&apps_smmu 0xe0 0x0>; + dma-coherent; clocks = <&gcc GCC_UFS_PHY_AXI_CLK>, <&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>, @@ -1491,6 +1492,7 @@ ufs_card_hc: ufs@1da4000 { power-domains = <&gcc UFS_CARD_GDSC>; iommus = <&apps_smmu 0x4a0 0x0>; + dma-coherent; clocks = <&gcc GCC_UFS_CARD_AXI_CLK>, <&gcc GCC_AGGRE_UFS_CARD_AXI_CLK>,