summaryrefslogtreecommitdiff
path: root/dts
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2024-10-18 09:05:04 -0600
committerTom Rini <[email protected]>2024-10-18 09:05:04 -0600
commit8ab2178de069194d2eed8fe1b90db7e12cf032bb (patch)
tree9908820332b9a4bf855f7dd661abae410c69dcb2 /dts
parentf8fe853a8de7523685e1322d6131366ebf2e5e7f (diff)
parent9b1cecdd9b6eaf22c4fa268430669ceff0c48786 (diff)
Merge tag 'u-boot-imx-master-20241018a' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/22796 - Switch to using upstream DT on DH i.MX8MP DHCOM PDK2/PDK3. - Add ability to build fallback DTBOs from arch/$(ARCH)/dts. - Remove fdt_high and initrd_high env variables from imx6-dhcom. - Add dummy clk for imx8. - Fix DT corruption in imx8_cpu. - Improve DDR stability on pico-imx7d.
Diffstat (limited to 'dts')
-rw-r--r--dts/Kconfig16
-rw-r--r--dts/Makefile14
2 files changed, 29 insertions, 1 deletions
diff --git a/dts/Kconfig b/dts/Kconfig
index 7ea4fd5a79b..ffd50c04846 100644
--- a/dts/Kconfig
+++ b/dts/Kconfig
@@ -125,6 +125,22 @@ config OF_UPSTREAM_VENDOR
help
Select the vendor to build all devicetree files for.
+config OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS
+ bool "Build local DTBOs as fallback for DTBOs missing upstream"
+ default n
+ depends on OF_UPSTREAM
+ help
+ Enable building DTBOs from arch/$(ARCH)/dts as a fallback for
+ DTBOs which are not part of Linux kernel upstream yet. This is
+ a stopgap measure to expedite OF_UPSTREAM switch for platforms
+ which already have main DT in Linux kernel upstream, but still
+ have leftover DTBOs in U-Boot tree.
+
+ Do not use this option, upstream your DTs and DTBOs instead.
+ If the upstreaming is in progress, use with utmost caution.
+
+ If unsure, say N.
+
choice
prompt "Provider of DTB for DT control"
depends on OF_CONTROL
diff --git a/dts/Makefile b/dts/Makefile
index 62a65688cf5..86bf8dc2156 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -20,6 +20,12 @@ else
dt_dir := arch/$(ARCH)/dts
endif
+ifneq ($(CONFIG_OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS),)
+local_dtbos := local-dtbos
+else
+local_dtbos :=
+endif
+
ifneq ($(EXT_DTB),)
DTB := $(EXT_DTB)
else
@@ -40,7 +46,7 @@ endif
targets += dt.dtb
-$(DTB): arch-dtbs
+$(DTB): arch-dtbs $(local_dtbos)
$(Q)test -e $@ || ( \
echo >&2; \
echo >&2 "Device Tree Source ($@) is not correctly specified."; \
@@ -53,6 +59,12 @@ PHONY += arch-dtbs
arch-dtbs:
$(Q)$(MAKE) $(build)=$(dt_dir) dtbs
+ifneq ($(CONFIG_OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS),)
+PHONY += local-dtbos
+local-dtbos:
+ $(Q)$(MAKE) $(build)=arch/$(ARCH)/dts dtbos
+endif
+
ifeq ($(CONFIG_XPL_BUILD),y)
obj-$(CONFIG_OF_EMBED) := dt-spl.dtb.o
# support "out-of-tree" build for dtb-spl