xref: /linux/drivers/of/Kconfig (revision 55f3538c4923e9dfca132e99ebec370e8094afda)
1# SPDX-License-Identifier: GPL-2.0
2config DTC
3	bool
4
5menuconfig OF
6	bool "Device Tree and Open Firmware support"
7	help
8	  This option enables the device tree infrastructure.
9	  It is automatically selected by platforms that need it or can
10	  be enabled manually for unittests, overlays or
11	  compile-coverage.
12
13if OF
14
15config OF_UNITTEST
16	bool "Device Tree runtime unit tests"
17	depends on !SPARC
18	select IRQ_DOMAIN
19	select OF_EARLY_FLATTREE
20	select OF_RESOLVE
21	help
22	  This option builds in test cases for the device tree infrastructure
23	  that are executed once at boot time, and the results dumped to the
24	  console.
25
26	  If unsure, say N here, but this option is safe to enable.
27
28config OF_ALL_DTBS
29	bool "Build all Device Tree Blobs"
30	depends on COMPILE_TEST
31	select DTC
32	help
33	  This option builds all possible Device Tree Blobs (DTBs) for the
34	  current architecture.
35
36	  If unsure, say N here, but this option is safe to enable.
37
38config OF_FLATTREE
39	bool
40	select DTC
41	select LIBFDT
42	select CRC32
43
44config OF_EARLY_FLATTREE
45	bool
46	select OF_FLATTREE
47
48config OF_PROMTREE
49	bool
50
51config OF_KOBJ
52	def_bool SYSFS
53
54# Hardly any platforms need this.  It is safe to select, but only do so if you
55# need it.
56config OF_DYNAMIC
57	bool "Support for dynamic device trees" if OF_UNITTEST
58	select OF_KOBJ
59	help
60	  On some platforms, the device tree can be manipulated at runtime.
61	  While this option is selected automatically on such platforms, you
62	  can enable it manually to improve device tree unit test coverage.
63
64config OF_ADDRESS
65	def_bool y
66	depends on !SPARC && (HAS_IOMEM || UML)
67	select OF_ADDRESS_PCI if PCI
68
69config OF_ADDRESS_PCI
70	bool
71
72config OF_IRQ
73	def_bool y
74	depends on !SPARC && IRQ_DOMAIN
75
76config OF_NET
77	depends on NETDEVICES
78	def_bool y
79
80config OF_MDIO
81	def_tristate PHYLIB
82	depends on PHYLIB
83	select FIXED_PHY
84	help
85	  OpenFirmware MDIO bus (Ethernet PHY) accessors
86
87config OF_PCI
88	def_tristate PCI
89	depends on PCI
90	help
91	  OpenFirmware PCI bus accessors
92
93config OF_PCI_IRQ
94	def_tristate PCI
95	depends on OF_PCI && OF_IRQ
96	help
97	  OpenFirmware PCI IRQ routing helpers
98
99config OF_RESERVED_MEM
100	depends on OF_EARLY_FLATTREE
101	bool
102	help
103	  Helpers to allow for reservation of memory regions
104
105config OF_RESOLVE
106	bool
107
108config OF_OVERLAY
109	bool "Device Tree overlays"
110	select OF_DYNAMIC
111	select OF_RESOLVE
112	help
113	  Overlays are a method to dynamically modify part of the kernel's
114	  device tree with dynamically loaded data.
115	  While this option is selected automatically when needed, you can
116	  enable it manually to improve device tree unit test coverage.
117
118config OF_NUMA
119	bool
120
121endif # OF
122