linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: thierry.reding@gmail.com (Thierry Reding)
To: linux-arm-kernel@lists.infradead.org
Subject: [Ksummit-2013-discuss] ARM topic: Is DT on ARM the solution, or is there something better?
Date: Wed, 23 Oct 2013 23:07:16 +0200	[thread overview]
Message-ID: <20131023210715.GF8828@mithrandir> (raw)
In-Reply-To: <20131023160131.GA20675@roeck-us.net>

On Wed, Oct 23, 2013 at 09:01:31AM -0700, Guenter Roeck wrote:
> On Wed, Oct 23, 2013 at 09:57:58AM +0200, Thierry Reding wrote:
[...]
> > 	pic1i2c: i2c-controller {
> > 		...
> > 
> > 		eeprom at 55 {
> > 			/* insert all other properties here */
> > 		};
> > 	};
> > 
> If I add the above to the i2c controller node, the kernel will try to
> instantiate the eeprom when the system comes up. If no card is
> inserted at that time, this will fail. The above describes the devices
> which needs to be instantiated after a card is inserted into the connector,
> and only then (and removed when the card is pulled).
> In addition, I use the 'ideeprom' property to establish a callback
> to be able to read the eeprom contents and trigger loading the DT overlay.

That's an interesting setup and a pretty elegant solution.

> > But that breaks down once you start needing to represent more than just
> > a single EEPROM behind the connector.
> > 
> And if insertion is dynamic, triggered by card insertion.
> 
> There are actually several additional i2c devices on the same bus.
> To instantiate those I use devicetree overlays, but that is done
> after the eeprom is read and I know which overlay to load.

Yes, I see why you need something less traditional to pull that off. And
we should be able to describe that kind of setup using DT as well. The
world would of course be much better if this was all discoverable and we
didn't have to describe it in the first place...

