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 DTC_SYMBOLS 16 bool "Enable dtc generation of symbols for overlays support" 17 depends on DTC && ARCH_ROCKCHIP 18 help 19 Set DTC_FLAGS += -@ 20 Android OS must enable this option. 21 22config OF_UNITTEST 23 bool "Device Tree runtime unit tests" 24 depends on !SPARC 25 select IRQ_DOMAIN 26 select OF_EARLY_FLATTREE 27 select OF_RESOLVE 28 help 29 This option builds in test cases for the device tree infrastructure 30 that are executed once at boot time, and the results dumped to the 31 console. 32 33 If unsure, say N here, but this option is safe to enable. 34 35config OF_ALL_DTBS 36 bool "Build all Device Tree Blobs" 37 depends on COMPILE_TEST 38 select DTC 39 help 40 This option builds all possible Device Tree Blobs (DTBs) for the 41 current architecture. 42 43 If unsure, say N here, but this option is safe to enable. 44 45config OF_FLATTREE 46 bool 47 select DTC 48 select LIBFDT 49 select CRC32 50 51config OF_EARLY_FLATTREE 52 bool 53 select DMA_DECLARE_COHERENT if HAS_DMA 54 select OF_FLATTREE 55 56config OF_PROMTREE 57 bool 58 59config OF_KOBJ 60 def_bool SYSFS 61 62# Hardly any platforms need this. It is safe to select, but only do so if you 63# need it. 64config OF_DYNAMIC 65 bool "Support for dynamic device trees" if OF_UNITTEST 66 select OF_KOBJ 67 help 68 On some platforms, the device tree can be manipulated at runtime. 69 While this option is selected automatically on such platforms, you 70 can enable it manually to improve device tree unit test coverage. 71 72config OF_ADDRESS 73 def_bool y 74 depends on !SPARC && (HAS_IOMEM || UML) 75 76config OF_IRQ 77 def_bool y 78 depends on !SPARC && IRQ_DOMAIN 79 80config OF_NET 81 depends on NETDEVICES 82 def_bool y 83 84config OF_RESERVED_MEM 85 bool 86 depends on OF_EARLY_FLATTREE 87 default y if DMA_DECLARE_COHERENT || DMA_CMA 88 89config OF_RESOLVE 90 bool 91 92config OF_OVERLAY 93 bool "Device Tree overlays" 94 select OF_DYNAMIC 95 select OF_FLATTREE 96 select OF_RESOLVE 97 help 98 Overlays are a method to dynamically modify part of the kernel's 99 device tree with dynamically loaded data. 100 While this option is selected automatically when needed, you can 101 enable it manually to improve device tree unit test coverage. 102 103config OF_NUMA 104 bool 105 106config OF_DMA_DEFAULT_COHERENT 107 # arches should select this if DMA is coherent by default for OF devices 108 bool 109 110endif # OF 111