Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5869439rwb; Mon, 5 Dec 2022 05:19:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf5ECs6V84FHWu1nfEsiZ6wSqsHAvdghbjP4vmW/6OeRT4ZBbggkjQ7lomg1CbELNVMUCoeL X-Received: by 2002:a17:906:b0d7:b0:78d:39e8:89eb with SMTP id bk23-20020a170906b0d700b0078d39e889ebmr55681577ejb.639.1670246349220; Mon, 05 Dec 2022 05:19:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670246349; cv=none; d=google.com; s=arc-20160816; b=qhcDkB0ehvXDvbyx2+/wBuIeosBogqdgGjGdodFD3fXarwyr0ds+Y9TReitk2rh9pP Q7Ykr5hf0/IQS3IOHrbBtt6Sr2abkhfsAKork5qKRfpZ4iuv52yxbH1sGAb27DOecDui thKK8vBtQPgaGOj8a53UASjy+/hHIYlkZqHkwQzRWJCV1GzJ7pwH+Z1edj9BieCaQYkP sC3Ua67AhWwA4NQiI6K/VoapsvDmxgaKqNyAdUSDXIt7Wkr3DKEc6BPlLnuqZvSqshim PMg0pRPEf+5oYsRDL1hRlt9vqskpEWnWkrQrcaA64O6dcHt7Bsdy6K4aiGqaNtzeIQkB m4+w== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KxnV3Qp0Y7lPeJMlAC3B0qrclK4fA9O7m2KwNM9QZuo=; b=eHA4p85vuJoERwjSf2oGKIwqzU20HKU6fjdm698V5cNO5n/KfN1VjDGnyYbF9vDTY5 TMX4KGN3D9CGphApIOje4k+apEsguFqnMCQsFefH04VXXwuilSpjdJp2PHtaavW1eRVY A776UxRw9YehR30OpPNqsomjoRbt0fuuTJOrlCg5fbSTC1hW3AB+pWGpFbeESkiOr/DH +kWiD16tOF98mGlo5zFbwcNixIKGDx0iA6F2jUaSxD0SiLjH8tZyXSwkl4SJn6XO+DBp 13nP1bSq0Qic1NyGqEbLN0K/79wTlSEmg0yv+EMMgHhp8IZ/XhHsqy4YPWvRd90VM9fM zCvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JSWTno9O; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q5-20020a056402248500b004676b7d42d7si11691103eda.243.2022.12.05.05.18.48; Mon, 05 Dec 2022 05:19:09 -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=@linaro.org header.s=google header.b=JSWTno9O; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232023AbiLENBB (ORCPT + 82 others); Mon, 5 Dec 2022 08:01:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231168AbiLENA6 (ORCPT ); Mon, 5 Dec 2022 08:00:58 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCE311B9FF for ; Mon, 5 Dec 2022 05:00:57 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id fa4-20020a17090af0c400b002198d1328a0so6107422pjb.0 for ; Mon, 05 Dec 2022 05:00:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=KxnV3Qp0Y7lPeJMlAC3B0qrclK4fA9O7m2KwNM9QZuo=; b=JSWTno9Ovpi4N2n7SJLNvOb921h7NEAgoxBTP99nODbDxre5VKCW/RolX8wEH1ew1N d3gwaS208r0SX3gBiOGTwfNxXY1ExcIz/wKYK0y0XIhx9QwhVnl9qU02TaEdu0FWJWw3 yn6KeodIQiqYlsDj+/oHDkTEnFfOpoFGTGYwPjrpkN108il9qnbshVF7CxcgOVn/30aB 0haTYo7TNYWsiwxQJtmKLnVlBkY3h0ZA1pIVVQiL9NNt7dpOlROTVU6+soQyDvNq/X/W FZTK5W7dOCCiINcjP7JoYPaywAs2sCkuYnkzKpxn4FlTl59W26EKlfLE6tNPtuLAQvw4 xIYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KxnV3Qp0Y7lPeJMlAC3B0qrclK4fA9O7m2KwNM9QZuo=; b=hRtSmsUaJBtuin4UUpIF19unuAN7DT7xabUAcoULOjqnPVp6kL8NncwKJwdTfP1eIP ENb6QRqf+IJ6pPmWjieXhTTKT/02IZd+vF+5gUZPa4VaEHVdXXmruBeKHXej81caQv3r F5iktp2Y5ZhF2SzaT5JXGPrzHAyTTT7RuFlkq69misp9M0fr2TTcwPVtptPdgM6s1/pa TyCgzteyc7ksKerFmEsrRydZEr7JfRmn3N9kilp175mgVd1n1Dfnn3NREw33Kb4naQuh iN5iArZb2ZitVukDu3S9vnUlnVd2tM9IuIMoKu0pl3lxECDjVyVO+gtcowJ8e9Dzuhfd A7VA== X-Gm-Message-State: ANoB5pn9vF3s0OrQrDUplvXCLhcCM8GcI3qAfKvXyPTR3Wdo+q6u0DEL UJIKxmZIrz2aRePwMMsRjCRa X-Received: by 2002:a17:90a:4889:b0:20d:d531:97cc with SMTP id b9-20020a17090a488900b0020dd53197ccmr90688319pjh.164.1670245256899; Mon, 05 Dec 2022 05:00:56 -0800 (PST) Received: from thinkpad ([59.92.98.136]) by smtp.gmail.com with ESMTPSA id s25-20020aa78bd9000000b00576d4c45a22sm2785404pfd.147.2022.12.05.05.00.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 05:00:55 -0800 (PST) Date: Mon, 5 Dec 2022 18:30:48 +0530 From: Manivannan Sadhasivam To: Johan Hovold 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: <20221205130048.GD20192@thinkpad> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 01:27:34PM +0100, Johan Hovold wrote: > 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. > Then what is the point of devicetree validation using bindings? There is also a comment from Krzysztof: https://lkml.org/lkml/2022/11/24/390 Thanks, Mani > It's the devicetree which is supposed to describe hardware, you don't > have to encode it also in the binding. > > Johan -- மணிவண்ணன் சதாசிவம்