From: Ben Dooks <ben.dooks-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
To: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>,
jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org,
grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
machael-QKn5cuLxLXY@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 7/9] I2C: MV64XXX: Add Device Tree support
Date: Tue, 26 Jun 2012 15:13:46 +0100 [thread overview]
Message-ID: <4FE9C39A.2080104@codethink.co.uk> (raw)
In-Reply-To: <20120626141047.GA18804-g2DYL2Zd6BY@public.gmane.org>
On 26/06/12 15:10, Andrew Lunn wrote:
> On Tue, Jun 26, 2012 at 03:03:56PM +0100, Ben Dooks wrote:
>> On 10/06/12 11:31, Andrew Lunn wrote:
>>> Extends the driver to get properties from device tree. Also extend the
>>> kirkwood DT support to supply the needed properties.
>>>
>>> Signed-off-by: Andrew Lunn<andrew-g2DYL2Zd6BY@public.gmane.org>
>>> ---
>>> Documentation/devicetree/bindings/i2c/mrvl-i2c.txt | 35 +++++++++++++++++-
>>> arch/arm/boot/dts/kirkwood.dtsi | 13 +++++++
>>> arch/arm/mach-kirkwood/board-dt.c | 2 ++
>>> drivers/i2c/busses/i2c-mv64xxx.c | 38 +++++++++++++++++---
>>> 4 files changed, 82 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt b/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt
>>> index b891ee2..89ef899 100644
>>> --- a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt
>>> +++ b/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt
>>> @@ -1,4 +1,4 @@
>>> -* I2C
>>> +* Marvell MMP I2C controller
>>>
>>> Required properties :
>>>
>>> @@ -32,3 +32,36 @@ Examples:
>>> interrupts =<58>;
>>> };
>>>
>>> +* Marvell MV64XXX I2C controller
>>> +
>>> +Required properties :
>>> +
>>> + - reg : Offset and length of the register set for the device
>>> + - compatible : should be "marvell,mv64xxx-i2c"
>>> + - interrupts : the interrupt number
>>> + - frequency-m : m factor in baud rate calculation
>>> +
>>> +Recommended properties :
>>> +
>>> + - frequency-n : n factor in baud rate calculation
>>> + - timeout-ms : How long to wait for a transaction to complete
>>> +
>>> +Baud Rate:
>>> +
>>> +The baud rate is calculated thus:
>>> +
>>> +Fscl = Ftclk
>>> + ------------------------------------------
>>> + (frequency-n + 1)
>>> + 10 *(frequency-m + 1) * 2
>>> +
>>> +Examples:
>>
>> I'd really rather see this calculated at run-time, given some
>> systems can quite easily change their clocks.
>
> Hi Ben
>
> Well, none of the Orion systems would make use of this. They all have
> fixed clocks.
>
> Maybe the new Armada XP systems could make use of clock scaling?
A couple of the development boards here have dip-switches to change
the clocks at start-time, and thus having something that does this
would be useful.
PS, for other people's info, this bounces to the i2c list due to the
use of 'xxx' in the title :(
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
next prev parent reply other threads:[~2012-06-26 14:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-10 10:31 [PATCH 7/9] I2C: MV64XXX: Add Device Tree support Andrew Lunn
[not found] ` <1339324322-29388-8-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>
2012-06-10 17:11 ` Jason Cooper
2012-06-26 14:03 ` Ben Dooks
[not found] ` <4FE9C14C.2030804-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
2012-06-26 14:10 ` Andrew Lunn
[not found] ` <20120626141047.GA18804-g2DYL2Zd6BY@public.gmane.org>
2012-06-26 14:13 ` Ben Dooks [this message]
2012-07-09 10:25 ` Wolfram Sang
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=4FE9C39A.2080104@codethink.co.uk \
--to=ben.dooks-4ydnlxn2s6swdatgbsphta@public.gmane.org \
--cc=andrew-g2DYL2Zd6BY@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=machael-QKn5cuLxLXY@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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).