Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5870455rwb; Mon, 5 Dec 2022 05:19:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf77zYGbcl5JwB04AGSrlRaRuUpiYaJKTX33Wp4hg9XGrcuCDrf8i3jV0Vq5uKQojrfhSCVx X-Received: by 2002:a17:907:98e8:b0:7c0:f685:31df with SMTP id ke8-20020a17090798e800b007c0f68531dfmr3726511ejc.142.1670246396391; Mon, 05 Dec 2022 05:19:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670246396; cv=none; d=google.com; s=arc-20160816; b=i9sIceCVGFTn/W6VEpTMr3C2UD8QmXidHbqKInJ5l1aiNNWchFpdsUFi/X7KMONkyZ QMUDHrtypaojXB6xVt/Dam8PBh0NA8LajR9mUSw3fSwgeJDfdzFHziRaz7MYH+uTqNUE mZQY0HmEXSwTIhwFu8XdSVGWTXduE5Kbyo6Z95nPWfm4vc2NMpkuK98m5w/z14i2bn6o GtB6Rhazd2PZDdPJjQ/70NtAZ2XYHlquqf5YrHqjzcAU+Ek5dl12jZXI1ohlctOQjg3h 1w2Y22B2zuJR1k+Eshug+w6j0DrkxMPk2jSwe6T67+KJO1AZYk0zCkUbcRG/ATFJBOxH RaNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=42IsG+6VvwxLrPuGKdqofVpVtgyr7qn6+Gt9NlyapoQ=; b=X/ORuHt9I0KCvxCvYqVXTRdCN0Ry+n3Q44H/0B/prfEldMsYgYQ4aJTFzcFQfImht3 gjnU3yvPzA0FjLZyb0VMXl/lzlTW1hCLEeAIkKLq4kBFetGJl6aXCwPfai7C7vfaXWxv n54WhUI4Oc2eec/+2t6l3xr29nOoqi3+jXolREW2u5Diov+dzgLWNVQNhnZG1VkLzOAq sBbCigyqgqoBHZ0yh0JXmidje+lgC0+80xutMt0GBmla5NXaxtiJPwHn1T1582/ArFg0 eT+Luq05SvwjYZPXQ5sk7ggEHdR4yD9luCDqijZr9kb21SvRPpq62KKtqRLCdhKk4g2Y cQAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X4MaHDrL; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd22-20020a1709069b9600b007c0f5d71c15si2492488ejc.689.2022.12.05.05.19.35; Mon, 05 Dec 2022 05:19:56 -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=X4MaHDrL; 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 S231802AbiLEM1e (ORCPT + 82 others); Mon, 5 Dec 2022 07:27:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230400AbiLEM1b (ORCPT ); Mon, 5 Dec 2022 07:27:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B27216387; Mon, 5 Dec 2022 04:27:30 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 4FDD06106C; Mon, 5 Dec 2022 12:27:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9ECA0C433C1; Mon, 5 Dec 2022 12:27:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670243249; bh=L1YNfHSIuiHZcP1HrrM4bGQckMyCRA5hADfzIoelQ1Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=X4MaHDrLLhmwj4rM/09fVzStptvEpYtFiMqZ/aP3/kT2Y2cydTBinXwR2w6/nu49H zMMPwDyoORkUuzkBaQqEVTD15DN4VmVQ+R/DBtYrzNUD2IeJcwNiLzJM9lTgkgShnM NuaBK6PPHJBBq6e4M7K0/9bXQufQOM91FuIK/Qcn2X1kzfiAJ4+0cRY+icosb1wOLQ pQ5Pp+d7CHCc4LRiGROqJXGjXF7kFdZPtNb/9WetY21wJk2n4CuwkT2xf9sSsAO/ho Z7xX/JTdGbjjV0R4G3fEjyRuMaOSgGA63zCUH1tE4f6vTExKzVzjgrRlAOqCTMWFHW C3TvNZ2pFv3Zg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1p2AZK-0000Tp-88; Mon, 05 Dec 2022 13:27:34 +0100 Date: Mon, 5 Dec 2022 13:27:34 +0100 From: Johan Hovold To: Manivannan Sadhasivam Cc: Johan Hovold , Bjorn Andersson , Alim Akhtar , Avri Altman , Andy Gross , Konrad Dybcio , Bart Van Assche , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] dt-bindings: ufs: qcom: allow 'dma-coherent' property Message-ID: References: <20221205100837.29212-1-johan+linaro@kernel.org> <20221205100837.29212-2-johan+linaro@kernel.org> <20221205115906.GA20192@thinkpad> <20221205122018.GC20192@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221205122018.GC20192@thinkpad> 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 On Mon, Dec 05, 2022 at 05:50:18PM +0530, Manivannan Sadhasivam wrote: > On Mon, Dec 05, 2022 at 01:07:16PM +0100, Johan Hovold wrote: > > On Mon, Dec 05, 2022 at 05:29:06PM +0530, Manivannan Sadhasivam wrote: > > > On Mon, Dec 05, 2022 at 11:08:36AM +0100, Johan Hovold wrote: > > > > 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 > > > > --- > > > > 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 > > > > + > > > > > > This property is not applicable to all SoCs. So setting true here will make it > > > valid for all. > > > > Yes, it would be a valid, but it will only be added to the DTs of SoCs > > that actually require it. No need to re-encode the dtsi in the binding. > > > > But if you make a property valid in the binding then it implies that anyone > could add it to DTS which is wrong. You should make this property valid for > SoCs that actually support it. No, it's not wrong. Note that the binding only requires 'compatible' and 'regs', all other properties are optional, and you could, for example, add a 'reset' property to a node for a device which does not have a reset without the DT validation failing. It's the devicetree which is supposed to describe hardware, you don't have to encode it also in the binding. Johan