Skip to contentSkip to conversation

dm: Remove pre-schema tag support

PATCH In review Tom Rini 1 participant 2 messages Nov 2, 2025 – Nov 10, 2025

Subsystems (2)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 dm: Remove pre-schema tag support

Support for using "u-boot,dm-..." rather than "bootph-..." has been deprecated since February 2023. Any platforms using this have had a console message saying to migrate by 2023.07. Go and remove all support here now, for the v2026.01 release.

The results of this change that aren't clear from the above are that we still have a checkpatch.pl error message, and document in doc/develop/spl.rst that they have been migrated since 2023. We also change the key2dtsi.py tool to use the correct bootph phase rather than the legacy phase.

---
Cc: Simon Glass <[email protected]>
Cc: Jan Kiszka <[email protected]>

---
 .azure-pipelines.yml                          |  12 --
 .gitlab-ci.yml                                |   9 --
 common/board_r.c                              |   7 --
 configs/ibex-ast2700_defconfig                |   1 -
 configs/jaguar-rk3588_defconfig               |   1 -
 configs/sama5d29_curiosity_mmc1_defconfig     |   1 -
 configs/sama5d29_curiosity_mmc_defconfig      |   1 -
 .../sama5d29_curiosity_qspiflash_defconfig    |   1 -
 configs/sama7g54_curiosity_mmc_defconfig      |   1 -
 .../sama7g54_curiosity_nandflash_defconfig    |   1 -
 .../sama7g54_curiosity_qspiflash_defconfig    |   1 -
 configs/tiger-rk3588_defconfig                |   1 -
 drivers/core/ofnode.c                         |  12 --
 dts/Kconfig                                   |  10 --
 include/asm-generic/global_data.h             |   6 +-
 scripts/Makefile.lib                          |   9 --
 test/py/tests/test_of_migrate.py              | 105 ------------------
 tools/key2dtsi.py                             |   2 +-
 tools/patman/test_checkpatch.py               |   6 -
 19 files changed, 4 insertions(+), 183 deletions(-)
 delete mode 100644 test/py/tests/test_of_migrate.py
.azure-pipelines.yml +0 -12
index fc55c8b21006..0843204e5f82 100644
@@ -188,18 +188,6 @@ stages:
           export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
           make pylint_err
 
-  - job: check_for_pre_schema_tags
-    displayName: 'Check for pre-schema driver model tags'
-    pool:
-      vmImage: $(ubuntu_vm)
-    container:
-      image: $(ci_runner_image)
-      options: $(container_option)
-    steps:
-      # If grep succeeds and finds a match the test fails as we should
-      # have no matches.
-      - script: git grep u-boot,dm- -- '*.dts*' && exit 1 || exit 0
-
   - job: check_packing_of_python_tools
     displayName: 'Check we can package the Python tools'
     pool:
.gitlab-ci.yml +0 -9
index 73ff975e5746..000ec1a14821 100644
@@ -245,15 +245,6 @@ Run pylint:
     - export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"
     - make pylint_err
 
-# Check for pre-schema driver model tags
-Check for pre-schema tags:
-  extends: .testsuites
-  script:
-    - git config --global --add safe.directory "${CI_PROJECT_DIR}";
-    # If grep succeeds and finds a match the test fails as we should
-    # have no matches.
-    - git grep u-boot,dm- -- '*.dts*' && exit 1 || exit 0
-
 # Check we can package the Python tools
 Check packing of Python tools:
   extends: .testsuites
common/board_r.c +0 -7
index 143d51d06330..76f9fc090fbe 100644
@@ -572,13 +572,6 @@ static int dm_announce(void)
 			printf("Warning: Unexpected devicetree source (not from a prior stage)");
 			printf("Warning: U-Boot may not function properly\n");
 		}
-		if (IS_ENABLED(CONFIG_OF_TAG_MIGRATE) &&
-		    (gd->flags & GD_FLG_OF_TAG_MIGRATE))
-			/*
-			 * U-Boot will silently fail to work after 2023.07 if
-			 * there are old tags present
-			 */
-			printf("Warning: Device tree includes old 'u-boot,dm-' tags: please fix by 2023.07!\n");
 	}
 
 	return 0;
configs/ibex-ast2700_defconfig +0 -1
index 088eec1ec702..a4090f055133 100644
@@ -65,7 +65,6 @@ CONFIG_CMD_SYSBOOT=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_DEVICE_TREE_INCLUDES="ast2700-u-boot.dtsi"
-# CONFIG_OF_TAG_MIGRATE is not set
 CONFIG_ENV_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_RX_ETH_BUFFER=2
 # CONFIG_DM_DEVICE_REMOVE is not set
configs/jaguar-rk3588_defconfig +0 -1
index 3ed07d18e103..def0acf6cfdc 100644
@@ -57,7 +57,6 @@ CONFIG_CMD_SQUASHFS=y
 # CONFIG_SPL_DOS_PARTITION is not set
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_LIVE=y
-# CONFIG_OF_TAG_MIGRATE is not set
 CONFIG_OF_SPL_REMOVE_PROPS="interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
