diff --git a/test/dm/core.c b/test/dm/core.c
index 8c18780..24e0b6b 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -25,6 +25,7 @@
 	TEST_INTVAL2		= 3,
 	TEST_INTVAL3		= 6,
 	TEST_INTVAL_MANUAL	= 101112,
+	TEST_INTVAL_PRE_RELOC	= 7,
 };
 
 static const struct dm_test_pdata test_pdata[] = {
@@ -37,6 +38,10 @@
 	.ping_add		= TEST_INTVAL_MANUAL,
 };
 
+static const struct dm_test_pdata test_pdata_pre_reloc = {
+	.ping_add		= TEST_INTVAL_PRE_RELOC,
+};
+
 U_BOOT_DEVICE(dm_test_info1) = {
 	.name = "test_drv",
 	.platdata = &test_pdata[0],
@@ -57,6 +62,11 @@
 	.platdata = &test_pdata_manual,
 };
 
+static struct driver_info driver_info_pre_reloc = {
+	.name = "test_pre_reloc_drv",
+	.platdata = &test_pdata_manual,
+};
+
 /* Test that binding with platdata occurs correctly */
 static int dm_test_autobind(struct dm_test_state *dms)
 {
@@ -71,7 +81,7 @@
 	ut_asserteq(0, list_count_items(&gd->dm_root->child_head));
 	ut_asserteq(0, dm_testdrv_op_count[DM_TEST_OP_POST_BIND]);
 
-	ut_assertok(dm_scan_platdata());
+	ut_assertok(dm_scan_platdata(false));
 
 	/* We should have our test class now at least, plus more children */
 	ut_assert(1 < list_count_items(&gd->uclass_root));
@@ -181,7 +191,7 @@
 
 	memcpy(op_count, dm_testdrv_op_count, sizeof(op_count));
 
-	ut_assertok(device_bind_by_name(dms->root, &driver_info_manual,
+	ut_assertok(device_bind_by_name(dms->root, false, &driver_info_manual,
 					&dev));
 	ut_assert(dev);
 	ut_assert(dm_testdrv_op_count[DM_TEST_OP_BIND]
@@ -232,15 +242,15 @@
 	struct udevice *dev, *dev_penultimate, *dev_last, *test_dev;
 	int pingret;
 
-	ut_assertok(device_bind_by_name(dms->root, &driver_info_manual,
+	ut_assertok(device_bind_by_name(dms->root, false, &driver_info_manual,
 					&dev));
 	ut_assert(dev);
 
 	/* Bind two new devices (numbers 4 and 5) */
-	ut_assertok(device_bind_by_name(dms->root, &driver_info_manual,
+	ut_assertok(device_bind_by_name(dms->root, false, &driver_info_manual,
 					&dev_penultimate));
 	ut_assert(dev_penultimate);
-	ut_assertok(device_bind_by_name(dms->root, &driver_info_manual,
+	ut_assertok(device_bind_by_name(dms->root, false, &driver_info_manual,
 					&dev_last));
 	ut_assert(dev_last);
 
@@ -255,7 +265,8 @@
 	ut_assert(dev_last == test_dev);
 
 	/* Add back the original device 3, now in position 5 */
-	ut_assertok(device_bind_by_name(dms->root, &driver_info_manual, &dev));
+	ut_assertok(device_bind_by_name(dms->root, false, &driver_info_manual,
+					&dev));
 	ut_assert(dev);
 
 	/* Try ping */
@@ -375,8 +386,8 @@
 		if (!start.uordblks)
 			puts("Warning: Please add '#define DEBUG' to the top of common/dlmalloc.c\n");
 
-		ut_assertok(dm_scan_platdata());
-		ut_assertok(dm_scan_fdt(gd->fdt_blob));
+		ut_assertok(dm_scan_platdata(false));
+		ut_assertok(dm_scan_fdt(gd->fdt_blob, false));
 
 		/* Scanning the uclass is enough to probe all the devices */
 		for (id = UCLASS_ROOT; id < UCLASS_COUNT; id++) {
@@ -444,8 +455,8 @@
 	for (i = 0; i < count; i++) {
 		struct dm_test_pdata *pdata;
 
-		ut_assertok(device_bind_by_name(parent, &driver_info_manual,
-						&dev));
+		ut_assertok(device_bind_by_name(parent, false,
+						&driver_info_manual, &dev));
 		pdata = calloc(1, sizeof(*pdata));
 		pdata->ping_add = key + i;
 		dev->platdata = pdata;
@@ -542,3 +553,20 @@
 	return 0;
 }
 DM_TEST(dm_test_children, 0);
+
+/* Test that pre-relocation devices work as expected */
+static int dm_test_pre_reloc(struct dm_test_state *dms)
+{
+	struct udevice *dev;
+
+	/* The normal driver should refuse to bind before relocation */
+	ut_asserteq(-EPERM, device_bind_by_name(dms->root, true,
+						&driver_info_manual, &dev));
+
+	/* But this one is marked pre-reloc */
+	ut_assertok(device_bind_by_name(dms->root, true,
+					&driver_info_pre_reloc, &dev));
+
+	return 0;
+}
+DM_TEST(dm_test_pre_reloc, 0);
diff --git a/test/dm/test-driver.c b/test/dm/test-driver.c
index 0f1a37b..bc6a6e7 100644
--- a/test/dm/test-driver.c
+++ b/test/dm/test-driver.c
@@ -144,3 +144,14 @@
 	.remove	= test_manual_remove,
 	.unbind	= test_manual_unbind,
 };
+
+U_BOOT_DRIVER(test_pre_reloc_drv) = {
+	.name	= "test_pre_reloc_drv",
+	.id	= UCLASS_TEST,
+	.ops	= &test_manual_ops,
+	.bind	= test_manual_bind,
+	.probe	= test_manual_probe,
+	.remove	= test_manual_remove,
+	.unbind	= test_manual_unbind,
+	.flags	= DM_FLAG_PRE_RELOC,
+};
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index 0f50537..d284f7f 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -100,7 +100,7 @@
 	int ret;
 	int i;
 
-	ret = dm_scan_fdt(gd->fdt_blob);
+	ret = dm_scan_fdt(gd->fdt_blob, false);
 	ut_assert(!ret);
 
 	ret = uclass_get(UCLASS_TEST_FDT, &uc);
@@ -145,3 +145,21 @@
 	return 0;
 }
 DM_TEST(dm_test_fdt, 0);
+
+static int dm_test_fdt_pre_reloc(struct dm_test_state *dms)
+{
+	struct uclass *uc;
+	int ret;
+
+	ret = dm_scan_fdt(gd->fdt_blob, true);
+	ut_assert(!ret);
+
+	ret = uclass_get(UCLASS_TEST_FDT, &uc);
+	ut_assert(!ret);
+
+	/* These is only one pre-reloc device */
+	ut_asserteq(1, list_count_items(&uc->dev_head));
+
+	return 0;
+}
+DM_TEST(dm_test_fdt_pre_reloc, 0);
diff --git a/test/dm/test-main.c b/test/dm/test-main.c
index fbdae68..94ce72a 100644
--- a/test/dm/test-main.c
+++ b/test/dm/test-main.c
@@ -89,11 +89,11 @@
 		ut_assertok(dm_test_init(dms));
 
 		if (test->flags & DM_TESTF_SCAN_PDATA)
-			ut_assertok(dm_scan_platdata());
+			ut_assertok(dm_scan_platdata(false));
 		if (test->flags & DM_TESTF_PROBE_TEST)
 			ut_assertok(do_autoprobe(dms));
 		if (test->flags & DM_TESTF_SCAN_FDT)
-			ut_assertok(dm_scan_fdt(gd->fdt_blob));
+			ut_assertok(dm_scan_fdt(gd->fdt_blob, false));
 
 		if (test->func(dms))
 			break;
diff --git a/test/dm/test.dts b/test/dm/test.dts
index 74d236b..cd18a31 100644
--- a/test/dm/test.dts
+++ b/test/dm/test.dts
@@ -6,11 +6,21 @@
 	#address-cells = <1>;
 	#size-cells = <0>;
 
+	aliases {
+		console = &uart0;
+	};
+
+	uart0: serial {
+		compatible = "sandbox,serial";
+		u-boot,dm-pre-reloc;
+	};
+
 	a-test {
 		reg = <0>;
 		compatible = "denx,u-boot-fdt-test";
 		ping-expect = <0>;
 		ping-add = <0>;
+		u-boot,dm-pre-reloc;
 	};
 
 	junk {
