From patchwork Fri Feb 2 13:05:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 769196 Delivered-To: patch@linaro.org Received: by 2002:adf:9bca:0:b0:33a:e5bd:fedd with SMTP id e10csp898740wrc; Fri, 2 Feb 2024 05:07:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IE0mSHFXWVwC5ynYKPXgxJ+PrBUzW/ijc1vppRP0bOe6jDXkj91e7pResRYT4G2pe/bDaX0 X-Received: by 2002:adf:fec8:0:b0:33b:1130:6d37 with SMTP id q8-20020adffec8000000b0033b11306d37mr1452179wrs.13.1706879245006; Fri, 02 Feb 2024 05:07:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706879244; cv=none; d=google.com; s=arc-20160816; b=BVyrIwzQIPGPc3JJg6eHwx6p0bDiyggVjBi+QdnUiCKcVW+UjxNSSvowrTmdnhaqEs rce4z0WSvP12+iSE9qpc68F4bKLxmJ2J2wbTn0q99yQO/BsVeFQNlWlVgcMFrD2kKlqS iAKMMCfnS5XDHqZLi6lho1F45HOy1fNUws5Rvf5jiu2loTvf1z3+2CLjf6SFnP+Bim0t CJ++lDkeTB5SrAcexYY61ilBubItjP79AxPaoYnsloXmgrBqRhY2ogpH9hpKgKq3FHLC 0OIZwYgNCBYwvzgoh1q7OFXES4LTX2c3j8ZLxVfdTYPKPgJ06iZAq2OZEufT3mPPIFed Xelw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xD1luGAP2JCOy74S0Dvk++4XEGenbMM27aVFBieuLJA=; fh=n/C99fz7aCgO0b5BziauH1EhUWtRTDf/SvQ54j+FE2Y=; b=hKyYd6R4RViPB1W2hC9EDLiokwxv/JJazMdGWvLig+z5BeMW/NGKxZyN5W07YYaZz0 PAYsX7GDRYxIJ9t7TJeuZE7L8SBldGAzZQQ0oFiGTHJ9sn5gvF8+Ia5ReNjCqiNr8+F3 e1YOf3Z/ujnHLQHDzS13r89WOXG4X7f7yaL0J3ud861a97Cld2qvG73D+2SRF8dDHe2o zQd8n+DspdFapnt5Ada9sc7RknjxbztYRS5EaPPmOjpZTwpdTjRigDDUje0JRq1Zj3DR PxO2h78P3fGAWT6GB+Ckhm9OvCabw2RlT9aQhF4v5LAY1BV4Q8EmESjYDhTxaO25nKny D82g==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M1Fb4IUO; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=0; AJvYcCVtIlqzTi12TRHwL89d8iNz7scoy28k5eKb+Xz5c18HMcW4cwddO1Zl3s9q+5LTW43ONFDzUKWGtwCHCM8SUtc1GKasV882TJxxRHV2/azVeIuRj0vitFI/3CfTCGbSG000UAOTNUdonOsOnDqS1IhC73VoEFpSNUKcYAg+GleHktOg0WjkXoBuEVz9EmskrDHCEzv7avRHo1x5UAjv7Mu+DZTohy70xi81LuJN8ImKsigiHwE/eKnRXVcQmZciLCEcRIPcqnPAO37NntigcwBGSAtDCxZW0HdToujI7jSK90lvnH2WrhX+emGxeCiPgmF1JP9TI7Qoihj3uCig4nlE+NAyJrgg6f9pESstKTAUDNYv0LdhaJJyWhOFbnuA0vGjCOoHRPK8PzPPFi4KO8eQbrKlNc5h1aPViH3qI6Om1UmZjL7T14cSM4RdzRkXKehTArmoH9+ujhlr/U6tYJP7JtnrLR2vXl8foZZRnboeMuep8FZVqYYcp2ObZ7qSPrLz8L7MaKd9zRLsiQpxRXqSFKzKOq6Gmcmd1ao8KNh7jm5zhgSwPYmv5vuBdX+FEUQttFzA+ddkG998TnXM/GRvKAjHldIDur79AvcmD1xclBDkHNHn4qlJ2Z3QN7iIe5xiBBlly2/INjKVyZdhd85JDCPjHctmFZE71qW1CDxISUJAq7E1DwdaPH90X23b66fv6pZ+246wjB6hWsvd+HsIO1hKLUZVbiSFHcFBJeHvd19fkD9KFaVCdt2ignspMoE5prpsodAnB6Vnqcb85gva4lc5DFBsS1X9ZAASb0Ps3szT+6ghXjxSGtfS6cNPqp34szN9rW8Qlg== Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id m10-20020a056000024a00b0033afe81695esi947573wrz.45.2024.02.02.05.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 05:07:24 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M1Fb4IUO; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AC0AE87D0A; Fri, 2 Feb 2024 14:07:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="M1Fb4IUO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8522487C9A; Fri, 2 Feb 2024 14:07:06 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_SBL_CSS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 46AD087C9A for ; Fri, 2 Feb 2024 14:07:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sumit.garg@linaro.org Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1d780a392fdso17313265ad.3 for ; Fri, 02 Feb 2024 05:07:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706879220; x=1707484020; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xD1luGAP2JCOy74S0Dvk++4XEGenbMM27aVFBieuLJA=; b=M1Fb4IUO9EQxmfu/dNixVH1Y1dIauenB2gZbyWmAr5hvzI2PU8rdOGtN+FcGuEUway /bZrJnQ35luWPfUYrwuXZMfe6ZduhV35mKFlqkbLk8F5pgUDAdYlv0tm+npWzq7RTor1 netMaRq4JwWwRyA6SG0+TS8oTUfFzRzhXzxqGdD5QF3MkVNisNAB9WReP3o1FJKLBTUO kA6A5wZmFGFx0pSbBpXI6c+s98XoN7u/ux8CY4UJ4jVDO6Wh/U3oa4q9sr1ac1KpTA9X wuTqFYKosSX9qsNzVsUIoJ3hG8Ly9JStNdwVxb2YZjKy+Z3egtCi+Xe3YZHIq2DX43AB fcVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706879220; x=1707484020; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xD1luGAP2JCOy74S0Dvk++4XEGenbMM27aVFBieuLJA=; b=arBUVeNtbt8VcXmIbVd7tM541PR3GRkK2DdsgZW5RqRyXN+qcBrV9wm9n5K1P1HefU /PQ9JwDvz2edX939PZQsk1ooeDUYEXbU1Zg5GbByacuUDvhMsyJZwV+6MgDFm9E1INCx Fxk242wduOS6Qft1MzF33vUezYVGBa9JRw+b9RN5Z+42Dqzsq+PJE+RnO06HzbdY8qC2 m2C/BwRhtNM/vvaT8vULtgv9Ece6EbxY2V1/pg18CWxmuYxhpk9ZdwmNo59bdGV33oB/ mTLiFqRS+LKjOH7gSV8ZeDpkVyH+9cF+WqM6T9QjwRoNhGVdKL6WmlSCMlu9+s4ni3VT WRZA== X-Gm-Message-State: AOJu0YzZ6/rl93Ne6TbMcGkGHvdHr4Hv06tTwHNJ+AnaEERt8FEVm5Cz dfLdJrCJeCFHVZaVuArLPjqs4O9zRM+hUzh9J2LMdakJotHkkwwOnXjZ+CM2GlppPGLeSqQ/U38 J+7s= X-Received: by 2002:a17:902:eac6:b0:1d9:4834:e1b8 with SMTP id p6-20020a170902eac600b001d94834e1b8mr4840345pld.33.1706879220138; Fri, 02 Feb 2024 05:07:00 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXTEyYtgLa9bgrvREoGfi4WDLkto38OjMK0aMxBfQGKUZlbI9gj6a9P3nuvJGrDXXl/5g9BGUsqoU7v3LUWuISPAt94MTuh7d5wIvbcsIF847aZcbcI0Duu86EJIYJJVclRAZDkmw6oL0xvR+PckRpRbGBwskkwkaU3MCTKKSRZ+NIW45Ik1+xoKBB/adEsR/qILKwBTTAgK49ae8Lbgx+MwOITiQIoZcWnLqc8OXoRzioKrIQADK2i5F/aEAty5L6EqpH6X0Ijj8rEY0nTayKaAj9KUyQhFPMDyAVMQh1jRhDkeQBdQeVncOSR1qx+nCnbruXlzLVNaBmY/rvE9zzYnO5fyvrmRduEJMc4SGNky5G43lyhVQpIb9VgtMInFl5OTFLiVb4CGGeKFkjG+3GMfTe+U/4ZofJyQo1v5heGuyAce/RaE/vWmEyEAhrT5syfGx8gKSybY/VN1W13ksurTViXwBKp3kTfMeceJSouah7+JlQ4pDSIdd58+6yCt2MW0rGRlYkaT398cfTD/MX+tNEW1HXq1pF23Mw06Mo+MH5UME1x0tNU73x91Wp9gNnIu4Iy/1CMUOfQD6DHZK7vX+X4T8HnHu+PHlvLQ0zdCpWkhpkHe0NTvqzt2lXNWXB+jXC97VW8WJrcPSWuALlL58aAne9cEWBQbnKMVYouj05EK6sRAZdTW2mHFGWoWCqeyzgIstVQcuQkGg0K+Mtdpo5YmkzLu+uKh3By7PgAhqxMDOpGc4TA2xxfSJtOBXY3sJP8ZxSx+cqdNX3mPFiIqu0bnsjgNHfzaQafFq0FqnNAdoJ7RvRaMQVpG+dGDmrcH5xbEqalaXybyYviGMmLidkgXt2QH3ARo4aR0vyE7hOBLOjon/kd7cknPCDltb9ZgmrOE2x5jt3yvyz1o2l1gfvS5tVXiaiQ Received: from sumit-X1.. ([223.178.213.44]) by smtp.gmail.com with ESMTPSA id q23-20020a170902edd700b001d923684323sm1542407plk.195.2024.02.02.05.06.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 05:06:59 -0800 (PST) From: Sumit Garg To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, u-boot-custodians@lists.denx.de Cc: trini@konsulko.com, sjg@chromium.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor@kernel.org, neil.armstrong@linaro.org, caleb.connolly@linaro.org, ff@shokubai.tech, daniel.thompson@linaro.org, dgilmore@fedoraproject.org, pbrobinson@gmail.com, ilias.apalodimas@linaro.org, b.galvani@gmail.com, xypron.glpk@gmx.de, michal.simek@amd.com, seanga2@gmail.com, rasmus.villemoes@prevas.dk, peng.fan@nxp.com, jh80.chung@samsung.com, rfried.dev@gmail.com, marex@denx.de, mibodhi@gmail.com, bb@ti.com, mark.kettenis@xs4all.nl, festevam@gmail.com, nm@ti.com, andre.przywara@arm.com, Sumit Garg Subject: [PATCH v5 07/11] doc: devicetree: Align documentation to use Kconfig options Date: Fri, 2 Feb 2024 18:35:30 +0530 Message-Id: <20240202130534.1051438-8-sumit.garg@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240202130534.1051438-1-sumit.garg@linaro.org> References: <20240202130534.1051438-1-sumit.garg@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Since U-Boot switched away from manual CONFIG_* defines to Kconfig options, align devicetree documentation accordingly. Signed-off-by: Sumit Garg --- Changes in v5: - Fixed inappropriate documentation update. Changes in v4: - Separate patch to align documentation to use Kconfig symbols instead. doc/develop/devicetree/control.rst | 48 ++++++++++++++---------------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/doc/develop/devicetree/control.rst b/doc/develop/devicetree/control.rst index 11c92d440f4d..9a0cb90336df 100644 --- a/doc/develop/devicetree/control.rst +++ b/doc/develop/devicetree/control.rst @@ -29,7 +29,7 @@ a number of similar boards with different peripherals, you can describe the features of each board in the devicetree file, and have a single generic source base. -To enable this feature, add CONFIG_OF_CONTROL to your board config file. +To enable this feature, select `OF_CONTROL` via Kconfig. What is a Flattened Devicetree? @@ -81,12 +81,8 @@ Failing that, you could write one from scratch yourself! Configuration ------------- -Use:: - - #define CONFIG_DEFAULT_DEVICE_TREE "" - -to set the filename of the devicetree source. Then put your devicetree -file into:: +Set up "" when prompted for `DEFAULT_DEVICE_TREE` by Kconfig. Then put +your devicetree file into:: arch//dts/.dts @@ -94,24 +90,24 @@ This should include your CPU or SOC's devicetree file, placed in `arch//dts`, and then make any adjustments required using a u-boot-dtsi file for your board. -If CONFIG_OF_EMBED is defined, then it will be picked up and built into +If `OF_EMBED` is selected by Kconfig, then it will be picked up and built into the U-Boot image (including u-boot.bin). This is suitable for debugging and development only and is not recommended for production devices. -If CONFIG_OF_SEPARATE is defined, then it will be built and placed in +If `OF_SEPARATE` is selected by Kconfig, then it will be built and placed in a u-boot.dtb file alongside u-boot-nodtb.bin with the combined result placed -in u-boot.bin so you can still just flash u-boot.bin onto your board. If you are -using CONFIG_SPL_FRAMEWORK, then u-boot.img will be built to include the device -tree binary. +in u-boot.bin so you can still just flash u-boot.bin onto your board. If Kconfig +option `SPL_FRAMEWORK` is enabled, then u-boot.img will be built to include the +device tree binary. -If CONFIG_OF_BOARD is defined, a board-specific routine will provide the +If `OF_BOARD` is selected by Kconfig, a board-specific routine will provide the devicetree at runtime, for example if an earlier bootloader stage creates it and passes it to U-Boot. -If CONFIG_BLOBLIST is defined, the devicetree may come from a bloblist passed -from a previous stage, if present. +If `BLOBLIST` is selected by Kconfig, the devicetree may come from a bloblist +passed from a previous stage, if present. -If CONFIG_SANDBOX is defined, then it will be read from a file on +If `SANDBOX` is selected by Kconfig, then it will be read from a file on startup. Use the -d flag to U-Boot to specify the file to read, -D for the default and -T for the test devicetree, used to run sandbox unit tests. @@ -145,7 +141,7 @@ Build: After the board configuration is done, fdt supported u-boot can be built in two ways: -# build the default dts which is defined from CONFIG_DEFAULT_DEVICE_TREE:: +# build the default dts which is selected by DEFAULT_DEVICE_TREE Kconfig:: $ make @@ -198,8 +194,8 @@ As mentioned above, the U-Boot build system automatically includes a `*-u-boot.dtsi` file, if found, containing U-Boot specific quirks. However, some data, such as the mentioned public keys, are not appropriate for upstream U-Boot but are better kept and maintained -outside the U-Boot repository. You can use CONFIG_DEVICE_TREE_INCLUDES -to specify a list of .dtsi files that will also be included when +outside the U-Boot repository. You can use `DEVICE_TREE_INCLUDES` Kconfig +option to specify a list of .dtsi files that will also be included when building .dtb files. @@ -213,14 +209,14 @@ The full devicetree is available to U-Boot proper, but normally only a subset 'SPL Support' in doc/driver-model/design.rst for more details. -Using several DTBs in the SPL (CONFIG_SPL_MULTI_DTB) ----------------------------------------------------- +Using several DTBs in the SPL (SPL_MULTI_DTB_FIT Kconfig option) +---------------------------------------------------------------- In some rare cases it is desirable to let SPL be able to select one DTB among many. This usually not very useful as the DTB for the SPL is small and usually fits several platforms. However the DTB sometimes include information that do work on several platforms (like IO tuning parameters). -In this case it is possible to use CONFIG_SPL_MULTI_DTB. This option appends to -the SPL a FIT image containing several DTBs listed in SPL_OF_LIST. +In this case it is possible to use SPL_MULTI_DTB_FIT Kconfig option. This option +appends to the SPL a FIT image containing several DTBs listed in SPL_OF_LIST. board_fit_config_name_match() is called to select the right DTB. If board_fit_config_name_match() relies on DM (DM driver to access an EEPROM @@ -247,10 +243,10 @@ architectures. It is important to understand that the fdt only selects options available in the platform / drivers. It cannot add new drivers (yet). So -you must still have the CONFIG option to enable the driver. For example, -you need to define CONFIG_SYS_NS16550 to bring in the NS16550 driver, +you must still have the Kconfig option to enable the driver. For example, +you need to enable SYS_NS16550 Kconfig option to bring in the NS16550 driver, but can use the fdt to specific the UART clock, peripheral address, etc. -In very broad terms, the CONFIG options in general control *what* driver +In very broad terms, the Kconfig options in general control *what* driver files are pulled in, and the fdt controls *how* those files work. History