linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: Abel Vesa <abel.vesa@linaro.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Rob Herring <robh+dt@kernel.org>
Cc: linux-kernel@vger.kernel.org, angelo@amarulasolutions.com,
	 michael@amarulasolutions.com,
	tommaso.merciai@amarulasolutions.com,
	 Chen-Yu Tsai <wenst@chromium.org>,
	linux-amarula@amarulasolutions.com,
	 anthony@amarulasolutions.com, jagan@amarulasolutions.com,
	 Abel Vesa <abelvesa@kernel.org>, Adam Ford <aford173@gmail.com>,
	 Fabio Estevam <festevam@gmail.com>, Li Jun <jun.li@nxp.com>,
	 Lucas Stach <l.stach@pengutronix.de>,
	Marek Vasut <marex@denx.de>,
	 Markus Niebel <Markus.Niebel@ew.tq-group.com>,
	Michael Turquette <mturquette@baylibre.com>,
	 NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	 Sascha Hauer <s.hauer@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,  Stephen Boyd <sboyd@kernel.org>,
	devicetree@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
	 Tero Kristo <kristo@kernel.org>,
	Tony Lindgren <tony@atomide.com>
Subject: Re: [RFC PATCH v2 11/11] arm64: dts: imx8mn: add clocks description
Date: Fri, 20 Jan 2023 18:47:10 +0100	[thread overview]
Message-ID: <CABGWkvrmKzPHozcB6Wn94sG50qEsR8rK-p32eP127XPBJ7xe0A@mail.gmail.com> (raw)
In-Reply-To: <Y8VgzyNxGpqSvJ2b@linaro.org>

Hi,

