[lkml]   [2020]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Q] devicetree overlays
Hello Enrico,

On Fri, Aug 7, 2020 at 7:27 AM Enrico Weigelt, metux IT consult
<> wrote:
> In both cases it would be nice to have the actual device configuration
> written as a DT snippet, which just needs to be loaded.

I believe you're asking: "how do I associate device tree nodes to
devices on a dynamically discoverable bus such as USB or PCI" right ?

I believe that already exists. You can describe the _expected_ pci or
usb topology in the
devicetree. If a device gets detected in a spot on the bus described
in the tree, that
snippet will be automatically associated with this device.

How to for usb:

How to for pci:

For example, associate a mac address to an ethernet controller
on a pcie bus via the devicetree.
"reg" (which describes pcie topology/address) still needs filling in.

&pcie {
host@0 {
#address-cells = <3>;
#size-cells = <2>;
reg = <0 0 0 0 0>;
bcm5778: bcm5778@0 {
reg = <0 0 0 0 0>;
mac-address = [CA 11 AB 1E 10 01];

 \ /
  Last update: 2020-08-07 16:18    [W:0.158 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site