Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2692701pxa; Mon, 24 Aug 2020 23:58:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAcWTvAAN6WqwRcA9YBTs6yh1CYZtqEwoJyhXomjszU8yM44ihBXKEDGE20HzX4EohlVEI X-Received: by 2002:a17:906:a1d7:: with SMTP id bx23mr9273702ejb.273.1598338729294; Mon, 24 Aug 2020 23:58:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598338729; cv=none; d=google.com; s=arc-20160816; b=YZ8HTHxSdcyJWnevU4v5mxfv5uVWaF99Iqxn+8ley1ADhVEDPJRNurMmmhjAOzYvmz FvfkkTGyomMANb1HufrqZQeAiAIFmMoI/eWFQIcN4rC1E3yPLlYeQ6FCXVh1L/m+xf62 NUEdDB5BTir38SxGMe20y5Y0Nbqb/KF4C6tK7zhkrRu3HE1Ma47qCmuspS8giJVgmax/ +l40ABDwPx+QZ9I0gTts4TqsD4sOxVe3wO2RgkosrJt5ZAb6KibTycRQndCK3AhwbJdp 1KKpPHSWnr6QGpkL402xHGi7j6+7+SPyFL18whJMzySTKHjpeRnPCviGHpd2AkUM4EpM Domg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=1/BMEK5hdF0iweITjCzRL7tnq3hV766kEY/n/gaXN14=; b=UsWWkLGGN2F87dHWE+81ZaiprmXZW7m26aWPh22JiBEvViyCVLzydb8MenukKhefWM ZbXYkEFRnZ/QfTOqQ+L/KxUTbe5S+pEPqREPqLOPg4h8erGgOfXaRLqa5hvMleaV8Xw5 tj5B5Y15lCJioPr1qcKPUYgpTjGvdXfOXji+1m4mvRgcYRqE4B1Zi0jv6z+MyY6eEw31 0LYt5O0ZqQbKet/SlcXUH0AaKbrPlerh3iP6VBmLtb6rapkMxd0hwrEcN7m6dUdVn6YO VMfIK2NCGCdeOWEldflzg6ehPiHbq0IigjkyohO5CY8yqoHeeCqcchiiXiua93XXZY6R 4J1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g14si193550edp.447.2020.08.24.23.58.26; Mon, 24 Aug 2020 23:58:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729227AbgHYGzl (ORCPT + 99 others); Tue, 25 Aug 2020 02:55:41 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:39147 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729148AbgHYGzk (ORCPT ); Tue, 25 Aug 2020 02:55:40 -0400 Received: by mail-wm1-f65.google.com with SMTP id g75so1073879wme.4; Mon, 24 Aug 2020 23:55:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=1/BMEK5hdF0iweITjCzRL7tnq3hV766kEY/n/gaXN14=; b=WHzldN0LodFs4WwI1EiYmhb8ySSaSJGDjLsyILIAUtbX6NZUpj9poLC3tfs2etTU1Q 0hsnnl3yyVRnIF7PTLAhkCU1IPDknPPnqS0xI1CVzTW6f3L7fuuP4SjAgRuJ8ys+utLz LQ/jZkZzIdcasBBm+uEB81qzz8wyYNj//OpKVLx1xj1jYq8H+PLusLAFFZnT97HrmFPb zuZn4EGWjX3IBiwgTS98GuMBBdWHsg1DGp3wh52fI/6X7etyyMVoRHYzjdgqLKiBxXFm rotwOddo+254em0OlKRjNYjVPgrrPqP8nAPVGD8OEM/pPjEfK9c0YAclcdoXOdr4UOZV z+HQ== X-Gm-Message-State: AOAM530jjo0WCxiUtnSAhAoIJ3xEzC9FVl/q1kjrsaTR4JDZ8CizO7XU OOOtqtxyuybtlJPcUScePvY= X-Received: by 2002:a1c:7fd3:: with SMTP id a202mr547797wmd.67.1598338538029; Mon, 24 Aug 2020 23:55:38 -0700 (PDT) Received: from kozik-lap ([194.230.155.216]) by smtp.googlemail.com with ESMTPSA id z1sm11576477wru.6.2020.08.24.23.55.36 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Aug 2020 23:55:37 -0700 (PDT) Date: Tue, 25 Aug 2020 08:55:34 +0200 From: "krzk@kernel.org" To: "Vaittinen, Matti" Cc: "miquel.raynal@bootlin.com" , "linux-imx@nxp.com" , "han.xu@nxp.com" , "Anson.Huang@nxp.com" , "yibin.gong@nxp.com" , "linux-kernel@vger.kernel.org" , "shawnguo@kernel.org" , "aford173@gmail.com" , "devicetree@vger.kernel.org" , "kernel@pengutronix.de" , "s.hauer@pengutronix.de" , "richard@nod.at" , "robh+dt@kernel.org" , "linux-mtd@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" , "daniel.baluta@nxp.com" , "lee.jones@linaro.org" , "festevam@gmail.com" , "vigneshr@ti.com" , "jun.li@nxp.com" Subject: Re: [PATCH 01/16] dt-bindings: mfd: rohm,bd71847-pmic: Correct clock properties requirements Message-ID: <20200825065534.GB3458@kozik-lap> References: <20200824190701.8447-1-krzk@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 25, 2020 at 06:23:36AM +0000, Vaittinen, Matti wrote: > > Hello Krzysztof, > > On Mon, 2020-08-24 at 21:06 +0200, Krzysztof Kozlowski wrote: > > The input clock and number of clock provider cells are not required > > for > > the PMIC to operate. They are needed only for the optional bd718x7 > > clock driver. > > I have always found the DT bindings hard to do. I quite often end up > having a different view with Rob so I probably could just shut-up and > watch how this evolves :) > > But as keeping my mouth is so difficult... > > ...All of the drivers are optional. The PMIC can power-on without any > drivers. Drivers are mostly used just for disabling the voltage from > graphics accelerator block when it is not needed (optional). Or some > DVS (optional). But yes, maybe the clk driver is "more optional" than > the rest. XD So, I am not against this. Each regulator node is optional, it can be skipped. And device will work and regulator driver will bind. The difference here is that without clocks the clock driver won't even bind... but if we keep clocks as required, then multiple DTSes do not pass the bindings check. I don't have strong feelings about dropping requirement for clocks, just this looks easier to implement and logical to me (this is a PMIC so clock is a secondary feature). > > > Add also clock-output-names as driver takes use of it. > > > > This fixes dtbs_check warnings like: > > > > arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dt.yaml: pmic@4b: > > 'clocks' is a required property > > arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dt.yaml: pmic@4b: > > '#clock-cells' is a required property > > > > Signed-off-by: Krzysztof Kozlowski > > --- > > .../devicetree/bindings/mfd/rohm,bd71847-pmic.yaml | 9 > > +++++++-- > > 1 file changed, 7 insertions(+), 2 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/mfd/rohm,bd71847- > > pmic.yaml b/Documentation/devicetree/bindings/mfd/rohm,bd71847- > > pmic.yaml > > index 77bcca2d414f..5d531051a153 100644 > > --- a/Documentation/devicetree/bindings/mfd/rohm,bd71847-pmic.yaml > > +++ b/Documentation/devicetree/bindings/mfd/rohm,bd71847-pmic.yaml > > @@ -38,6 +38,9 @@ properties: > > "#clock-cells": > > const: 0 > > > > + clock-output-names: > > + maxItems: 1 > > I had this in original binding (text) document patch series. For some > reason it was later dropped. Unfortunately I didn't easily find a > reason as to why. Adding it back now is absolutely fine for me though. > > > + > > # The BD71847 abd BD71850 support two different HW states as reset > > target > > # states. States are called as SNVS and READY. At READY state all > > the PMIC > > # power outputs go down and OTP is reload. At the SNVS state all > > other logic > > @@ -116,12 +119,14 @@ required: > > - compatible > > - reg > > - interrupts > > - - clocks > > - - "#clock-cells" > > - regulators > > > > additionalProperties: false > > > > +dependencies: > > + '#clock-cells': [clocks] > > + clocks: ['#clock-cells'] > > This is new to me. Please educate me - does this simply mean that if > '#clock-cells' is given, then also the 'clocks' must be given - and the > other way around? Yes, because the clocks do not have sense without clock-cells and vice versa. > > If so, then: > Acked-By: Matti Vaittinen > Thanks. Best regards, Krzysztof