Masahiro Yamada | 783e6a7 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 1 | # |
| 2 | # Device Tree Control |
| 3 | # |
Masahiro Yamada | 783e6a7 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 4 | |
| 5 | config SUPPORT_OF_CONTROL |
| 6 | bool |
| 7 | |
| 8 | menu "Device Tree Control" |
Masahiro Yamada | 783e6a7 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 9 | depends on SUPPORT_OF_CONTROL |
| 10 | |
| 11 | config OF_CONTROL |
| 12 | bool "Run-time configuration via Device Tree" |
| 13 | help |
| 14 | This feature provides for run-time configuration of U-Boot |
| 15 | via a flattened device tree. |
| 16 | |
Masahiro Yamada | dffb86e | 2015-08-12 07:31:54 +0900 | [diff] [blame] | 17 | config SPL_OF_CONTROL |
| 18 | bool "Enable run-time configuration via Device Tree in SPL" |
| 19 | depends on SPL && OF_CONTROL |
Simon Glass | 2860f03 | 2015-02-27 22:06:38 -0700 | [diff] [blame] | 20 | help |
| 21 | Some boards use device tree in U-Boot but only have 4KB of SRAM |
| 22 | which is not enough to support device tree. Enable this option to |
| 23 | allow such boards to be supported by U-Boot SPL. |
| 24 | |
Masahiro Yamada | 783e6a7 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 25 | choice |
| 26 | prompt "Provider of DTB for DT control" |
| 27 | depends on OF_CONTROL |
| 28 | |
| 29 | config OF_SEPARATE |
| 30 | bool "Separate DTB for DT control" |
| 31 | depends on !SANDBOX |
| 32 | help |
| 33 | If this option is enabled, the device tree will be built and |
| 34 | placed as a separate u-boot.dtb file alongside the U-Boot image. |
| 35 | |
| 36 | config OF_EMBED |
| 37 | bool "Embedded DTB for DT control" |
| 38 | help |
| 39 | If this option is enabled, the device tree will be picked up and |
Simon Glass | 3d3f60c | 2015-08-31 18:47:52 -0600 | [diff] [blame] | 40 | built into the U-Boot image. This is suitable for local debugging |
| 41 | and development only and is not recommended for production devices. |
| 42 | Boards in the mainline U-Boot tree should not use it. |
Masahiro Yamada | 783e6a7 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 43 | |
| 44 | config OF_HOSTFILE |
| 45 | bool "Host filed DTB for DT control" |
| 46 | depends on SANDBOX |
| 47 | help |
| 48 | If this option is enabled, DTB will be read from a file on startup. |
| 49 | This is only useful for Sandbox. Use the -d flag to U-Boot to |
| 50 | specify the file to read. |
| 51 | |
| 52 | endchoice |
| 53 | |
Masahiro Yamada | f1ef2b6 | 2014-09-22 19:59:06 +0900 | [diff] [blame] | 54 | config DEFAULT_DEVICE_TREE |
| 55 | string "Default Device Tree for DT control" |
Simon Glass | 70d4109 | 2016-02-22 22:55:44 -0700 | [diff] [blame] | 56 | depends on OF_CONTROL |
Masahiro Yamada | f1ef2b6 | 2014-09-22 19:59:06 +0900 | [diff] [blame] | 57 | help |
| 58 | This option specifies the default Device Tree used for DT control. |
Robert P. J. Day | 5699ea6 | 2014-10-21 16:44:32 -0400 | [diff] [blame] | 59 | It can be overridden from the command line: |
Masahiro Yamada | f1ef2b6 | 2014-09-22 19:59:06 +0900 | [diff] [blame] | 60 | $ make DEVICE_TREE=<device-tree-name> |
| 61 | |
Simon Glass | cdf1724 | 2016-02-22 22:55:57 -0700 | [diff] [blame] | 62 | config OF_LIST |
| 63 | string "List of device tree files to include for DT control" |
| 64 | depends on SPL_LOAD_FIT |
Michal Simek | c409bd0 | 2016-05-04 15:14:11 +0200 | [diff] [blame] | 65 | default DEFAULT_DEVICE_TREE |
Simon Glass | cdf1724 | 2016-02-22 22:55:57 -0700 | [diff] [blame] | 66 | help |
| 67 | This option specifies a list of device tree files to use for DT |
| 68 | control. These will be packaged into a FIT. At run-time, SPL will |
| 69 | select the correct DT to use by examining the hardware (e.g. |
| 70 | reading a board ID value). This is a list of device tree files |
| 71 | (without the directory or .dtb suffix) separated by <space>. |
| 72 | |
Simon Glass | fa78e0a | 2015-06-23 15:38:29 -0600 | [diff] [blame] | 73 | config OF_SPL_REMOVE_PROPS |
| 74 | string "List of device tree properties to drop for SPL" |
Masahiro Yamada | 897705e | 2015-08-28 20:28:42 +0900 | [diff] [blame] | 75 | depends on SPL_OF_CONTROL |
Masahiro Yamada | 5f3f7b7 | 2016-02-03 20:51:36 +0900 | [diff] [blame] | 76 | default "interrupt-parent" if SPL_PINCTRL_FULL && SPL_CLK |
Masahiro Yamada | 6aa8179 | 2015-08-31 19:36:24 +0900 | [diff] [blame] | 77 | default "clocks clock-names interrupt-parent" if SPL_PINCTRL_FULL |
Masahiro Yamada | 5f3f7b7 | 2016-02-03 20:51:36 +0900 | [diff] [blame] | 78 | default "pinctrl-0 pinctrl-names interrupt-parent" if SPL_CLK |
Simon Glass | fa78e0a | 2015-06-23 15:38:29 -0600 | [diff] [blame] | 79 | default "pinctrl-0 pinctrl-names clocks clock-names interrupt-parent" |
| 80 | help |
| 81 | Since SPL normally runs in a reduced memory space, the device tree |
| 82 | is cut down to only what is needed to load and start U-Boot. Only |
| 83 | nodes marked with the property "u-boot,dm-pre-reloc" will be |
| 84 | included. In addition, some properties are not used by U-Boot and |
| 85 | can be discarded. This option defines the list of properties to |
| 86 | discard. |
| 87 | |
Simon Glass | 2789ddb | 2016-07-04 11:58:06 -0600 | [diff] [blame] | 88 | config SPL_OF_PLATDATA |
| 89 | bool "Generate platform data for use in SPL" |
| 90 | depends on SPL_OF_CONTROL |
| 91 | help |
| 92 | For very constrained SPL environments the overhead of decoding |
| 93 | device tree nodes and converting their contents into platform data |
| 94 | is too large. This overhead includes libfdt code as well as the |
| 95 | device tree contents itself. The latter is fairly compact, but the |
| 96 | former can add 3KB or more to a Thumb 2 Image. |
| 97 | |
| 98 | This option enables generation of platform data from the device |
| 99 | tree as C code. This code creates devices using U_BOOT_DEVICE() |
| 100 | declarations. The benefit is that it allows driver code to access |
| 101 | the platform data directly in C structures, avoidin the libfdt |
| 102 | overhead. |
| 103 | |
| 104 | This option works by generating C structure declarations for each |
| 105 | compatible string, then adding platform data and U_BOOT_DEVICE |
| 106 | declarations for each node. See README.platdata for more |
| 107 | information. |
| 108 | |
Masahiro Yamada | 783e6a7 | 2014-09-22 19:59:05 +0900 | [diff] [blame] | 109 | endmenu |