From patchwork Thu Mar 21 21:04:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 781830 Delivered-To: patch@linaro.org Received: by 2002:adf:cf01:0:b0:33e:7753:30bd with SMTP id o1csp1085766wrj; Thu, 21 Mar 2024 16:39:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV1lRYDfpEtwKh0deVUJmkU3xDx0bvrmB4SnPa3JGl3IabHZQzscglaV5dbogdLleGpt949A2IXdzUOwZoq3lZQ X-Google-Smtp-Source: AGHT+IGijhBQQOasn96ryjXmO3nUTM776VL3aGsfxjQvNDQ/8RNVnH0MwqoUYoR0M4pSi0ZZnqmc X-Received: by 2002:a5d:4bd1:0:b0:33d:d4c2:8ba5 with SMTP id l17-20020a5d4bd1000000b0033dd4c28ba5mr360717wrt.5.1711064371401; Thu, 21 Mar 2024 16:39:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711064371; cv=none; d=google.com; s=arc-20160816; b=NQ0zbfT72iKNmTeNTXxegLSWeK5rvTdg/x/+ssknk1aC4VzDR5ZKiwPlpUEaUBzg/9 e8qr3rsGb7RCzdBtJmVZNqePMOfKfOQGJMD9E1SD8rSaPtKg0ud0PKGZVr+vIQerVGpP 0FeFUbDcvN7V15Rkpy2ajItiINcSGPHtD2rS95unOnZf7XBI7InsgajOuCWVXLaVJA1R aeRySD0hgkzbXcRmdOfCW4q5xSlVK2RX9sKeF34F/kpvdAvoSt0GN+bvzl+yUV3UofZx w5BGAI9tquvJRE/U44IwW7qIz/VwLA5xHPf/tUApuJsxXZSxFQQTfRIFeWmhpscxcS6B v/Ag== 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:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=zKs4JT+m2KCkJOqgG6C5kt9r4QRZhsfdeXlX04Y/UsA=; fh=td6uwRQTE5WyQoTzly9w9ZNZpATVWdjjKdDHY2id97k=; b=YzwjRAOLkrjjuButfatyM6Ps7U7WpS2CTGwsQtomqlshSg57ABMNP9MvMcKsQcphlb KWeYQ0rHVoeCcujfHe59wtoWKabiRvmgu89oGr8DpTmA45xJpPPJHmHgPAAebXqkm1Ui o5EdjzI5aoUrMpQQfxRsd8UTk0gPZJOtbhBFi2Midxvq4rtZuz3+w4QhwXEHR5Kk3zMM /L4+bluWB5aeEc6wCZ50jcN796wEjfamINlohXpyaDDbE41z7HMv6CJCtcZYc0RqH8sF VmIUI0spn/9serXCcuOiFGx2a/pmCJ/JYhVXR0B1TjAIIzOwjD6eXwJ2imY2eus2zUux ZXYQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oWlDpKPA; 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 Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id b10-20020a5d45ca000000b0033e827f5c68si339046wrs.1002.2024.03.21.16.39.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 16:39:31 -0700 (PDT) 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=oWlDpKPA; 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 C6B0F881C1; Fri, 22 Mar 2024 00:35:30 +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="oWlDpKPA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5DD9B8753A; Thu, 21 Mar 2024 22:04:54 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) (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 A15A98814E for ; Thu, 21 Mar 2024 22:04:42 +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=caleb.connolly@linaro.org Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2d46c2e8dd7so17607801fa.1 for ; Thu, 21 Mar 2024 14:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711055082; x=1711659882; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zKs4JT+m2KCkJOqgG6C5kt9r4QRZhsfdeXlX04Y/UsA=; b=oWlDpKPAFryPHA39CNVchco4n7Vjdp2mMDl6puGNL+9Bs7De+es0I6W7D3GjRE2lJL zCrpaD74eBpNrdRcqcwkMW+pj6rTYWPcRSBDcIzIydCla4KrJkfBzffYcembSenEFA0L 26A2LkyMCFWii70CgYZtX+0Nq0YIOdonqV95odOs6Bm44LfcvpP1Bg8vh2SZ1tKrVlHp IaWP58cVLS2/o3eNUlqqAUtKwF+syn9F3ZRgrr9Uc+dyBbe83K1qnzn2fzneARwvTJyo RwvcTLJveaUHChWIxwVZtHk3ShywrDcmcEz0CyM2zgvfkwNAkkfXJwlI96JP78VPCFzD KXIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711055082; x=1711659882; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zKs4JT+m2KCkJOqgG6C5kt9r4QRZhsfdeXlX04Y/UsA=; b=ux+4qJRgod31Ok4Th9AUNCxXtq0scebmGAl9gkh3C4G26XGA3K5rcmkPq7i0U6Tvhb NGlF1jIwZPdxBWwe0PZCV5vsn5M0DANPtUDZLVMv8Y7ci12qylPgtAXctiFiAb1kj7MR Ajy4z/rPskXtDbnGbSph39MM8dI4Gp4MMgL+4mXtpRdgdJwN59g5ZsZuLPdtj4c4xAW0 6ipldlJ8VF7Ev85nQscAG8pj/TiHuFNxfRxkLNsDr0C1evsVMkQF9KGpLt7L02GP/1mf MQPYuChr4P0qHjIuE3Wi3QdTX4EaXg+gvLtZjzAY2WzG7XPJUdjMycY8VOnXRMHubi0e 92WA== X-Gm-Message-State: AOJu0YwkVVbQek0slZ4yxwp+OPLkZzspbD1Ec+XJxUl7OYpDJoWZcloC kHayUaAE4cNilIr/l3FTF8Vfeve31HPSH59JjOO05CbEjRTDwe49hMsIyKiFnjM= X-Received: by 2002:a2e:9582:0:b0:2d4:6814:7c98 with SMTP id w2-20020a2e9582000000b002d468147c98mr413187ljh.43.1711055081771; Thu, 21 Mar 2024 14:04:41 -0700 (PDT) Received: from lion.localdomain (host-92-17-96-232.as13285.net. [92.17.96.232]) by smtp.gmail.com with ESMTPSA id ay15-20020a05600c1e0f00b004146f728906sm925462wmb.7.2024.03.21.14.04.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 14:04:41 -0700 (PDT) From: Caleb Connolly Date: Thu, 21 Mar 2024 21:04:07 +0000 Subject: [PATCH v2 24/24] dts: support building all dtb files for a specific vendor MIME-Version: 1.0 Message-Id: <20240321-b4-upstream-dt-headers-v2-24-1eac0df875fe@linaro.org> References: <20240321-b4-upstream-dt-headers-v2-0-1eac0df875fe@linaro.org> In-Reply-To: <20240321-b4-upstream-dt-headers-v2-0-1eac0df875fe@linaro.org> To: Tom Rini , Neil Armstrong , Sumit Garg , Patrice Chotard , Patrick Delaunay , Jagan Teki , Simon Glass , Philipp Tomsich , Kever Yang , Lukasz Majewski , Sean Anderson , Sam Protsenko , Matthias Brugger , Peter Robinson , Joe Hershberger , Ramon Fried , Thierry Reding , Svyatoslav Ryhel , Michal Simek , Paul Barker , Weijie Gao , GSS_MTK_Uboot_upstream , Ryder Lee , Chunfeng Yun , Eugen Hristev , Rick Chen , Leo , Ryan Chen , Chia-Wei Wang , Aspeed BMC SW team , Joel Stanley , Kunihiko Hayashi , Dai Okamura , Eugeniy Paltsev Cc: u-boot@lists.denx.de, u-boot-amlogic@groups.io, uboot-stm32@st-md-mailman.stormreply.com, uboot-snps-arc@synopsys.com, Caleb Connolly X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2528; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=lFINIkt3mPUDg930k4h55ttVmUyWegfEw9o+thWATTw=; b=owGbwMvMwCFYaeA6f6eBkTjjabUkhtQ/C/ZqBxVkeS9oVp1n6Lqgdkngu4YNyp9k1v/acWpTz c6ZgTuaOkpZGAQ5GGTFFFnETyyzbFp72V5j+4ILMHNYmUCGMHBxCsBEousY/inx+2//rjnNqe7L /+1/Wsrz2EvdLZpT7r+a9q4qLfrqQQmGPzxZnnNDHkjNeeKrO+fhLJWnd9/M2a30pFlC9vSLFdy BXx4DAA== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-Mailman-Approved-At: Fri, 22 Mar 2024 00:35:07 +0100 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 This adjusts OF_UPSTREAM to behave more like the kernel by allowing for all the devicetree files for a given vendor to be compiled. This is useful for Qualcomm in particular as most boards are supported by a single U-Boot build just provided with a different DT. Signed-off-by: Caleb Connolly --- dts/Kconfig | 24 ++++++++++++++++++++++++ scripts/Makefile.dts | 13 +++++++++++++ 2 files changed, 37 insertions(+) diff --git a/dts/Kconfig b/dts/Kconfig index b9b6367154ef..6883a000a052 100644 --- a/dts/Kconfig +++ b/dts/Kconfig @@ -100,8 +100,32 @@ config OF_UPSTREAM However, newer boards whose devicetree source files haven't landed in the dts/upstream subtree, they can override this option to have the DT build from existing U-Boot tree location instead. +config OF_UPSTREAM_BUILD_VENDOR + bool "Build all devicetree files for a particular vendor" + depends on OF_UPSTREAM + help + Enable building all devicetree files for a particular vendor. This + is useful for generic U-Boot configurations where many boards can + be supported with a single binary. + + This is only available for platforms using upstream devicetree. + +config OF_UPSTREAM_VENDOR + string "Vendor to build all upstream devicetree files for" + depends on OF_UPSTREAM_BUILD_VENDOR + default "qcom" if ARCH_SNAPDRAGON + default "rockchip" if ARCH_ROCKCHIP + default "amlogic" if ARCH_MESON + default "allwinner" if ARCH_SUNXI + default "mediatek" if ARCH_MEDIATEK + default "marvell" if ARCH_MVEBU || ARCH_KIRKWOOD + default "xilinx" if ARCH_VERSAL || ARCH_ZYNQ + default "nvidia" if ARCH_TEGRA + help + Select the vendor to build all devicetree files for. + choice prompt "Provider of DTB for DT control" depends on OF_CONTROL diff --git a/scripts/Makefile.dts b/scripts/Makefile.dts index 5e2429c6170c..790f3c508f19 100644 --- a/scripts/Makefile.dts +++ b/scripts/Makefile.dts @@ -1,3 +1,16 @@ # SPDX-License-Identifier: GPL-2.0+ dtb-y += $(patsubst %,%.dtb,$(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE) $(CONFIG_OF_LIST) $(CONFIG_SPL_OF_LIST))) + +ifeq ($(CONFIG_OF_UPSTREAM_BUILD_VENDOR),y) +ifeq ($(CONFIG_ARM64),y) +dt_dir := $(srctree)/dts/upstream/src/arm64 +else +dt_dir := $(srctree)/dts/upstream/src/$(ARCH) +endif + +dtb-vendor_dts := $(patsubst %.dts,%.dtb,$(wildcard $(dt_dir)/$(subst ",,$(CONFIG_OF_UPSTREAM_VENDOR))/*.dts)) + +dtb-y += $(subst $(dt_dir)/,,$(dtb-vendor_dts)) + +endif