boot failure due to custom overlay - BBB

I’m booting from eMMC. I’m using a custom overlay that was compiled and used on earlier Debian. On Debian 11, when I try to use the custom overlay, boot fails. Following is the the log from terminal:

U-Boot 2022.04-ge0d31da5 (Aug 04 2023 - 18:48:26 +0000)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
Reset Source: Global external warm reset has occurred.
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
Core:  150 devices, 14 uclasses, devicetree: separate
WDT:   Started wdt@44e35000 with servicing (60s timeout)
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4... Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone Cape EEPROM: no EEPROM at address: 0x54
BeagleBone Cape EEPROM: no EEPROM at address: 0x55
BeagleBone Cape EEPROM: no EEPROM at address: 0x56
BeagleBone Cape EEPROM: no EEPROM at address: 0x57
Net:   Could not get PHY for ethernet@4a100000: addr 0
eth2: ethernet@4a100000, eth3: usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] ...
board_rev=[00C0] ...
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@48060000.blk...
Disk mmc@48060000.blk not ready
Scanning disk mmc@481d8000.blk...
Found 2 disks
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
1717 bytes read in 3 ms (558.6 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-5.10.168-ti-r71 ...
11342336 bytes read in 715 ms (15.1 MiB/s)
debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=1] ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot-univ.dtb ...
loading /boot/dtbs/5.10.168-ti-r71/am335x-boneblack-uboot-univ.dtb ...
210757 bytes read in 17 ms (11.8 MiB/s)
Found 0 extension board(s).
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /boot/dtbs/5.10.168-ti-r71/overlays/BB-ADC-00A0.dtbo ...
645 bytes read in 4 ms (157.2 KiB/s)
uboot_overlays: loading /boot/dtbs/5.10.168-ti-r71/overlays/BB-BONE-eMMC1-01-00A0.dtbo ...
1605 bytes read in 4 ms (391.6 KiB/s)
uboot_overlays: uboot loading of [BB-HDMI-TDA998x-00A0.dtbo] disabled by /boot/uEnv.txt [disable_uboot_overlay_video=1]...
uboot_overlays: loading /lib/firmware/WORK-R01-00A0.dtbo ...
3315 bytes read in 5 ms (647.5 KiB/s)
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
loading /boot/initrd.img-5.10.168-ti-r71 ...
13138355 bytes read in 837 ms (15 MiB/s)
debug: [console=ttyS0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet] ...
debug: [bootz 0x82000000 0x88080000:c879b3 88000000] ...
Kernel image @ 0x82000000 [ 0x000000 - 0xad1200 ]
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
** Invalid partition 2 **
Couldn't find partition mmc 1:2
** Invalid partition 3 **
Couldn't find partition mmc 1:3
** Invalid partition 4 **
Couldn't find partition mmc 1:4
** Invalid partition 5 **
Couldn't find partition mmc 1:5
** Invalid partition 6 **
Couldn't find partition mmc 1:6
** Invalid partition 7 **
Couldn't find partition mmc 1:7
starting USB...
Bus usb@47401800: Port not available.
USB is stopped. Please issue 'usb start' first.
starting USB...
Bus usb@47401800: Port not available.
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready

Following is the overlay:


/dts-v1/;
/plugin/;

/{
	/* identification */
	compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,am33xx";
	part-number = "WORK-R01";
	version = "00A0";

	/* used resources */
	exclusive-use = 
		/* pin header*/
		"P9.42", "P9.28", "P9.12", "P9.13", "P9.41", "P9.30", "P9.31", "P9.29", "P9.27", "P9.25",
		/* hardware IP*/
		"gpio0_7", "gpio3_17", "gpio0_31", "gpio0_20", "gpio3_16", "gpio3_14", "gpio3_15", "gpio3_19", "gpio3_21", "gpio1_28";

	
	fragment@0 {
		target = <&am33xx_pinmux>;
		__overlay__ {
			work_pinout: pinmux_work_pinout {
				pinctrl-single,pins = <
					0x164 0x17     // gpio7   
					0x19C 0x3F     // gpio113 
					0x074 0x07     // gpio31  
					0x1B4 0x07     // gpio20 
					0x198 0x3F     // gpio112 
					0x190 0x07     // gpio110
					0x194 0x07     // gpio111 
					0x1A4 0x07     // gpio115
					0x1AC 0x3F     // gpio117 
					0x078 0x3F     // gpio60  

					/* OUTPUT: 0x07 - pull-down, 0x17 - pull-up, 0x0F/0x1F - no pull-up/down */
					/* INPUT:  0x27 - pull-down, 0x37 - pull-up, 0x2F/0x3F - no pull-up/down */
				>;
			};
		};
	};

	fragment@1 {
		target = <&ocp>;
		__overlay__ {
			gpio_helper {
				compatible = "gpio-of-helper";
				status = "okay";
				pinctrl-names = "default";
				pinctrl-0 = <&work_pinout>;

				/* declaration of gpio */
				en_n {
					gpio-name = "en_n";
					gpio = <&gpio1 7 0x00>;
					output;
					init-high;
				};
				
				intb_n {
					gpio-name = "intb_n";
					gpio = <&gpio4 17 0x00>;
					input;
				};
				
				write_en {
					gpio-name = "write_en";
					gpio = <&gpio1 31 0x00>;
					output;
					init-low;
				};
				
				d_en {
					gpio-name = "d_en";
					gpio = <&gpio1 20 0x00>;
					output;
					init-low;
				};
				
				d_intb_n {
					gpio-name = "d_intb_n";
					gpio = <&gpio4 16 0x00>;
					input;
				};
				
				f_stb_n {
					gpio-name = "f_stb_n";
					gpio = <&gpio4 14 0x00>;
					output;
					init-low;
				};
				
				h_en {
					gpio-name = "h_en";
					gpio = <&gpio4 15 0x00>;
					output;
					init-low;
				};
				
				ht_en {
					gpio-name = "ht_en";
					gpio = <&gpio4 19 0x00>;
					output;
					init-low;
				};
				
				fault_n {
					gpio-name = "fault_n";
					gpio = <&gpio4 21 0x00>;
					input;
				};

				ger_in {
					gpio-name = "ger_in";
					gpio = <&gpio2 28 0x00>;
					input;
				};
			};
		};
	};
};

Thanks in advance!