blob: 6fe7a5bc08adf4caccbf3bccc9cb9ca4283b599f [file] [log] [blame]
Masahiro Yamada783e6a72014-09-22 19:59:05 +09001#
2# Device Tree Control
3#
Masahiro Yamada783e6a72014-09-22 19:59:05 +09004
5config SUPPORT_OF_CONTROL
6 bool
7
8menu "Device Tree Control"
Masahiro Yamada783e6a72014-09-22 19:59:05 +09009 depends on SUPPORT_OF_CONTROL
10
11config 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
mario.six@gdsys.cc2a792752017-02-22 16:07:22 +010017config OF_BOARD_FIXUP
18 bool "Board-specific manipulation of Device Tree"
19 help
20 In certain circumstances it is necessary to be able to modify
21 U-Boot's device tree (e.g. to delete device from it). This option
22 make the Device Tree writeable and provides a board-specific
23 "board_fix_fdt" callback (called during pre-relocation time), which
24 enables the board initialization to modifiy the Device Tree. The
25 modified copy is subsequently used by U-Boot after relocation.
26
Masahiro Yamadadffb86e2015-08-12 07:31:54 +090027config SPL_OF_CONTROL
28 bool "Enable run-time configuration via Device Tree in SPL"
29 depends on SPL && OF_CONTROL
Simon Glass2860f032015-02-27 22:06:38 -070030 help
31 Some boards use device tree in U-Boot but only have 4KB of SRAM
32 which is not enough to support device tree. Enable this option to
33 allow such boards to be supported by U-Boot SPL.
34
Masahiro Yamada783e6a72014-09-22 19:59:05 +090035choice
36 prompt "Provider of DTB for DT control"
37 depends on OF_CONTROL
38
39config OF_SEPARATE
40 bool "Separate DTB for DT control"
41 depends on !SANDBOX
42 help
43 If this option is enabled, the device tree will be built and
44 placed as a separate u-boot.dtb file alongside the U-Boot image.
45
46config OF_EMBED
47 bool "Embedded DTB for DT control"
48 help
49 If this option is enabled, the device tree will be picked up and
Simon Glass3d3f60c2015-08-31 18:47:52 -060050 built into the U-Boot image. This is suitable for local debugging
51 and development only and is not recommended for production devices.
52 Boards in the mainline U-Boot tree should not use it.
Masahiro Yamada783e6a72014-09-22 19:59:05 +090053
54config OF_HOSTFILE
55 bool "Host filed DTB for DT control"
56 depends on SANDBOX
57 help
58 If this option is enabled, DTB will be read from a file on startup.
59 This is only useful for Sandbox. Use the -d flag to U-Boot to
60 specify the file to read.
61
62endchoice
63
Masahiro Yamadaf1ef2b62014-09-22 19:59:06 +090064config DEFAULT_DEVICE_TREE
65 string "Default Device Tree for DT control"
Simon Glass70d41092016-02-22 22:55:44 -070066 depends on OF_CONTROL
Masahiro Yamadaf1ef2b62014-09-22 19:59:06 +090067 help
68 This option specifies the default Device Tree used for DT control.
Robert P. J. Day5699ea62014-10-21 16:44:32 -040069 It can be overridden from the command line:
Masahiro Yamadaf1ef2b62014-09-22 19:59:06 +090070 $ make DEVICE_TREE=<device-tree-name>
71
Simon Glasscdf17242016-02-22 22:55:57 -070072config OF_LIST
73 string "List of device tree files to include for DT control"
74 depends on SPL_LOAD_FIT
Michal Simekc409bd02016-05-04 15:14:11 +020075 default DEFAULT_DEVICE_TREE
Simon Glasscdf17242016-02-22 22:55:57 -070076 help
77 This option specifies a list of device tree files to use for DT
78 control. These will be packaged into a FIT. At run-time, SPL will
79 select the correct DT to use by examining the hardware (e.g.
80 reading a board ID value). This is a list of device tree files
81 (without the directory or .dtb suffix) separated by <space>.
82
Simon Glassfa78e0a2015-06-23 15:38:29 -060083config OF_SPL_REMOVE_PROPS
84 string "List of device tree properties to drop for SPL"
Masahiro Yamada897705e2015-08-28 20:28:42 +090085 depends on SPL_OF_CONTROL
Vikas Manocha239ae4a2017-03-24 14:47:44 -070086 default "interrupt-parent" if SPL_PINCTRL && SPL_CLK
87 default "clocks clock-names interrupt-parent" if SPL_PINCTRL
Masahiro Yamada5f3f7b72016-02-03 20:51:36 +090088 default "pinctrl-0 pinctrl-names interrupt-parent" if SPL_CLK
Simon Glassfa78e0a2015-06-23 15:38:29 -060089 default "pinctrl-0 pinctrl-names clocks clock-names interrupt-parent"
90 help
91 Since SPL normally runs in a reduced memory space, the device tree
92 is cut down to only what is needed to load and start U-Boot. Only
93 nodes marked with the property "u-boot,dm-pre-reloc" will be
94 included. In addition, some properties are not used by U-Boot and
95 can be discarded. This option defines the list of properties to
96 discard.
97
Simon Glass2789ddb2016-07-04 11:58:06 -060098config SPL_OF_PLATDATA
99 bool "Generate platform data for use in SPL"
100 depends on SPL_OF_CONTROL
101 help
102 For very constrained SPL environments the overhead of decoding
103 device tree nodes and converting their contents into platform data
104 is too large. This overhead includes libfdt code as well as the
105 device tree contents itself. The latter is fairly compact, but the
106 former can add 3KB or more to a Thumb 2 Image.
107
108 This option enables generation of platform data from the device
109 tree as C code. This code creates devices using U_BOOT_DEVICE()
110 declarations. The benefit is that it allows driver code to access
111 the platform data directly in C structures, avoidin the libfdt
112 overhead.
113
114 This option works by generating C structure declarations for each
115 compatible string, then adding platform data and U_BOOT_DEVICE
116 declarations for each node. See README.platdata for more
117 information.
118
Masahiro Yamada783e6a72014-09-22 19:59:05 +0900119endmenu