So the SATA HAT has been working perfectly with 2x HDDs for a month but i have detected a problem with it. In case if I disconnect the 12v power plug from SATA HAT and reconnect it, the system powers on immediately and once booted, SATA HAT is not detected (drives are spinning but not showing up. lspci command returns empty as well.

Now in order to get it running i have to shutdown the M4 without unplugging the power adapter and then starting from the power button. This time SATA HAT is dectected and all drives identified and running. lspci command returns proper Marvell's SATA Controller signature.

Steps to reproduce

Step 1: Unplug 12v power adapter from SATA HAT.
Step 2: Plug 12v power adapte to SATA HAT after 1 minute.
Step 3: let it boot on its own.
Step 4: Once in desktop, run lspci, or gparted (no drives or sata controller detected).
Step 5: Shutdown using this command $ sudo shutdown -h now
Step 6: Once the LEDs are off press power button on SATA HAT.
Step 7: Once in desktop, run lspci (SATA Controller is detected along with drives).

This has been observed both on FriendlyDesktop as well as Armbian. Now my usecase requires it to run 24/7 but once in a while I do get a power failure and that causes issues with detection and only way to solve them is to physically press the button. Not even a OS restart using command (sudo reboot) works. I am using a 12v 4Amp power brick.