1783e6a72SMasahiro Yamada# 2783e6a72SMasahiro Yamada# Device Tree Control 3783e6a72SMasahiro Yamada# 4783e6a72SMasahiro Yamada 5783e6a72SMasahiro Yamadaconfig SUPPORT_OF_CONTROL 6783e6a72SMasahiro Yamada bool 7783e6a72SMasahiro Yamada 8783e6a72SMasahiro Yamadamenu "Device Tree Control" 9783e6a72SMasahiro Yamada depends on SUPPORT_OF_CONTROL 10783e6a72SMasahiro Yamada 11783e6a72SMasahiro Yamadaconfig OF_CONTROL 12783e6a72SMasahiro Yamada bool "Run-time configuration via Device Tree" 13783e6a72SMasahiro Yamada help 14783e6a72SMasahiro Yamada This feature provides for run-time configuration of U-Boot 15783e6a72SMasahiro Yamada via a flattened device tree. 16783e6a72SMasahiro Yamada 17dffb86e4SMasahiro Yamadaconfig SPL_OF_CONTROL 18dffb86e4SMasahiro Yamada bool "Enable run-time configuration via Device Tree in SPL" 19dffb86e4SMasahiro Yamada depends on SPL && OF_CONTROL 202860f03bSSimon Glass help 212860f03bSSimon Glass Some boards use device tree in U-Boot but only have 4KB of SRAM 222860f03bSSimon Glass which is not enough to support device tree. Enable this option to 232860f03bSSimon Glass allow such boards to be supported by U-Boot SPL. 242860f03bSSimon Glass 25783e6a72SMasahiro Yamadachoice 26783e6a72SMasahiro Yamada prompt "Provider of DTB for DT control" 27783e6a72SMasahiro Yamada depends on OF_CONTROL 28783e6a72SMasahiro Yamada 29783e6a72SMasahiro Yamadaconfig OF_SEPARATE 30783e6a72SMasahiro Yamada bool "Separate DTB for DT control" 31783e6a72SMasahiro Yamada depends on !SANDBOX 32783e6a72SMasahiro Yamada help 33783e6a72SMasahiro Yamada If this option is enabled, the device tree will be built and 34783e6a72SMasahiro Yamada placed as a separate u-boot.dtb file alongside the U-Boot image. 35783e6a72SMasahiro Yamada 36783e6a72SMasahiro Yamadaconfig OF_EMBED 37783e6a72SMasahiro Yamada bool "Embedded DTB for DT control" 38783e6a72SMasahiro Yamada help 39783e6a72SMasahiro Yamada If this option is enabled, the device tree will be picked up and 403d3f60cbSSimon Glass built into the U-Boot image. This is suitable for local debugging 413d3f60cbSSimon Glass and development only and is not recommended for production devices. 423d3f60cbSSimon Glass Boards in the mainline U-Boot tree should not use it. 43783e6a72SMasahiro Yamada 44783e6a72SMasahiro Yamadaconfig OF_HOSTFILE 45783e6a72SMasahiro Yamada bool "Host filed DTB for DT control" 46783e6a72SMasahiro Yamada depends on SANDBOX 47783e6a72SMasahiro Yamada help 48783e6a72SMasahiro Yamada If this option is enabled, DTB will be read from a file on startup. 49783e6a72SMasahiro Yamada This is only useful for Sandbox. Use the -d flag to U-Boot to 50783e6a72SMasahiro Yamada specify the file to read. 51783e6a72SMasahiro Yamada 52783e6a72SMasahiro Yamadaendchoice 53783e6a72SMasahiro Yamada 54f1ef2b62SMasahiro Yamadaconfig DEFAULT_DEVICE_TREE 55f1ef2b62SMasahiro Yamada string "Default Device Tree for DT control" 5670d41093SSimon Glass depends on OF_CONTROL 57f1ef2b62SMasahiro Yamada help 58f1ef2b62SMasahiro Yamada This option specifies the default Device Tree used for DT control. 595699ea6dSRobert P. J. Day It can be overridden from the command line: 60f1ef2b62SMasahiro Yamada $ make DEVICE_TREE=<device-tree-name> 61f1ef2b62SMasahiro Yamada 62cdf17246SSimon Glassconfig OF_LIST 63cdf17246SSimon Glass string "List of device tree files to include for DT control" 64cdf17246SSimon Glass depends on SPL_LOAD_FIT 65c409bd01SMichal Simek default DEFAULT_DEVICE_TREE 66cdf17246SSimon Glass help 67cdf17246SSimon Glass This option specifies a list of device tree files to use for DT 68cdf17246SSimon Glass control. These will be packaged into a FIT. At run-time, SPL will 69cdf17246SSimon Glass select the correct DT to use by examining the hardware (e.g. 70cdf17246SSimon Glass reading a board ID value). This is a list of device tree files 71cdf17246SSimon Glass (without the directory or .dtb suffix) separated by <space>. 72cdf17246SSimon Glass 73fa78e0a3SSimon Glassconfig OF_SPL_REMOVE_PROPS 74fa78e0a3SSimon Glass string "List of device tree properties to drop for SPL" 75897705ecSMasahiro Yamada depends on SPL_OF_CONTROL 765f3f7b79SMasahiro Yamada default "interrupt-parent" if SPL_PINCTRL_FULL && SPL_CLK 776aa8179fSMasahiro Yamada default "clocks clock-names interrupt-parent" if SPL_PINCTRL_FULL 785f3f7b79SMasahiro Yamada default "pinctrl-0 pinctrl-names interrupt-parent" if SPL_CLK 79fa78e0a3SSimon Glass default "pinctrl-0 pinctrl-names clocks clock-names interrupt-parent" 80fa78e0a3SSimon Glass help 81fa78e0a3SSimon Glass Since SPL normally runs in a reduced memory space, the device tree 82fa78e0a3SSimon Glass is cut down to only what is needed to load and start U-Boot. Only 83fa78e0a3SSimon Glass nodes marked with the property "u-boot,dm-pre-reloc" will be 84fa78e0a3SSimon Glass included. In addition, some properties are not used by U-Boot and 85fa78e0a3SSimon Glass can be discarded. This option defines the list of properties to 86fa78e0a3SSimon Glass discard. 87fa78e0a3SSimon Glass 88*2789ddb9SSimon Glassconfig SPL_OF_PLATDATA 89*2789ddb9SSimon Glass bool "Generate platform data for use in SPL" 90*2789ddb9SSimon Glass depends on SPL_OF_CONTROL 91*2789ddb9SSimon Glass help 92*2789ddb9SSimon Glass For very constrained SPL environments the overhead of decoding 93*2789ddb9SSimon Glass device tree nodes and converting their contents into platform data 94*2789ddb9SSimon Glass is too large. This overhead includes libfdt code as well as the 95*2789ddb9SSimon Glass device tree contents itself. The latter is fairly compact, but the 96*2789ddb9SSimon Glass former can add 3KB or more to a Thumb 2 Image. 97*2789ddb9SSimon Glass 98*2789ddb9SSimon Glass This option enables generation of platform data from the device 99*2789ddb9SSimon Glass tree as C code. This code creates devices using U_BOOT_DEVICE() 100*2789ddb9SSimon Glass declarations. The benefit is that it allows driver code to access 101*2789ddb9SSimon Glass the platform data directly in C structures, avoidin the libfdt 102*2789ddb9SSimon Glass overhead. 103*2789ddb9SSimon Glass 104*2789ddb9SSimon Glass This option works by generating C structure declarations for each 105*2789ddb9SSimon Glass compatible string, then adding platform data and U_BOOT_DEVICE 106*2789ddb9SSimon Glass declarations for each node. See README.platdata for more 107*2789ddb9SSimon Glass information. 108*2789ddb9SSimon Glass 109783e6a72SMasahiro Yamadaendmenu 110