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