From: Mark Rutland <mark.rutland@arm.com>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: Wolfram Sang <wsa@the-dreams.de>,
Thierry Reding <treding@nvidia.com>,
Stephen Warren <swarren@nvidia.com>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
linux-i2c@vger.kernel.org,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [RFC] i2c: device-tree: Handling child nodes which are not i2c devices
Date: Tue, 3 May 2016 16:30:25 +0100 [thread overview]
Message-ID: <20160503153024.GB6850@leverpostej> (raw)
In-Reply-To: <57110A35.2070509@nvidia.com>
On Fri, Apr 15, 2016 at 04:35:17PM +0100, Jon Hunter wrote:
> Hi all,
>
> For Tegra we have an i2c device for display port, namely the display
> port auxiliary channel (or dpaux) as specified by the display port
> standard. If an design using Tegra does not utilise the display port
> interface, then the pads assigned to the dpaux can be re-assigned to
> another generic i2c controller (i2c6 for Tegra124/210). In other words,
> the pads can be re-used for a generic i2c interface.
>
> The registers that control whether the pads are mapped to the dpaux or
> i2c6 are located in the dpaux register space. Therefore, I am looking at
> adding pin controller support for dpaux so that i2c6 can request these
> pads if it is enabled and I was hoping to add a pinmux node the to dpaux
> device in device-tree to do this. For example, something like ...
>
> dpaux@0,545c0000 {
> ...
>
> /* pinctrl node */
> pinmux {
> ...
> };
> };
>
> Although the above works, when doing this I noticed that when the device
> booted, I would seeing the following error messages on boot ...
>
> i2c i2c-5: of_i2c: modalias failure on ...
>
> These error messages being caused by the new pinmux node because it is
> not recognised as an i2c device. To avoid this error messages we have
> come up with a couple solutions but wanted to get some feedback on the
> best approach.
>
> 1. Add a i2c-bus sub-node to the dpaux binding (suggested by Stephen
> Warren), so we would have something like the below. Then i2c devices
> for dpaux would be place in the i2c-bus sub-node.
>
> dpaux@0,545c0000 {
> ...
>
> /* pinctrl node */
> pinmux {
> ...
> };
>
> /* place-holder for i2c devices */
> i2c-bus {
> ...
> };
> };
>From a binding perspective, this makes the most sense to me.
I believe we have variants of this (container nodes for actual busses
owned by a controller) in practice today elsewhere.
> To make the above work ideally we would like to make the 'i2c-bus'
> node a generic solution for all i2c devices, so the i2c core would
> check for the presence of this node and if it is found then would
> default to this node for looking for i2c-devices.
I don't have strong opinions on this (having a generic subnode name for
the actual bus exposed by a controller) either way.
I can imagine that it would be possible for a single controller to
expose multiple I2C (or other) busses, so it might make sense for this
to be the preferred style, but not necessarily enforeced as a generic
binding.
Thanks,
Mark
next prev parent reply other threads:[~2016-05-03 15:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-15 15:35 [RFC] i2c: device-tree: Handling child nodes which are not i2c devices Jon Hunter
2016-04-25 14:51 ` Jon Hunter
[not found] ` <571E2EE4.90104-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-25 15:51 ` Stephen Warren
2016-05-03 15:16 ` Jon Hunter
2016-05-03 15:30 ` Mark Rutland [this message]
[not found] ` <57110A35.2070509-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-08-01 9:19 ` Tomeu Vizoso
[not found] ` <CAAObsKC-DGH4GedCcZdv2zvesaTSo6ugsHSQU=J0=P1cZeyCDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-01 9:41 ` Peter Rosin
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=20160503153024.GB6850@leverpostej \
--to=mark.rutland@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=swarren@nvidia.com \
--cc=treding@nvidia.com \
--cc=wsa@the-dreams.de \
/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).