From: Simon Horman <horms@verge.net.au>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 01/20] clk: shmobile: r8a7779: Add clocks support
Date: Fri, 14 Mar 2014 00:38:09 +0000 [thread overview]
Message-ID: <20140314003808.GD28137@verge.net.au> (raw)
In-Reply-To: <28465199.RhyHDRhTSc@avalon>
On Thu, Mar 13, 2014 at 10:07:45AM +0100, Laurent Pinchart wrote:
> Hi Simon,
>
> On Thursday 13 March 2014 11:22:47 Simon Horman wrote:
> > On Wed, Mar 12, 2014 at 11:12:02AM +0100, Laurent Pinchart wrote:
> > > On Wednesday 12 March 2014 16:55:23 Simon Horman wrote:
> > > > On Wed, Feb 26, 2014 at 02:02:37PM +0100, Laurent Pinchart wrote:
> > > > On Wednesday 26 February 2014 13:53:17 Laurent Pinchart wrote:
> > > > > > On Wednesday 26 February 2014 16:33:17 Simon Horman wrote:
> > > > > > > The R8A7779 SoC has several clocks that are too custom to be
> > > > > > > supported in a generic driver. Those clocks can be divided in two
> > > > > > > categories:
> > > > > > >
> > > > > > > - Fixed rate clocks with multiplier and divisor set according to
> > > > > > > boot mode configuration
> > > > > > >
> > > > > > > - Custom divider clocks with SoC-specific divider values
> > > > > > >
> > > > > > > This driver supports both.
> > > > > >
> > > > > > Looking at the R8A7779 datasheet it looks like we only have fixed
> > > > > > rate clocks, without any configurable divider clock. Did I miss
> > > > > > something ?
> > > >
> > > > Sorry, its a cut-and past error on my part.
> > > > I will revise the changelog.
> > > >
> > > > > > > Based on work for R-Car Gen2 SoCs by Laurent Pinchart.
> > > > > > >
> > > > > > > Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > > > > > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > > > > > >
> > > > > > > ---
> > > > > > > v3
> > > > > > > * As suggested by Laurent Pinchart
> > > > > > >
> > > > > > > - Added external clock input
> > > > > > > - Use PLLA ratio set bu MD11 and MD12
> > > > > > > - Add _div suffixes of fields of struct cpt_clk_config
> > > > > > > - Register PLLA as a fixed factor clock
> > > > > > > - Use sizeof() instead of sizeof
> > > > > > > - Use num_clks instead of CPG_NUM_CLOCKS in
> > > > > > > r8a7779_cpg_clocks_init()
> > > > > > >
> > > > > > > - I kept this as r8a7779 binding rather than moving to a R-Car
> > > > > > > Gen1 binding which could be shared with other SoCs as I do not
> > > > > > > believe that the SoCs is are sufficiently similar.
> > > > > >
> > > > > > I had a look at the M1 datasheet and I still find its CPG very
> > > > > > similar with the H1 CPG. The PLLA multiplier and divider are
> > > > > > different, but if you look closely, they're both exactly twice the
> > > > > > value compared to H1, so there's no difference in practice.
> > > > > >
> > > > > > What differences do you see that would make it impractical to share
> > > > > > a single driver for both ?
> > > >
> > > > Thanks for pointing that out. Looking over the M1 datasheet again I
> > > > agree with you that there does seem to be rather a lot of similarities
> > > > with the H1. And I agree that it is likely that the driver could be
> > > > shared.
> > > >
> > > > However, I'd like to leave that as future work at this time.
> > > >
> > > > The reason for this is that on the one hand I believe such work sould be
> > > > done in conjunctin with integrating the driver on the bockw board.
> > > > And that seems to be non-trivial to me.
> > >
> > > We can always rename the driver later, that's not a big issue, but we
> > > can't change compatibility strings. I would thus like to see
> > > "renesas,rcar-gen1-cpg-clocks" listed in the DT bindings.
> >
> > I know that we have done such things in the past but these days I feel that
> > it is a bit contentious as it is a binding for a software abstraction
> > rather than the hardware. And as far as I know bindings are supposed to
> > describe the hardware.
>
> Sure, and I consider rcar-gen1-cpf is a hardware description. We have two
> generations of SoCs in the R-Car series so far, the first generation (H1 and
> M1) and the second generation (H2 and M2). The second generation is even
> explictly named as such in the M2 datasheet. SoCs within a generation share
> hardware characteristics, and it makes sense to reflect that in compatible
> strings.
I think that if it is documented, as it is for R-Car Gen 2, then
this is entirely reasonable and I agree that it describes the hardware.
However, if it is not documented I don't think that we can make assumptions
and thus I don't think it is appropriate for R-Car Gen 1.
next prev parent reply other threads:[~2014-03-14 0:38 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-26 7:33 [PATCH v3 00/20] ARM: shmobile: r8a7779, marzen: CCF and multiplatform Simon Horman
2014-02-26 7:33 ` [PATCH v3 01/20] clk: shmobile: r8a7779: Add clocks support Simon Horman
2014-02-26 8:05 ` Geert Uytterhoeven
2014-02-26 8:59 ` Simon Horman
2014-02-26 9:06 ` Geert Uytterhoeven
2014-02-28 1:35 ` Simon Horman
2014-02-26 12:53 ` Laurent Pinchart
2014-02-26 13:02 ` Laurent Pinchart
2014-03-12 7:55 ` Simon Horman
2014-03-12 10:12 ` Laurent Pinchart
2014-03-13 2:22 ` Simon Horman
2014-03-13 9:07 ` Laurent Pinchart
2014-03-14 0:38 ` Simon Horman [this message]
2014-03-01 13:50 ` Wolfram Sang
2014-03-01 17:33 ` Geert Uytterhoeven
2014-03-02 11:35 ` Laurent Pinchart
2014-03-02 11:51 ` Geert Uytterhoeven
2014-03-02 11:59 ` Wolfram Sang
2014-02-26 7:33 ` [PATCH v3 02/20] clk: shmobile: r8a7779: Add MSTP clock support Simon Horman
2014-02-26 12:53 ` Laurent Pinchart
2014-02-26 7:33 ` [PATCH v3 03/20] ARM: shmobile: r8a7779: Add clock index macros for DT sources Simon Horman
2014-02-26 12:56 ` Laurent Pinchart
2014-02-26 7:33 ` [PATCH v3 04/20] ARM: shmobile: r8a7779: Add clocks Simon Horman
2014-02-26 8:13 ` Geert Uytterhoeven
2014-02-26 8:55 ` Simon Horman
2014-02-26 13:15 ` Laurent Pinchart
2014-03-12 8:40 ` Simon Horman
2014-02-26 14:45 ` Laurent Pinchart
2014-03-12 8:43 ` Simon Horman
2014-03-01 14:29 ` Wolfram Sang
2014-02-26 7:33 ` [PATCH v3 05/20] ARM: shmobile: Sync Marzen DTS with Marzen reference DTS Simon Horman
2014-02-26 13:17 ` Laurent Pinchart
2014-02-26 7:33 ` [PATCH v3 06/20] ARM: shmobile: marzen: Specify external clock frequency in DT Simon Horman
2014-02-26 13:19 ` Laurent Pinchart
2014-02-26 7:33 ` [PATCH v3 07/20] ARM: shmobile: marzen: Reference clocks Simon Horman
2014-02-26 13:20 ` Laurent Pinchart
2014-02-26 14:23 ` Sergei Shtylyov
2014-03-13 0:09 ` Simon Horman
2014-02-26 7:33 ` [PATCH v3 08/20] ARM: shmobile: r8a7779: " Simon Horman
2014-02-26 13:21 ` Laurent Pinchart
2014-02-26 7:33 ` [PATCH v3 09/20] ARM: shmobile: r8a7779: Add helper to read mode pins Simon Horman
2014-02-26 7:33 ` [PATCH v3 10/20] ARM: shmobile: r8a7779: Move r8a7779_earlytimer_init to clock-r8a7779.c Simon Horman
2014-02-26 7:33 ` [PATCH v3 11/20] ARM: shmobile: marzen-reference: Move clock and OF device initialisation into board Simon Horman
2014-02-26 7:33 ` [PATCH v3 12/20] ARM: shmobile: r8a7779: Do not include sh_clk.h in r8a7779.h Simon Horman
2014-02-26 7:33 ` [PATCH v3 13/20] ARM: shmobile: r8a7779: Initial multiplatform support Simon Horman
2014-02-26 7:33 ` [PATCH v3 14/20] ARM: shmobile: marzen-reference: Initialize CPG device Simon Horman
2014-02-26 13:22 ` Laurent Pinchart
2014-02-26 7:33 ` [PATCH v3 15/20] ARM: shmobile: marzen-reference: Instantiate clkdevs for SCIF and TMU Simon Horman
2014-02-26 8:29 ` Geert Uytterhoeven
2014-02-26 8:56 ` Simon Horman
2014-02-26 13:24 ` Laurent Pinchart
2014-03-13 0:03 ` Simon Horman
2014-02-26 7:33 ` [PATCH v3 16/20] ARM: shmobile: marzen: Add to shmobile defconfig Simon Horman
2014-02-26 7:33 ` [PATCH v3 17/20] ARM: shmobile: Remove non-multiplatform Marzen reference support Simon Horman
2014-02-26 7:33 ` [PATCH v3 18/20] ARM: shmobile: Let Marzen multiplatform boot with Marzen DTB Simon Horman
2014-02-26 7:33 ` [PATCH v3 19/20] ARM: shmobile: Remove Marzen reference DTS Simon Horman
2014-02-26 7:33 ` [PATCH v3 20/20] ARM: shmobile: marzen-reference: Remove legacy clock support Simon Horman
2014-02-26 8:33 ` Geert Uytterhoeven
2014-02-26 8:57 ` Simon Horman
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=20140314003808.GD28137@verge.net.au \
--to=horms@verge.net.au \
--cc=linux-arm-kernel@lists.infradead.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).