All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Subject: Re: [PATCH v2 2/4] i2c: sunxi: Add Reduced Serial Bus (RSB) DT bindings documentation
Date: Wed, 4 Mar 2015 17:39:35 +0100	[thread overview]
Message-ID: <20150304163935.GO4911@lukather> (raw)
In-Reply-To: <1425284686-5116-3-git-send-email-wens-jdAy2FN1RRM@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1591 bytes --]

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

WARNING: multiple messages have this Message-ID (diff)
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/4] i2c: sunxi: Add Reduced Serial Bus (RSB) DT bindings documentation
Date: Wed, 4 Mar 2015 17:39:35 +0100	[thread overview]
Message-ID: <20150304163935.GO4911@lukather> (raw)
In-Reply-To: <1425284686-5116-3-git-send-email-wens@csie.org>

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150304/0c8967a8/attachment.sig>

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Wolfram Sang <wsa@the-dreams.de>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	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 <hdegoede@redhat.com>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v2 2/4] i2c: sunxi: Add Reduced Serial Bus (RSB) DT bindings documentation
Date: Wed, 4 Mar 2015 17:39:35 +0100	[thread overview]
Message-ID: <20150304163935.GO4911@lukather> (raw)
In-Reply-To: <1425284686-5116-3-git-send-email-wens@csie.org>

[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2015-03-04 16:39 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02  8:24 [PATCH v2 0/4] i2c: sunxi: Add Reduced Serial Bus (RSB) support Chen-Yu Tsai
2015-03-02  8:24 ` Chen-Yu Tsai
2015-03-02  8:24 ` Chen-Yu Tsai
     [not found] ` <1425284686-5116-1-git-send-email-wens-jdAy2FN1RRM@public.gmane.org>
2015-03-02  8:24   ` [PATCH v2 1/4] " Chen-Yu Tsai
2015-03-02  8:24     ` Chen-Yu Tsai
2015-03-02  8:24     ` Chen-Yu Tsai
     [not found]     ` <1425284686-5116-2-git-send-email-wens-jdAy2FN1RRM@public.gmane.org>
2015-03-04 16:53       ` Maxime Ripard
2015-03-04 16:53         ` Maxime Ripard
2015-03-04 16:53         ` Maxime Ripard
2015-03-04 17:27       ` Wolfram Sang
2015-03-04 17:27         ` Wolfram Sang
2015-03-04 17:27         ` Wolfram Sang
2015-03-05 18:28         ` Maxime Ripard
2015-03-05 18:28           ` Maxime Ripard
2015-03-05 18:28           ` Maxime Ripard
2015-03-05 18:40           ` Wolfram Sang
2015-03-05 18:40             ` Wolfram Sang
2015-03-05 18:40             ` Wolfram Sang
2015-03-05 22:08             ` Maxime Ripard
2015-03-05 22:08               ` Maxime Ripard
2015-03-06  6:36               ` Wolfram Sang
2015-03-06  6:36                 ` Wolfram Sang
2015-03-06  6:36                 ` Wolfram Sang
2015-03-02  8:24   ` [PATCH v2 2/4] i2c: sunxi: Add Reduced Serial Bus (RSB) DT bindings documentation Chen-Yu Tsai
2015-03-02  8:24     ` Chen-Yu Tsai
2015-03-02  8:24     ` Chen-Yu Tsai
     [not found]     ` <1425284686-5116-3-git-send-email-wens-jdAy2FN1RRM@public.gmane.org>
2015-03-04 16:39       ` Maxime Ripard [this message]
2015-03-04 16:39         ` Maxime Ripard
2015-03-04 16:39         ` Maxime Ripard
2015-03-02  8:24   ` [PATCH v2 3/4] ARM: dts: sun8i: Add Reduced Serial Bus controller device node to A23 dtsi Chen-Yu Tsai
2015-03-02  8:24     ` Chen-Yu Tsai
2015-03-02  8:24     ` Chen-Yu Tsai
2015-03-02  8:24   ` [PATCH v2 4/4] ARM: dts: sun8i: ippo-q8h-v5: Enable Reduced Serial Bus controller Chen-Yu Tsai
2015-03-02  8:24     ` Chen-Yu Tsai
2015-03-02  8:24     ` Chen-Yu Tsai

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=20150304163935.GO4911@lukather \
    --to=maxime.ripard-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=wens-jdAy2FN1RRM@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.