.. SPDX-License-Identifier: GPL-2.0+

Compiled-in Device Tree / Platform Data
=======================================


Introduction
------------

Device tree is the standard configuration method in U-Boot. It is used to
define what devices are in the system and provide configuration information
to these devices.

The overhead of adding devicetree access to U-Boot is fairly modest,
approximately 3KB on Thumb 2 (plus the size of the DT itself). This means
that in most cases it is best to use devicetree for configuration.

However there are some very constrained environments where U-Boot needs to
work. These include SPL with severe memory limitations. For example, some
SoCs require a 16KB SPL image which must include a full MMC stack. In this
case the overhead of devicetree access may be too great.

It is possible to create platform data manually by defining C structures
for it, and reference that data in a `U_BOOT_DRVINFO()` declaration. This
bypasses the use of devicetree completely, effectively creating a parallel
configuration mechanism. But it is an available option for SPL.

As an alternative, the 'of-platdata' feature is provided. This converts the
devicetree contents into C code which can be compiled into the SPL binary.
This saves the 3KB of code overhead and perhaps a few hundred more bytes due
to more efficient storage of the data.


How it works
------------

The feature is enabled by CONFIG OF_PLATDATA. This is only available in
SPL/TPL and should be tested with:

.. code-block:: c

    #if CONFIG_IS_ENABLED(OF_PLATDATA)

A tool called 'dtoc' converts a devicetree file either into a set of
struct declarations, one for each compatible node, and a set of
`U_BOOT_DRVINFO()` declarations along with the actual platform data for each
device. As an example, consider this MMC node:

.. code-block:: none

    sdmmc: dwmmc@ff0c0000 {
            compatible = "rockchip,rk3288-dw-mshc";
            clock-freq-min-max = <400000 150000000>;
            clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
                     <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
            clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
            fifo-depth = <0x100>;
            interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
            reg = <0xff0c0000 0x4000>;
            bus-width = <4>;
            cap-mmc-highspeed;
            cap-sd-highspeed;
            card-detect-delay = <200>;
            disable-wp;
            num-slots = <1>;
            pinctrl-names = "default";
            pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
                vmmc-supply = <&vcc_sd>;
                status = "okay";
                u-boot,dm-pre-reloc;
        };


Some of these properties are dropped by U-Boot under control of the
CONFIG_OF_SPL_REMOVE_PROPS option. The rest are processed. This will produce
the following C struct declaration:

.. code-block:: c

    struct dtd_rockchip_rk3288_dw_mshc {
            fdt32_t         bus_width;
            bool            cap_mmc_highspeed;
            bool            cap_sd_highspeed;
            fdt32_t         card_detect_delay;
            fdt32_t         clock_freq_min_max[2];
            struct phandle_1_arg clocks[4];
            bool            disable_wp;
            fdt32_t         fifo_depth;
            fdt32_t         interrupts[3];
            fdt32_t         num_slots;
            fdt32_t         reg[2];
            fdt32_t         vmmc_supply;
    };

and the following device declarations:

.. code-block:: c

    /* Node /clock-controller@ff760000 index 0 */
    ...

    /* Node /dwmmc@ff0c0000 index 2 */
    static struct dtd_rockchip_rk3288_dw_mshc dtv_dwmmc_at_ff0c0000 = {
            .fifo_depth             = 0x100,
            .cap_sd_highspeed       = true,
            .interrupts             = {0x0, 0x20, 0x4},
            .clock_freq_min_max     = {0x61a80, 0x8f0d180},
            .vmmc_supply            = 0xb,
            .num_slots              = 0x1,
            .clocks                 = {{0, 456},
                                       {0, 68},
                                       {0, 114},
                                       {0, 118}},
            .cap_mmc_highspeed      = true,
            .disable_wp             = true,
            .bus_width              = 0x4,
            .u_boot_dm_pre_reloc    = true,
            .reg                    = {0xff0c0000, 0x4000},
            .card_detect_delay      = 0xc8,
    };

    U_BOOT_DRVINFO(dwmmc_at_ff0c0000) = {
            .name           = "rockchip_rk3288_dw_mshc",
            .plat       = &dtv_dwmmc_at_ff0c0000,
            .plat_size  = sizeof(dtv_dwmmc_at_ff0c0000),
            .parent_idx     = -1,
    };

The device is then instantiated at run-time and the platform data can be
accessed using:

.. code-block:: c

    struct udevice *dev;
    struct dtd_rockchip_rk3288_dw_mshc *plat = dev_get_plat(dev);

This avoids the code overhead of converting the devicetree data to
platform data in the driver. The `of_to_plat()` method should
therefore do nothing in such a driver.

Note that for the platform data to be matched with a driver, the 'name'
property of the `U_BOOT_DRVINFO()` declaration has to match a driver declared
via `U_BOOT_DRIVER()`. This effectively means that a `U_BOOT_DRIVER()` with a
'name' corresponding to the devicetree 'compatible' string (after converting
it to a valid name for C) is needed, so a dedicated driver is required for
each 'compatible' string.

In order to make this a bit more flexible, the `DM_DRIVER_ALIAS()` macro can be
used to declare an alias for a driver name, typically a 'compatible' string.
This macro produces no code, but is used by dtoc tool. It must be located in the
same file as its associated driver, ideally just after it.

The parent_idx is the index of the parent `driver_info` structure within its
linker list (instantiated by the `U_BOOT_DRVINFO()` macro). This is used to
support `dev_get_parent()`.

During the build process dtoc parses both `U_BOOT_DRIVER()` and
`DM_DRIVER_ALIAS()` to build a list of valid driver names and driver aliases.
If the 'compatible' string used for a device does not not match a valid driver
name, it will be checked against the list of driver aliases in order to get the
right driver name to use. If in this step there is no match found a warning is
issued to avoid run-time failures.

Where a node has multiple compatible strings, dtoc generates a `#define` to
make them equivalent, e.g.:

.. code-block:: c

    #define dtd_rockchip_rk3299_dw_mshc dtd_rockchip_rk3288_dw_mshc


Converting of-platdata to a useful form
---------------------------------------

Of course it would be possible to use the of-platdata directly in your driver
whenever configuration information is required. However this means that the
driver will not be able to support devicetree, since the of-platdata
structure is not available when devicetree is used. It would make no sense
to use this structure if devicetree were available, since the structure has
all the limitations metioned in caveats below.

Therefore it is recommended that the of-platdata structure should be used
only in the `probe()` method of your driver. It cannot be used in the
`of_to_plat()` method since this is not called when platform data is
already present.


How to structure your driver
----------------------------

Drivers should always support devicetree as an option. The of-platdata
feature is intended as a add-on to existing drivers.

Your driver should convert the plat struct in its `probe()` method. The
existing devicetree decoding logic should be kept in the
`of_to_plat()` method and wrapped with `#if`.

For example:

.. code-block:: c

    #include <dt-structs.h>

    struct mmc_plat {
    #if CONFIG_IS_ENABLED(OF_PLATDATA)
            /* Put this first since driver model will copy the data here */
            struct dtd_mmc dtplat;
    #endif
            /*
             * Other fields can go here, to be filled in by decoding from
             * the devicetree (or the C structures when of-platdata is used).
             */
            int fifo_depth;
    };

    static int mmc_of_to_plat(struct udevice *dev)
    {
        if (CONFIG_IS_ENABLED(OF_REAL)) {
            /* Decode the devicetree data */
            struct mmc_plat *plat = dev_get_plat(dev);
            const void *blob = gd->fdt_blob;
            int node = dev_of_offset(dev);

            plat->fifo_depth = fdtdec_get_int(blob, node, "fifo-depth", 0);
        }

        return 0;
    }

    static int mmc_probe(struct udevice *dev)
    {
            struct mmc_plat *plat = dev_get_plat(dev);

    #if CONFIG_IS_ENABLED(OF_PLATDATA)
            /* Decode the of-platdata from the C structures */
            struct dtd_mmc *dtplat = &plat->dtplat;

            plat->fifo_depth = dtplat->fifo_depth;
    #endif
            /* Set up the device from the plat data */
            writel(plat->fifo_depth, ...)
    }

    static const struct udevice_id mmc_ids[] = {
            { .compatible = "vendor,mmc" },
            { }
    };

    U_BOOT_DRIVER(mmc_drv) = {
            .name           = "mmc_drv",
            .id             = UCLASS_MMC,
            .of_match       = mmc_ids,
            .of_to_plat = mmc_of_to_plat,
            .probe          = mmc_probe,
            .priv_auto = sizeof(struct mmc_priv),
            .plat_auto = sizeof(struct mmc_plat),
    };

    DM_DRIVER_ALIAS(mmc_drv, vendor_mmc) /* matches compatible string */

Note that `struct mmc_plat` is defined in the C file, not in a header. This
is to avoid needing to include dt-structs.h in a header file. The idea is to
keep the use of each of-platdata struct to the smallest possible code area.
There is just one driver C file for each struct, that can convert from the
of-platdata struct to the standard one used by the driver.

In the case where SPL_OF_PLATDATA is enabled, `plat_auto` is
still used to allocate space for the platform data. This is different from
the normal behaviour and is triggered by the use of of-platdata (strictly
speaking it is a non-zero `plat_size` which triggers this).

The of-platdata struct contents is copied from the C structure data to the
start of the newly allocated area. In the case where devicetree is used,
the platform data is allocated, and starts zeroed. In this case the
`of_to_plat()` method should still set up the platform data (and the
of-platdata struct will not be present).

SPL must use either of-platdata or devicetree. Drivers cannot use both at
the same time, but they must support devicetree. Supporting of-platdata is
optional.

The devicetree becomes inaccessible when CONFIG_SPL_OF_PLATDATA is enabled,
since the devicetree access code is not compiled in. A corollary is that
a board can only move to using of-platdata if all the drivers it uses support
it. There would be little point in having some drivers require the device
tree data, since then libfdt would still be needed for those drivers and
there would be no code-size benefit.


Build-time instantiation
------------------------

Even with of-platdata there is a fair amount of code required in driver model.
It is possible to have U-Boot handle the instantiation of devices at build-time,
so avoiding the need for the `device_bind()` code and some parts of
`device_probe()`.

The feature is enabled by CONFIG_OF_PLATDATA_INST.

Here is an example device, as generated by dtoc::

   /*
    * Node /serial index 6
    * driver sandbox_serial parent root_driver
   */

   #include <asm/serial.h>
   struct sandbox_serial_plat __attribute__ ((section (".priv_data")))
      _sandbox_serial_plat_serial = {
      .dtplat = {
         .sandbox_text_colour   = "cyan",
      },
   };
   #include <asm/serial.h>
   u8 _sandbox_serial_priv_serial[sizeof(struct sandbox_serial_priv)]
      __attribute__ ((section (".priv_data")));
   #include <serial.h>
   u8 _sandbox_serial_uc_priv_serial[sizeof(struct serial_dev_priv)]
      __attribute__ ((section (".priv_data")));

   DM_DEVICE_INST(serial) = {
      .driver     = DM_DRIVER_REF(sandbox_serial),
      .name       = "sandbox_serial",
      .plat_      = &_sandbox_serial_plat_serial,
      .priv_      = _sandbox_serial_priv_serial,
      .uclass     = DM_UCLASS_REF(serial),
      .uclass_priv_ = _sandbox_serial_uc_priv_serial,
      .uclass_node   = {
         .prev = &DM_UCLASS_REF(serial)->dev_head,
         .next = &DM_UCLASS_REF(serial)->dev_head,
      },
      .child_head   = {
         .prev = &DM_DEVICE_REF(serial)->child_head,
         .next = &DM_DEVICE_REF(serial)->child_head,
      },
      .sibling_node   = {
         .prev = &DM_DEVICE_REF(i2c_at_0)->sibling_node,
         .next = &DM_DEVICE_REF(spl_test)->sibling_node,
      },
      .seq_ = 0,
   };

Here is part of the driver, for reference::

   static const struct udevice_id sandbox_serial_ids[] = {
      { .compatible = "sandbox,serial" },
      { }
   };

   U_BOOT_DRIVER(sandbox_serial) = {
      .name   = "sandbox_serial",
      .id   = UCLASS_SERIAL,
      .of_match    = sandbox_serial_ids,
      .of_to_plat  = sandbox_serial_of_to_plat,
      .plat_auto   = sizeof(struct sandbox_serial_plat),
      .priv_auto   = sizeof(struct sandbox_serial_priv),
      .probe = sandbox_serial_probe,
      .remove = sandbox_serial_remove,
      .ops   = &sandbox_serial_ops,
      .flags = DM_FLAG_PRE_RELOC,
   };


The `DM_DEVICE_INST()` macro declares a struct udevice so you can see that the
members are from that struct. The private data is declared immediately above,
as `_sandbox_serial_priv_serial`, so there is no need for run-time memory
allocation. The #include lines are generated as well, since dtoc searches the
U-Boot source code for the definition of `struct sandbox_serial_priv` and adds
the relevant header so that the code will compile without errors.

The `plat_` member is set to the dtv data which is declared immediately above
the device. This is similar to how it would look without of-platdata-inst, but
node that the `dtplat` member inside is part of the wider
`_sandbox_serial_plat_serial` struct. This is because the driver declares its
own platform data, and the part generated by dtoc can only be a portion of it.
The `dtplat` part is always first in the struct. If the device has no
`.plat_auto` field, then a simple dtv struct can be used as with this example::

   static struct dtd_sandbox_clk dtv_clk_sbox = {
      .assigned_clock_rates   = 0x141,
      .assigned_clocks   = {0x7, 0x3},
   };

   #include <asm/clk.h>
   u8 _sandbox_clk_priv_clk_sbox[sizeof(struct sandbox_clk_priv)]
      __attribute__ ((section (".priv_data")));

   DM_DEVICE_INST(clk_sbox) = {
      .driver    = DM_DRIVER_REF(sandbox_clk),
      .name      = "sandbox_clk",
      .plat_     = &dtv_clk_sbox,

Here is part of the driver, for reference::

   static const struct udevice_id sandbox_clk_ids[] = {
      { .compatible = "sandbox,clk" },
      { }
   };

   U_BOOT_DRIVER(sandbox_clk) = {
      .name       = "sandbox_clk",
      .id         = UCLASS_CLK,
      .of_match   = sandbox_clk_ids,
      .ops        = &sandbox_clk_ops,
      .probe      = sandbox_clk_probe,
      .priv_auto  = sizeof(struct sandbox_clk_priv),
   };


You can see that `dtv_clk_sbox` just has the devicetree contents and there is
no need for the `dtplat` separation, since the driver has no platform data of
its own, besides that provided by the devicetree (i.e. no `.plat_auto` field).

The doubly linked lists are handled by explicitly declaring the value of each
node, as you can see with the `.prev` and `.next` values in the example above.
Since dtoc knows the order of devices it can link them into the appropriate
lists correctly.

One of the features of driver model is the ability for a uclass to have a
small amount of private data for each device in that uclass. This is used to
provide a generic data structure that the uclass can use for all devices, thus
allowing generic features to be implemented in common code. An example is I2C,
which stores the bus speed there.

Similarly, parent devices can have data associated with each of their children.
This is used to provide information common to all children of a particular bus.
For an I2C bus, this is used to store the I2C address of each child on the bus.

This is all handled automatically by dtoc::

   #include <asm/i2c.h>
   u8 _sandbox_i2c_priv_i2c_at_0[sizeof(struct sandbox_i2c_priv)]
      __attribute__ ((section (".priv_data")));
   #include <i2c.h>
   u8 _sandbox_i2c_uc_priv_i2c_at_0[sizeof(struct dm_i2c_bus)]
      __attribute__ ((section (".priv_data")));

   DM_DEVICE_INST(i2c_at_0) = {
      .driver      = DM_DRIVER_REF(sandbox_i2c),
      .name      = "sandbox_i2c",
      .plat_   = &dtv_i2c_at_0,
      .priv_      = _sandbox_i2c_priv_i2c_at_0,
      .uclass   = DM_UCLASS_REF(i2c),
      .uclass_priv_ = _sandbox_i2c_uc_priv_i2c_at_0,
     ...

Part of driver, for reference::

   static const struct udevice_id sandbox_i2c_ids[] = {
      { .compatible = "sandbox,i2c" },
      { }
   };

   U_BOOT_DRIVER(sandbox_i2c) = {
      .name   = "sandbox_i2c",
      .id   = UCLASS_I2C,
      .of_match = sandbox_i2c_ids,
      .ops   = &sandbox_i2c_ops,
      .priv_auto   = sizeof(struct sandbox_i2c_priv),
   };

Part of I2C uclass, for reference::

   UCLASS_DRIVER(i2c) = {
      .id         = UCLASS_I2C,
      .name       = "i2c",
      .flags      = DM_UC_FLAG_SEQ_ALIAS,
      .post_bind  = i2c_post_bind,
      .pre_probe  = i2c_pre_probe,
      .post_probe = i2c_post_probe,
      .per_device_auto   = sizeof(struct dm_i2c_bus),
      .per_child_plat_auto   = sizeof(struct dm_i2c_chip),
      .child_post_bind = i2c_child_post_bind,
   };

Here, `_sandbox_i2c_uc_priv_i2c_at_0` is required by the uclass but is declared
in the device, as required by driver model. The required header file is included
so that the code will compile without errors. A similar mechanism is used for
child devices, but is not shown by this example.

It would not be that useful to avoid binding devices but still need to allocate
uclasses at runtime. So dtoc generates uclass instances as well::

   struct list_head uclass_head = {
      .prev = &DM_UCLASS_REF(serial)->sibling_node,
      .next = &DM_UCLASS_REF(clk)->sibling_node,
   };

   DM_UCLASS_INST(clk) = {
      .uc_drv      = DM_UCLASS_DRIVER_REF(clk),
      .sibling_node   = {
         .prev = &uclass_head,
         .next = &DM_UCLASS_REF(i2c)->sibling_node,
      },
      .dev_head   = {
         .prev = &DM_DEVICE_REF(clk_sbox)->uclass_node,
         .next = &DM_DEVICE_REF(clk_fixed)->uclass_node,
      },
   };

At the top is the list head. Driver model uses this on start-up, instead of
creating its own.

Below that are a set of `DM_UCLASS_INST()` macros, each declaring a
`struct uclass`. The doubly linked lists work as for devices.

All private data is placed into a `.priv_data` section so that it is contiguous
in the resulting output binary.


Indexes
-------

U-Boot stores drivers, devices and many other things in linker_list structures.
These are sorted by name, so dtoc knows the order that they will appear when
the linker runs. Each driver_info / udevice is referenced by its index in the
linker_list array, called 'idx' in the code.

When CONFIG_OF_PLATDATA_INST is enabled, idx is the udevice index, otherwise it
is the driver_info index. In either case, indexes are used to reference devices
using device_get_by_ofplat_idx(). This allows phandles to work as expected.


Phases
------

U-Boot operates in several phases, typically TPL, SPL and U-Boot proper.
The latter does not use dtoc.

In some rare cases different drivers are used for two phases. For example,
in TPL it may not be necessary to use the full PCI subsystem, so a simple
driver can be used instead.

This works in the build system simply by compiling in one driver or the
other (e.g. PCI driver + uclass for SPL; simple_bus for TPL). But dtoc has
no way of knowing which code is compiled in for which phase, since it does
not inspect Makefiles or dependency graphs.

So to make this work for dtoc, we need to be able to explicitly mark
drivers with their phase. This is done by adding a macro to the driver::

   /* code in tpl.c only compiled into TPL */
   U_BOOT_DRIVER(pci_x86) = {
      .name   = "pci_x86",
      .id   = UCLASS_SIMPLE_BUS,
      .of_match = of_match_ptr(tpl_fake_pci_ids),
      DM_PHASE(tpl)
   };


   /* code in pci_x86.c compiled into SPL and U-Boot proper */
   U_BOOT_DRIVER(pci_x86) = {
      .name   = "pci_x86",
      .id   = UCLASS_PCI,
      .of_match = pci_x86_ids,
      .ops   = &pci_x86_ops,
   };


Notice that the second driver has the same name but no DM_PHASE(), so it will be
used for SPL and U-Boot.

Note also that this only affects the code generated by dtoc. You still need to
make sure that only the required driver is build into each phase.


Header files
------------

With OF_PLATDATA_INST, dtoc must include the correct header file in the
generated code for any structs that are used, so that the code will compile.
For example, if `struct ns16550_plat` is used, the code must include the
`ns16550.h` header file.

Typically dtoc can detect the header file needed for a driver by looking
for the structs that it uses. For example, if a driver as a `.priv_auto`
that uses `struct ns16550_plat`, then dtoc can search header files for the
definition of that struct and use the file.

In some cases, enums are used in drivers, typically with the `.data` field
of `struct udevice_id`. Since dtoc does not support searching for these,
you must use the `DM_HDR()` macro to tell dtoc which header to use. This works
as a macro included in the driver definition::

   static const struct udevice_id apl_syscon_ids[] = {
      { .compatible = "intel,apl-punit", .data = X86_SYSCON_PUNIT },
      { }
   };

   U_BOOT_DRIVER(intel_apl_punit) = {
      .name       = "intel_apl_punit",
      .id         = UCLASS_SYSCON,
      .of_match   = apl_syscon_ids,
      .probe      = apl_punit_probe,
      DM_HEADER(<asm/cpu.h>)    /* for X86_SYSCON_PUNIT */
   };



Problems
--------

This section shows some common problems and how to fix them.

Driver not found
~~~~~~~~~~~~~~~~

In some cases you will you see something like this::

   WARNING: the driver rockchip_rk3188_grf was not found in the driver list

The driver list is a list of drivers, each with a name. The name is in the
U_BOOT_DRIVER() declaration, repeated twice, one in brackets and once as the
.name member. For example, in the following declaration the driver name is
`rockchip_rk3188_grf`::

  U_BOOT_DRIVER(rockchip_rk3188_grf) = {
       .name = "rockchip_rk3188_grf",
       .id = UCLASS_SYSCON,
       .of_match = rk3188_syscon_ids + 1,
       .bind = rk3188_syscon_bind_of_plat,
  };

The first name U_BOOT_DRIVER(xx) is used to create a linker symbol so that the
driver can be accessed at build-time without any overhead. The second one
(.name = "xx") is used at runtime when something wants to print out the driver
name.

The dtoc tool expects to be able to find a driver for each compatible string in
the devicetree. For example, if the devicetree has::

   grf: grf@20008000 {
      compatible = "rockchip,rk3188-grf", "syscon";
      reg = <0x20008000 0x200>;
      u-boot,dm-spl;
   };

then dtoc looks at the first compatible string ("rockchip,rk3188-grf"),
converts that to a C identifier (rockchip_rk3188_grf) and then looks for that.

Missing .compatible or Missing .id
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Various things can cause dtoc to fail to find the driver and it tries to
warn about these. For example::

   rockchip_rk3188_uart: Missing .compatible in drivers/serial/serial_rockchip.c
                    : WARNING: the driver rockchip_rk3188_uart was not found in the driver list

Without a compatible string a driver cannot be used by dtoc, even if the
compatible string is not actually needed at runtime.

If the problem is simply that there are multiple compatible strings, the
DM_DRIVER_ALIAS() macro can be used to tell dtoc about this and avoid a problem.

Checks are also made to confirm that the referenced driver has a .compatible
member and a .id member. The first provides the array of compatible strings and
the second provides the uclass ID.

Missing parent
~~~~~~~~~~~~~~

When a device is used, its parent must be present as well. If you see an error
like::

   Node '/i2c@0/emul/emul0' requires parent node '/i2c@0/emul' but it is not in
      the valid list

it indicates that you are using a node whose parent is not present in the
devicetree. In this example, if you look at the device tree output
(e.g. fdtdump tpl/u-boot-tpl.dtb in your build directory), you may see something
like this::

   emul {
       emul0 {
           compatible = "sandbox,i2c-rtc-emul";
           #emul-cells = <0x00000000>;
           phandle = <0x00000003>;
       };
   };

In this example, 'emul0' exists but its parent 'emul' has no properties. These
have been dropped by fdtgrep in an effort to reduce the devicetree size. This
indicates that the two nodes have different phase settings. Looking at the
source .dts::

   i2c_emul: emul {
      u-boot,dm-spl;
      reg = <0xff>;
      compatible = "sandbox,i2c-emul-parent";
      emul0: emul0 {
         u-boot,dm-pre-reloc;
         compatible = "sandbox,i2c-rtc-emul";
         #emul-cells = <0>;
      };
   };

you can see that the child node 'emul0' usees 'u-boot,dm-pre-reloc', indicating
that the node is present in all SPL builds, but its parent uses 'u-boot,dm-spl'
indicating it is only present in SPL, not TPL. For a TPL build, this will fail
with the above message. The fix is to change 'emul0' to use the same
'u-boot,dm-spl' condition, so that it is not present in TPL, like its parent.

Link errors / undefined reference
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sometimes dtoc does not find the problem for you, but something is wrong and
you get a link error, e.g.::

   :(__u_boot_list_2_udevice_2_spl_test5+0x0): undefined reference to
      `_u_boot_list_2_driver_2_sandbox_spl_test'
   /usr/bin/ld: dts/dt-uclass.o:(__u_boot_list_2_uclass_2_misc+0x8):
        undefined reference to `_u_boot_list_2_uclass_driver_2_misc'

The first one indicates that the device cannot find its driver. This means that
there is a driver 'sandbox_spl_test' but it is not compiled into the build.
Check your Kconfig settings to make sure it is. If you don't want that in the
build, adjust your phase settings, e.g. by using 'u-boot,dm-spl' in the node
to exclude it from the TPL build::

	spl-test5 {
		u-boot,dm-tpl;
		compatible = "sandbox,spl-test";
		stringarray = "tpl";
	};

We can drop the 'u-boot,dm-tpl' line so this node won't appear in the TPL
devicetree and thus the driver won't be needed.

The second error above indicates that the MISC uclass is needed by the driver
(since it is in the MISC uclass) but that uclass is not compiled in the build.
The fix above would fix this error too. But if you do want this uclass in the
build, check your Kconfig settings to make sure the uclass is being built
(CONFIG_MISC in this case).

Another error that can crop up is something like::

   spl/dts/dt-device.c:257:38: error: invalid application of ‘sizeof’ to
         incomplete type ‘struct sandbox_irq_priv’
      257 | u8 _sandbox_irq_priv_irq_sbox[sizeof(struct sandbox_irq_priv)]
          |                                      ^~~~~~

This indicates that `struct sandbox_irq_priv` is not defined anywhere. The
solution is to add a DM_HEADER() line, as below, so this is included in the
dt-device.c file::

   U_BOOT_DRIVER(sandbox_irq) = {
      .name		= "sandbox_irq",
      .id		= UCLASS_IRQ,
      .of_match	= sandbox_irq_ids,
      .ops		= &sandbox_irq_ops,
      .priv_auto	= sizeof(struct sandbox_irq_priv),
      DM_HEADER(<asm/irq.h>)
   };

Note that there is no dependency checking on the above, so U-Boot will not
regenerate the dt-device.c file when you update the source file (here,
`irq_sandbox.c`). You need to run `make mrproper` first to get a fresh build.

Another error that can crop up is something like::

   spl/dts/dt-device.c:257:38: error: invalid application of ‘sizeof’ to
         incomplete type ‘struct sandbox_irq_priv’
      257 | u8 _sandbox_irq_priv_irq_sbox[sizeof(struct sandbox_irq_priv)]
          |                                      ^~~~~~

This indicates that `struct sandbox_irq_priv` is not defined anywhere. The
solution is to add a DM_HEADER() line, as below, so this is included in the
dt-device.c file::

   U_BOOT_DRIVER(sandbox_irq) = {
      .name		= "sandbox_irq",
      .id		= UCLASS_IRQ,
      .of_match	= sandbox_irq_ids,
      .ops		= &sandbox_irq_ops,
      .priv_auto	= sizeof(struct sandbox_irq_priv),
      DM_HEADER(<asm/irq.h>)
   };

Note that there is no dependency checking on the above, so U-Boot will not
regenerate the dt-device.c file when you update the source file (here,
`irq_sandbox.c`). You need to run `make mrproper` first to get a fresh build.


Caveats
-------

There are various complications with this feature which mean it should only
be used when strictly necessary, i.e. in SPL with limited memory. Notable
caveats include:

   - Device tree does not describe data types. But the C code must define a
     type for each property. These are guessed using heuristics which
     are wrong in several fairly common cases. For example an 8-byte value
     is considered to be a 2-item integer array, and is byte-swapped. A
     boolean value that is not present means 'false', but cannot be
     included in the structures since there is generally no mention of it
     in the devicetree file.

   - Naming of nodes and properties is automatic. This means that they follow
     the naming in the devicetree, which may result in C identifiers that
     look a bit strange.

   - It is not possible to find a value given a property name. Code must use
     the associated C member variable directly in the code. This makes
     the code less robust in the face of devicetree changes. To avoid having
     a second struct with similar members and names you need to explicitly
     declare it as an alias with `DM_DRIVER_ALIAS()`.

   - The platform data is provided to drivers as a C structure. The driver
     must use the same structure to access the data. Since a driver
     normally also supports devicetree it must use `#ifdef` to separate
     out this code, since the structures are only available in SPL. This could
     be fixed fairly easily by making the structs available outside SPL, so
     that `IS_ENABLED()` could be used.

   - With CONFIG_OF_PLATDATA_INST all binding happens at build-time, meaning
     that (by default) it is not possible to call `device_bind()` from C code.
     This means that all devices must have an associated devicetree node and
     compatible string. For example if a GPIO device currently creates child
     devices in its `bind()` method, it will not work with
     CONFIG_OF_PLATDATA_INST. Arguably this is bad practice anyway and the
     devicetree binding should be updated to declare compatible strings for
     the child devices. It is possible to disable OF_PLATDATA_NO_BIND but this
     is not recommended since it increases code size.


Internals
---------

Generated files
~~~~~~~~~~~~~~~

When enabled, dtoc generates the following five files:

include/generated/dt-decl.h (OF_PLATDATA_INST only)
   Contains declarations for all drivers, devices and uclasses. This allows
   any `struct udevice`, `struct driver` or `struct uclass` to be located by its
   name

include/generated/dt-structs-gen.h
   Contains the struct definitions for the devicetree nodes that are used. This
   is the same as without OF_PLATDATA_INST

spl/dts/dt-plat.c (only with !OF_PLATDATA_INST)
   Contains the `U_BOOT_DRVINFO()` declarations that U-Boot uses to bind devices
   at start-up. See above for an example

spl/dts/dt-device.c (only with OF_PLATDATA_INST)
   Contains `DM_DEVICE_INST()` declarations for each device that can be used at
   run-time. These are declared in the file along with any private/platform data
   that they use. Every device has an idx, as above. Since each device must be
   part of a double-linked list, the nodes are declared in the code as well.

spl/dts/dt-uclass.c (only with OF_PLATDATA_INST)
   Contains `DM_UCLASS_INST()` declarations for each uclass that can be used at
   run-time. These are declared in the file along with any private data
   associated with the uclass itself (the `.priv_auto` member). Since each
   uclass must be part of a double-linked list, the nodes are declared in the
   code as well.

The dt-structs.h file includes the generated file
`(include/generated/dt-structs.h`) if CONFIG_SPL_OF_PLATDATA is enabled.
Otherwise (such as in U-Boot proper) these structs are not available. This
prevents them being used inadvertently. All usage must be bracketed with
`#if CONFIG_IS_ENABLED(OF_PLATDATA)`.

The dt-plat.c file contains the device declarations and is is built in
spl/dt-plat.c.


CONFIG options
~~~~~~~~~~~~~~

Several CONFIG options are used to control the behaviour of of-platdata, all
available for both SPL and TPL:

OF_PLATDATA
   This is the main option which enables the of-platdata feature

OF_PLATDATA_PARENT
   This allows `device_get_parent()` to work. Without this, all devices exist as
   direct children of the root node. This option is highly desirable (if not
   always absolutely essential) for buses such as I2C.

OF_PLATDATA_INST
   This controls the instantiation of devices at build time. With it disabled,
   only `U_BOOT_DRVINFO()` records are created, with U-Boot handling the binding
   in `device_bind()` on start-up. With it enabled, only `DM_DEVICE_INST()` and
   `DM_UCLASS_INST()` records are created, and `device_bind()` is not needed at
   runtime.

OF_PLATDATA_NO_BIND
   This controls whether `device_bind()` is supported. It is enabled by default
   with OF_PLATDATA_INST since code-size reduction is really the main point of
   the feature. It can be disabled if needed but is not likely to be supported
   in the long term.

OF_PLATDATA_DRIVER_RT
   This controls whether the `struct driver_rt` records are used by U-Boot.
   Normally when a device is bound, U-Boot stores the device pointer in one of
   these records. There is one for every `struct driver_info` in the system,
   i.e. one for every device that is bound from those records. It provides a
   way to locate a device in the code and is used by
   `device_get_by_ofplat_idx()`. This option is always enabled with of-platdata,
   provided OF_PLATDATA_INST is not. In that case the records are useless since
   we don't have any `struct driver_info` records.

OF_PLATDATA_RT
   This controls whether the `struct udevice_rt` records are used by U-Boot.
   It moves the updatable fields from `struct udevice` (currently only `flags`)
   into a separate structure, allowing the records to be kept in read-only
   memory. It is generally enabled if OF_PLATDATA_INST is enabled. This option
   also controls whether the private data is used in situ, or first copied into
   an allocated region. Again this is to allow the private data declared by
   dtoc-generated code to be in read-only memory. Note that access to private
   data must be done via accessor functions, such as `dev_get_priv()`, so that
   the relocation is handled.

READ_ONLY
   This indicates that the data generated by dtoc should not be modified. Only
   a few fields actually do get changed in U-Boot, such as device flags. This
   option causes those to move into an allocated space (see OF_PLATDATA_RT).
   Also, since updating doubly linked lists is generally impossible when some of
   the nodes cannot be updated, OF_PLATDATA_NO_BIND is enabled.

Data structures
~~~~~~~~~~~~~~~

A few extra data structures are used with of-platdata:

`struct udevice_rt`
   Run-time information for devices. When OF_PLATDATA_RT is enabled, this holds
   the flags for each device, so that `struct udevice` can remain unchanged by
   U-Boot, and potentially reside in read-only memory. Access to flags is then
   via functions like `dev_get_flags()` and `dev_or_flags()`. This data
   structure is allocated on start-up, where the private data is also copied.
   All flags values start at 0 and any changes are handled by `dev_or_flags()`
   and `dev_bic_flags()`. It would be more correct for the flags to be set to
   `DM_FLAG_BOUND`, or perhaps `DM_FLAG_BOUND | DM_FLAG_ALLOC_PDATA`, but since
   there is no code to bind/unbind devices and no code to allocate/free
   private data / platform data, it doesn't matter.

`struct driver_rt`
   Run-time information for `struct driver_info` records. When
   OF_PLATDATA_DRIVER_RT is enabled, this holds a pointer to the device
   created by each record. This is needed so that is it possible to locate a
   device from C code. Specifically, the code can use `DM_DRVINFO_GET(name)` to
   get a reference to a particular `struct driver_info`, with `name` being the
   name of the devicetree node. This is very convenient. It is also fast, since
   no    searching or string comparison is needed. This data structure is
   allocated    on start-up, filled out by `device_bind()` and used by
   `device_get_by_ofplat_idx()`.

Other changes
~~~~~~~~~~~~~

Some other changes are made with of-platdata:

Accessor functions
   Accessing private / platform data via functions such as `dev_get_priv()` has
   always been encouraged. With OF_PLATDATA_RT this is essential, since the
   `priv_` and `plat_`  (etc.) values point to the data generated by dtoc, not
   the read-write copy that is sometimes made on start-up. Changing the
   private / platform data  pointers has always been discouraged (the API is
   marked internal) but with OF_PLATDATA_RT this is not currently supported in
   general, since it assumes that all such pointers point to the relocated data.
   Note also that the renaming of struct members to have a trailing underscore
   was partly done to make people aware that they should not be accessed
   directly.

`gd->uclass_root_s`
   Normally U-Boot sets up the head of the uclass list here and makes
   `gd->uclass_root` point to it. With OF_PLATDATA_INST, dtoc generates a
   declaration of `uclass_head` in `dt-uclass.c` since it needs to link the
   head node into the list. In that case, `gd->uclass_root_s` is not used and
   U-Boot just makes `gd->uclass_root` point to `uclass_head`.

`gd->dm_driver_rt`
   This holds a pointer to a list of `struct driver_rt` records, one for each
   `struct driver_info`. The list is in alphabetical order by the name used
   in `U_BOOT_DRVINFO(name)` and indexed by idx, with the first record having
   an index of 0. It is only used if OF_PLATDATA_INST is not enabled. This is
   accessed via macros so that it can be used inside IS_ENABLED(), rather than
   requiring #ifdefs in the C code when it is not present.

`gd->dm_udevice_rt`
   This holds a pointer to a list of `struct udevice_rt` records, one for each
   `struct udevice`. The list is in alphabetical order by the name used
   in `DM_DEVICE_INST(name)` (a C version of the devicetree node) and indexed by
   idx, with the first record having an index of 0. It is only used if
   OF_PLATDATA_INST is enabled. This is accessed via macros so that it can be
   used inside `IS_ENABLED()`, rather than requiring #ifdefs in the C code when
   it is not present.

`gd->dm_priv_base`
   When OF_PLATDATA_RT is enabled, the private/platform data for each device is
   copied into an allocated region by U-Boot on start-up. This points to that
   region. All calls to accessor functions (e.g. `dev_get_priv()`) then
   translate from the pointer provided by the caller (assumed to lie between
   `__priv_data_start` and `__priv_data_end`) to the new allocated region. This
   member is accessed via macros so that it can be used inside IS_ENABLED(),
   rather than required #ifdefs in the C code when it is not present.

`struct udevice->flags_`
   When OF_PLATDATA_RT is enabled, device flags are no-longer part of
   `struct udevice`, but are instead kept in `struct udevice_rt`, as described
   above. Flags are accessed via functions, such as `dev_get_flags()` and
   `dev_or_flags()`.

`struct udevice->node_`
   When OF_PLATDATA is enabled, there is no devicetree at runtime, so no need
   for this field. It is removed, just to save space.

`DM_PHASE`
   This macro is used to indicate which phase of U-Boot a driver is intended
   for. See above for details.

`DM_HDR`
   This macro is used to indicate which header file dtoc should use to allow
   a driver declaration to compile correctly. See above for details.

`device_get_by_ofplat_idx()`
   There used to be a function called `device_get_by_driver_info()` which
   looked up a `struct driver_info` pointer and returned the `struct udevice`
   that was created from it. It was only available for use with of-platdata.
   This has been removed in favour of `device_get_by_ofplat_idx()` which uses
   `idx`, the index of the `struct driver_info` or `struct udevice` in the
   linker_list. Similarly, the `struct phandle_0_arg` (etc.) structs have been
   updated to use this index instead of a pointer to `struct driver_info`.

`DM_DRVINFO_GET`
   This has been removed since we now use indexes to obtain a driver from
   `struct phandle_0_arg` and the like.

Two-pass binding
   The original of-platdata tried to order `U_BOOT_DRVINFO()` in the generated
   files so as to have parents declared ahead of children. This was convenient
   as it avoided any special code in U-Boot. With OF_PLATDATA_INST this does
   not work as the idx value relies on using alphabetical order for everything,
   so that dtoc and U-Boot's linker_lists agree on the idx value. Devices are
   then bound in order of idx, having no regard to parent/child relationships.
   For this reason, device binding now hapens in multiple passes, with parents
   being bound before their children. This is important so that children can
   find their parents in the bind() method if needed.

Root device
   The root device is generally bound by U-Boot but with OF_PLATDATA_INST it
   cannot be, since binding needs to be done at build time. So in this case
   dtoc sets up a root device using `DM_DEVICE_INST()` in `dt-device.c` and
   U-Boot makes use of that. When OF_PLATDATA_INST is not enabled, U-Boot
   generally ignores the root node and does not create a `U_BOOT_DRVINFO()`
   record for it. This means that the idx numbers used by `struct driver_info`
   (when OF_PLATDATA_INST is disabled) and the idx numbers used by
   `struct udevice` (when OF_PLATDATA_INST is enabled) differ, since one has a
   root node and the other does not. This does not actually matter, since only
   one of them is actually used for any particular build, but it is worth
   keeping in mind if comparing index values and switching OF_PLATDATA_INST on
   and off.

`__priv_data_start` and `__priv_data_end`
   The private/platform data declared by dtoc is all collected together in
   a linker section and these symbols mark the start and end of it. This allows
   U-Boot to relocate the area to a new location if needed (with
   OF_PLATDATA_RT)

`dm_priv_to_rw()`
   This function converts a private- or platform-data pointer value generated by
   dtoc into one that can be used by U-Boot. It is a NOP unless OF_PLATDATA_RT
   is enabled, in which case it translates the address to the relocated
   region. See above for more information.

The dm_populate_phandle_data() function that was previous needed has now been
removed, since dtoc can address the drivers directly from dt-plat.c and does
not need to fix up things at runtime.

The pylibfdt Python module is used to access the devicetree.


Credits
-------

This is an implementation of an idea by Tom Rini <trini@konsulko.com>.


Future work
-----------
- Consider programmatically reading binding files instead of devicetree
  contents
- Allow IS_ENABLED() to be used in the C code instead of #if


.. Simon Glass <sjg@chromium.org>
.. Google, Inc
.. 6/6/16
.. Updated Independence Day 2016
.. Updated 1st October 2020
.. Updated 5th February 2021