configs/sama5d29_curiosity_mmc1_defconfig +0 -1
index 4e56c670357e..ad835af5dbd9 100644
@@ -65,7 +65,6 @@ CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y
 CONFIG_MTDIDS_DEFAULT="nor0=nor0"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:256k(bootstrap)ro,1M(u-boot)ro,256k(env)ro,512k(dtb)ro,6M(kernel)ro"
 CONFIG_OF_CONTROL=y
-# CONFIG_OF_TAG_MIGRATE is not set
 CONFIG_ENV_IS_IN_FAT=y
 CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
 CONFIG_ENV_RELOC_GD_ENV_ADDR=y
configs/sama5d29_curiosity_mmc_defconfig +0 -1
index 28d5626a2a59..e01332768b1f 100644
@@ -65,7 +65,6 @@ CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y
 CONFIG_MTDIDS_DEFAULT="nor0=nor0"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:256k(bootstrap)ro,1M(u-boot)ro,256k(env)ro,512k(dtb)ro,6M(kernel)ro"
 CONFIG_OF_CONTROL=y
-# CONFIG_OF_TAG_MIGRATE is not set
 CONFIG_ENV_IS_IN_FAT=y
 CONFIG_ENV_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_HOSTNAME=y
configs/sama5d29_curiosity_qspiflash_defconfig +0 -1
index e19e39cd6dc1..17504f5de14b 100644
@@ -65,7 +65,6 @@ CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y
 CONFIG_MTDIDS_DEFAULT="nor0=nor0"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:256k(bootstrap)ro,1M(u-boot)ro,256k(env)ro,512k(dtb)ro,6M(kernel)ro"
 CONFIG_OF_CONTROL=y
-# CONFIG_OF_TAG_MIGRATE is not set
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_HOSTNAME=y
configs/sama7g54_curiosity_mmc_defconfig +0 -1
index 557173d1af01..f6f552c00879 100644
@@ -68,7 +68,6 @@ CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y
 CONFIG_MTDIDS_DEFAULT="nand0=nand0,nor0=nor0"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=nand0:256k(bootstrap-nand)ro,1M(u-boot-nand)ro,256k(env-nand)ro,512k(dtb-nand)ro,6M(kernel-nand)ro,-(rootfs-nand)ro;nor0:256k(bootstrap-nor)ro,1M(u-boot-nor)ro,256k(env-nor)ro,512k(dtb-nor)ro,6M(kernel-nor)ro"
 CONFIG_OF_CONTROL=y
-# CONFIG_OF_TAG_MIGRATE is not set
 CONFIG_ENV_IS_IN_FAT=y
 CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
 CONFIG_ENV_RELOC_GD_ENV_ADDR=y
configs/sama7g54_curiosity_nandflash_defconfig +0 -1
index 4a3b5e5f5b36..830454705c2c 100644
@@ -67,7 +67,6 @@ CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y
 CONFIG_MTDIDS_DEFAULT="nand0=nand0,nor0=nor0"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=nand0:256k(bootstrap-nand)ro,1M(u-boot-nand)ro,256k(env-nand)ro,512k(dtb-nand)ro,6M(kernel-nand)ro,-(rootfs-nand)ro;nor0:256k(bootstrap-nor)ro,1M(u-boot-nor)ro,256k(env-nor)ro,512k(dtb-nor)ro,6M(kernel-nor)ro"
 CONFIG_OF_CONTROL=y
-# CONFIG_OF_TAG_MIGRATE is not set
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_ENV_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_HOSTNAME=y
configs/sama7g54_curiosity_qspiflash_defconfig +0 -1
index fee0a8bac040..d91eb28db0ff 100644
@@ -68,7 +68,6 @@ CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y
 CONFIG_MTDIDS_DEFAULT="nand0=nand0,nor0=nor0"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=nand0:256k(bootstrap-nand)ro,1M(u-boot-nand)ro,256k(env-nand)ro,512k(dtb-nand)ro,6M(kernel-nand)ro,-(rootfs-nand)ro;nor0:256k(bootstrap-nor)ro,1M(u-boot-nor)ro,256k(env-nor)ro,512k(dtb-nor)ro,6M(kernel-nor)ro"
 CONFIG_OF_CONTROL=y
-# CONFIG_OF_TAG_MIGRATE is not set
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_HOSTNAME=y
configs/tiger-rk3588_defconfig +0 -1
index 8ba2a996ee20..50a3b553a111 100644
@@ -57,7 +57,6 @@ CONFIG_CMD_SQUASHFS=y
 # CONFIG_SPL_DOS_PARTITION is not set
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_LIVE=y
-# CONFIG_OF_TAG_MIGRATE is not set
 CONFIG_OF_SPL_REMOVE_PROPS="interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
drivers/core/ofnode.c +0 -12
index e040e3f2806f..071d998a0a51 100644
@@ -1629,18 +1629,6 @@ bool ofnode_pre_reloc(ofnode node)
 	    ofnode_read_bool(node, "bootph-pre-sram"))
 		return gd->flags & GD_FLG_RELOC;
 
