All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Rob Herring <robh@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
	linux-clk <linux-clk@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Kumar Gala <galak@codeaurora.org>,
	Jason Cooper <jason@lakedaemon.net>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Nadav Haklai <nadavh@marvell.com>,
	Lior Amsalem <alior@marvell.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Yehuda Yitschak <yehuday@marvell.com>
Subject: Re: [PATCH 2/3] clk: mvebu: add AP806 core clock driver
Date: Tue, 23 Feb 2016 16:56:03 +0100	[thread overview]
Message-ID: <20160223165603.74576dca@free-electrons.com> (raw)
In-Reply-To: <20160223102550.2e0cba04@free-electrons.com>

Rob, Michael, Stephen,

On Tue, 23 Feb 2016 10:25:50 +0100, Thomas Petazzoni wrote:

> > >> Maybe add a big fat warning that the bindings are unstable, and the DT
> > >> blob must be kept in sync with the kernel?
> > >
> > > +1 and feel free to blame the lack of documentation.  No one can expect
> > > bindings to be finalized when the chip topology is not fully understood.
> > 
> > I can understand not understanding the full clock tree. I have "full"
> > documentation of a Marvell chip and don't understand the clock tree
> > fully. But I can't believe you don't have some sense of how many
> > clocks you have to deal with. 10? 100? 1000? What I see is 2 nodes of
> > a single register each for clocks at roughly the same address. That
> > tells me your binding is too fine grained. If you really don't know
> > what is right, then err on the side of a single clock provider node
> > and don't put the clock details in DT.
> 
> I don't quite understand the reasoning behind this conclusion. We know
> for sure that those two registers control only those core and ring
> clocks. Maybe there are other registers controlling other clocks,  that
> we don't know. But for sure, those two registers only give details
> about those core and ring clocks, so I don't see what would be the
> usefulness of merging that into a single DT node.
> 
> We would lose the fact that the relationship between the ring clocks
> and one of the core clock is represented in the DT. Instead of having a
> clear <&coreclk X> or <&ringclk Y> reference, we would have a
> mysterious <&allclk XYZ> reference, which doesn't tell immediately
> whether it's a core clock or ring clock.
> 
> So, while I definitely agree that a syscon is probably in order to
> cover all the system registers, I don't see the point of having a
> single node to cover all the clocks.

So, I had a discussion with Marvell engineers and a closer look at the
matter. It turns out that those two clock registers are in the middle
of an area called DFX (Design for Testability), which contain registers
to fine tune the silicon and detect manufacturing issues. This area of
registers is most likely never going to be publicly documented, and the
fact that those two clock-related registers were placed there was more
an oversight than a real architecture choice.

For this reason, there is in fact no real benefit in mapping the entire
area using a syscon, and having the two DT nodes for the core clocks
and ring clocks, mapping just their own registers is by far the
simplest solution considering the register layout.

We would prefer to keep things as proposed in terms of DT
representation, with the understanding that the submission of the Linux
support for this platform comes very early in the chip development
cycle, and that as such, the DT bindings should be considered unstable.

Thanks a lot,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] clk: mvebu: add AP806 core clock driver
Date: Tue, 23 Feb 2016 16:56:03 +0100	[thread overview]
Message-ID: <20160223165603.74576dca@free-electrons.com> (raw)
In-Reply-To: <20160223102550.2e0cba04@free-electrons.com>

Rob, Michael, Stephen,

On Tue, 23 Feb 2016 10:25:50 +0100, Thomas Petazzoni wrote:

> > >> Maybe add a big fat warning that the bindings are unstable, and the DT
> > >> blob must be kept in sync with the kernel?
> > >
> > > +1 and feel free to blame the lack of documentation.  No one can expect
> > > bindings to be finalized when the chip topology is not fully understood.
> > 
> > I can understand not understanding the full clock tree. I have "full"
> > documentation of a Marvell chip and don't understand the clock tree
> > fully. But I can't believe you don't have some sense of how many
> > clocks you have to deal with. 10? 100? 1000? What I see is 2 nodes of
> > a single register each for clocks at roughly the same address. That
> > tells me your binding is too fine grained. If you really don't know
> > what is right, then err on the side of a single clock provider node
> > and don't put the clock details in DT.
> 
> I don't quite understand the reasoning behind this conclusion. We know
> for sure that those two registers control only those core and ring
> clocks. Maybe there are other registers controlling other clocks,  that
> we don't know. But for sure, those two registers only give details
> about those core and ring clocks, so I don't see what would be the
> usefulness of merging that into a single DT node.
> 
> We would lose the fact that the relationship between the ring clocks
> and one of the core clock is represented in the DT. Instead of having a
> clear <&coreclk X> or <&ringclk Y> reference, we would have a
> mysterious <&allclk XYZ> reference, which doesn't tell immediately
> whether it's a core clock or ring clock.
> 
> So, while I definitely agree that a syscon is probably in order to
> cover all the system registers, I don't see the point of having a
> single node to cover all the clocks.

