devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viorel Suman <viorel.suman@oss.nxp.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Viorel Suman <viorel.suman@nxp.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Dong Aisheng <aisheng.dong@nxp.com>,
	Fabio Estevam <festevam@gmail.com>,
	Shawn Guo <shawnguo@kernel.org>, Stefan Agner <stefan@agner.ch>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
	Wim Van Sebroeck <wim@linux-watchdog.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	NXP Linux Team <linux-imx@nxp.com>,
	Abel Vesa <abelvesa@kernel.org>,
	Oliver Graute <oliver.graute@kococonnector.com>,
	Liu Ying <victor.liu@nxp.com>,
	Mirela Rabulea <mirela.rabulea@nxp.com>,
	Peng Fan <peng.fan@nxp.com>, Ming Qian <ming.qian@nxp.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-input@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-watchdog@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v6 10/14] arm64: dts: freescale: imx8qxp: Remove unnecessary clock related entries
Date: Thu, 30 Jun 2022 22:48:04 +0300	[thread overview]
Message-ID: <20220630194804.sa3mvokpv7iksgbx@fsr-ub1664-116> (raw)
In-Reply-To: <5d8b2044-5ca6-c90c-57b4-afbb2ae20dde@linaro.org>

On 22-06-30 20:01:31, Krzysztof Kozlowski wrote:
> On 30/06/2022 10:36, Viorel Suman wrote:
> > On 22-06-29 20:04:43, Krzysztof Kozlowski wrote:
> >> On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
> >>> From: Viorel Suman <viorel.suman@nxp.com>
> >>>
> >>> "clocks" and "clock-names" are not used the driver, so
> >>> remove them in order to match the yaml definition.
> >>
> >> So this explains the unexpected change in the bindings... but actually
> >> it does not explain whether it is correct or not. Just because driver
> >> does not use it, is not a proof that clocks are not there. In different
> >> OS/implementation this DTS might break stuff, so basically it is ABI
> >> break. DTS should describe the hardware fully, so if the clocks are
> >> there, should be in DTS regardless of the driver.
> > 
> > Hi Krzysztof,
> > 
> > Both XTAL clocks - 24MHz and 32kHz - are still defined in DTSI files, see for instance in
> > arch/arm64/boot/dts/freescale/imx8qxp.dtsi :
> > ---------------
> >         xtal32k: clock-xtal32k {
> >                 compatible = "fixed-clock";
> >                 #clock-cells = <0>;
> >                 clock-frequency = <32768>;
> >                 clock-output-names = "xtal_32KHz";
> >         };
> > 
> >         xtal24m: clock-xtal24m {
> >                 compatible = "fixed-clock";
> >                 #clock-cells = <0>;
> >                 clock-frequency = <24000000>;
> >                 clock-output-names = "xtal_24MHz";
> >         };
> > ---------------
> > Both can be seen in /sys/kernel/debug/clk/clk_summary once boot is complete, both can be referenced
> > in any DTS node, so there is no ABI break.
> 
> ABI break is not relevant to the fixed clocks being or not being defined
> in the DTS. You have a device which was taking the clock inputs, so the
> clocks stayed enabled.
> 
> Now, you don't take these inputs, so for example the clocks are getting
> disabled as not used.

Ok, thanks for the explanation.

> > 
> > "DTS should describe the hardware fully" - this is true in case the OS is supposed to controll the
> > hardware fully. i.MX8 System Controller Unit concept implies resources being allocated and managed
> > by SCU, there is no direct OS access to some hardware. SCU actually defines the hardware environment
> > the OS is being able to see and run within. SCU is able to define several such isolated hardware
> > environments, each having its own OS running. So, in this particular case - i.MX8 SCU concept -
> > DTS should describe the hardware from the perspective of the hardware environment exposed by SCU to
> > OS.
> 
> OK, that sounds good, but the question about these clocks remain - are
> they inputs to the SCU or not.

The question context looks a bit shifted. The "clocks" and "clock-names"
attributes are removed from a clock provider device.

The OS clock provider in this case is a client which uses some protocol
to communicate with SCU via a messaging unit. There is no
access to xtal clocks via the existing OS<->SCU communication protocol.

> 
> Regardless whether they are actual input or not, you used not
> appropriate argument here - that Linux OS implementation does not use
> them. The proper argument is - whether the hardware environment has them
> connected or not.

Right, agreed.

