Representing and addressing devices
Each device is given at least one node in a DT. Some properties are common to many device types, especially devices sitting on a bus known to the kernel (SPI, I2C, platform, MDIO, and so on). These properties are reg
, #address-cells
, and #size-cells
. The purpose of these properties is device addressing on the bus they sit on. That said, the main addressing property is reg
, which is a generic property whose meaning depends on the bus the device sits on. The #
(hash) that prefixes size-cell
and address-cell
can be translated into length
.
Each addressable device gets a reg
property that is a list of tuples in the form reg = <address0 size0 [address1size1] [address2size2] ... >
, where each tuple represents an address range used by the device. #size-cells
indicates how many 32-bit cells are used to represent size, and may be 0 if size is not relevant. On the other hand, #address-cells
indicates how many 32-bit cells are used to represent the address. In...