blob: d5850093539d20b076a0c02b0859bdef4d3c12f9 [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
Masahiro Yamadadffb86e2015-08-12 07:31:54 +090017config SPL_OF_CONTROL
18 bool "Enable run-time configuration via Device Tree in SPL"
19 depends on SPL && OF_CONTROL
Simon Glass2860f032015-02-27 22:06:38 -070020 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 Yamada783e6a72014-09-22 19:59:05 +090025choice
26 prompt "Provider of DTB for DT control"
27 depends on OF_CONTROL
28
29config 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
36config 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 Glass3d3f60c2015-08-31 18:47:52 -060040 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 Yamada783e6a72014-09-22 19:59:05 +090043
44config 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
52endchoice
53
Masahiro Yamadaf1ef2b62014-09-22 19:59:06 +090054config DEFAULT_DEVICE_TREE
55 string "Default Device Tree for DT control"
Simon Glass70d41092016-02-22 22:55:44 -070056 depends on OF_CONTROL
Masahiro Yamadaf1ef2b62014-09-22 19:59:06 +090057 help
58 This option specifies the default Device Tree used for DT control.
Robert P. J. Day5699ea62014-10-21 16:44:32 -040059 It can be overridden from the command line:
Masahiro Yamadaf1ef2b62014-09-22 19:59:06 +090060 $ make DEVICE_TREE=<device-tree-name>
61
Simon Glasscdf17242016-02-22 22:55:57 -070062config OF_LIST
63 string "List of device tree files to include for DT control"
64 depends on SPL_LOAD_FIT
65 help
66 This option specifies a list of device tree files to use for DT
67 control. These will be packaged into a FIT. At run-time, SPL will
68 select the correct DT to use by examining the hardware (e.g.
69 reading a board ID value). This is a list of device tree files
70 (without the directory or .dtb suffix) separated by <space>.
71
Simon Glassfa78e0a2015-06-23 15:38:29 -060072config OF_SPL_REMOVE_PROPS
73 string "List of device tree properties to drop for SPL"
Masahiro Yamada897705e2015-08-28 20:28:42 +090074 depends on SPL_OF_CONTROL
Masahiro Yamada5f3f7b72016-02-03 20:51:36 +090075 default "interrupt-parent" if SPL_PINCTRL_FULL && SPL_CLK
Masahiro Yamada6aa81792015-08-31 19:36:24 +090076 default "clocks clock-names interrupt-parent" if SPL_PINCTRL_FULL
Masahiro Yamada5f3f7b72016-02-03 20:51:36 +090077 default "pinctrl-0 pinctrl-names interrupt-parent" if SPL_CLK
Simon Glassfa78e0a2015-06-23 15:38:29 -060078 default "pinctrl-0 pinctrl-names clocks clock-names interrupt-parent"
79 help
80 Since SPL normally runs in a reduced memory space, the device tree
81 is cut down to only what is needed to load and start U-Boot. Only
82 nodes marked with the property "u-boot,dm-pre-reloc" will be
83 included. In addition, some properties are not used by U-Boot and
84 can be discarded. This option defines the list of properties to
85 discard.
86
Masahiro Yamada783e6a72014-09-22 19:59:05 +090087endmenu