So, I had a discussion with Marvell engineers and a closer look at the
matter. It turns out that those two clock registers are in the middle
of an area called DFX (Design for Testability), which contain registers
to fine tune the silicon and detect manufacturing issues. This area of
registers is most likely never going to be publicly documented, and the
fact that those two clock-related registers were placed there was more
an oversight than a real architecture choice.

For this reason, there is in fact no real benefit in mapping the entire
area using a syscon, and having the two DT nodes for the core clocks
and ring clocks, mapping just their own registers is by far the
simplest solution considering the register layout.

We would prefer to keep things as proposed in terms of DT
representation, with the understanding that the submission of the Linux
support for this platform comes very early in the chip development
cycle, and that as such, the DT bindings should be considered unstable.

Thanks a lot,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2016-02-23 15:56 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15  7:34 [PATCH 0/3] clk: mvebu: initial support for AP806 clocks Thomas Petazzoni
2016-02-15  7:34 ` Thomas Petazzoni
2016-02-15  7:34 ` [PATCH 1/3] clk: unconditionally recurse into clk/mvebu/ Thomas Petazzoni
2016-02-15  7:34   ` Thomas Petazzoni
2016-02-15  7:34   ` Thomas Petazzoni
2016-02-15  8:33   ` Marcin Wojtas
2016-02-15  8:33     ` Marcin Wojtas
2016-02-15  8:33     ` Marcin Wojtas
2016-02-15 11:06     ` Gregory CLEMENT
2016-02-15 11:06       ` Gregory CLEMENT
2016-02-15 11:06       ` Gregory CLEMENT
2016-02-15  7:34 ` [PATCH 2/3] clk: mvebu: add AP806 core clock driver Thomas Petazzoni
2016-02-15  7:34   ` Thomas Petazzoni
2016-02-15  7:34   ` Thomas Petazzoni
2016-02-22  2:53   ` Rob Herring
2016-02-22  2:53     ` Rob Herring
2016-02-22  8:14     ` Thomas Petazzoni
2016-02-22  8:14       ` Thomas Petazzoni
2016-02-22 14:16       ` Andrew Lunn
2016-02-22 14:16         ` Andrew Lunn
2016-02-22 14:16         ` Andrew Lunn
2016-02-22 18:32         ` Michael Turquette
2016-02-22 18:32           ` Michael Turquette
2016-02-22 18:32           ` Michael Turquette
2016-02-22 19:42           ` Rob Herring
2016-02-22 19:42             ` Rob Herring
2016-02-22 20:23             ` Michael Turquette
2016-02-22 20:23               ` Michael Turquette
2016-02-22 20:23               ` Michael Turquette
2016-02-23  9:25             ` Thomas Petazzoni
2016-02-23  9:25               ` Thomas Petazzoni
2016-02-23 15:56               ` Thomas Petazzoni [this message]
2016-02-23 15:56                 ` Thomas Petazzoni
2016-02-15  7:34 ` [PATCH 3/3] clk: mvebu: add AP806 ring " Thomas Petazzoni
2016-02-15  7:34   ` Thomas Petazzoni
2016-02-22  2:54   ` Rob Herring
2016-02-22  2:54     ` Rob Herring
2016-02-22  8:15     ` Thomas Petazzoni
2016-02-22  8:15       ` Thomas Petazzoni
2016-02-15 23:31 ` [PATCH 0/3] clk: mvebu: initial support for AP806 clocks Michael Turquette
2016-02-15 23:31   ` Michael Turquette
2016-02-15 23:31   ` Michael Turquette
2016-02-15 23:36   ` Michael Turquette
2016-02-15 23:36     ` Michael Turquette
2016-02-15 23:36     ` Michael Turquette
2016-02-17 14:23     ` Thomas Petazzoni
2016-02-17 14:23       ` Thomas Petazzoni

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=20160223165603.74576dca@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=alior@marvell.com \
    --cc=andrew@lunn.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=gregory.clement@free-electrons.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@baylibre.com \
    --cc=nadavh@marvell.com \
    --cc=pawel.moll@arm.com \
    --cc=robh@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=yehuday@marvell.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.