linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 5/6] clocksource: armada-370-xp: Fix device-tree binding
Date: Mon, 19 Aug 2013 13:39:49 -0300	[thread overview]
Message-ID: <20130819163948.GA22511@localhost> (raw)
In-Reply-To: <1459049.v9II6MKhh6@flatron>

On Mon, Aug 19, 2013 at 01:01:12AM +0200, Tomasz Figa wrote:
> On Monday 19 of August 2013 01:33:18 Sebastian Hesselbarth wrote:
> > On 08/17/2013 06:43 PM, Ezequiel Garcia wrote:
> > > On Sat, Aug 17, 2013 at 02:29:28PM +0200, Sebastian Hesselbarth wrote:
> > > 
> > > In fact: I'm not sure. I'm slightly inclined towards considering both
> > > clocks as clock sources, just as Stephen and Tomasz are proposing.
> > > 
> > >> But in the end, passing it by DT should be the way to go. I cannot
> > >> look
> > >> into the XP datasheet, but I would guess that the exact feature of
> > >> the
> > >> ip is not to use _the_ fixed 25MHz clock but XTAL as reference. Maybe
> > >> one of the free-electrons guys can look it up?
> > > 
> > > No, the documentation has a register bit for "25Mhz frequency enable",
> > > for each timer/watchdog.
> > > 
> > > ---
> > > 
> > > Anyway, I (almost) agree that the 25Mhz fixed clock must be somehow
> > > represented in the device-tree, but I'm not exactly sure how.
> > > Gregory: maybe you can help in this?
> > 
> > In armada-370-xp.dtsi add a 25MHz ref clock node and modify timer node
> > to reference it:
> > 
> > cpus { ... };
> > 
> > clocks {
> > 	ref25M: timer-clock {
> > 		compatible = "fixed-clock";
> > 		clock-frequency = <25000000>;
> > 	};
> > }
> > 
> > ...
> > 
> > internal-regs {
> > 	timer at 20300 {
> > 		compatible = "marvell,armada-370-xp-timer";
> > 		reg = <0x20300 0x30>, <0x21040 0x30>;
> > 		interrupts = <37>, <38>, <39>, <40>, <5>, <6>;
> > 		clocks = <&coreclk 2>, <&ref25M>;
> > 		clock-names = "fabric", "fixed";
> 
> These names look more like SoC-level clock names, not clock input names of 
> the IP. Are they referenced by such names in documentation?
> 

The L2/Coherency fabric clock is called "nbclk" both in marvell's documentation
and in Documentation/device-tree/binding/clock/mvebu-core-clock.txt.

The 25 MHz clock is (very scarcely) called "refclk".

> > 	};
> > };
> > 
> > Then use of_clk_get_by_name(np, "fabric") and of_clk_get_by_name(np,
> > "fixed") respectively. Clock select strategy should be, (a) fail if
> > no clock, (b) use fabric/fixed if just one clock, (c) use fixed if
> > both clocks.
> 
> This basically sounds good, except those names.
> 

Okey, I've just sent a new patchset, on top of the previous (already
applied) work.

Feel free to comment on that.

Sebastian: Thanks a lot for suggesting this!
-- 
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

  reply	other threads:[~2013-08-19 16:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13 14:43 [PATCH v4 0/6] Armada 370/XP clocksource fixes Ezequiel Garcia
2013-08-13 14:43 ` [PATCH v4 1/6] clocksource: armada-370-xp: Use BIT() Ezequiel Garcia
2013-08-13 14:43 ` [PATCH v4 2/6] clocksource: armada-370-xp: Simplify TIMER_CTRL register access Ezequiel Garcia
2013-08-13 14:43 ` [PATCH v4 3/6] clocksource: armada-370-xp: Use CLOCKSOURCE_OF_DECLARE Ezequiel Garcia
2013-08-13 14:43 ` [PATCH v4 4/6] clocksource: armada-370-xp: Introduce new compatibles Ezequiel Garcia
2013-08-13 14:43 ` [PATCH v4 5/6] clocksource: armada-370-xp: Fix device-tree binding Ezequiel Garcia
2013-08-14 15:26   ` Mark Rutland
2013-08-15 16:27     ` Ezequiel Garcia
2013-08-16 23:29       ` Stephen Warren
2013-08-17 12:09         ` Tomasz Figa
2013-08-17 12:29           ` Sebastian Hesselbarth
2013-08-17 12:34             ` Tomasz Figa
2013-08-17 16:43             ` Ezequiel Garcia
2013-08-18 23:33               ` Sebastian Hesselbarth
2013-08-18 23:01                 ` Tomasz Figa
2013-08-19 16:39                   ` Ezequiel Garcia [this message]
2013-08-19  1:35                 ` Ezequiel Garcia
2013-08-17 16:38         ` Ezequiel Garcia
2013-08-13 14:43 ` [PATCH v4 6/6] ARM: mvebu: Fix the Armada 370/XP timer compatible strings Ezequiel Garcia
2013-08-13 19:26   ` Jason Cooper
2013-08-13 16:22 ` [PATCH v4 0/6] Armada 370/XP clocksource fixes Daniel Lezcano
2013-08-13 16:52   ` Jason Cooper
2013-08-13 17:48     ` Daniel Lezcano
2013-08-13 17:58       ` Jason Cooper
2013-08-13 18:04         ` Daniel Lezcano
2013-08-13 18:08           ` Jason Cooper
2013-08-20 12:44   ` Ezequiel Garcia

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=20130819163948.GA22511@localhost \
    --to=ezequiel.garcia@free-electrons.com \
    --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).