Kconfig 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. #
  2. # Device Tree Control
  3. #
  4. config SUPPORT_OF_CONTROL
  5. bool
  6. config DTC
  7. bool
  8. menu "Device Tree Control"
  9. depends on SUPPORT_OF_CONTROL
  10. config OF_CONTROL
  11. bool "Run-time configuration via Device Tree"
  12. select DTC
  13. help
  14. This feature provides for run-time configuration of U-Boot
  15. via a flattened device tree.
  16. config OF_BOARD_FIXUP
  17. bool "Board-specific manipulation of Device Tree"
  18. help
  19. In certain circumstances it is necessary to be able to modify
  20. U-Boot's device tree (e.g. to delete device from it). This option
  21. make the Device Tree writeable and provides a board-specific
  22. "board_fix_fdt" callback (called during pre-relocation time), which
  23. enables the board initialization to modifiy the Device Tree. The
  24. modified copy is subsequently used by U-Boot after relocation.
  25. config SPL_OF_CONTROL
  26. bool "Enable run-time configuration via Device Tree in SPL"
  27. depends on SPL && OF_CONTROL
  28. help
  29. Some boards use device tree in U-Boot but only have 4KB of SRAM
  30. which is not enough to support device tree. Enable this option to
  31. allow such boards to be supported by U-Boot SPL.
  32. config TPL_OF_CONTROL
  33. bool "Enable run-time configuration via Device Tree in TPL"
  34. depends on TPL && OF_CONTROL
  35. help
  36. Some boards use device tree in U-Boot but only have 4KB of SRAM
  37. which is not enough to support device tree. Enable this option to
  38. allow such boards to be supported by U-Boot TPL.
  39. config OF_LIVE
  40. bool "Enable use of a live tree"
  41. depends on OF_CONTROL
  42. help
  43. Normally U-Boot uses a flat device tree which saves space and
  44. avoids the need to unpack the tree before use. However a flat
  45. tree does not support modifcation from within U-Boot since it
  46. can invalidate driver-model device tree offsets. This option
  47. enables a live tree which is available after relocation,
  48. and can be adjusted as needed.
  49. choice
  50. prompt "Provider of DTB for DT control"
  51. depends on OF_CONTROL
  52. config OF_SEPARATE
  53. bool "Separate DTB for DT control"
  54. depends on !SANDBOX
  55. help
  56. If this option is enabled, the device tree will be built and
  57. placed as a separate u-boot.dtb file alongside the U-Boot image.
  58. config OF_EMBED
  59. bool "Embedded DTB for DT control"
  60. help
  61. If this option is enabled, the device tree will be picked up and
  62. built into the U-Boot image. This is suitable for local debugging
  63. and development only and is not recommended for production devices.
  64. Boards in the mainline U-Boot tree should not use it.
  65. config OF_BOARD
  66. bool "Provided by the board at runtime"
  67. depends on !SANDBOX
  68. help
  69. If this option is enabled, the device tree will be provided by
  70. the board at runtime if the board supports it, instead of being
  71. bundled with the image.
  72. config OF_HOSTFILE
  73. bool "Host filed DTB for DT control"
  74. depends on SANDBOX
  75. help
  76. If this option is enabled, DTB will be read from a file on startup.
  77. This is only useful for Sandbox. Use the -d flag to U-Boot to
  78. specify the file to read.
  79. endchoice
  80. config DEFAULT_DEVICE_TREE
  81. string "Default Device Tree for DT control"
  82. depends on OF_CONTROL
  83. help
  84. This option specifies the default Device Tree used for DT control.
  85. It can be overridden from the command line:
  86. $ make DEVICE_TREE=<device-tree-name>
  87. config OF_LIST
  88. string "List of device tree files to include for DT control"
  89. depends on SPL_LOAD_FIT || MULTI_DTB_FIT
  90. default DEFAULT_DEVICE_TREE
  91. help
  92. This option specifies a list of device tree files to use for DT
  93. control. These will be packaged into a FIT. At run-time, U-boot
  94. or SPL will select the correct DT to use by examining the
  95. hardware (e.g. reading a board ID value). This is a list of
  96. device tree files (without the directory or .dtb suffix)
  97. separated by <space>.
  98. config DTB_RESELECT
  99. bool "Support swapping dtbs at a later point in boot"
  100. depends on MULTI_DTB_FIT
  101. help
  102. It is possible during initial boot you may need to use a generic
  103. dtb until you can fully determine the board your running on. This
  104. config allows boards to implement a function at a later point
  105. during boot to switch to the "correct" dtb.
  106. config MULTI_DTB_FIT
  107. bool "Support embedding several DTBs in a FIT image for u-boot"
  108. help
  109. This option provides hooks to allow U-boot to parse an
  110. appended FIT image and enable board specific code to then select
  111. the correct DTB to be used. Use this if you need to support
  112. multiple DTBs but don't use the SPL.
  113. config SPL_MULTI_DTB_FIT
  114. depends on SPL_LOAD_FIT && SPL_OF_CONTROL && !SPL_OF_PLATDATA
  115. bool "Support embedding several DTBs in a FIT image for the SPL"
  116. help
  117. This option provides the SPL with the ability to select its own
  118. DTB at runtime from an appended FIT image containing several DTBs.
  119. This allows using the same SPL binary on multiple platforms.
  120. The primary purpose is to handle different versions of
  121. the same platform without tweaking the platform code if the
  122. differences can be expressed in the DTBs (common examples are: bus
  123. capabilities, pad configurations).
  124. config SPL_OF_LIST
  125. string "List of device tree files to include for DT control in SPL"
  126. depends on SPL_MULTI_DTB_FIT
  127. default OF_LIST
  128. help
  129. This option specifies a list of device tree files to use for DT
  130. control in the SPL. These will be packaged into a FIT. At run-time,
  131. the SPL will select the correct DT to use by examining the
  132. hardware (e.g. reading a board ID value). This is a list of
  133. device tree files (without the directory or .dtb suffix)
  134. separated by <space>.
  135. choice
  136. prompt "SPL OF LIST compression"
  137. depends on SPL_MULTI_DTB_FIT
  138. default SPL_MULTI_DTB_FIT_LZO
  139. config SPL_MULTI_DTB_FIT_LZO
  140. bool "LZO"
  141. depends on SYS_MALLOC_F
  142. select SPL_LZO
  143. help
  144. Compress the FIT image containing the DTBs available for the SPL
  145. using LZO compression. (requires lzop on host).
  146. config SPL_MULTI_DTB_FIT_GZIP
  147. bool "GZIP"
  148. depends on SYS_MALLOC_F
  149. select SPL_GZIP
  150. help
  151. Compress the FIT image containing the DTBs available for the SPL
  152. using GZIP compression. (requires gzip on host)
  153. config SPL_MULTI_DTB_FIT_NO_COMPRESSION
  154. bool "No compression"
  155. help
  156. Do not compress the FIT image containing the DTBs available for the SPL.
  157. Use this options only if LZO is not available and the DTBs are very small.
  158. endchoice
  159. choice
  160. prompt "Location of uncompressed DTBs "
  161. depends on (SPL_MULTI_DTB_FIT_GZIP || SPL_MULTI_DTB_FIT_LZO)
  162. default SPL_MULTI_DTB_FIT_DYN_ALLOC if SYS_MALLOC_F
  163. config SPL_MULTI_DTB_FIT_DYN_ALLOC
  164. bool "Dynamically allocate the memory"
  165. depends on SYS_MALLOC_F
  166. config SPL_MULTI_DTB_FIT_USER_DEFINED_AREA
  167. bool "User-defined location"
  168. endchoice
  169. config SPL_MULTI_DTB_FIT_UNCOMPRESS_SZ
  170. hex "Size of memory reserved to uncompress the DTBs"
  171. depends on (SPL_MULTI_DTB_FIT_GZIP || SPL_MULTI_DTB_FIT_LZO)
  172. default 0x8000
  173. help
  174. This is the size of this area where the DTBs are uncompressed.
  175. If this area is dynamically allocated, make sure that
  176. SPL_SYS_MALLOC_F_LEN is big enough to contain it.
  177. config SPL_MULTI_DTB_FIT_USER_DEF_ADDR
  178. hex "Address of memory where dtbs are uncompressed"
  179. depends on SPL_MULTI_DTB_FIT_USER_DEFINED_AREA
  180. help
  181. the FIT image containing the DTBs is uncompressed in an area defined
  182. at compilation time. This is the address of this area. It must be
  183. aligned on 2-byte boundary.
  184. config OF_SPL_REMOVE_PROPS
  185. string "List of device tree properties to drop for SPL"
  186. depends on SPL_OF_CONTROL
  187. default "interrupt-parent" if SPL_PINCTRL && SPL_CLK
  188. default "clocks clock-names interrupt-parent" if SPL_PINCTRL
  189. default "pinctrl-0 pinctrl-names interrupt-parent" if SPL_CLK
  190. default "pinctrl-0 pinctrl-names clocks clock-names interrupt-parent"
  191. help
  192. Since SPL normally runs in a reduced memory space, the device tree
  193. is cut down to only what is needed to load and start U-Boot. Only
  194. nodes marked with the property "u-boot,dm-pre-reloc" will be
  195. included. In addition, some properties are not used by U-Boot and
  196. can be discarded. This option defines the list of properties to
  197. discard.
  198. config SPL_OF_PLATDATA
  199. bool "Generate platform data for use in SPL"
  200. depends on SPL_OF_CONTROL
  201. help
  202. For very constrained SPL environments the overhead of decoding
  203. device tree nodes and converting their contents into platform data
  204. is too large. This overhead includes libfdt code as well as the
  205. device tree contents itself. The latter is fairly compact, but the
  206. former can add 3KB or more to a Thumb 2 Image.
  207. This option enables generation of platform data from the device
  208. tree as C code. This code creates devices using U_BOOT_DEVICE()
  209. declarations. The benefit is that it allows driver code to access
  210. the platform data directly in C structures, avoidin the libfdt
  211. overhead.
  212. This option works by generating C structure declarations for each
  213. compatible string, then adding platform data and U_BOOT_DEVICE
  214. declarations for each node. See README.platdata for more
  215. information.
  216. config TPL_OF_PLATDATA
  217. bool "Generate platform data for use in TPL"
  218. depends on TPL_OF_CONTROL
  219. help
  220. For very constrained SPL environments the overhead of decoding
  221. device tree nodes and converting their contents into platform data
  222. is too large. This overhead includes libfdt code as well as the
  223. device tree contents itself. The latter is fairly compact, but the
  224. former can add 3KB or more to a Thumb 2 Image.
  225. This option enables generation of platform data from the device
  226. tree as C code. This code creates devices using U_BOOT_DEVICE()
  227. declarations. The benefit is that it allows driver code to access
  228. the platform data directly in C structures, avoidin the libfdt
  229. overhead.
  230. This option works by generating C structure declarations for each
  231. compatible string, then adding platform data and U_BOOT_DEVICE
  232. declarations for each node. See README.platdata for more
  233. information.
  234. endmenu
  235. config MKIMAGE_DTC_PATH
  236. string "Path to dtc binary for use within mkimage"
  237. default "dtc"
  238. help
  239. The mkimage host tool will, in order to generate FIT images make
  240. calls to the dtc application in order to create the output. In
  241. some cases the system dtc may not support all required features
  242. and the path to a different version should be given here.