Kconfig 10 KB

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