Merge "Fix SMCCC_ARCH_SOC_ID implementation" into integration
diff --git a/Makefile b/Makefile
index f01a9ae..5c4f36c 100644
--- a/Makefile
+++ b/Makefile
@@ -94,12 +94,6 @@
 
 export Q ECHO
 
-# Default build string (git branch and commit)
-ifeq (${BUILD_STRING},)
-        BUILD_STRING	:=	$(shell git describe --always --dirty --tags 2> /dev/null)
-endif
-VERSION_STRING		:=	v${VERSION_MAJOR}.${VERSION_MINOR}(${BUILD_TYPE}):${BUILD_STRING}
-
 # The cert_create tool cannot generate certificates individually, so we use the
 # target 'certificates' to create them all
 ifneq (${GENERATE_COT},0)
@@ -281,6 +275,12 @@
         LOG_LEVEL	:=	20
 endif
 
+# Default build string (git branch and commit)
+ifeq (${BUILD_STRING},)
+        BUILD_STRING  :=  $(shell git describe --always --dirty --tags 2> /dev/null)
+endif
+VERSION_STRING    :=  v${VERSION_MAJOR}.${VERSION_MINOR}(${BUILD_TYPE}):${BUILD_STRING}
+
 ifeq (${AARCH32_INSTRUCTION_SET},A32)
 TF_CFLAGS_aarch32	+=	-marm
 else ifeq (${AARCH32_INSTRUCTION_SET},T32)
diff --git a/common/fdt_wrappers.c b/common/fdt_wrappers.c
index 842d713..1901a20 100644
--- a/common/fdt_wrappers.c
+++ b/common/fdt_wrappers.c
@@ -276,3 +276,68 @@
 
 	return 0;
 }
+
+/*******************************************************************************
+ * This function fills reg node info (base & size) with an index found by
+ * checking the reg-names node.
+ * Returns 0 on success and a negative FDT error code on failure.
+ ******************************************************************************/
+int fdt_get_reg_props_by_name(const void *dtb, int node, const char *name,
+			      uintptr_t *base, size_t *size)
+{
+	int index;
+
+	index = fdt_stringlist_search(dtb, node, "reg-names", name);
+	if (index < 0) {
+		return index;
+	}
+
+	return fdt_get_reg_props_by_index(dtb, node, index, base, size);
+}
+
+/*******************************************************************************
+ * This function gets the stdout path node.
+ * It reads the value indicated inside the device tree.
+ * Returns node offset on success and a negative FDT error code on failure.
+ ******************************************************************************/
+int fdt_get_stdout_node_offset(const void *dtb)
+{
+	int node;
+	const char *prop, *path;
+	int len;
+
+	/* The /secure-chosen node takes precedence over the standard one. */
+	node = fdt_path_offset(dtb, "/secure-chosen");
+	if (node < 0) {
+		node = fdt_path_offset(dtb, "/chosen");
+		if (node < 0) {
+			return -FDT_ERR_NOTFOUND;
+		}
+	}
+
+	prop = fdt_getprop(dtb, node, "stdout-path", NULL);
+	if (prop == NULL) {
+		return -FDT_ERR_NOTFOUND;
+	}
+
+	/* Determine the actual path length, as a colon terminates the path. */
+	path = strchr(prop, ':');
+	if (path == NULL) {
+		len = strlen(prop);
+	} else {
+		len = path - prop;
+	}
+
+	/* Aliases cannot start with a '/', so it must be the actual path. */
+	if (prop[0] == '/') {
+		return fdt_path_offset_namelen(dtb, prop, len);
+	}
+
+	/* Lookup the alias, as this contains the actual path. */
+	path = fdt_get_alias_namelen(dtb, prop, len);
+	if (path == NULL) {
+		return -FDT_ERR_NOTFOUND;
+	}
+
+	return fdt_path_offset(dtb, path);
+}
diff --git a/docs/components/fconf/fconf_properties.rst b/docs/components/fconf/fconf_properties.rst
new file mode 100644
index 0000000..5c28a7a
--- /dev/null
+++ b/docs/components/fconf/fconf_properties.rst
@@ -0,0 +1,32 @@
+DTB binding for FCONF properties
+================================
+
+This document describes the device tree format of |FCONF| properties. These
+properties are not related to a specific platform and can be queried from
+common code.
+
+Dynamic configuration
+~~~~~~~~~~~~~~~~~~~~~
+
+The |FCONF| framework expects a *dtb-registry* node with the following field:
+
+- compatible [mandatory]
+   - value type: <string>
+   - Must be the string "fconf,dyn_cfg-dtb_registry".
+
+Then a list of subnodes representing a configuration |DTB|, which can be used
+by |FCONF|. Each subnode should be named according to the information it
+contains, and must be formed with the following fields:
+
+- load-address [mandatory]
+    - value type: <u64>
+    - Physical loading base address of the configuration.
+
+- max-size [mandatory]
+    - value type: <u32>
+    - Maximum size of the configuration.
+
+- id [mandatory]
+    - value type: <u32>
+    - Image ID of the configuration.
+
diff --git a/docs/components/fconf.rst b/docs/components/fconf/index.rst
similarity index 90%
rename from docs/components/fconf.rst
rename to docs/components/fconf/index.rst
index 7352ac3..0da56ec 100644
--- a/docs/components/fconf.rst
+++ b/docs/components/fconf/index.rst
@@ -81,6 +81,10 @@
 This second level wrapper can be used to remap the ``FCONF_GET_PROPERTY()`` to
 anything appropriate: structure, array, function, etc..
 
