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