From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934380AbbCDQkK (ORCPT ); Wed, 4 Mar 2015 11:40:10 -0500 Received: from down.free-electrons.com ([37.187.137.238]:48792 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933130AbbCDQkE (ORCPT ); Wed, 4 Mar 2015 11:40:04 -0500 Date: Wed, 4 Mar 2015 17:39:35 +0100 From: Maxime Ripard To: Chen-Yu Tsai Cc: Wolfram Sang , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, Hans de Goede , Arnd Bergmann Subject: Re: [PATCH v2 2/4] i2c: sunxi: Add Reduced Serial Bus (RSB) DT bindings documentation Message-ID: <20150304163935.GO4911@lukather> References: <1425284686-5116-1-git-send-email-wens@csie.org> <1425284686-5116-3-git-send-email-wens@csie.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KM+e2hnYAO+MCJ5e" Content-Disposition: inline In-Reply-To: <1425284686-5116-3-git-send-email-wens@csie.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --KM+e2hnYAO+MCJ5e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > 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 --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --KM+e2hnYAO+MCJ5e Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJU9zVHAAoJEBx+YmzsjxAgNmcP/R+xiyRspES/g8b+8FHgKRCY t3+J16QCbeha/nKeVC7E63blZzdxpR59vO/z+LrvgWPjnX2oF9PcNxmP0pJTx4fZ tjgNQYfR/AsM8/S7nLTwtm6BuGtvnNh0II+JwTSa4dXKMCTze1hfCzDzB0vq9RD6 BXqf5/+r7EjgES1Bluz57ioiOVwXzwCED6EfLRrpODMnaQhNECHyp/+2Z7BSeYGS OlmFUj2Ate9hPyvfbkHkGbU5z3ZA9K4AGh0aq0sLQgrtoAXCtZudRbefv3lh3ygb ed0jp5kizL2t/Hl/tw+2mlHLMiAvPlsr14iZTWzLlXriyDRjAxYA++UGCJMc3rqW teEuxUWoFaJLAukYL/rAjkIRQZcd4meEKuerp1svHLV+p0A4RqgcdjAhSz8ANmy0 HSMcvTP76DuTdbl8iRcX/+WBdQh4iw6xDLvTaw6QcNt4oE0krtUjuQP2S2cFSicJ NtL54crvYYp6KMdi3fC5wzVtBFNytpcm1IUZm2OvzFzZPZJglOMZEfjWJ0pqW9Se rnRG8uCuPBrbAlTQS10qBxN0S7xKLATdKqSWUgobxbSLq6+QII/2+BImQQBwmM+r ef6kRLYjQKOHkJDFqWvKFvH+U12IadAXm5hkTiopboYhAv5UsdlhBAHFiaNzMav0 kyMx07hAby/dbA4je4Se =bK9k -----END PGP SIGNATURE----- --KM+e2hnYAO+MCJ5e--