devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Question] Status of user-space dynamic overlays API
@ 2025-02-22 20:13 Ayush Singh
  2025-02-22 20:31 ` Heinrich Schuchardt
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Ayush Singh @ 2025-02-22 20:13 UTC (permalink / raw)
  To: xypron.glpk, Jason Kridner, Deepak Khatri, d-gole, Robert Nelson,
	Andrew Davis, Geert Uytterhoeven, Greg Kroah-Hartman,
	David Gibson, Luca Ceresoli, Pantelis Antoniou
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Hello everyone.

I have been looking at ways to do runtime devicetree overlay 
application, and was just wondering what the current status of the 
different proposals [0], [1] were. They seem to be quite old and I think 
they were already rejected, but due to all the broken links, I am not 
really sure about the exact reasons. Also, maybe we now have the 
solutions to some the blockers at the time.


Let me fist go over some of the use cases where I think dynamic 
devicetree overlays can be useful. I am mostly interested in their use 
in single board computers like PocketBeagle 2 [2], Raspberry Pi [3], etc.


# Uses

## Dynamic Pin muxing

A lot of SBC's aimed for creating hardware projects expose headers, 
where each pin can be used for multiple things like GPIO, I2C, PWM, etc, 
depending on the pinmux. I think Raspberry Pi has it's own solution to 
do userspace pinmux, but if userspace devicetree application was a 
thing, it could probably be used for this. Additionally, being able to 
use dynamic devicetree overlays for pin muxing would allow much easier 
transition to use proper device trees during production.


## Dynamic Sensors/Devices

Using devices such as sensors, external ADCs, EEPROMs, etc are also a 
common usecase in SBC's. A lot of current solutions seem to be designed 
around using user-space drivers in such cases. This is a bit of a shame 
since Linux kernel already has drivers for a lot of these drivers, and 
they are probably going to be of higher quality than most user space 
drivers.


# Challenges

## Security

The concerns regarding security seemed to show up in the other 
proposals. There was a proposal to have a devicetree property to 
allow/deny the application of overlays in some nodes, with default being 
deny. Was it insufficient?


## Memory Leaks

Currently, updating/removing properties leaks memory. Was it one of the 
reasons for the rejection of previous proposals?


Maybe kernel already has some solutions more suited to my usecase that I 
am unware of?


[0]: 
https://lore.kernel.org/all/1417605808-23327-1-git-send-email-pantelis.antoniou@konsulko.com/#t

[1]: https://lore.kernel.org/all/20161220190455.25115-1-xypron.glpk@gmx.de/

[2]: https://www.beagleboard.org/boards/pocketbeagle-2

[3]: https://www.raspberrypi.com/


Best Regards,

Ayush Singh


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-04-30 13:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-22 20:13 [Question] Status of user-space dynamic overlays API Ayush Singh
2025-02-22 20:31 ` Heinrich Schuchardt
2025-02-24  5:58   ` Ayush Singh
2025-02-24  8:37 ` Geert Uytterhoeven
2025-02-24 10:09   ` Ayush Singh
2025-02-24 13:29     ` Herve Codina
2025-03-05  4:31     ` David Gibson
2025-03-10  5:22       ` Ayush Singh
2025-03-05  4:27   ` David Gibson
2025-02-24 11:24 ` Luca Ceresoli
2025-04-30 10:18 ` Ayush Singh
2025-04-30 13:07   ` Luca Ceresoli

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).