1af6074fcSRob Herring# SPDX-License-Identifier: GPL-2.0 25ab5fc7eSGrant Likelyconfig DTC 35ab5fc7eSGrant Likely bool 45ab5fc7eSGrant Likely 50166dc11SRob Herringconfig GENERIC_BUILTIN_DTB 60166dc11SRob Herring bool 70166dc11SRob Herring 80166dc11SRob Herringconfig BUILTIN_DTB_ALL 90166dc11SRob Herring bool 100166dc11SRob Herring 110166dc11SRob Herringmenuconfig OF 12bcbefae2SStephen Rothwell bool "Device Tree and Open Firmware support" 130166dc11SRob Herring help 145ab5fc7eSGrant Likely This option enables the device tree infrastructure. 1519fd7487SGrant Likely It is automatically selected by platforms that need it or can 1619fd7487SGrant Likely be enabled manually for unittests, overlays or 177b937cc2SFrank Rowand compile-coverage. 186019a3d0SRob Herring 192eb46da2SGrant Likelyif OF 2053a42093SGrant Likely 2153a42093SGrant Likelyconfig OF_UNITTEST 225d927086SGeert Uytterhoeven bool "Device Tree runtime unit tests" 2353a42093SGrant Likely depends on OF_EARLY_FLATTREE 2453a42093SGrant Likely select IRQ_DOMAIN 25f381b31aSFrank Rowand select OF_RESOLVE 26f381b31aSFrank Rowand help 27f381b31aSFrank Rowand This option builds in test cases for the device tree infrastructure 28f381b31aSFrank Rowand that are executed once at boot time, and the results dumped to the 29f381b31aSFrank Rowand console. 30f381b31aSFrank Rowand 31f381b31aSFrank Rowand This option should only be enabled for a development kernel. The tests 32f381b31aSFrank Rowand will taint the kernel with TAINT_TEST. The tests will cause ERROR and 33f381b31aSFrank Rowand WARNING messages to print on the console. The tests will cause stack 34f381b31aSFrank Rowand traces to print on the console. It is possible that the tests will 35f381b31aSFrank Rowand leave the devicetree in a corrupted state. 36f381b31aSFrank Rowand 37f381b31aSFrank Rowand The unittest output will be verbose. Copy the output to a file 3853a42093SGrant Likely via capturing the console output or via the dmesg command. Process 39893ecc6dSStephen Boyd this file with scripts/dtc/of_unittest_expect to reduce the 40893ecc6dSStephen Boyd verbosity, test whether expected output is present, and to 41893ecc6dSStephen Boyd summarize the results. 42893ecc6dSStephen Boyd 43893ecc6dSStephen Boyd If unsure, say N here. This option is not safe to enable. 44893ecc6dSStephen Boyd 45893ecc6dSStephen Boydconfig OF_KUNIT_TEST 46893ecc6dSStephen Boyd tristate "Devicetree KUnit Test" if !KUNIT_ALL_TESTS 47893ecc6dSStephen Boyd depends on KUNIT 481b7c501bSRob Herring default KUNIT_ALL_TESTS 491b7c501bSRob Herring help 501b7c501bSRob Herring This option builds KUnit unit tests for device tree infrastructure. 511b7c501bSRob Herring 521b7c501bSRob Herring If unsure, say N here, but this option is safe to enable. 531b7c501bSRob Herring 541b7c501bSRob Herringconfig OF_ALL_DTBS 551b7c501bSRob Herring bool "Build all Device Tree Blobs" 561b7c501bSRob Herring depends on COMPILE_TEST 571b7c501bSRob Herring select DTC 58e169cfbeSGrant Likely help 59e169cfbeSGrant Likely This option builds all possible Device Tree Blobs (DTBs) for the 605ab5fc7eSGrant Likely current architecture. 61e6a6928cSRob Herring 6208d53aa5SArd Biesheuvel If unsure, say N here, but this option is safe to enable. 63e169cfbeSGrant Likely 64e6ce1324SStephen Neuendorfferconfig OF_FLATTREE 657b937cc2SFrank Rowand bool 667e08baf6SBaoquan He select DTC 67e6ce1324SStephen Neuendorffer select LIBFDT 68e6ce1324SStephen Neuendorffer select CRC32 693cfc535cSAndres Salomon 703cfc535cSAndres Salomonconfig OF_EARLY_FLATTREE 713cfc535cSAndres Salomon def_bool OF && !(SPARC || ALPHA || HEXAGON || M68K || PARISC || S390) 72b56b5528SRob Herring select DMA_DECLARE_COHERENT if HAS_DMA && HAS_IOMEM 73b56b5528SRob Herring select OF_FLATTREE 74b56b5528SRob Herring 750f22dd39SGrant Likelyconfig OF_PROMTREE 760f22dd39SGrant Likely bool 77fcdeb7feSGrant Likely 78121c92caSGeert Uytterhoevenconfig OF_KOBJ 79b56b5528SRob Herring def_bool SYSFS 80121c92caSGeert Uytterhoeven 81121c92caSGeert Uytterhoeven# Hardly any platforms need this. It is safe to select, but only do so if you 82121c92caSGeert Uytterhoeven# need it. 83121c92caSGeert Uytterhoevenconfig OF_DYNAMIC 84fcdeb7feSGrant Likely bool "Support for dynamic device trees" if OF_UNITTEST 856b884a8dSGrant Likely select OF_KOBJ 866b884a8dSGrant Likely help 876019a3d0SRob Herring On some platforms, the device tree can be manipulated at runtime. 886b884a8dSGrant Likely While this option is selected automatically on such platforms, you 89e3873444SGrant Likely can enable it manually to improve device tree unit test coverage. 90e3873444SGrant Likely 9163c60e3aSGeert Uytterhoevenconfig OF_ADDRESS 92e3873444SGrant Likely def_bool y 933f0c8206SMarek Szyprowski depends on !SPARC && (HAS_IOMEM || UML) 941ee292a6SRob Herring 953f0c8206SMarek Szyprowskiconfig OF_IRQ 967941b27bSPantelis Antoniou def_bool y 977941b27bSPantelis Antoniou depends on !SPARC && IRQ_DOMAIN 987941b27bSPantelis Antoniou 997518b589SPantelis Antoniouconfig OF_RESERVED_MEM 1005c776064SMatwey V. Kornilov def_bool OF_EARLY_FLATTREE 1017518b589SPantelis Antoniou 10239a751a4SFrank Rowandconfig OF_RESOLVE 1037518b589SPantelis Antoniou bool 104121c92caSGeert Uytterhoeven 105121c92caSGeert Uytterhoevenconfig OF_OVERLAY 106121c92caSGeert Uytterhoeven bool "Device Tree overlays" 107121c92caSGeert Uytterhoeven select OF_DYNAMIC 108121c92caSGeert Uytterhoeven select OF_FLATTREE 1097518b589SPantelis Antoniou select OF_RESOLVE 1105c9dd72dSStephen Boyd help 1115c9dd72dSStephen Boyd Overlays are a method to dynamically modify part of the kernel's 1125c9dd72dSStephen Boyd device tree with dynamically loaded data. 1135c9dd72dSStephen Boyd While this option is selected automatically when needed, you can 114*332857fdSStephen Boyd enable it manually to improve device tree unit test coverage. 1155c9dd72dSStephen Boyd 1165c9dd72dSStephen Boydconfig OF_OVERLAY_KUNIT_TEST 1175c9dd72dSStephen Boyd tristate "Device Tree overlay KUnit tests" if !KUNIT_ALL_TESTS 1185c9dd72dSStephen Boyd depends on KUNIT 1195c9dd72dSStephen Boyd default KUNIT_ALL_TESTS 120298535c0SDavid Daney select DTC 121298535c0SDavid Daney help 122298535c0SDavid Daney This option builds KUnit unit tests for the device tree overlay code. 1230166dc11SRob Herring 124 If unsure, say N here, but this option is safe to enable. 125 126config OF_NUMA 127 bool 128 129endif # OF 130