The DTB is here to describe the hardware; with hardware such as RPIs
we indeed change the hardware when connecting something to the GPIOs or
i2c/spi busses. Both sides needs to cooperate and the device tree is there
to make the link between the different elements.
Fair enough, although with something like i2c, I think of it more like “connecting something to a traditional serial port”. Is there a tutorial on this that I can read?
Extending and rebuilding a fdt is easy in our tree.
Well, that’s good to know :-)
I'm not sure you can do something general enough this way. For example
you may need to configure pullup/pulldown state of the GPIO, and some
controllers may allow different pull levels. The FDT can address this,
with MD-specific nodes under a MI node. For example look at allwinner,*
properties in our fdt trees.
Yah, but I can already set up the GPIO itself with /etc/gpio.conf.
BTW I just noticed we have fdt gpiokeys driver, which looks like what you
want.
Well, hey now. Ok, I guess I’ll now go off and figure out how FDT works.