+To ensure a good interpretation of the properties, this documentation must
+explain how the properties are described for a specific backend. Refer to the
+:ref:`binding-document` section for more information and example.
+
 Loading the property device tree
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -88,7 +92,7 @@
 the properties' values. This must be done after the io layer is initialized, as
 the |DTB| is stored on an external device (FIP).
 
-.. uml:: ../resources/diagrams/plantuml/fconf_bl1_load_config.puml
+.. uml:: ../../resources/diagrams/plantuml/fconf_bl1_load_config.puml
 
 Populating the properties
 ~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -98,7 +102,7 @@
 This function will call all the ``populate()`` callbacks which have been
 registered with ``FCONF_REGISTER_POPULATOR()`` as described above.
 
-.. uml:: ../resources/diagrams/plantuml/fconf_bl2_populate.puml
+.. uml:: ../../resources/diagrams/plantuml/fconf_bl2_populate.puml
 
 Namespace guidance
 ~~~~~~~~~~~~~~~~~~
@@ -129,3 +133,12 @@
 Example:
  - Arm io framework: arm.io_policies.bl31_id
 
+.. _binding-document:
+
+Properties binding information
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. toctree::
+  :maxdepth: 1
+
+  fconf_properties
diff --git a/docs/components/index.rst b/docs/components/index.rst
index 49986ca..e3ce614 100644
--- a/docs/components/index.rst
+++ b/docs/components/index.rst
@@ -10,7 +10,7 @@
    arm-sip-service
    debugfs-design
    exception-handling
-   fconf
+   fconf/index
    firmware-update
    platform-interrupt-controller-API
    ras
diff --git a/drivers/st/spi/stm32_qspi.c b/drivers/st/spi/stm32_qspi.c
index c5e4ea8..ff92796 100644
--- a/drivers/st/spi/stm32_qspi.c
+++ b/drivers/st/spi/stm32_qspi.c
@@ -9,6 +9,7 @@
 #include <platform_def.h>
 
 #include <common/debug.h>
+#include <common/fdt_wrappers.h>
 #include <drivers/delay_timer.h>
 #include <drivers/spi_mem.h>
 #include <drivers/st/stm32_gpio.h>
@@ -465,13 +466,13 @@
 		return -FDT_ERR_NOTFOUND;
 	}
 
