Kconfig 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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. config OF_PRIOR_STAGE
  88. bool "Prior stage bootloader DTB for DT control"
  89. help
  90. If this option is enabled, the device tree used for DT
  91. control will be read from a device tree binary, at a memory
  92. location passed to U-Boot by the prior stage bootloader.
  93. endchoice
  94. config DEFAULT_DEVICE_TREE
  95. string "Default Device Tree for DT control"
  96. depends on OF_CONTROL
  97. help
  98. This option specifies the default Device Tree used for DT control.
  99. It can be overridden from the command line:
  100. $ make DEVICE_TREE=<device-tree-name>
  101. config OF_LIST
  102. string "List of device tree files to include for DT control"
  103. depends on SPL_LOAD_FIT || MULTI_DTB_FIT
  104. default DEFAULT_DEVICE_TREE
  105. help
  106. This option specifies a list of device tree files to use for DT
  107. control. These will be packaged into a FIT. At run-time, U-boot
  108. or SPL will select the correct DT to use by examining the
  109. hardware (e.g. reading a board ID value). This is a list of
  110. device tree files (without the directory or .dtb suffix)
  111. separated by <space>.
  112. config DTB_RESELECT
  113. bool "Support swapping dtbs at a later point in boot"
  114. depends on MULTI_DTB_FIT
  115. help
  116. It is possible during initial boot you may need to use a generic
  117. dtb until you can fully determine the board your running on. This
  118. config allows boards to implement a function at a later point
  119. during boot to switch to the "correct" dtb.
  120. config MULTI_DTB_FIT
  121. bool "Support embedding several DTBs in a FIT image for u-boot"
  122. help
  123. This option provides hooks to allow U-boot to parse an
  124. appended FIT image and enable board specific code to then select
  125. the correct DTB to be used. Use this if you need to support
  126. multiple DTBs but don't use the SPL.
  127. config SPL_MULTI_DTB_FIT
  128. depends on SPL_LOAD_FIT && SPL_OF_CONTROL && !SPL_OF_PLATDATA
  129. bool "Support embedding several DTBs in a FIT image for the SPL"
  130. help
  131. This option provides the SPL with the ability to select its own
  132. DTB at runtime from an appended FIT image containing several DTBs.
  133. This allows using the same SPL binary on multiple platforms.
  134. The primary purpose is to handle different versions of
  135. the same platform without tweaking the platform code if the
  136. differences can be expressed in the DTBs (common examples are: bus
  137. capabilities, pad configurations).
  138. config SPL_OF_LIST
  139. string "List of device tree files to include for DT control in SPL"
  140. depends on SPL_MULTI_DTB_FIT
  141. default OF_LIST
  142. help
  143. This option specifies a list of device tree files to use for DT
  144. control in the SPL. These will be packaged into a FIT. At run-time,
  145. the SPL will select the correct DT to use by examining the
  146. hardware (e.g. reading a board ID value). This is a list of
  147. device tree files (without the directory or .dtb suffix)
  148. separated by <space>.
  149. choice
  150. prompt "SPL OF LIST compression"
  151. depends on SPL_MULTI_DTB_FIT
  152. default SPL_MULTI_DTB_FIT_LZO
  153. config SPL_MULTI_DTB_FIT_LZO
  154. bool "LZO"
  155. depends on SYS_MALLOC_F
  156. select SPL_LZO
  157. help
  158. Compress the FIT image containing the DTBs available for the SPL
  159. using LZO compression. (requires lzop on host).
  160. config SPL_MULTI_DTB_FIT_GZIP
  161. bool "GZIP"
  162. depends on SYS_MALLOC_F
  163. select SPL_GZIP
  164. help
  165. Compress the FIT image containing the DTBs available for the SPL
  166. using GZIP compression. (requires gzip on host)
  167. config SPL_MULTI_DTB_FIT_NO_COMPRESSION
  168. bool "No compression"
  169. help
  170. Do not compress the FIT image containing the DTBs available for the SPL.
  171. Use this options only if LZO is not available and the DTBs are very small.
  172. endchoice
  173. choice
  174. prompt "Location of uncompressed DTBs "
  175. depends on (SPL_MULTI_DTB_FIT_GZIP || SPL_MULTI_DTB_FIT_LZO)
  176. default SPL_MULTI_DTB_FIT_DYN_ALLOC if SYS_MALLOC_F
  177. config SPL_MULTI_DTB_FIT_DYN_ALLOC
  178. bool "Dynamically allocate the memory"
  179. depends on SYS_MALLOC_F
  180. config SPL_MULTI_DTB_FIT_USER_DEFINED_AREA
  181. bool "User-defined location"
  182. endchoice
  183. config SPL_MULTI_DTB_FIT_UNCOMPRESS_SZ
  184. hex "Size of memory reserved to uncompress the DTBs"
  185. depends on (SPL_MULTI_DTB_FIT_GZIP || SPL_MULTI_DTB_FIT_LZO)
  186. default 0x8000
  187. help
  188. This is the size of this area where the DTBs are uncompressed.
  189. If this area is dynamically allocated, make sure that
  190. SPL_SYS_MALLOC_F_LEN is big enough to contain it.
  191. config SPL_MULTI_DTB_FIT_USER_DEF_ADDR
  192. hex "Address of memory where dtbs are uncompressed"
  193. depends on SPL_MULTI_DTB_FIT_USER_DEFINED_AREA
  194. help
  195. the FIT image containing the DTBs is uncompressed in an area defined
  196. at compilation time. This is the address of this area. It must be
  197. aligned on 2-byte boundary.
  198. config OF_SPL_REMOVE_PROPS
  199. string "List of device tree properties to drop for SPL"
  200. depends on SPL_OF_CONTROL
  201. default "interrupt-parent" if SPL_PINCTRL && SPL_CLK
  202. default "clocks clock-names interrupt-parent" if SPL_PINCTRL
  203. default "pinctrl-0 pinctrl-names interrupt-parent" if SPL_CLK
  204. default "pinctrl-0 pinctrl-names clocks clock-names interrupt-parent"
  205. help
  206. Since SPL normally runs in a reduced memory space, the device tree
  207. is cut down to only what is needed to load and start U-Boot. Only
  208. nodes marked with the property "u-boot,dm-pre-reloc" will be
  209. included. In addition, some properties are not used by U-Boot and
  210. can be discarded. This option defines the list of properties to
  211. discard.
  212. config SPL_OF_PLATDATA
  213. bool "Generate platform data for use in SPL"
  214. depends on SPL_OF_CONTROL
  215. select DTOC
  216. help
  217. For very constrained SPL environments the overhead of decoding
  218. device tree nodes and converting their contents into platform data
  219. is too large. This overhead includes libfdt code as well as the
  220. device tree contents itself. The latter is fairly compact, but the
  221. former can add 3KB or more to a Thumb 2 Image.
  222. This option enables generation of platform data from the device
  223. tree as C code. This code creates devices using U_BOOT_DEVICE()
  224. declarations. The benefit is that it allows driver code to access
  225. the platform data directly in C structures, avoidin the libfdt
  226. overhead.
  227. This option works by generating C structure declarations for each
  228. compatible string, then adding platform data and U_BOOT_DEVICE
  229. declarations for each node. See README.platdata for more
  230. information.
  231. config TPL_OF_PLATDATA
  232. bool "Generate platform data for use in TPL"
  233. depends on TPL_OF_CONTROL
  234. select DTOC
  235. help
  236. For very constrained SPL environments the overhead of decoding
  237. device tree nodes and converting their contents into platform data
  238. is too large. This overhead includes libfdt code as well as the
  239. device tree contents itself. The latter is fairly compact, but the
  240. former can add 3KB or more to a Thumb 2 Image.
  241. This option enables generation of platform data from the device
  242. tree as C code. This code creates devices using U_BOOT_DEVICE()
  243. declarations. The benefit is that it allows driver code to access
  244. the platform data directly in C structures, avoidin the libfdt
  245. overhead.
  246. This option works by generating C structure declarations for each
  247. compatible string, then adding platform data and U_BOOT_DEVICE
  248. declarations for each node. See README.platdata for more
  249. information.
  250. endmenu
  251. config MKIMAGE_DTC_PATH
  252. string "Path to dtc binary for use within mkimage"
  253. default "dtc"
  254. help
  255. The mkimage host tool will, in order to generate FIT images make
  256. calls to the dtc application in order to create the output. In
  257. some cases the system dtc may not support all required features
  258. and the path to a different version should be given here.