Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 1 | # |
| 2 | # Device Tree Control |
| 3 | # |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 4 | |
| 5 | config SUPPORT_OF_CONTROL |
| 6 | bool |
| 7 | |
Tom Rini | 61d0fac | 2017-09-23 13:00:57 -0400 | [diff] [blame] | 8 | config DTC |
| 9 | bool |
| 10 | |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 11 | menu "Device Tree Control" |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 12 | depends on SUPPORT_OF_CONTROL |
| 13 | |
| 14 | config OF_CONTROL |
| 15 | bool "Run-time configuration via Device Tree" |
Tom Rini | 61d0fac | 2017-09-23 13:00:57 -0400 | [diff] [blame] | 16 | select DTC |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 17 | help |
| 18 | This feature provides for run-time configuration of U-Boot |
| 19 | via a flattened device tree. |
| 20 | |
mario.six@gdsys.cc | 7e9b9d6 | 2017-02-22 16:07:22 +0100 | [diff] [blame] | 21 | config OF_BOARD_FIXUP |
| 22 | bool "Board-specific manipulation of Device Tree" |
| 23 | help |
| 24 | In certain circumstances it is necessary to be able to modify |
| 25 | U-Boot's device tree (e.g. to delete device from it). This option |
| 26 | make the Device Tree writeable and provides a board-specific |
| 27 | "board_fix_fdt" callback (called during pre-relocation time), which |
| 28 | enables the board initialization to modifiy the Device Tree. The |
| 29 | modified copy is subsequently used by U-Boot after relocation. |
| 30 | |
Masahiro Yamada | 1e35f39 | 2015-08-12 07:31:54 +0900 | [diff] [blame] | 31 | config SPL_OF_CONTROL |
| 32 | bool "Enable run-time configuration via Device Tree in SPL" |
| 33 | depends on SPL && OF_CONTROL |
Simon Glass | 400d040 | 2015-02-27 22:06:38 -0700 | [diff] [blame] | 34 | help |
| 35 | Some boards use device tree in U-Boot but only have 4KB of SRAM |
| 36 | which is not enough to support device tree. Enable this option to |
| 37 | allow such boards to be supported by U-Boot SPL. |
| 38 | |
Philipp Tomsich | 2341dc6 | 2017-06-29 11:11:21 +0200 | [diff] [blame] | 39 | config TPL_OF_CONTROL |
| 40 | bool "Enable run-time configuration via Device Tree in TPL" |
| 41 | depends on TPL && OF_CONTROL |
| 42 | help |
| 43 | Some boards use device tree in U-Boot but only have 4KB of SRAM |
| 44 | which is not enough to support device tree. Enable this option to |
| 45 | allow such boards to be supported by U-Boot TPL. |
| 46 | |
Simon Glass | a6eedb8 | 2017-05-18 20:08:53 -0600 | [diff] [blame] | 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 | |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 58 | choice |
| 59 | prompt "Provider of DTB for DT control" |
| 60 | depends on OF_CONTROL |
| 61 | |
| 62 | config OF_SEPARATE |
| 63 | bool "Separate DTB for DT control" |
| 64 | depends on !SANDBOX |
| 65 | help |
| 66 | If this option is enabled, the device tree will be built and |
| 67 | placed as a separate u-boot.dtb file alongside the U-Boot image. |
| 68 | |
| 69 | config OF_EMBED |
| 70 | bool "Embedded DTB for DT control" |
| 71 | help |
| 72 | If this option is enabled, the device tree will be picked up and |
Simon Glass | d9b64ea | 2015-08-31 18:47:52 -0600 | [diff] [blame] | 73 | built into the U-Boot image. This is suitable for local debugging |
| 74 | and development only and is not recommended for production devices. |
| 75 | Boards in the mainline U-Boot tree should not use it. |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 76 | |
Alex Deymo | 5b661ec | 2017-04-02 01:25:20 -0700 | [diff] [blame] | 77 | config OF_BOARD |
| 78 | bool "Provided by the board at runtime" |
| 79 | depends on !SANDBOX |
| 80 | help |
| 81 | If this option is enabled, the device tree will be provided by |
| 82 | the board at runtime if the board supports it, instead of being |
| 83 | bundled with the image. |
| 84 | |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 85 | config OF_HOSTFILE |
| 86 | bool "Host filed DTB for DT control" |
| 87 | depends on SANDBOX |
| 88 | help |
| 89 | If this option is enabled, DTB will be read from a file on startup. |
| 90 | This is only useful for Sandbox. Use the -d flag to U-Boot to |
| 91 | specify the file to read. |
| 92 | |
| 93 | endchoice |
| 94 | |
Masahiro Yamada | 8c65b9d | 2014-09-22 19:59:06 +0900 | [diff] [blame] | 95 | config DEFAULT_DEVICE_TREE |
| 96 | string "Default Device Tree for DT control" |
Simon Glass | 644f5bc | 2016-02-22 22:55:44 -0700 | [diff] [blame] | 97 | depends on OF_CONTROL |
Masahiro Yamada | 8c65b9d | 2014-09-22 19:59:06 +0900 | [diff] [blame] | 98 | help |
| 99 | This option specifies the default Device Tree used for DT control. |
Robert P. J. Day | eb61df5 | 2014-10-21 16:44:32 -0400 | [diff] [blame] | 100 | It can be overridden from the command line: |
Masahiro Yamada | 8c65b9d | 2014-09-22 19:59:06 +0900 | [diff] [blame] | 101 | $ make DEVICE_TREE=<device-tree-name> |
| 102 | |
Simon Glass | 963817b | 2016-02-22 22:55:57 -0700 | [diff] [blame] | 103 | config OF_LIST |
| 104 | string "List of device tree files to include for DT control" |
Cooper Jr., Franklin | 06c7b62 | 2017-06-16 17:25:09 -0500 | [diff] [blame] | 105 | depends on SPL_LOAD_FIT || FIT_EMBED |
Michal Simek | 9b2e95a | 2016-05-04 15:14:11 +0200 | [diff] [blame] | 106 | default DEFAULT_DEVICE_TREE |
Simon Glass | 963817b | 2016-02-22 22:55:57 -0700 | [diff] [blame] | 107 | help |
| 108 | This option specifies a list of device tree files to use for DT |
Cooper Jr., Franklin | 06c7b62 | 2017-06-16 17:25:09 -0500 | [diff] [blame] | 109 | control. These will be packaged into a FIT. At run-time, U-boot |
| 110 | or SPL will select the correct DT to use by examining the |
| 111 | hardware (e.g. reading a board ID value). This is a list of |
| 112 | device tree files (without the directory or .dtb suffix) |
| 113 | separated by <space>. |
Simon Glass | 963817b | 2016-02-22 22:55:57 -0700 | [diff] [blame] | 114 | |
Simon Glass | 89caf33 | 2015-06-23 15:38:29 -0600 | [diff] [blame] | 115 | config OF_SPL_REMOVE_PROPS |
| 116 | string "List of device tree properties to drop for SPL" |
Masahiro Yamada | ddb9aa97 | 2015-08-28 20:28:42 +0900 | [diff] [blame] | 117 | depends on SPL_OF_CONTROL |
Vikas Manocha | b6cca7d | 2017-03-24 14:47:44 -0700 | [diff] [blame] | 118 | default "interrupt-parent" if SPL_PINCTRL && SPL_CLK |
| 119 | default "clocks clock-names interrupt-parent" if SPL_PINCTRL |
Masahiro Yamada | f03811c | 2016-02-03 20:51:36 +0900 | [diff] [blame] | 120 | default "pinctrl-0 pinctrl-names interrupt-parent" if SPL_CLK |
Simon Glass | 89caf33 | 2015-06-23 15:38:29 -0600 | [diff] [blame] | 121 | default "pinctrl-0 pinctrl-names clocks clock-names interrupt-parent" |
| 122 | help |
| 123 | Since SPL normally runs in a reduced memory space, the device tree |
| 124 | is cut down to only what is needed to load and start U-Boot. Only |
| 125 | nodes marked with the property "u-boot,dm-pre-reloc" will be |
| 126 | included. In addition, some properties are not used by U-Boot and |
| 127 | can be discarded. This option defines the list of properties to |
| 128 | discard. |
| 129 | |
Simon Glass | 7bc65f3 | 2016-07-04 11:58:06 -0600 | [diff] [blame] | 130 | config SPL_OF_PLATDATA |
| 131 | bool "Generate platform data for use in SPL" |
| 132 | depends on SPL_OF_CONTROL |
| 133 | help |
| 134 | For very constrained SPL environments the overhead of decoding |
| 135 | device tree nodes and converting their contents into platform data |
| 136 | is too large. This overhead includes libfdt code as well as the |
| 137 | device tree contents itself. The latter is fairly compact, but the |
| 138 | former can add 3KB or more to a Thumb 2 Image. |
| 139 | |
| 140 | This option enables generation of platform data from the device |
| 141 | tree as C code. This code creates devices using U_BOOT_DEVICE() |
| 142 | declarations. The benefit is that it allows driver code to access |
| 143 | the platform data directly in C structures, avoidin the libfdt |
| 144 | overhead. |
| 145 | |
| 146 | This option works by generating C structure declarations for each |
| 147 | compatible string, then adding platform data and U_BOOT_DEVICE |
| 148 | declarations for each node. See README.platdata for more |
| 149 | information. |
| 150 | |
Philipp Tomsich | 2341dc6 | 2017-06-29 11:11:21 +0200 | [diff] [blame] | 151 | config TPL_OF_PLATDATA |
| 152 | bool "Generate platform data for use in TPL" |
| 153 | depends on TPL_OF_CONTROL |
| 154 | help |
| 155 | For very constrained SPL environments the overhead of decoding |
| 156 | device tree nodes and converting their contents into platform data |
| 157 | is too large. This overhead includes libfdt code as well as the |
| 158 | device tree contents itself. The latter is fairly compact, but the |
| 159 | former can add 3KB or more to a Thumb 2 Image. |
| 160 | |
| 161 | This option enables generation of platform data from the device |
| 162 | tree as C code. This code creates devices using U_BOOT_DEVICE() |
| 163 | declarations. The benefit is that it allows driver code to access |
| 164 | the platform data directly in C structures, avoidin the libfdt |
| 165 | overhead. |
| 166 | |
| 167 | This option works by generating C structure declarations for each |
| 168 | compatible string, then adding platform data and U_BOOT_DEVICE |
| 169 | declarations for each node. See README.platdata for more |
| 170 | information. |
| 171 | |
Masahiro Yamada | 9fadbc8 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 172 | endmenu |
Tom Rini | 0e17fc7 | 2017-09-23 23:14:33 -0400 | [diff] [blame] | 173 | |
| 174 | config MKIMAGE_DTC_PATH |
| 175 | string "Path to dtc binary for use within mkimage" |
| 176 | default "dtc" |
| 177 | help |
| 178 | The mkimage host tool will, in order to generate FIT images make |
| 179 | calls to the dtc application in order to create the output. In |
| 180 | some cases the system dtc may not support all required features |
| 181 | and the path to a different version should be given here. |