Device Tree Memo
Angie An

Device tree allows the operating system or bootloader to know things like:

this system-on-chip has:

  • 2 Cortex-A9 CPU cores
  • 2 memory-mapped UART controllers of this variant, one with registers at 0xF1000000 and IRQ 23, and another with registers at 0xF1001000 and IRQ 24
  • 3 I2C controllers of that variant, with registers at those memory-mapped address, those IRQs and taking their input clock from this source

simplified example of i2c controller and it’s sub node (eeprom0):

image-20240401161154891

simplified example of spi controller and it’s sub node (flash0):

image-20240405163920782

there is no need to describe usb devices in the device tree as sub node, the usb controller will discover them at runtime.

image-20240402182135124

The linux kernel sources can be considered as the canonical(非常によく似た) location for device tree source files

arch//boot/dts

 Comments