-	if (IS_ENABLED(CONFIG_OF_TAG_MIGRATE)) {
-		/* detect and handle old tags */
-		if (ofnode_read_bool(node, "u-boot,dm-pre-reloc") ||
-		    ofnode_read_bool(node, "u-boot,dm-pre-proper") ||
-		    ofnode_read_bool(node, "u-boot,dm-spl") ||
-		    ofnode_read_bool(node, "u-boot,dm-tpl") ||
-		    ofnode_read_bool(node, "u-boot,dm-vpl")) {
-			gd->flags |= GD_FLG_OF_TAG_MIGRATE;
-			return true;
-		}
-	}
-
 	return false;
 #endif
 }
dts/Kconfig +0 -10
index 4e2622d48d04..870f75ad3ec3 100644
@@ -408,16 +408,6 @@ config SPL_MULTI_DTB_FIT_USER_DEF_ADDR
 	   at compilation time. This is the address of this area. It must be
 	   aligned on 2-byte boundary.
 
-config OF_TAG_MIGRATE
-	bool "Ease migration from old device trees with u-boot,dm- tags"
-	default y
-	help
-	  U-Boot moved over to use new tags to mark device tree nodes which need
-	  to be processed in SPL, before relocation, etc. Enable this option to
-	  detect old tags and handle them.
-
-	  Note: This option will be removed after the 2023.07 release.
-
 config OF_SPL_REMOVE_PROPS
 	string "List of device tree properties to drop for SPL"
 	depends on SPL_OF_CONTROL
include/asm-generic/global_data.h +3 -3
index 506ee51cdb08..745d2c3a9663 100644
@@ -671,10 +671,10 @@ enum gd_flags {
 	 * @GD_FLG_FDT_CHANGED: Device tree change has been detected by tests
 	 */
 	GD_FLG_FDT_CHANGED = 0x100000,
-	/**
-	 * @GD_FLG_OF_TAG_MIGRATE: Device tree has old u-boot,dm- tags
+	/*
+	 * @GD_FLG_OF_TAG_MIGRATE: Previously had the value of 0x200000 but was
+	 * freed when migration support was removed.
 	 */
-	GD_FLG_OF_TAG_MIGRATE = 0x200000,
 	/**
 	 * @GD_FLG_DM_DEAD: Driver model is not accessible. This can be set when
 	 * the memory used to holds its tables has been mapped out.
scripts/Makefile.lib +0 -9
index 5db2fbc418a1..791eb1cb3276 100644
@@ -671,15 +671,6 @@ cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \
 # pass removes various unused properties from the remaining nodes.
 # The output is typically a much smaller device tree file.
 
-ifdef CONFIG_OF_TAG_MIGRATE
-# Support the old tags for a migration period
-migrate_tpl := -b u-boot,dm-pre-reloc -b u-boot,dm-tpl
-migrate_vpl := -b u-boot,dm-pre-reloc -b u-boot,dm-vpl
-migrate_spl := -b u-boot,dm-pre-reloc -b u-boot,dm-spl
-migrate_all := -P u-boot,dm-pre-reloc \
-	-P u-boot,dm-spl -P u-boot,dm-tpl -P u-boot,dm-vpl
-endif
-
 ifeq ($(CONFIG_VPL_BUILD),y)
 fdtgrep_props := -b bootph-all -b bootph-verify $(migrate_vpl)
 else
test/py/tests/test_of_migrate.py deleted +0 -105

105 lines not on this page · raw message

tools/key2dtsi.py +1 -1
index 1dbb2cc94bf1..123bb3f218bf 100755
@@ -58,7 +58,7 @@ if args.required_conf:
 elif args.required_image:
     out.write('\t\t\trequired = "image";\n')
 if args.spl:
-    out.write('\t\t\tu-boot,dm-spl;\n')
+    out.write('\t\t\tbootph-pre-ram;\n')
 out.write('\t\t};\n')
 out.write('\t};\n')
 out.write('};\n')
tools/patman/test_checkpatch.py +0 -6
index 4e8d163184e1..b4722330f867 100644
@@ -522,11 +522,5 @@ index 0000000..2234c87
         self.check_strl("cat");
         self.check_strl("cpy");
 
-    def test_schema(self):
-        """Check for uses of strn(cat|cpy)"""
-        pm = PatchMaker()
-        pm.add_line('arch/sandbox/dts/sandbox.dtsi', '\tu-boot,dm-pre-proper;')
-        self.check_single_message(pm, 'PRE_SCHEMA', 'error')
-
 if __name__ == "__main__":
     unittest.main()
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 5 lines · Tom Rini

Support for using "u-boot,dm-..." rather than "bootph-..." has been deprecated since February 2023. Any platforms using this have had a console message saying to migrate by 2023.07. Go and remove all support here now, for the v2026.01 release.

Quoted 7 lines

The results of this change that aren't clear from the above are that we still have a checkpatch.pl error message, and document in doc/develop/spl.rst that they have been migrated since 2023. We also change the key2dtsi.py tool to use the correct bootph phase rather than the legacy phase.

[...]

Applied to u-boot/master, thanks!

[1/1] dm: Remove pre-schema tag support

      commit: 6d04828b45202312c93892b4be834809c795d4d2
Signature · 1 line
Tom