[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150304163935.GO4911@lukather>
Date: Wed, 4 Mar 2015 17:39:35 +0100
From: Maxime Ripard <maxime.ripard@...e-electrons.com>
To: Chen-Yu Tsai <wens@...e.org>
Cc: Wolfram Sang <wsa@...-dreams.de>, Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>, linux-i2c@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-sunxi@...glegroups.com,
Hans de Goede <hdegoede@...hat.com>,
Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v2 2/4] i2c: sunxi: Add Reduced Serial Bus (RSB) DT
bindings documentation
On Mon, Mar 02, 2015 at 04:24:44PM +0800, Chen-Yu Tsai wrote:
> Reduced Serial Bus (RSB) is an SMBus like bus used to communicate
> with some PMICs (like the AXP223) or other peripherals.
>
> The RSB DT bindings are pretty much the same as the one defined for
> the marvell's mv64xxx controller, with the additional RSB specific
> "allwinner,rsb-hw-addr" property for slave device nodes.
>
> There are 2 types of addresses for RSB devices, a hardware address
> and a runtime (software) configurable address. The former is only
> used when configuring the latter. All read/write accesses use the
> runtime address.
>
> It would seem straightforward to use the hardware address in the
> DT bindings as the slave's address. However this will not work as
> the hardware address is 12 bits wide, and at least 1 device, the
> AC100 audio codec, has the highest bit set. This address would be
> incompatible with I2C (7 or 10 bit addresses) and likely rejected.
>
> Hence this binding uses statically allocated (by the author of the
> DT) runtime addresses for the slave's "reg" property. The hardware
> address is put in a separete named property. When writing a new DT,
^ separate
> the author must take care to not have multiple slave devices use
> the same address. It is recommended to follow whatever conventions
> the hardware vendor uses.
While very complete, the three last paragraphs should rather be, or at
least duplicated, in the file itself.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists