Kconfig 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. #
  2. # Device Tree Control
  3. #
  4. config SUPPORT_OF_CONTROL
  5. bool
  6. menu "Device Tree Control"
  7. depends on SUPPORT_OF_CONTROL
  8. config OF_CONTROL
  9. bool "Run-time configuration via Device Tree"
  10. help
  11. This feature provides for run-time configuration of U-Boot
  12. via a flattened device tree.
  13. config OF_BOARD_FIXUP
  14. bool "Board-specific manipulation of Device Tree"
  15. help
  16. In certain circumstances it is necessary to be able to modify
  17. U-Boot's device tree (e.g. to delete device from it). This option
  18. make the Device Tree writeable and provides a board-specific
  19. "board_fix_fdt" callback (called during pre-relocation time), which
  20. enables the board initialization to modifiy the Device Tree. The
  21. modified copy is subsequently used by U-Boot after relocation.
  22. config SPL_OF_CONTROL
  23. bool "Enable run-time configuration via Device Tree in SPL"
  24. depends on SPL && OF_CONTROL
  25. help
  26. Some boards use device tree in U-Boot but only have 4KB of SRAM
  27. which is not enough to support device tree. Enable this option to
  28. allow such boards to be supported by U-Boot SPL.
  29. config TPL_OF_CONTROL
  30. bool "Enable run-time configuration via Device Tree in TPL"
  31. depends on TPL && OF_CONTROL
  32. help
  33. Some boards use device tree in U-Boot but only have 4KB of SRAM
  34. which is not enough to support device tree. Enable this option to
  35. allow such boards to be supported by U-Boot TPL.
  36. config OF_LIVE
  37. bool "Enable use of a live tree"
  38. depends on OF_CONTROL
  39. help
  40. Normally U-Boot uses a flat device tree which saves space and
  41. avoids the need to unpack the tree before use. However a flat
  42. tree does not support modifcation from within U-Boot since it
  43. can invalidate driver-model device tree offsets. This option
  44. enables a live tree which is available after relocation,
  45. and can be adjusted as needed.
  46. choice
  47. prompt "Provider of DTB for DT control"
  48. depends on OF_CONTROL
  49. config OF_SEPARATE
  50. bool "Separate DTB for DT control"
  51. depends on !SANDBOX
  52. help
  53. If this option is enabled, the device tree will be built and
  54. placed as a separate u-boot.dtb file alongside the U-Boot image.
  55. config OF_EMBED
  56. bool "Embedded DTB for DT control"
  57. help
  58. If this option is enabled, the device tree will be picked up and
  59. built into the U-Boot image. This is suitable for local debugging
  60. and development only and is not recommended for production devices.
  61. Boards in the mainline U-Boot tree should not use it.
  62. config OF_BOARD
  63. bool "Provided by the board at runtime"
  64. depends on !SANDBOX
  65. help
  66. If this option is enabled, the device tree will be provided by
  67. the board at runtime if the board supports it, instead of being
  68. bundled with the image.
  69. config OF_HOSTFILE
  70. bool "Host filed DTB for DT control"
  71. depends on SANDBOX
  72. help
  73. If this option is enabled, DTB will be read from a file on startup.
  74. This is only useful for Sandbox. Use the -d flag to U-Boot to
  75. specify the file to read.
  76. endchoice
  77. config DEFAULT_DEVICE_TREE
  78. string "Default Device Tree for DT control"
  79. depends on OF_CONTROL
  80. help
  81. This option specifies the default Device Tree used for DT control.
  82. It can be overridden from the command line:
  83. $ make DEVICE_TREE=<device-tree-name>
  84. config OF_LIST
  85. string "List of device tree files to include for DT control"
  86. depends on SPL_LOAD_FIT || FIT_EMBED
  87. default DEFAULT_DEVICE_TREE
  88. help
  89. This option specifies a list of device tree files to use for DT
  90. control. These will be packaged into a FIT. At run-time, U-boot
  91. or SPL will select the correct DT to use by examining the
  92. hardware (e.g. reading a board ID value). This is a list of
  93. device tree files (without the directory or .dtb suffix)
  94. separated by <space>.
  95. config OF_SPL_REMOVE_PROPS
  96. string "List of device tree properties to drop for SPL"
  97. depends on SPL_OF_CONTROL
  98. default "interrupt-parent" if SPL_PINCTRL && SPL_CLK
  99. default "clocks clock-names interrupt-parent" if SPL_PINCTRL
  100. default "pinctrl-0 pinctrl-names interrupt-parent" if SPL_CLK
  101. default "pinctrl-0 pinctrl-names clocks clock-names interrupt-parent"
  102. help
  103. Since SPL normally runs in a reduced memory space, the device tree
  104. is cut down to only what is needed to load and start U-Boot. Only
  105. nodes marked with the property "u-boot,dm-pre-reloc" will be
  106. included. In addition, some properties are not used by U-Boot and
  107. can be discarded. This option defines the list of properties to
  108. discard.
  109. config SPL_OF_PLATDATA
  110. bool "Generate platform data for use in SPL"
  111. depends on SPL_OF_CONTROL
  112. help
  113. For very constrained SPL environments the overhead of decoding
  114. device tree nodes and converting their contents into platform data
  115. is too large. This overhead includes libfdt code as well as the
  116. device tree contents itself. The latter is fairly compact, but the
  117. former can add 3KB or more to a Thumb 2 Image.
  118. This option enables generation of platform data from the device
  119. tree as C code. This code creates devices using U_BOOT_DEVICE()
  120. declarations. The benefit is that it allows driver code to access
  121. the platform data directly in C structures, avoidin the libfdt
  122. overhead.
  123. This option works by generating C structure declarations for each
  124. compatible string, then adding platform data and U_BOOT_DEVICE
  125. declarations for each node. See README.platdata for more
  126. information.
  127. config TPL_OF_PLATDATA
  128. bool "Generate platform data for use in TPL"
  129. depends on TPL_OF_CONTROL
  130. help
  131. For very constrained SPL environments the overhead of decoding
  132. device tree nodes and converting their contents into platform data
  133. is too large. This overhead includes libfdt code as well as the
  134. device tree contents itself. The latter is fairly compact, but the
  135. former can add 3KB or more to a Thumb 2 Image.
  136. This option enables generation of platform data from the device
  137. tree as C code. This code creates devices using U_BOOT_DEVICE()
  138. declarations. The benefit is that it allows driver code to access
  139. the platform data directly in C structures, avoidin the libfdt
  140. overhead.
  141. This option works by generating C structure declarations for each
  142. compatible string, then adding platform data and U_BOOT_DEVICE
  143. declarations for each node. See README.platdata for more
  144. information.
  145. endmenu