blob: 454acaaa3c73ad939c508dee1e2f9307e6be679d [file] [log] [blame]
Masahiro Yamada9fadbc82014-09-22 19:59:05 +09001#
2# Device Tree Control
3#
Masahiro Yamada9fadbc82014-09-22 19:59:05 +09004
5config SUPPORT_OF_CONTROL
6 bool
7
Tom Rini61d0fac2017-09-23 13:00:57 -04008config DTC
9 bool
10
Masahiro Yamada9fadbc82014-09-22 19:59:05 +090011menu "Device Tree Control"
Masahiro Yamada9fadbc82014-09-22 19:59:05 +090012 depends on SUPPORT_OF_CONTROL
13
14config OF_CONTROL
15 bool "Run-time configuration via Device Tree"
Tom Rini61d0fac2017-09-23 13:00:57 -040016 select DTC
Masahiro Yamada9fadbc82014-09-22 19:59:05 +090017 help
18 This feature provides for run-time configuration of U-Boot
19 via a flattened device tree.
20
mario.six@gdsys.cc7e9b9d62017-02-22 16:07:22 +010021config 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 Yamada1e35f392015-08-12 07:31:54 +090031config SPL_OF_CONTROL
32 bool "Enable run-time configuration via Device Tree in SPL"
33 depends on SPL && OF_CONTROL
Simon Glass400d0402015-02-27 22:06:38 -070034 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 Tomsich2341dc62017-06-29 11:11:21 +020039config 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 Glassa6eedb82017-05-18 20:08:53 -060047config 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 Yamada9fadbc82014-09-22 19:59:05 +090058choice
59 prompt "Provider of DTB for DT control"
60 depends on OF_CONTROL
61
62config 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
69config 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 Glassd9b64ea2015-08-31 18:47:52 -060073 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 Yamada9fadbc82014-09-22 19:59:05 +090076
Alex Deymo5b661ec2017-04-02 01:25:20 -070077config 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 Yamada9fadbc82014-09-22 19:59:05 +090085config 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
93endchoice
94
Masahiro Yamada8c65b9d2014-09-22 19:59:06 +090095config DEFAULT_DEVICE_TREE
96 string "Default Device Tree for DT control"
Simon Glass644f5bc2016-02-22 22:55:44 -070097 depends on OF_CONTROL
Masahiro Yamada8c65b9d2014-09-22 19:59:06 +090098 help
99 This option specifies the default Device Tree used for DT control.
Robert P. J. Dayeb61df52014-10-21 16:44:32 -0400100 It can be overridden from the command line:
Masahiro Yamada8c65b9d2014-09-22 19:59:06 +0900101 $ make DEVICE_TREE=<device-tree-name>
102
Simon Glass963817b2016-02-22 22:55:57 -0700103config OF_LIST
104 string "List of device tree files to include for DT control"
Jean-Jacques Hiblot2037fa42017-09-15 12:57:24 +0200105 depends on SPL_LOAD_FIT || MULTI_DTB_FIT
Michal Simek9b2e95a2016-05-04 15:14:11 +0200106 default DEFAULT_DEVICE_TREE
Simon Glass963817b2016-02-22 22:55:57 -0700107 help
108 This option specifies a list of device tree files to use for DT
Cooper Jr., Franklin06c7b622017-06-16 17:25:09 -0500109 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 Glass963817b2016-02-22 22:55:57 -0700114
Jean-Jacques Hiblot2037fa42017-09-15 12:57:24 +0200115
116config DTB_RESELECT
117 bool "Support swapping dtbs at a later point in boot"
118 depends on MULTI_DTB_FIT
119 help
120 It is possible during initial boot you may need to use a generic
121 dtb until you can fully determine the board your running on. This
122 config allows boards to implement a function at a later point
123 during boot to switch to the "correct" dtb.
124
125config MULTI_DTB_FIT
126 bool "Support embedding several DTBs in a FIT image for u-boot"
127 help
128 This option provides hooks to allow U-boot to parse an
129 appended FIT image and enable board specific code to then select
130 the correct DTB to be used. Use this if you need to support
131 multiple DTBs but don't use the SPL.
132
Simon Glass89caf332015-06-23 15:38:29 -0600133config OF_SPL_REMOVE_PROPS
134 string "List of device tree properties to drop for SPL"
Masahiro Yamadaddb9aa972015-08-28 20:28:42 +0900135 depends on SPL_OF_CONTROL
Vikas Manochab6cca7d2017-03-24 14:47:44 -0700136 default "interrupt-parent" if SPL_PINCTRL && SPL_CLK
137 default "clocks clock-names interrupt-parent" if SPL_PINCTRL
Masahiro Yamadaf03811c2016-02-03 20:51:36 +0900138 default "pinctrl-0 pinctrl-names interrupt-parent" if SPL_CLK
Simon Glass89caf332015-06-23 15:38:29 -0600139 default "pinctrl-0 pinctrl-names clocks clock-names interrupt-parent"
140 help
141 Since SPL normally runs in a reduced memory space, the device tree
142 is cut down to only what is needed to load and start U-Boot. Only
143 nodes marked with the property "u-boot,dm-pre-reloc" will be
144 included. In addition, some properties are not used by U-Boot and
145 can be discarded. This option defines the list of properties to
146 discard.
147
Simon Glass7bc65f32016-07-04 11:58:06 -0600148config SPL_OF_PLATDATA
149 bool "Generate platform data for use in SPL"
150 depends on SPL_OF_CONTROL
151 help
152 For very constrained SPL environments the overhead of decoding
153 device tree nodes and converting their contents into platform data
154 is too large. This overhead includes libfdt code as well as the
155 device tree contents itself. The latter is fairly compact, but the
156 former can add 3KB or more to a Thumb 2 Image.
157
158 This option enables generation of platform data from the device
159 tree as C code. This code creates devices using U_BOOT_DEVICE()
160 declarations. The benefit is that it allows driver code to access
161 the platform data directly in C structures, avoidin the libfdt
162 overhead.
163
164 This option works by generating C structure declarations for each
165 compatible string, then adding platform data and U_BOOT_DEVICE
166 declarations for each node. See README.platdata for more
167 information.
168
Philipp Tomsich2341dc62017-06-29 11:11:21 +0200169config TPL_OF_PLATDATA
170 bool "Generate platform data for use in TPL"
171 depends on TPL_OF_CONTROL
172 help
173 For very constrained SPL environments the overhead of decoding
174 device tree nodes and converting their contents into platform data
175 is too large. This overhead includes libfdt code as well as the
176 device tree contents itself. The latter is fairly compact, but the
177 former can add 3KB or more to a Thumb 2 Image.
178
179 This option enables generation of platform data from the device
180 tree as C code. This code creates devices using U_BOOT_DEVICE()
181 declarations. The benefit is that it allows driver code to access
182 the platform data directly in C structures, avoidin the libfdt
183 overhead.
184
185 This option works by generating C structure declarations for each
186 compatible string, then adding platform data and U_BOOT_DEVICE
187 declarations for each node. See README.platdata for more
188 information.
189
Masahiro Yamada9fadbc82014-09-22 19:59:05 +0900190endmenu
Tom Rini0e17fc72017-09-23 23:14:33 -0400191
192config MKIMAGE_DTC_PATH
193 string "Path to dtc binary for use within mkimage"
194 default "dtc"
195 help
196 The mkimage host tool will, in order to generate FIT images make
197 calls to the dtc application in order to create the output. In
198 some cases the system dtc may not support all required features
199 and the path to a different version should be given here.