From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [RFC 0/4] prototype: switch I2C IP cores at runtime
Date: Sat, 14 Mar 2015 14:37:45 +0000 [thread overview]
Message-ID: <2317733.HsD3XeDrul@avalon> (raw)
In-Reply-To: <1418674817-12809-1-git-send-email-wsa@the-dreams.de>
Hi Geert,
On Monday 05 January 2015 15:28:09 Geert Uytterhoeven wrote:
> On Mon, Dec 15, 2014 at 9:20 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> > Some SoC (like Renesas RCar Gen2) have different I2C IP cores with
> > different feature sets. This is an experimental patch series to let those
> > different IP cores access the same I2C bus at runtime. Finally, we have
> > some code to talk
>
> Thanks for your series!
>
> > about :) Unlike previous sketched versions, this one does not require a
> > remove/probe-cycle of I2C bus drivers which would mean complete
> > reinitialization of all connected I2C clients. However, the first two
> > patches
>
> Not having to remove/probe all slaves is great!
>
> > need serious discussion. So, have a look if you are interested...
>
> I don't really have comments about the first two patches, as they are
> "implementation details".
>
> I'm mostly approaching this from the DT point of view, as DT describes the
> hardware, so the description should reflect the actual hardware topology as
> closely as possible.
>
> Currently DT describes (let's keep using i2c as an example):
> - one ore more i2c masters (in .dtsi),
> - an i2c bus (in .dts), which is a child of one particular i2c master
> node, - pinctrl (in .dts) to link the i2c bus to one particular i2c master.
>
> Obviously this does not match the hardware, as
> (1) pinctrl is dynamic, and
> (2) the i2c bus is not hard-tied to that specific i2c master instance.
>
> What does describe the hardware is:
> - one or more i2c masters (in .dtsi),
> - pinctrl for the i2c masters (tables/code under drivers/pinctrl/),
> - an i2c bus (in .dts), defined by actual pin connections,
> - pinctrl (in .dts) to link the pin connections used by the i2c bus to one
> default i2c master (is this needed?).
> With the above description, switching can be controlled from pinctrl,
> triggered by the user or by availability of drivers and/or QoS.
> Of course callbacks are needed to inform i2c masters (or the i2c subsystem
> if you want to avoid remove/probe-cycles) if a bus is moved to another
> master.
>
> Your "i2c-demux" in DT is actually a description of an i2c bus.
> But instead of linking it to pins, it contains a list of all i2c masters.
> If I want to add an i2c-gpio master, I'll have to add it to DT. That sounds
> insignificant, but (in theory) all I/O masters could be implemented using
> GPIO. So one day someone may implement an xxx-gpio driver for whatever bus,
> and I think it should be supported out-of-the-box. When using pins, and
> thus describing the i2c bus in a pin-centric way, that will just work.
>
> Notes: for other buses, it may be required to support using only a subset of
> all pins, depending on which SoC module is used. E.g.
> - A QSPI FLASH uses 4 wires in quad transfer mode, but only 2 in dual
> or single transfer mode, and not all SPI masters support quad transfer
> mode,
> - A serial port may or may not support RTS/CTS depending on the used
> serial module.
>
> So... let's hint "Send", wait and see...
For what it's worth, embedded audio has a similar issue with I2S busses that
can have multiple masters. We've discussed at the FOSDEM how this could be
represented in DT using the graph OF bindings, and concluded that we probably
need a DT node to represent the bus itself.
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2015-03-14 14:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 20:20 [RFC 0/4] prototype: switch I2C IP cores at runtime Wolfram Sang
2015-01-05 14:28 ` Geert Uytterhoeven
2015-03-14 11:43 ` Wolfram Sang
2015-03-14 14:37 ` Laurent Pinchart [this message]
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=2317733.HsD3XeDrul@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-sh@vger.kernel.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