xref: /openbmc/linux/drivers/of/Kconfig (revision dabf6b36)
1af6074fcSRob Herring# SPDX-License-Identifier: GPL-2.0
25ab5fc7eSGrant Likelyconfig DTC
35ab5fc7eSGrant Likely	bool
45ab5fc7eSGrant Likely
50166dc11SRob Herringmenuconfig OF
60166dc11SRob Herring	bool "Device Tree and Open Firmware support"
70166dc11SRob Herring	help
80166dc11SRob Herring	  This option enables the device tree infrastructure.
90166dc11SRob Herring	  It is automatically selected by platforms that need it or can
100166dc11SRob Herring	  be enabled manually for unittests, overlays or
110166dc11SRob Herring	  compile-coverage.
12bcbefae2SStephen Rothwell
130166dc11SRob Herringif OF
145ab5fc7eSGrant Likely
1519fd7487SGrant Likelyconfig OF_UNITTEST
1619fd7487SGrant Likely	bool "Device Tree runtime unit tests"
176019a3d0SRob Herring	depends on !SPARC
186019a3d0SRob Herring	select IRQ_DOMAIN
19649e0a77SRob Herring	select OF_EARLY_FLATTREE
202eb46da2SGrant Likely	select OF_RESOLVE
2153a42093SGrant Likely	help
2253a42093SGrant Likely	  This option builds in test cases for the device tree infrastructure
235d927086SGeert Uytterhoeven	  that are executed once at boot time, and the results dumped to the
2453a42093SGrant Likely	  console.
2553a42093SGrant Likely
2653a42093SGrant Likely	  If unsure, say N here, but this option is safe to enable.
2753a42093SGrant Likely
281b7c501bSRob Herringconfig OF_ALL_DTBS
291b7c501bSRob Herring	bool "Build all Device Tree Blobs"
301b7c501bSRob Herring	depends on COMPILE_TEST
311b7c501bSRob Herring	select DTC
321b7c501bSRob Herring	help
331b7c501bSRob Herring	  This option builds all possible Device Tree Blobs (DTBs) for the
341b7c501bSRob Herring	  current architecture.
351b7c501bSRob Herring
361b7c501bSRob Herring	  If unsure, say N here, but this option is safe to enable.
371b7c501bSRob Herring
38e169cfbeSGrant Likelyconfig OF_FLATTREE
39e169cfbeSGrant Likely	bool
405ab5fc7eSGrant Likely	select DTC
41e6a6928cSRob Herring	select LIBFDT
4208d53aa5SArd Biesheuvel	select CRC32
43e169cfbeSGrant Likely
44e6ce1324SStephen Neuendorfferconfig OF_EARLY_FLATTREE
45e6ce1324SStephen Neuendorffer	bool
46ff4c25f2SChristoph Hellwig	select DMA_DECLARE_COHERENT if HAS_DMA
47e6ce1324SStephen Neuendorffer	select OF_FLATTREE
48e6ce1324SStephen Neuendorffer
493cfc535cSAndres Salomonconfig OF_PROMTREE
503cfc535cSAndres Salomon	bool
513cfc535cSAndres Salomon
52b56b5528SRob Herringconfig OF_KOBJ
53b56b5528SRob Herring	def_bool SYSFS
54b56b5528SRob Herring
550f22dd39SGrant Likely# Hardly any platforms need this.  It is safe to select, but only do so if you
560f22dd39SGrant Likely# need it.
57fcdeb7feSGrant Likelyconfig OF_DYNAMIC
58121c92caSGeert Uytterhoeven	bool "Support for dynamic device trees" if OF_UNITTEST
59b56b5528SRob Herring	select OF_KOBJ
60121c92caSGeert Uytterhoeven	help
61121c92caSGeert Uytterhoeven	  On some platforms, the device tree can be manipulated at runtime.
62121c92caSGeert Uytterhoeven	  While this option is selected automatically on such platforms, you
63121c92caSGeert Uytterhoeven	  can enable it manually to improve device tree unit test coverage.
64fcdeb7feSGrant Likely
656b884a8dSGrant Likelyconfig OF_ADDRESS
666b884a8dSGrant Likely	def_bool y
676019a3d0SRob Herring	depends on !SPARC && (HAS_IOMEM || UML)
686b884a8dSGrant Likely
69e3873444SGrant Likelyconfig OF_IRQ
70e3873444SGrant Likely	def_bool y
7163c60e3aSGeert Uytterhoeven	depends on !SPARC && IRQ_DOMAIN
72e3873444SGrant Likely
734b6ba8aaSDavid Daneyconfig OF_NET
744b6ba8aaSDavid Daney	depends on NETDEVICES
754b6ba8aaSDavid Daney	def_bool y
764b6ba8aaSDavid Daney
778bc487d1SGrant Likelyconfig OF_MDIO
788bc487d1SGrant Likely	def_tristate PHYLIB
795ab5fc7eSGrant Likely	depends on PHYLIB
80a5e4bd99SArnd Bergmann	select FIXED_PHY
818bc487d1SGrant Likely	help
828bc487d1SGrant Likely	  OpenFirmware MDIO bus (Ethernet PHY) accessors
835ab5fc7eSGrant Likely
843f0c8206SMarek Szyprowskiconfig OF_RESERVED_MEM
853f0c8206SMarek Szyprowski	bool
8634e04eedSChristoph Hellwig	depends on OF_EARLY_FLATTREE
87ff4c25f2SChristoph Hellwig	default y if DMA_DECLARE_COHERENT || DMA_CMA
883f0c8206SMarek Szyprowski
897941b27bSPantelis Antoniouconfig OF_RESOLVE
907941b27bSPantelis Antoniou	bool
917941b27bSPantelis Antoniou
927518b589SPantelis Antoniouconfig OF_OVERLAY
935c776064SMatwey V. Kornilov	bool "Device Tree overlays"
947518b589SPantelis Antoniou	select OF_DYNAMIC
9539a751a4SFrank Rowand	select OF_FLATTREE
967518b589SPantelis Antoniou	select OF_RESOLVE
97121c92caSGeert Uytterhoeven	help
98121c92caSGeert Uytterhoeven	  Overlays are a method to dynamically modify part of the kernel's
99121c92caSGeert Uytterhoeven	  device tree with dynamically loaded data.
100121c92caSGeert Uytterhoeven	  While this option is selected automatically when needed, you can
101121c92caSGeert Uytterhoeven	  enable it manually to improve device tree unit test coverage.
1027518b589SPantelis Antoniou
103298535c0SDavid Daneyconfig OF_NUMA
104298535c0SDavid Daney	bool
105298535c0SDavid Daney
106dabf6b36SMichael Ellermanconfig OF_DMA_DEFAULT_COHERENT
107dabf6b36SMichael Ellerman	# arches should select this if DMA is coherent by default for OF devices
108dabf6b36SMichael Ellerman	bool
109dabf6b36SMichael Ellerman
1100166dc11SRob Herringendif # OF
111