Speakers
Description
New embedded products are being developed by the industry having add-on boards that can be hot-plugged to the main board to extend features, and do so using busses not natively hot-pluggable and discoverable such as USB or PCI. Instead they use busses that are traditionally not removable such as I²C, SPI, and even more complex ones such as MIPI DSI.
Currently Linux is unable to handle such situations. This session aims at discussing how to solve the main blocker issues.
What needs to be supported for such products is add-ons that:
- can be plugged and removed at runtime at any moment without notice
- add devices on non discoverable busses, where fixed devices can be already present on the main board
- use a non-standard (product-specific) connector
- provide a way to detect which add-on model gets attached among several available
The most suitable tool to handle this use case appears to be device tree overlays, which already provide most of the required functionality. However using overlays exposes a number of problems.
This topic has been discussed informally during an unconference session at ELC 2024 and a series with a proposed implementation [Ceresoli 2024 v4].
Other related but different use cases include:
- Non-discoverable devices in PCI devices:
- discussed at LPC 2023 [Herring LPC 2023]
- patches sent for Microchip LAN966x [Codina 2024 v5]
- BeaglePlay MikroBus support:
- proposed patch series: [Ayush Singh 2024 v5]
- Generic "adapter" overlays for BBB capes, RPi hats, MikroBUS Grove, Qwiic
- DT hardware prober
- proposed patch series: [Chen-Yu Tsai 2024 v7]
Topics to discuss:
- Any other new similar use cases from the audience?
- How to describe in the device tree the hotplug connector and the relationship between the components on the removable add-on and the busses on the main board they attach to
- Runtime dependency between devices: add-on devices have to be removed in the correct order, and devlink is there to ensure this; however currently devlink does not work correctly when DT overlays are loaded
- Proper instantiation and removal of add-on devices for the involved subsystems: I²C, platform, DRM, interrupts
Other topics that might be discussed:
- fixing issues with various subsystems and drivers that don't react well on device removal
- fixing memory leaks on overlay removal