Regards,
Viorel

  reply	other threads:[~2022-06-30 19:48 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-29 16:44 [PATCH v6 00/14] dt-bindings: arm: freescale: Switch fsl,scu from txt to yaml Viorel Suman (OSS)
2022-06-29 16:44 ` [PATCH v6 01/14] dt-bindings: clk: imx: Add fsl,scu-clk yaml file Viorel Suman (OSS)
2022-06-29 17:48   ` Krzysztof Kozlowski
2022-06-29 16:44 ` [PATCH v6 02/14] dt-bindings: pinctrl: imx: Add fsl,scu-iomux " Viorel Suman (OSS)
2022-06-29 17:53   ` Krzysztof Kozlowski
2022-06-30 12:37     ` Viorel Suman (OSS)
2022-06-30 18:33       ` Krzysztof Kozlowski
2022-07-05 18:33         ` Rob Herring
2022-07-06 14:11           ` Rob Herring
2022-07-06 14:29             ` Krzysztof Kozlowski
2022-06-30 13:44   ` Rob Herring
2022-06-29 16:44 ` [PATCH v6 03/14] dt-bindings: input: Add fsl,scu-key " Viorel Suman (OSS)
2022-06-29 17:54   ` Krzysztof Kozlowski
2022-06-29 16:44 ` [PATCH v6 04/14] dt-bindings: nvmem: Add fsl,scu-ocotp " Viorel Suman (OSS)
2022-06-29 17:56   ` Krzysztof Kozlowski
2022-06-29 17:56   ` Krzysztof Kozlowski
2022-06-29 16:44 ` [PATCH v6 05/14] dt-bindings: power: Add fsl,scu-pd " Viorel Suman (OSS)
2022-06-29 17:57   ` Krzysztof Kozlowski
2022-06-29 16:44 ` [PATCH v6 06/14] dt-bindings: rtc: Add fsl,scu-rtc " Viorel Suman (OSS)
2022-06-29 17:58   ` Krzysztof Kozlowski
2022-06-29 16:44 ` [PATCH v6 07/14] dt-bindings: thermal: Add fsl,scu-thermal " Viorel Suman (OSS)
2022-06-29 17:59   ` Krzysztof Kozlowski
2022-06-29 16:44 ` [PATCH v6 08/14] dt-bindings: watchdog: Add fsl,scu-wdt " Viorel Suman (OSS)
2022-06-29 17:59   ` Krzysztof Kozlowski
2022-06-30 14:43     ` Guenter Roeck
2022-06-29 16:44 ` [PATCH v6 09/14] dt-bindings: firmware: Add fsl,scu " Viorel Suman (OSS)
2022-06-29 18:02   ` Krzysztof Kozlowski
2022-06-30 13:44   ` Rob Herring
2022-06-29 16:44 ` [PATCH v6 10/14] arm64: dts: freescale: imx8qxp: Remove unnecessary clock related entries Viorel Suman (OSS)
2022-06-29 18:04   ` Krzysztof Kozlowski
2022-06-30  8:36     ` Viorel Suman
2022-06-30 18:01       ` Krzysztof Kozlowski
2022-06-30 19:48         ` Viorel Suman [this message]
2022-07-04  8:06           ` Krzysztof Kozlowski
2022-06-29 16:44 ` [PATCH v6 11/14] arm64: dts: freescale: imx8: Fix power controller name Viorel Suman (OSS)
2022-06-29 18:05   ` Krzysztof Kozlowski
2022-06-29 16:44 ` [PATCH v6 12/14] arm64: dts: freescale: imx8qxp: Add fallback compatible for clock controller Viorel Suman (OSS)
2022-06-29 18:05   ` Krzysztof Kozlowski
2022-06-29 16:44 ` [PATCH v6 13/14] arm64: dts: freescale: imx8qxp: Fix the keys node name Viorel Suman (OSS)
2022-06-29 18:06   ` Krzysztof Kozlowski
2022-06-29 16:44 ` [PATCH v6 14/14] dt-bindings: arm: freescale: Remove fsl,scu txt file Viorel Suman (OSS)
2022-06-29 18:03   ` Krzysztof Kozlowski
2022-06-29 17:51 ` [PATCH v6 00/14] dt-bindings: arm: freescale: Switch fsl,scu from txt to yaml Krzysztof Kozlowski
2022-06-30 12:13   ` Viorel Suman (OSS)
2022-06-30 18:03     ` Krzysztof Kozlowski
2022-06-30 18:11       ` Viorel Suman
2022-07-05  0:39   ` Shawn Guo
2022-07-05  7:28     ` Krzysztof Kozlowski
2022-07-05  8:07       ` Viorel Suman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220630194804.sa3mvokpv7iksgbx@fsr-ub1664-116 \
    --to=viorel.suman@oss.nxp.com \
    --cc=a.zummo@towertech.it \
    --cc=abelvesa@kernel.org \
    --cc=aisheng.dong@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=amitk@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=ming.qian@nxp.com \
    --cc=mirela.rabulea@nxp.com \
    --cc=mturquette@baylibre.com \
    --cc=oliver.graute@kococonnector.com \
    --cc=peng.fan@nxp.com \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=stefan@agner.ch \
    --cc=victor.liu@nxp.com \
    --cc=viorel.suman@nxp.com \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).