-	ret = fdt_get_reg_props_by_name(qspi_node, "qspi",
+	ret = fdt_get_reg_props_by_name(fdt, qspi_node, "qspi",
 					&stm32_qspi.reg_base, &size);
 	if (ret != 0) {
 		return ret;
 	}
 
-	ret = fdt_get_reg_props_by_name(qspi_node, "qspi_mm",
+	ret = fdt_get_reg_props_by_name(fdt, qspi_node, "qspi_mm",
 					&stm32_qspi.mm_base,
 					&stm32_qspi.mm_size);
 	if (ret != 0) {
diff --git a/include/common/fdt_wrappers.h b/include/common/fdt_wrappers.h
index 7a6b598..382651e 100644
--- a/include/common/fdt_wrappers.h
+++ b/include/common/fdt_wrappers.h
@@ -30,5 +30,8 @@
 		unsigned int length, const void *data);
 int fdt_get_reg_props_by_index(const void *dtb, int node, int index,
 			       uintptr_t *base, size_t *size);
+int fdt_get_reg_props_by_name(const void *dtb, int node, const char *name,
+			      uintptr_t *base, size_t *size);
+int fdt_get_stdout_node_offset(const void *dtb);
 
 #endif /* FDT_WRAPPERS_H */
diff --git a/lib/fconf/fconf_dyn_cfg_getter.c b/lib/fconf/fconf_dyn_cfg_getter.c
index 03aaf9b..7b5bd6e 100644
--- a/lib/fconf/fconf_dyn_cfg_getter.c
+++ b/lib/fconf/fconf_dyn_cfg_getter.c
@@ -48,8 +48,8 @@
 	/* As libfdt use void *, we can't avoid this cast */
 	const void *dtb = (void *)config;
 
-	/* Find the node offset point to "arm,dyn_cfg-dtb_registry" compatible property */
-	const char *compatible_str = "arm,dyn_cfg-dtb_registry";
+	/* Find the node offset point to "fconf,dyn_cfg-dtb_registry" compatible property */
+	const char *compatible_str = "fconf,dyn_cfg-dtb_registry";
 	node = fdt_node_offset_by_compatible(dtb, -1, compatible_str);
 	if (node < 0) {
 		ERROR("FCONF: Can't find %s compatible in dtb\n", compatible_str);
diff --git a/plat/arm/board/a5ds/fdts/a5ds_fw_config.dts b/plat/arm/board/a5ds/fdts/a5ds_fw_config.dts
index 2f2d265..ff079ab 100644
--- a/plat/arm/board/a5ds/fdts/a5ds_fw_config.dts
+++ b/plat/arm/board/a5ds/fdts/a5ds_fw_config.dts
@@ -10,7 +10,7 @@
 
 / {
 	dtb-registry {
-		compatible = "arm,dyn_cfg-dtb_registry";
+		compatible = "fconf,dyn_cfg-dtb_registry";
 
 		/* tb_fw_config is temporarily contained in this dtb */
 		tb_fw-config {
diff --git a/plat/arm/board/arm_fpga/aarch64/fpga_helpers.S b/plat/arm/board/arm_fpga/aarch64/fpga_helpers.S
index f350455..aeed310 100644
--- a/plat/arm/board/arm_fpga/aarch64/fpga_helpers.S
+++ b/plat/arm/board/arm_fpga/aarch64/fpga_helpers.S
@@ -108,8 +108,6 @@
 
 func plat_crash_console_init
 	mov_imm	x0, PLAT_FPGA_CRASH_UART_BASE
-	mov_imm	x1, PLAT_FPGA_CRASH_UART_CLK_IN_HZ
-	mov_imm	x2, PLAT_FPGA_CONSOLE_BAUDRATE
 	b	console_pl011_core_init
 endfunc plat_crash_console_init
 
diff --git a/plat/arm/board/arm_fpga/fpga_bl31_setup.c b/plat/arm/board/arm_fpga/fpga_bl31_setup.c
index 6329497..e4b9767 100644
--- a/plat/arm/board/arm_fpga/fpga_bl31_setup.c
+++ b/plat/arm/board/arm_fpga/fpga_bl31_setup.c
@@ -5,8 +5,11 @@
  */
 
 #include <assert.h>
-#include <lib/mmio.h>
+
+#include <common/fdt_wrappers.h>
 #include <drivers/generic_delay_timer.h>
+#include <lib/mmio.h>
+#include <libfdt.h>
 
 #include <plat/common/platform.h>
 #include <platform_def.h>
@@ -76,7 +79,16 @@
 
 unsigned int plat_get_syscnt_freq2(void)
 {
-	return FPGA_TIMER_FREQUENCY;
+	const void *fdt = (void *)(uintptr_t)FPGA_PRELOADED_DTB_BASE;
+	int node;
+
+	node = fdt_node_offset_by_compatible(fdt, 0, "arm,armv8-timer");
+	if (node < 0) {
+		return FPGA_DEFAULT_TIMER_FREQUENCY;
+	}
+
+	return fdt_read_uint32_default(fdt, node, "clock-frequency",
+				       FPGA_DEFAULT_TIMER_FREQUENCY);
 }
 
 void bl31_plat_enable_mmu(uint32_t flags)
diff --git a/plat/arm/board/arm_fpga/fpga_console.c b/plat/arm/board/arm_fpga/fpga_console.c
index b4ebf34..8c1da62 100644
--- a/plat/arm/board/arm_fpga/fpga_console.c
+++ b/plat/arm/board/arm_fpga/fpga_console.c
@@ -4,8 +4,12 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
-#include <drivers/console.h>
+#include <stddef.h>
+#include <stdint.h>
+
+#include <common/fdt_wrappers.h>
 #include <drivers/arm/pl011.h>
+#include <drivers/console.h>
 
 #include <platform_def.h>
 
@@ -13,10 +17,21 @@
 
 void fpga_console_init(void)
 {
-	(void)console_pl011_register(PLAT_FPGA_BOOT_UART_BASE,
-		PLAT_FPGA_BOOT_UART_CLK_IN_HZ,
-		PLAT_FPGA_CONSOLE_BAUDRATE,
-		&console);
+	const void *fdt = (void *)(uintptr_t)FPGA_PRELOADED_DTB_BASE;
+	uintptr_t base_addr = PLAT_FPGA_CRASH_UART_BASE;
+	int node;
+
+	/*
+	 * Try to read the UART base address from the DT, by chasing the
+	 * stdout-path property of the chosen node.
+	 * If this does not work, use the crash console address as a fallback.
+	 */
+	node = fdt_get_stdout_node_offset(fdt);
+	if (node >= 0) {
+		fdt_get_reg_props_by_index(fdt, node, 0, &base_addr, NULL);
+	}
+
+	(void)console_pl011_register(base_addr, 0, 0, &console);
 
 	console_set_scope(&console, CONSOLE_FLAG_BOOT |
 		CONSOLE_FLAG_RUNTIME);
diff --git a/plat/arm/board/arm_fpga/fpga_def.h b/plat/arm/board/arm_fpga/fpga_def.h
index dbdbe6f..0378729 100644
--- a/plat/arm/board/arm_fpga/fpga_def.h
+++ b/plat/arm/board/arm_fpga/fpga_def.h
@@ -23,18 +23,16 @@
 #define FPGA_MAX_PE_PER_CPU			4
 
 #define FPGA_PRIMARY_CPU			0x0
-
 /*******************************************************************************
  * FPGA image memory map related constants
  ******************************************************************************/
 
-/* UART base address and clock frequency, as configured by the image */
-#define PLAT_FPGA_BOOT_UART_BASE 		0x7ff80000
-#define PLAT_FPGA_BOOT_UART_CLK_IN_HZ 		10000000
-
-#define PLAT_FPGA_CRASH_UART_BASE		PLAT_FPGA_BOOT_UART_BASE
-#define PLAT_FPGA_CRASH_UART_CLK_IN_HZ		PLAT_FPGA_BOOT_UART_CLK_IN_HZ
+/*
+ * UART base address, just for the crash console, as a fallback.
+ * The actual console UART address is taken from the DT.
+ */
+#define PLAT_FPGA_CRASH_UART_BASE		0x7ff80000
 
-#define FPGA_TIMER_FREQUENCY			10000000
+#define FPGA_DEFAULT_TIMER_FREQUENCY		10000000
 
 #endif
diff --git a/plat/arm/board/arm_fpga/fpga_gicv3.c b/plat/arm/board/arm_fpga/fpga_gicv3.c
index be1684e..9fb5fa9 100644
--- a/plat/arm/board/arm_fpga/fpga_gicv3.c
+++ b/plat/arm/board/arm_fpga/fpga_gicv3.c
@@ -4,9 +4,13 @@
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
+#include <common/debug.h>
+#include <common/fdt_wrappers.h>
 #include <drivers/arm/gicv3.h>
 #include <drivers/arm/gic_common.h>
+#include <libfdt.h>
 
+#include <platform_def.h>
 #include <plat/common/platform.h>
 #include <platform_def.h>
 
@@ -22,9 +26,7 @@
 	return (unsigned int)plat_core_pos_by_mpidr(mpidr);
 }
 
-static const gicv3_driver_data_t fpga_gicv3_driver_data = {
-	.gicd_base = GICD_BASE,
-	.gicr_base = GICR_BASE,
+static gicv3_driver_data_t fpga_gicv3_driver_data = {
 	.interrupt_props = fpga_interrupt_props,
 	.interrupt_props_num = ARRAY_SIZE(fpga_interrupt_props),
 	.rdistif_num = PLATFORM_CORE_COUNT,
@@ -34,6 +36,30 @@
 
 void plat_fpga_gic_init(void)
 {
+	const void *fdt = (void *)(uintptr_t)FPGA_PRELOADED_DTB_BASE;
+	int node, ret;
+
+	node = fdt_node_offset_by_compatible(fdt, 0, "arm,gic-v3");
+	if (node < 0) {
+		WARN("No \"arm,gic-v3\" compatible node found in DT, no GIC support.\n");
+		return;
+	}
+
+	/* TODO: Assuming only empty "ranges;" properties up the bus path. */
+	ret = fdt_get_reg_props_by_index(fdt, node, 0,
+				 &fpga_gicv3_driver_data.gicd_base, NULL);
+	if (ret < 0) {
+		WARN("Could not read GIC distributor address from DT.\n");
+		return;
+	}
+
+	ret = fdt_get_reg_props_by_index(fdt, node, 1,
+				 &fpga_gicv3_driver_data.gicr_base, NULL);
+	if (ret < 0) {
+		WARN("Could not read GIC redistributor address from DT.\n");
+		return;
+	}
+
 	gicv3_driver_init(&fpga_gicv3_driver_data);
 	gicv3_distif_init();
 	gicv3_rdistif_init(plat_my_core_pos());
diff --git a/plat/arm/board/arm_fpga/include/platform_def.h b/plat/arm/board/arm_fpga/include/platform_def.h
index 5c8aff6..31fc987 100644
--- a/plat/arm/board/arm_fpga/include/platform_def.h
+++ b/plat/arm/board/arm_fpga/include/platform_def.h
@@ -35,9 +35,6 @@
 #define BL31_LIMIT			UL(0x01000000)
 #endif
 
-#define GICD_BASE			0x30000000
-#define GICR_BASE			0x30040000
-
 #define PLAT_SDEI_NORMAL_PRI		0x70
 
 #define ARM_IRQ_SEC_PHY_TIMER		29
@@ -87,6 +84,4 @@
 #define PLAT_FPGA_HOLD_STATE_WAIT	0
 #define PLAT_FPGA_HOLD_STATE_GO		1
 
-#define PLAT_FPGA_CONSOLE_BAUDRATE	38400
-
 #endif
diff --git a/plat/arm/board/arm_fpga/platform.mk b/plat/arm/board/arm_fpga/platform.mk
index 302aabf..0d0d010 100644
--- a/plat/arm/board/arm_fpga/platform.mk
+++ b/plat/arm/board/arm_fpga/platform.mk
@@ -4,6 +4,8 @@
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
+include lib/libfdt/libfdt.mk
+
 RESET_TO_BL31 := 1
 ifeq (${RESET_TO_BL31}, 0)
 $(error "This is a BL31-only port; RESET_TO_BL31 must be enabled")
@@ -38,6 +40,8 @@
 # This can be overridden depending on CPU(s) used in the FPGA image
 HW_ASSISTED_COHERENCY	:=	1
 
+PL011_GENERIC_UART	:=	1
+
 FPGA_CPU_LIBS	:=	lib/cpus/${ARCH}/aem_generic.S
 
 # select a different set of CPU files, depending on whether we compile for
@@ -80,7 +84,8 @@
 
 PLAT_BL_COMMON_SOURCES	:=	plat/arm/board/arm_fpga/${ARCH}/fpga_helpers.S
 
-BL31_SOURCES		+=	drivers/delay_timer/delay_timer.c		\
+BL31_SOURCES		+=	common/fdt_wrappers.c				\
+				drivers/delay_timer/delay_timer.c		\
 				drivers/delay_timer/generic_delay_timer.c	\
 				drivers/arm/pl011/${ARCH}/pl011_console.S	\
 				plat/common/plat_psci_common.c			\
diff --git a/plat/arm/board/fvp/fdts/fvp_fw_config.dts b/plat/arm/board/fvp/fdts/fvp_fw_config.dts
index 98ea857..7c11108 100644
--- a/plat/arm/board/fvp/fdts/fvp_fw_config.dts
+++ b/plat/arm/board/fvp/fdts/fvp_fw_config.dts
@@ -10,7 +10,7 @@
 
 / {
 	dtb-registry {
-		compatible = "arm,dyn_cfg-dtb_registry";
+		compatible = "fconf,dyn_cfg-dtb_registry";
 
 		/* tb_fw_config is temporarily contained on this dtb */
 		tb_fw-config {
diff --git a/plat/arm/board/fvp/jmptbl.i b/plat/arm/board/fvp/jmptbl.i
index 50a5ba4..213a974 100644
--- a/plat/arm/board/fvp/jmptbl.i
+++ b/plat/arm/board/fvp/jmptbl.i
@@ -24,10 +24,13 @@
 fdt     fdt_first_subnode
 fdt     fdt_next_subnode
 fdt     fdt_path_offset
+fdt     fdt_path_offset_namelen
 fdt     fdt_subnode_offset
 fdt     fdt_address_cells
 fdt     fdt_size_cells
 fdt     fdt_parent_offset
+fdt     fdt_stringlist_search
+fdt     fdt_get_alias_namelen
 mbedtls mbedtls_asn1_get_alg
 mbedtls mbedtls_asn1_get_alg_null
 mbedtls mbedtls_asn1_get_bitstring_null
diff --git a/plat/arm/board/fvp_ve/fdts/fvp_ve_fw_config.dts b/plat/arm/board/fvp_ve/fdts/fvp_ve_fw_config.dts
index 147c8f3..1727e2e 100644
--- a/plat/arm/board/fvp_ve/fdts/fvp_ve_fw_config.dts
+++ b/plat/arm/board/fvp_ve/fdts/fvp_ve_fw_config.dts
@@ -10,7 +10,7 @@
 
 / {
 	dtb-registry {
-		compatible = "arm,dyn_cfg-dtb_registry";
+		compatible = "fconf,dyn_cfg-dtb_registry";
 
 		/* tb_fw_config is temporarily contained on this dtb */
 		tb_fw-config {
diff --git a/plat/arm/board/juno/fdts/juno_fw_config.dts b/plat/arm/board/juno/fdts/juno_fw_config.dts
index cab6f2b..4e460aa 100644
--- a/plat/arm/board/juno/fdts/juno_fw_config.dts
+++ b/plat/arm/board/juno/fdts/juno_fw_config.dts
@@ -10,7 +10,7 @@
 
 / {
 	dtb-registry {
-		compatible = "arm,dyn_cfg-dtb_registry";
+		compatible = "fconf,dyn_cfg-dtb_registry";
 
 		/* tb_fw_config is temporarily contained on this dtb */
 		tb_fw-config {
diff --git a/plat/arm/board/juno/jmptbl.i b/plat/arm/board/juno/jmptbl.i
index eb4399e..09017ac 100644
--- a/plat/arm/board/juno/jmptbl.i
+++ b/plat/arm/board/juno/jmptbl.i
@@ -24,6 +24,10 @@
 fdt     fdt_first_subnode
 fdt     fdt_next_subnode
 fdt     fdt_parent_offset
+fdt     fdt_stringlist_search
+fdt     fdt_get_alias_namelen
+fdt     fdt_path_offset
+fdt     fdt_path_offset_namelen
 mbedtls mbedtls_asn1_get_alg
 mbedtls mbedtls_asn1_get_alg_null
 mbedtls mbedtls_asn1_get_bitstring_null
diff --git a/plat/arm/board/rddaniel/fdts/rddaniel_fw_config.dts b/plat/arm/board/rddaniel/fdts/rddaniel_fw_config.dts
index 81e4cc1..bb544a4 100644
--- a/plat/arm/board/rddaniel/fdts/rddaniel_fw_config.dts
+++ b/plat/arm/board/rddaniel/fdts/rddaniel_fw_config.dts
@@ -10,7 +10,7 @@
 
 / {
 	dtb-registry {
-		compatible = "arm,dyn_cfg-dtb_registry";
+		compatible = "fconf,dyn_cfg-dtb_registry";
 
 		/* tb_fw_config is temporarily contained on this dtb */
 		tb_fw-config {
diff --git a/plat/arm/board/rddanielxlr/fdts/rddanielxlr_fw_config.dts b/plat/arm/board/rddanielxlr/fdts/rddanielxlr_fw_config.dts
index 81e4cc1..bb544a4 100644
--- a/plat/arm/board/rddanielxlr/fdts/rddanielxlr_fw_config.dts
+++ b/plat/arm/board/rddanielxlr/fdts/rddanielxlr_fw_config.dts
@@ -10,7 +10,7 @@
 
 / {
 	dtb-registry {
-		compatible = "arm,dyn_cfg-dtb_registry";
+		compatible = "fconf,dyn_cfg-dtb_registry";
 
 		/* tb_fw_config is temporarily contained on this dtb */
 		tb_fw-config {
diff --git a/plat/arm/board/rde1edge/fdts/rde1edge_fw_config.dts b/plat/arm/board/rde1edge/fdts/rde1edge_fw_config.dts
index 2719ab4..a5b4a58 100644
--- a/plat/arm/board/rde1edge/fdts/rde1edge_fw_config.dts
+++ b/plat/arm/board/rde1edge/fdts/rde1edge_fw_config.dts
@@ -10,7 +10,7 @@
 
 / {
 	dtb-registry {
-		compatible = "arm,dyn_cfg-dtb_registry";
+		compatible = "fconf,dyn_cfg-dtb_registry";
 
 		/* tb_fw_config is temporarily contained on this dtb */
 		tb_fw-config {
diff --git a/plat/arm/board/rdn1edge/fdts/rdn1edge_fw_config.dts b/plat/arm/board/rdn1edge/fdts/rdn1edge_fw_config.dts
index ba74b75..1f460f1 100644
--- a/plat/arm/board/rdn1edge/fdts/rdn1edge_fw_config.dts
+++ b/plat/arm/board/rdn1edge/fdts/rdn1edge_fw_config.dts
@@ -9,7 +9,7 @@
 /dts-v1/;
 / {
 	dtb-registry {
-		compatible = "arm,dyn_cfg-dtb_registry";
+		compatible = "fconf,dyn_cfg-dtb_registry";
 
 		/* tb_fw_config is temporarily contained on this dtb */
 		tb_fw-config {
diff --git a/plat/arm/board/sgi575/fdts/sgi575_fw_config.dts b/plat/arm/board/sgi575/fdts/sgi575_fw_config.dts
index 605cc08..da933e5 100644
--- a/plat/arm/board/sgi575/fdts/sgi575_fw_config.dts
+++ b/plat/arm/board/sgi575/fdts/sgi575_fw_config.dts
@@ -10,7 +10,7 @@
 
 / {
 	dtb-registry {
-		compatible = "arm,dyn_cfg-dtb_registry";
+		compatible = "fconf,dyn_cfg-dtb_registry";
 
 		/* tb_fw_config is temporarily contained on this dtb */
 		tb_fw-config {
diff --git a/plat/arm/board/sgm775/fdts/sgm775_fw_config.dts b/plat/arm/board/sgm775/fdts/sgm775_fw_config.dts
index c5702ca..306bd89 100644
--- a/plat/arm/board/sgm775/fdts/sgm775_fw_config.dts
+++ b/plat/arm/board/sgm775/fdts/sgm775_fw_config.dts
@@ -10,7 +10,7 @@
 
 / {
 	dtb-registry {
-		compatible = "arm,dyn_cfg-dtb_registry";
+		compatible = "fconf,dyn_cfg-dtb_registry";
 
 		/* tb_fw_config is temporarily contained on this dtb */
 		tb_fw-config {
diff --git a/plat/renesas/rcar/bl2_plat_setup.c b/plat/renesas/rcar/bl2_plat_setup.c
index 8910967..add2a4f 100644
--- a/plat/renesas/rcar/bl2_plat_setup.c
+++ b/plat/renesas/rcar/bl2_plat_setup.c
@@ -134,6 +134,7 @@
 
 	while (--i >= 0)
 		*string++ = num_buf[i];
+	*string = 0;
 }
 
 #if (RCAR_LOSSY_ENABLE == 1)
diff --git a/plat/st/common/include/stm32mp_dt.h b/plat/st/common/include/stm32mp_dt.h
index 91a8d67..e79551a 100644
--- a/plat/st/common/include/stm32mp_dt.h
+++ b/plat/st/common/include/stm32mp_dt.h
@@ -28,8 +28,6 @@
 int fdt_get_address(void **fdt_addr);
 bool fdt_check_node(int node);
 uint8_t fdt_get_status(int node);
-int fdt_get_reg_props_by_name(int node, const char *name, uintptr_t *base,
-			      size_t *size);
 int dt_set_stdout_pinctrl(void);
 void dt_fill_device_info(struct dt_node_info *info, int node);
 int dt_get_node(struct dt_node_info *info, int offset, const char *compat);
diff --git a/plat/st/common/stm32mp_dt.c b/plat/st/common/stm32mp_dt.c
index c76b033..155f784 100644
--- a/plat/st/common/stm32mp_dt.c
+++ b/plat/st/common/stm32mp_dt.c
@@ -136,92 +136,6 @@
 #endif
 
 /*******************************************************************************
- * This function fills reg node info (base & size) with an index found by
- * checking the reg-names node.
- * Returns 0 on success and a negative FDT error code on failure.
- ******************************************************************************/
-int fdt_get_reg_props_by_name(int node, const char *name, uintptr_t *base,
-			      size_t *size)
-{
-	const fdt32_t *cuint;
-	int index, len;
-
-	assert((fdt_get_node_parent_address_cells(node) == 1) &&
-	       (fdt_get_node_parent_size_cells(node) == 1));
-
-	index = fdt_stringlist_search(fdt, node, "reg-names", name);
-	if (index < 0) {
-		return index;
-	}
-
-	cuint = fdt_getprop(fdt, node, "reg", &len);
-	if (cuint == NULL) {
-		return -FDT_ERR_NOTFOUND;
-	}
-
-	if ((index * (int)sizeof(uint32_t)) > len) {
-		return -FDT_ERR_BADVALUE;
-	}
-
-	cuint += index << 1;
-	if (base != NULL) {
-		*base = fdt32_to_cpu(*cuint);
-	}
-	cuint++;
-	if (size != NULL) {
-		*size = fdt32_to_cpu(*cuint);
-	}
-
-	return 0;
-}
-
-/*******************************************************************************
- * This function gets the stdout path node.
- * It reads the value indicated inside the device tree.
- * Returns node offset on success and a negative FDT error code on failure.
- ******************************************************************************/
-static int dt_get_stdout_node_offset(void)
-{
-	int node;
-	const char *cchar;
-
-	node = fdt_path_offset(fdt, "/secure-chosen");
-	if (node < 0) {
-		node = fdt_path_offset(fdt, "/chosen");
-		if (node < 0) {
-			return -FDT_ERR_NOTFOUND;
-		}
-	}
-
-	cchar = fdt_getprop(fdt, node, "stdout-path", NULL);
-	if (cchar == NULL) {
-		return -FDT_ERR_NOTFOUND;
-	}
-
-	node = -FDT_ERR_NOTFOUND;
-	if (strchr(cchar, (int)':') != NULL) {
-		const char *name;
-		char *str = (char *)cchar;
-		int len = 0;
-
-		while (strncmp(":", str, 1)) {
-			len++;
-			str++;
-		}
-
-		name = fdt_get_alias_namelen(fdt, cchar, len);
-
-		if (name != NULL) {
-			node = fdt_path_offset(fdt, name);
-		}
-	} else {
-		node = fdt_path_offset(fdt, cchar);
-	}
-
-	return node;
-}
-
-/*******************************************************************************
  * This function gets the stdout pin configuration information from the DT.
  * And then calls the sub-function to treat it and set GPIO registers.
  * Returns 0 on success and a negative FDT error code on failure.
@@ -230,7 +144,7 @@
 {
 	int node;
 
-	node = dt_get_stdout_node_offset();
+	node = fdt_get_stdout_node_offset(fdt);
 	if (node < 0) {
 		return -FDT_ERR_NOTFOUND;
 	}
@@ -299,7 +213,7 @@
 {
 	int node;
 
-	node = dt_get_stdout_node_offset();
+	node = fdt_get_stdout_node_offset(fdt);
 	if (node < 0) {
 		return -FDT_ERR_NOTFOUND;
 	}