Re: [Discussion] Global vs Local devicetree overlays for addon board + connector setups
From: Luca Ceresoli
Date: Mon Jun 09 2025 - 10:14:12 EST
Hello Andrew,
adding a bit more to the discussion.
On Thu, 5 Jun 2025 12:52:19 +0530
Ayush Singh <ayush@xxxxxxxxxxxxxxx> wrote:
[...]
> >> Basic Requirements
> >>
> >> *********************
> >>
> >>
> >> Here are some basic functionality that the chosen approach can do for
> >> it to be viable for the connector + addon board setups:
> >>
> >>
> >> 1. Dynamic device addition/removal from userspace
> >>
> >
> > I'm going to suggest we ignore the removal part. Not because it is too
> > difficult to solve, but because it is impossible to solve.
> >
> > A huge amount of drivers and devices do not actually allow for removal.
> >
> > The reason is because there is no need, hot-pluggable busses are the
> > exception, not the rule. The rare cases like USB are built to handle
> > this both in hardware and software. None of the connectors we have
> > talked about are actually hot-pluggable! I2C, SPI, etc.. none of
> > these are hot-pluggable. Even if you get away with yanking the cape
> > off a BeagleBone while it is running once or twice, it is violating
> > the electrical specifications and you will eventually break something.
> >
> > If we don't focus on the (non-valid) removal part, so many other parts
> > solutions become viable again. Right now we have no good way to even
> > *add* an add-on board, even statically, so let's not let "perfect" be
> > the enemy of good..
>
>
> Not quite, removal is a very important part of the equation, specially
> for mikroBUS. mikroBUS iteself is not exactly hot-pluggable, but Beagle
> has a usecase of mikroBUS over greybus (over 6lowpan). Since the node
> can be removed, you now have a setup where mikroBUS becomes removable.
Removal is indeed valid.
There are use cases for removal, as discussed at LPC2024 [1][2]. And
for the use case Hervé and I am working on, mentioned at LPC, addition
without removal is totally useless.
Busses that are non-natively hotplug are surely tricky to handle but
they work if 1) the hardware is designed to be electrically safe against
removal (HDMI DDC is a simple example based on I²C) and 2) the drivers
and related subsystems are resilient to removal. We are working on 2,
and I'm working particularly on DRM (some series I sent recently: [3],
[4]).
[1] https://lpc.events/event/18/contributions/1696/attachments/1404/3464/ceresoli-codina-hotplug-overlays.pdf
[2] https://www.youtube.com/watch?v=ACDCiC1r8Xw
[3] https://lore.kernel.org/lkml/20250528-drm-bridge-convert-to-alloc-api-v4-1-f04e698c9a77@xxxxxxxxxxx/
[4] https://lore.kernel.org/lkml/20250606-drm-bridge-alloc-doc-test-v9-0-b5bf7b43ed92@xxxxxxxxxxx/
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com