Luci app and wifi not working after bad cell count error

I have the open wrt snapshot running on a banana pi r4. it works perfectly fine for most times but sometimes it suddently stops working and unmounts /overlay directory somehow which makes then luci app stop working and wifi also stops working. only ethernet functions normally after that. Important to note this gets fixed when i restart the router and the modem

this is what i see when i do logread

root@OpenWrt:~# logread | grep err
Thu Jan  1 00:00:14 1970 kern.info kernel: [    0.014284] /soc/interrupt-controller@c000000: Fixed dependency cycle(s) with /soc/interrupt-controller@c000000
Thu Jan  1 00:00:14 1970 kern.err kernel: [    0.069452] mtk-xsphy soc:xphy@11e10000: failed to get ref_clk(id-1)
Thu Jan  1 00:00:14 1970 kern.err kernel: [    0.070310] /soc/pcie@11290000: Failed to get clk index: 0 ret: -517
Thu Jan  1 00:00:14 1970 kern.err kernel: [    0.070319] mtk-pcie-gen3 11290000.pcie: failed to get clocks
Thu Jan  1 00:00:14 1970 kern.err kernel: [    0.070426] /soc/pcie@11300000: Failed to get clk index: 0 ret: -517
Thu Jan  1 00:00:14 1970 kern.err kernel: [    0.070434] mtk-pcie-gen3 11300000.pcie: failed to get clocks
Thu Jan  1 00:00:14 1970 kern.err kernel: [    0.070548] /soc/pcie@11310000: Failed to get clk index: 0 ret: -517
Thu Jan  1 00:00:14 1970 kern.err kernel: [    0.070556] mtk-pcie-gen3 11310000.pcie: failed to get clocks
Thu Jan  1 00:00:14 1970 kern.err kernel: [    1.172227] OF: Bad cell count for /soc/spi@11007000/spi_nand@0/partitions
Thu Jan  1 00:00:14 1970 kern.err kernel: [    1.179156] OF: Bad cell count for /soc/spi@11007000/spi_nand@0/partitions
Thu Jan  1 00:00:14 1970 kern.err kernel: [    2.176648] OF: Bad cell count for /soc/spi@11007000/spi_nand@0/partitions
Thu Jan  1 00:00:14 1970 kern.err kernel: [    2.189523] OF: Bad cell count for /soc/spi@11007000/spi_nand@0/partitions
Thu Jan  1 00:00:14 1970 kern.err kernel: [    2.360554] mtk-cpufreq mtk-cpufreq: failed to initialize dvfs info for cpu0
Thu Jan  1 00:00:14 1970 kern.err kernel: [    2.792714] mtk-pcie-gen3 11280000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
Thu Jan  1 00:00:14 1970 kern.warn kernel: [    2.801514] mtk-pcie-gen3: probe of 11280000.pcie failed with error -110
Thu Jan  1 00:00:14 1970 kern.err kernel: [    3.172722] mtk-pcie-gen3 11290000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
Thu Jan  1 00:00:14 1970 kern.warn kernel: [    3.181503] mtk-pcie-gen3: probe of 11290000.pcie failed with error -110
Thu Jan  1 00:00:14 1970 kern.err kernel: [    5.424171] mtk_soc_eth 15100000.ethernet: generated random MAC address 65:74:68:25:64:00
Thu Jan  1 00:00:14 1970 kern.err kernel: [   12.042849] crypto-safexcel 15600000.crypto: can't request region for resource [mem 0x15600000-0x1577ffff]
Thu Jan  1 00:00:14 1970 kern.err kernel: [   12.052505] crypto-safexcel 15600000.crypto: failed to get resource
Thu Jan  1 00:00:14 1970 kern.warn kernel: [   12.058778] crypto-safexcel: probe of 15600000.crypto failed with error -16
Thu Jan  1 00:00:25 1970 daemon.err procd: Got unexpected signal 1
Thu Jan  1 00:00:28 1970 daemon.err odhcp6c[3194]: Failed to send RS (Address not available)
Thu Jan  1 00:00:29 1970 daemon.err odhcp6c[3194]: Failed to send SOLICIT message to ff02::1:2 (Address not available)
Thu Jan  1 00:00:29 1970 daemon.warn odhcpd[2156]: No default route present, overriding ra_lifetime to 0!
Thu Jan  1 00:00:30 1970 daemon.err odhcp6c[3194]: Failed to send SOLICIT message to ff02::1:2 (Address not available)

Df no longer shows /overlay

root@OpenWrt:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                  2012024     26444   1985580   1% /
tmpfs                  2012024       548   2011476   0% /tmp
tmpfs                      512         0       512   0% /dev

bad cell count is harmless warning about dts partitions.
What kind of devices are connected to m2 slots?

Nothing connected m2 slot as of now. I used to have an nvme there but it was giving me a lot of trouble and would soft brick my system when mounting it. So I have removed that mount since then. Again I’m not sure if the root cause is bad cell count itself but the result is wifi and luci app stops working. Also my known hosts signature also becomes invalid when this happens