On Mon, Jan 16, 2023 at 3:36 PM Abel Vesa <abel.vesa@linaro.org> wrote:
>
> On 23-01-01 18:57:40, Dario Binacchi wrote:
> > The patch creates a unique node for each clock in the imx8mn clock
> > control module (CCM).
> >
> > To ensure backwards compatibility it was not possible to separate the
> > changes to the device tree from those applied to the clocks setup code.
> > In doing so, all clocks are initialized from the device tree and the
> > legacy setup code with hardwired parameters is removed.
> >
> > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> >
> > ---
> >
> > (no changes since v1)
> >
> >  .../boot/dts/freescale/imx8mn-clocks.dtsi     | 1885 +++++++++++++++++
> >  arch/arm64/boot/dts/freescale/imx8mn.dtsi     |   54 +-
> >  drivers/clk/imx/clk-imx8mn.c                  |  714 ++-----
> >  3 files changed, 2086 insertions(+), 567 deletions(-)
> >  create mode 100644 arch/arm64/boot/dts/freescale/imx8mn-clocks.dtsi
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mn-clocks.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-clocks.dtsi
> > new file mode 100644
> > index 000000000000..21e02ea996d0
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/freescale/imx8mn-clocks.dtsi
> > @@ -0,0 +1,1885 @@
> > +// SPDX-License-Identifier: GPL-2.0-only
> > +/*
> > + * Device Tree Source for imx8mn clock data
> > + *
> > + * Copyright (c) 2022 Amarula Solutions
> > + *
> > + * Dario Binacchi <dario.binacchi@amarulasolutions.com>
> > + */
> > +
> > +/ {
> > +     osc_32k: clock-osc-32k {
> > +             compatible = "fixed-clock";
> > +             #clock-cells = <0>;
> > +             clock-frequency = <32768>;
> > +             clock-output-names = "osc_32k";
> > +     };
> > +
>
> [...]
>
> > +
> > +     clk_audio_pll2_bypass: clock-audio-pll2-bypass@14 {
> > +             compatible = "fsl,imx8mn-mux-clock";
> > +             #clock-cells = <0>;
> > +             clocks = <&clk_audio_pll2>, <&clk_audio_pll2_ref_sel>;
> > +             fsl,anatop = <&anatop 0x14>;
> > +             fsl,bit-shift = <16>;
> > +             fsl,set-rate-parent;
>
> NACK. I'm sorry, but this creates a huge effort on maintaining the
> bindings.

IMHO I don't think that's the point. Rather, is it correct to keep adding
platforms always replicating the same code that makes use of hardwired
parameters? When I thought about the development of this series I
thought it could be an opportunity to reverse the trend. In the direction
suggested by the linux kernel development policies.The benefits of using the
device tree have been proven for quite some time now.
The 03/11 and 04/11 patches of the series make a list of the legacy code that
has been added over time (functions with names that are sometimes unclear)
and that with the progressive use of the device tree would be removed.

As written in the cover letter, I am available to add the necessary DT
bindings to
the series.

Plus the vendor specific properties will keep increasing.
>
> I don't think Rob and Krzysztof will be OK with this either.

I hope instead that they agree with me. I didn't answer right away as
I was waiting
for their opinion. And I keep hoping for their response. And any other
recipients of
the series as well.

By the way, I add Tero Kristo and Toni Lindgren as their work done for
the TI clock
subsystem has been a great help for me in the implementation of this series.

Thanks and regards,
Dario

>
>
> > +             clock-output-names = "audio_pll2_bypass";
> > +     };
> > +
> > +     clk_audio_pll2_out: clock-audio-pll2-out@14 {
> > +             compatible = "fsl,imx8mn-gate-clock";
> > +             #clock-cells = <0>;
> > +             clocks = <&clk_audio_pll2_bypass>;
> > +             fsl,anatop = <&anatop 0x14>;
> > +             fsl,bit-shift = <13>;
> > +             clock-output-names = "audio_pll2_out";
> > +     };
> > +
>
> [...]
>
> > --
> > 2.32.0
> >



-- 

Dario Binacchi

Senior Embedded Linux Developer

dario.binacchi@amarulasolutions.com

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
info@amarulasolutions.com

www.amarulasolutions.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-01-20 17:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-01 17:57 [RFC PATCH v2 00/11] clk: imx8mn: setup clocks from the device tree Dario Binacchi
2023-01-01 17:57 ` [RFC PATCH v2 01/11] clk: imx: add structure to extend register accesses Dario Binacchi
2023-01-01 17:57 ` [RFC PATCH v2 02/11] clk: imx: add clk_hw based API imx_get_clk_hw_from_dt() Dario Binacchi
2023-01-01 17:57 ` [RFC PATCH v2 03/11] clk: imx8mn: add gate driver Dario Binacchi
2023-01-01 17:57 ` [RFC PATCH v2 04/11] clk: imx8mn: add mux driver Dario Binacchi
2023-01-01 17:57 ` [RFC PATCH v2 05/11] clk: imx8mn: add divider driver Dario Binacchi
2023-01-01 17:57 ` [RFC PATCH v2 06/11] clk: imx: pll14xx: add device tree support Dario Binacchi
2023-01-01 17:57 ` [RFC PATCH v2 07/11] clk: imx: composite-8m: " Dario Binacchi
2023-01-01 17:57 ` [RFC PATCH v2 08/11] clk: imx: gate2: " Dario Binacchi
2023-01-01 17:57 ` [RFC PATCH v2 09/11] clk: imx: cpu: " Dario Binacchi
2023-01-01 17:57 ` [RFC PATCH v2 10/11] arm64: dts: imx8mn: add dumy clock Dario Binacchi
2023-01-02 23:04 ` [RFC PATCH v2 00/11] clk: imx8mn: setup clocks from the device tree Marek Vasut
2023-01-04 16:09   ` Dario Binacchi
     [not found] ` <20230101175740.1010258-12-dario.binacchi@amarulasolutions.com>
2023-01-16 14:35   ` [RFC PATCH v2 11/11] arm64: dts: imx8mn: add clocks description Abel Vesa
2023-01-20 17:47     ` Dario Binacchi [this message]
2023-01-25 21:10 ` [RFC PATCH v2 00/11] clk: imx8mn: setup clocks from the device tree Stephen Boyd
2023-01-26 10:49   ` Michael Nazzareno Trimarchi
2023-02-10 22:49     ` Stephen Boyd
2023-02-11  9:19       ` Michael Nazzareno Trimarchi

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=CABGWkvrmKzPHozcB6Wn94sG50qEsR8rK-p32eP127XPBJ7xe0A@mail.gmail.com \
    --to=dario.binacchi@amarulasolutions.com \
    --cc=Markus.Niebel@ew.tq-group.com \
    --cc=abel.vesa@linaro.org \
    --cc=abelvesa@kernel.org \
    --cc=aford173@gmail.com \
    --cc=angelo@amarulasolutions.com \
    --cc=anthony@amarulasolutions.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=jagan@amarulasolutions.com \
    --cc=jun.li@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=kristo@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=michael@amarulasolutions.com \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=tommaso.merciai@amarulasolutions.com \
    --cc=tony@atomide.com \
    --cc=wenst@chromium.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).