Merge branch 'master-fdt' of https://source.denx.de/u-boot/custodians/u-boot-sh
diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c
index 22697a2..7c46914 100644
--- a/arch/arm/mach-k3/security.c
+++ b/arch/arm/mach-k3/security.c
@@ -50,7 +50,7 @@
 
 	if (get_device_type() == K3_DEVICE_TYPE_GP) {
 		if (ti_secure_cert_detected(*p_image)) {
-			printf("Warning: Detected image signing certificate on GP device. "
+			debug("Warning: Detected image signing certificate on GP device. "
 			       "Skipping certificate to prevent boot failure. "
 			       "This will fail if the image was also encrypted\n");
 
@@ -60,6 +60,7 @@
 				return;
 			}
 
+			printf("Skipping authentication on GP device\n");
 			*p_image += cert_length;
 			*p_size -= cert_length;
 		}
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c
index cbae510..154a5d7 100644
--- a/arch/sandbox/cpu/os.c
+++ b/arch/sandbox/cpu/os.c
@@ -188,7 +188,7 @@
 	fd = os_open(fname, OS_O_RDONLY);
 	if (fd < 0) {
 		printf("Cannot open file '%s'\n", fname);
-		goto err;
+		return -EIO;
 	}
 	size = os_filesize(fd);
 	if (size < 0) {
diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig
index 8b0ccba..e000549 100644
--- a/configs/am64x_evm_a53_defconfig
+++ b/configs/am64x_evm_a53_defconfig
@@ -44,7 +44,7 @@
 CONFIG_SPL_SYS_MALLOC=y
 CONFIG_SPL_SYS_MALLOC_SIZE=0x800000
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1800
 CONFIG_SPL_DMA=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_ETH=y
diff --git a/configs/am64x_evm_r5_defconfig b/configs/am64x_evm_r5_defconfig
index 555d69b..4a3780c 100644
--- a/configs/am64x_evm_r5_defconfig
+++ b/configs/am64x_evm_r5_defconfig
@@ -51,7 +51,7 @@
 CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000
 CONFIG_SPL_EARLY_BSS=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800
 CONFIG_SPL_DMA=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_ETH=y
diff --git a/configs/arbel_evb_defconfig b/configs/arbel_evb_defconfig
index 45fafe7..08753ae 100644
--- a/configs/arbel_evb_defconfig
+++ b/configs/arbel_evb_defconfig
@@ -80,7 +80,6 @@
 CONFIG_PINCTRL_NPCM8XX=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_NPCM8XX=y
-CONFIG_RESET_SYSCON=y
 CONFIG_RNG_NPCM=y
 CONFIG_DM_SERIAL=y
 CONFIG_NPCM_SERIAL=y
@@ -90,8 +89,6 @@
 CONFIG_NPCM_PSPI=y
 CONFIG_TEE=y
 CONFIG_OPTEE=y
-CONFIG_TIMER=y
-CONFIG_NPCM_TIMER=y
 CONFIG_TPM2_FTPM_TEE=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 14e53cf..2dd9d4e 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -1254,7 +1254,7 @@
 static void __maybe_unused fat2rtc(u16 date, u16 time, struct rtc_time *tm)
 {
 	tm->tm_mday = date & 0x1f;
-	tm->tm_mon = (date & 0x1e0) >> 4;
+	tm->tm_mon = (date & 0x1e0) >> 5;
 	tm->tm_year = (date >> 9) + 1980;
 
 	tm->tm_sec = (time & 0x1f) << 1;
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index 8b5d669..c8e0fbf 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -18,6 +18,7 @@
 #include <rand.h>
 #include <asm/byteorder.h>
 #include <asm/cache.h>
+#include <dm/uclass.h>
 #include <linux/ctype.h>
 #include <linux/math64.h>
 #include "fat.c"
@@ -1152,6 +1153,41 @@
 }
 
 /**
+ * dentry_set_time() - set change time
+ *
+ * @dentptr:	directory entry
+ */
+static void dentry_set_time(dir_entry *dentptr)
+{
+	if (CONFIG_IS_ENABLED(DM_RTC)) {
+		struct udevice *dev;
+		struct rtc_time tm;
+		u16 date;
+		u16 time;
+
+		uclass_first_device(UCLASS_RTC, &dev);
+		if (!dev)
+			goto err;
+		if (dm_rtc_get(dev, &tm))
+			goto err;
+		if (tm.tm_year < 1980 || tm.tm_year > 2107)
+			goto err;
+		date = (tm.tm_mday & 0x1f) |
+		       ((tm.tm_mon & 0xf) << 5) |
+		       ((tm.tm_year - 1980) << 9);
+		time = (tm.tm_sec > 1) |
+		       ((tm.tm_min & 0x3f) << 5) |
+		(tm.tm_hour << 11);
+		dentptr->date = date;
+		dentptr->time = time;
+		return;
+	}
+err:
+	dentptr->date = 0x2821; /* 2000-01-01 */
+	dentptr->time = 0;
+}
+
+/**
  * fill_dentry() - fill directory entry with shortname
  *
  * @mydata:		private filesystem parameters
@@ -1171,6 +1207,12 @@
 
 	dentptr->attr = attr;
 
+	/* Set change date */
+	dentry_set_time(dentptr);
+	/* Set creation date */
+	dentptr->cdate = dentptr->date;
+	dentptr->ctime = dentptr->time;
+
 	memcpy(&dentptr->nameext, shortname, SHORT_NAME_SIZE);
 }
 
@@ -1376,6 +1418,8 @@
 
 		/* Update file size in a directory entry */
 		retdent->size = cpu_to_le32(pos + size);
+		/* Update change date */
+		dentry_set_time(retdent);
 	} else {
 		/* Create a new file */
 		char shortname[SHORT_NAME_SIZE];
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 1285731..62f8751 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -334,7 +334,7 @@
 	(cat $< > $(pre-tmp)); \
 	$(foreach f,$(subst $(quote),,$(dtsi_include_list)), \
 	  echo '$(pound)include "$(f)"' >> $(pre-tmp);) \
-	$(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \
+	$(HOSTCC) -E $(dtc_cpp_flags) -I$(obj) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \
 	$(DTC) -O dtb -o $@ -b 0 \
 		-i $(dir $<) -i $(u_boot_dtsi_loc) $(DTC_FLAGS) \
 		-d $(depfile).dtc.tmp $(dtc-tmp) || \
diff --git a/test/py/tests/test_eficonfig/test_eficonfig.py b/test/py/tests/test_eficonfig/test_eficonfig.py
index b0a6cc4..1d8e033 100644
--- a/test/py/tests/test_eficonfig/test_eficonfig.py
+++ b/test/py/tests/test_eficonfig/test_eficonfig.py
@@ -224,7 +224,7 @@
 
         # Change the Boot Order
         press_up_down_enter_and_wait(0, 2, True, None)
-        # Check the curren BootOrder
+        # Check the current BootOrder
         for i in ('test 2', 'test 1', 'host 0:1', 'Save', 'Quit'):
             u_boot_console.p.expect([i])
         # move 'test 2' to the second entry
@@ -269,7 +269,7 @@
         u_boot_console.run_command('eficonfig', wait_for_prompt=False)
         # Select 'Edit Boot Option'
         press_up_down_enter_and_wait(0, 1, True, None)
-        # Check the curren BootOrder
+        # Check the current BootOrder
         for i in ('test 1', 'Quit'):
             u_boot_console.p.expect([i])
         press_up_down_enter_and_wait(0, 0, True, None)
@@ -326,7 +326,7 @@
 
         # Select 'Delete Boot Option'
         press_up_down_enter_and_wait(0, 3, True, None)
-        # Check the curren BootOrder
+        # Check the current BootOrder
         for i in ('test 3', 'Quit'):
             u_boot_console.p.expect([i])
 
diff --git a/tools/fit_common.c b/tools/fit_common.c
index 2d417d4..d1cde16 100644
--- a/tools/fit_common.c
+++ b/tools/fit_common.c
@@ -23,6 +23,8 @@
 #include <image.h>
 #include <u-boot/crc.h>
 
+#define COPYFILE_BUFSIZE (64 * 1024)
+
 void fit_print_header(const void *fit, struct image_tool_params *params)
 {
 	fit_print_contents(fit);
@@ -145,14 +147,14 @@
 		goto out;
 	}
 
-	buf = calloc(1, 512);
+	buf = calloc(1, COPYFILE_BUFSIZE);
 	if (!buf) {
 		printf("Can't allocate buffer to copy file\n");
 		goto out;
 	}
 
 	while (1) {
-		size = read(fd_src, buf, 512);
+		size = read(fd_src, buf, COPYFILE_BUFSIZE);
 		if (size < 0) {
 			printf("Can't read file %s\n", src);
 			goto out;