> > > > > not the very least because DT isn't supported on x86 and I have to deal with
> > > > > that situation as well (and, no, ACPI doesn't solve my problems there either).
> > > > 
> > > > Actually DT is supported very well on x86. There's at least one platform
> > > > in mainline that uses it (arch/x86/platform/ce4100/falconfalls.dts) and
> > > > I've ported a platform that I worked on in the past to use DT on x86 as
> > > > well.
> > > > 
> > > But presumably that was DT only, or was it a system that needs to use
> > > DT on top of ACPI ? If so, I would be very interested in that experience,
> > > especially if you had any issues to get it working.
> > 
> > I'm not quite sure I understand what you mean by "on top of ACPI". The
> > device certainly did support ACPI, but I was using DT more as a
> > supplement to describe what ACPI and PCI couldn't.
> > 
> > To be somewhat more specific, the platform used an FPGA connected to the
> > chipset using PCIe. That itself was excellent because all of a sudden
> > devices were actually discoverable. So it was easy to just implement a
> > GPIO, SPI or I2C controller and whatnot within that FPGA, but once a
> > device behind SPI or I2C needed to be hooked up, you loose all benefits
> > from having something like PCI and you're back to square one.
> > 
> > One example where this became essential was that the touchscreen on the
> > device was controlled by an I2C chip, and the touchscreen controller's
> > interrupt pin was connected to the GPIO controller on the PCI bus. So
> > what we ended up with looked roughly something like this:
> > 
> > 	pci at 3fc {
> > 		[...bunch of nodes to describe PCI hierarchy...]
> > 
> > 		pci at 2,0 {
> > 			/* GPIO expander */
> > 			gpio: pci at 0,0 {
> > 				...
> > 				interrupt-controller;
> > 				...
> > 			};
> > 		};
> > 
> > 		[...more nodes...]
> > 
> > 		pci at 8,0 {
> > 			/* I2C controller */
> > 			pci at 0,0 {
> > 				touchscreen at 48 {
> > 					...
> > 					interrupt-parent = <&gpio>;
> > 					interrupts = <1 0x8>;
> > 					...
> > 				};
> > 			};
> > 		};
> > 	};
> > 
> > That's a *very* simplified form. The complete device tree is much more
> > complex because it requires the exact hierarchy of PCI to be represented
> > in order for the right device nodes to end up attached to the right PCI
> > devices.
> > 
> > But perhaps that doesn't help you at all with the problems that you've
> > encountered?
> > 
> Actually, the use case sounds pretty similar, so maybe you have solved the
> problem at least to some degree. In my case, I'll also need devicetree overlays,
> since I also need to be able to handle OIR capable cards, but that is a separate
> set of problems.
> 
> Was this just a matter of enabling OF on this platform, or do you have an
> out-of-tree set of patches ? If the latter, is it available somewhere
> to look at (including the complete devicetree from your above example) ?

It was mostly a matter of enabling OF and writing the device tree. Most
of the generic kernel code changes I even got merged, but there were a
few patches that I never got around to merge. Some weren't anywhere
close to a mergeable state either.

I no longer work for the company and don't have access to the patches.
But I can ping a few people and see if I can dig up something for you.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131023/0c67cd55/attachment.sig>

  reply	other threads:[~2013-10-23 21:07 UTC|newest]

Thread overview: 171+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-20 21:26 ARM topic: Is DT on ARM the solution, or is there something better? Stephen Warren
2013-10-20 22:08 ` [Ksummit-2013-discuss] " Mark Brown
2013-10-20 22:21   ` Stephen Warren
2013-10-21  1:00     ` Nicolas Pitre
2013-10-21  9:15       ` Thierry Reding
2013-10-21 14:57         ` Maxime Bizon
2013-10-21 17:07         ` Richard Cochran
2013-10-21 20:24           ` Stephen Warren
2013-10-22  9:24           ` Thierry Reding
2013-10-23 17:30             ` Richard Cochran
2013-10-23 19:06               ` Thierry Reding
2013-10-22 17:22           ` Jason Gunthorpe
2013-10-21 20:29       ` Stephen Warren
2013-10-21 20:40         ` Nicolas Pitre
2013-10-22  9:39           ` Thierry Reding
2013-10-22 15:04             ` Matt Porter
2013-10-22 17:13               ` Jason Gunthorpe
2013-10-22 17:49                 ` Guenter Roeck
2013-10-23  8:06                 ` Richard Cochran
2013-10-23  9:49                   ` Thierry Reding
2013-10-23 17:16                     ` Richard Cochran
2013-10-23 17:25                       ` Matt Porter
2013-10-23 18:05                         ` Richard Cochran
2013-10-23 18:57                           ` Nicolas Pitre
2013-10-23 20:12                           ` Matt Porter
2013-10-23 17:55                       ` Nicolas Pitre
2013-10-23 18:13                         ` Richard Cochran
2013-10-23 20:35                           ` Thierry Reding
2013-10-23 17:29                   ` Jason Gunthorpe
2013-10-23 17:45                     ` Richard Cochran
2013-10-23 18:46                       ` Maxime Bizon
2013-10-23 18:51                         ` Richard Cochran
2013-10-23 19:12                           ` Maxime Bizon
2013-10-24  9:52                         ` Grant Likely
2013-10-24 11:33                           ` Maxime Bizon
2013-10-24 11:47                             ` David Woodhouse
2013-10-24 12:13                               ` Maxime Bizon
2013-10-24 12:22                                 ` David Woodhouse
2013-10-24 12:22                                 ` David Woodhouse
2013-10-24 13:05                                   ` Maxime Bizon
2013-10-24 13:14                                     ` David Woodhouse
2013-10-24 13:46                                       ` Maxime Bizon
2013-10-24 19:52                                         ` Matt Porter
2013-10-24 20:11                                       ` Matt Sealey
2013-10-25  9:00                                 ` Stephen Warren
2013-10-24 12:23                               ` Thierry Reding
2013-10-24 12:29                                 ` David Woodhouse
2013-10-24 13:00                                 ` Maxime Bizon
2013-10-24 13:10                                   ` David Woodhouse
2013-10-24 13:30                                     ` Maxime Bizon
2013-10-24 14:05                                       ` David Woodhouse
2013-10-24 14:19                                         ` Thierry Reding
2013-10-24 14:30                                           ` David Woodhouse
2013-10-24 14:38                                             ` Thierry Reding
2013-10-24 16:39                                             ` Nicolas Pitre
2013-10-24 16:45                                               ` David Woodhouse
2013-10-24 17:08                                                 ` Nicolas Pitre
2013-10-24 18:15                                                 ` jonsmirl at gmail.com
2013-10-24 14:32                                           ` Richard Cochran
2013-10-24 14:47                                             ` Thierry Reding
2013-10-24 15:37                                             ` Nicolas Pitre
2013-10-24 14:33                                           ` Maxime Bizon
2013-10-24 14:57                                             ` Thierry Reding
2013-10-24 16:27                                         ` Nicolas Pitre
2013-10-24 14:12                                     ` Thierry Reding
2013-10-24 14:22                                       ` David Woodhouse
2013-10-24 14:23                                         ` Thierry Reding
2013-10-24 14:38                                           ` David Woodhouse
2013-10-24 14:58                                             ` Thierry Reding
2013-10-24 19:58                                         ` Matt Porter
2013-10-24 23:54                                       ` Grant Likely
2013-10-25  8:52                             ` Stephen Warren
2013-10-25  9:16                               ` Thierry Reding
2013-10-23 17:47                     ` Richard Cochran
2013-10-23 17:58                       ` Nicolas Pitre
2013-10-23 18:02                       ` Jason Gunthorpe
2013-10-23 18:23                         ` Richard Cochran
2013-10-24  8:34                           ` Thierry Reding
2013-10-24 15:00                             ` Richard Cochran
2013-10-24 19:46                               ` Matt Porter
2013-10-23 18:01                     ` Guenter Roeck
2013-10-23 18:25                       ` Jason Gunthorpe
2013-10-23 18:30                         ` Richard Cochran
2013-10-23 18:54                           ` Jason Gunthorpe
2013-10-24  8:06                             ` Sascha Hauer
2013-10-24  8:17                               ` Thierry Reding
2013-10-24  8:52                                 ` Sascha Hauer
2013-10-23 23:29                           ` Ben Hutchings
2013-10-24  7:32                             ` Richard Cochran
2013-10-24  9:35                               ` Ben Hutchings
2013-10-24 12:02                         ` Andre Heider
2013-10-24  8:01                     ` Sascha Hauer
2013-10-24  8:11                       ` Thierry Reding
2013-10-22 17:42               ` Nicolas Pitre
2013-10-22 18:21                 ` Peter Maydell
2013-10-22 18:36                   ` Nicolas Pitre
2013-10-22 19:16                   ` Guenter Roeck
2013-10-22 20:12                 ` Thierry Reding
2013-10-22 20:41                   ` Nicolas Pitre
2013-10-22 21:39                     ` Jason Gunthorpe
2013-10-23  8:50                     ` Thierry Reding
2013-10-23  9:02                     ` Thierry Reding
2013-10-22 20:42                   ` Matt Porter
2013-10-23 10:04                     ` Thierry Reding
2013-10-23 11:48                       ` Peter Maydell
2013-10-23 16:29                       ` Matt Porter
2013-10-22  6:47       ` David Brown
2013-10-20 23:11 ` Russell King - ARM Linux
2013-10-20 23:44   ` [Ksummit-2013-discuss] " Guenter Roeck
2013-10-20 23:51     ` Russell King - ARM Linux
2013-10-21  0:13       ` Guenter Roeck
2013-10-21 20:05     ` Stephen Warren
2013-10-22  9:45       ` Thierry Reding
2013-10-21  8:32   ` Sascha Hauer
2013-10-21  8:48     ` Russell King - ARM Linux
2013-10-21  9:27       ` Sascha Hauer
     [not found]         ` < CAF6AEGtt_2sStiZCNBp9btxevWghSwLZZBdN6ir8eUpX1FXrCQ@mail.gmail.com>
     [not found]           ` < 20131024072811.GS30088@pengutronix.de>
     [not found]             ` < CAF6AEGuEho9Ms7ifTE-EmBoQ-=_AXgvGcJxi5qEC0vsZ+H9C+A@mail.gmail.com>
2013-10-21  9:57         ` Russell King - ARM Linux
2013-10-21 10:24           ` Thierry Reding
2013-10-21 10:30             ` Russell King - ARM Linux
2013-10-21 10:41               ` Thierry Reding
2013-10-22  9:19             ` [Ksummit-2013-discuss] " Mark Brown
2013-10-21 20:09           ` Stephen Warren
2013-10-21 23:18           ` Sascha Hauer
2013-10-24  1:14         ` Rob Clark
2013-10-24  7:28           ` Sascha Hauer
2013-10-24  9:00             ` Thierry Reding
2013-10-24  9:21               ` Sascha Hauer
2013-10-24 21:21             ` Rob Clark
2013-10-25  9:24               ` Thierry Reding
2013-11-18 12:45               ` Russell King - ARM Linux
2013-11-18 15:37                 ` Thierry Reding
2013-11-18 16:11                   ` Russell King - ARM Linux
2013-11-18 16:18                     ` Thierry Reding
2013-11-18 18:43                     ` Mark Brown
2013-11-19 13:54                 ` Grant Likely
2013-10-21 10:04       ` Thierry Reding
2013-10-21 10:57       ` [Ksummit-2013-discuss] " Laurent Pinchart
2013-10-21 10:00   ` Laurent Pinchart
2013-10-21 11:18   ` Sebastian Hesselbarth
2013-10-21  8:54 ` Thierry Reding
2013-10-21 20:19   ` Stephen Warren
2013-10-21 22:51     ` [Ksummit-2013-discuss] " Guenter Roeck
2013-10-22 10:27       ` James Hogan
2013-10-22 16:31         ` Jonathan Cameron
2013-10-22 16:49           ` Guenter Roeck
2013-10-22 20:35             ` Thierry Reding
2013-10-22 21:10               ` Guenter Roeck
2013-10-23  7:57                 ` Thierry Reding
2013-10-23 16:01                   ` Guenter Roeck
2013-10-23 21:07                     ` Thierry Reding [this message]
2013-10-24 15:18                       ` Guenter Roeck
2013-11-01 10:36                         ` Thierry Reding
2013-11-01 13:30                           ` Guenter Roeck
2013-10-22 20:48         ` Thierry Reding
2013-10-22 10:25     ` Thierry Reding
2013-10-22 21:44 ` Matt Sealey
2013-10-23 11:41   ` Peter Maydell
2013-10-23 23:02     ` [Ksummit-2013-discuss] " Rob Herring
2013-11-18 12:26 ` Thierry Reding
2013-11-18 13:40   ` Grant Likely
2013-11-18 13:57     ` Mark Brown
2013-11-18 15:29       ` Thierry Reding
2013-11-18 15:50         ` Mark Brown
2013-11-18 16:06           ` Thierry Reding
2013-11-18 17:16             ` Stephen Warren
2013-11-19  9:35               ` Thierry Reding
2013-11-19 17:27                 ` Stephen Warren
2013-11-20 13:29                   ` Thierry Reding
2013-11-18 18:35             ` Mark Brown
2013-11-19  9:11               ` Thierry Reding
2013-11-19 10:16                 ` Mark Brown

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=20131023210715.GF8828@mithrandir \
    --to=thierry.reding@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).