]> git.ipfire.org Git - people/ms/u-boot.git/blame - dts/Kconfig
Allow boards to initialize the DT at runtime.
[people/ms/u-boot.git] / dts / Kconfig
CommitLineData
783e6a72
MY
1#
2# Device Tree Control
3#
783e6a72
MY
4
5config SUPPORT_OF_CONTROL
6 bool
7
8menu "Device Tree Control"
783e6a72
MY
9 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
2a792753 17config 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
dffb86e4
MY
27config SPL_OF_CONTROL
28 bool "Enable run-time configuration via Device Tree in SPL"
29 depends on SPL && OF_CONTROL
2860f03b
SG
30 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
783e6a72
MY
35choice
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
3d3f60cb
SG
50 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.
783e6a72 53
82f766d1
AD
54config OF_BOARD
55 bool "Provided by the board at runtime"
56 depends on !SANDBOX
57 help
58 If this option is enabled, the device tree will be provided by
59 the board at runtime if the board supports it, instead of being
60 bundled with the image.
61
783e6a72
MY
62config OF_HOSTFILE
63 bool "Host filed DTB for DT control"
64 depends on SANDBOX
65 help
66 If this option is enabled, DTB will be read from a file on startup.
67 This is only useful for Sandbox. Use the -d flag to U-Boot to
68 specify the file to read.
69
70endchoice
71
f1ef2b62
MY
72config DEFAULT_DEVICE_TREE
73 string "Default Device Tree for DT control"
70d41093 74 depends on OF_CONTROL
f1ef2b62
MY
75 help
76 This option specifies the default Device Tree used for DT control.
5699ea6d 77 It can be overridden from the command line:
f1ef2b62
MY
78 $ make DEVICE_TREE=<device-tree-name>
79
cdf17246
SG
80config OF_LIST
81 string "List of device tree files to include for DT control"
82 depends on SPL_LOAD_FIT
c409bd01 83 default DEFAULT_DEVICE_TREE
cdf17246
SG
84 help
85 This option specifies a list of device tree files to use for DT
86 control. These will be packaged into a FIT. At run-time, SPL will
87 select the correct DT to use by examining the hardware (e.g.
88 reading a board ID value). This is a list of device tree files
89 (without the directory or .dtb suffix) separated by <space>.
90
fa78e0a3
SG
91config OF_SPL_REMOVE_PROPS
92 string "List of device tree properties to drop for SPL"
897705ec 93 depends on SPL_OF_CONTROL
239ae4a9
VM
94 default "interrupt-parent" if SPL_PINCTRL && SPL_CLK
95 default "clocks clock-names interrupt-parent" if SPL_PINCTRL
5f3f7b79 96 default "pinctrl-0 pinctrl-names interrupt-parent" if SPL_CLK
fa78e0a3
SG
97 default "pinctrl-0 pinctrl-names clocks clock-names interrupt-parent"
98 help
99 Since SPL normally runs in a reduced memory space, the device tree
100 is cut down to only what is needed to load and start U-Boot. Only
101 nodes marked with the property "u-boot,dm-pre-reloc" will be
102 included. In addition, some properties are not used by U-Boot and
103 can be discarded. This option defines the list of properties to
104 discard.
105
2789ddb9
SG
106config SPL_OF_PLATDATA
107 bool "Generate platform data for use in SPL"
108 depends on SPL_OF_CONTROL
109 help
110 For very constrained SPL environments the overhead of decoding
111 device tree nodes and converting their contents into platform data
112 is too large. This overhead includes libfdt code as well as the
113 device tree contents itself. The latter is fairly compact, but the
114 former can add 3KB or more to a Thumb 2 Image.
115
116 This option enables generation of platform data from the device
117 tree as C code. This code creates devices using U_BOOT_DEVICE()
118 declarations. The benefit is that it allows driver code to access
119 the platform data directly in C structures, avoidin the libfdt
120 overhead.
121
122 This option works by generating C structure declarations for each
123 compatible string, then adding platform data and U_BOOT_DEVICE
124 declarations for each node. See README.platdata for more
125 information.
126
783e6a72 127endmenu