I met some problem about SATA suspend/resume when i.MX6QSD enter/exit deep sleep mode. Below is the flow:
1. Send command ATA_CMD_STANDBY_IMMEDIATE (0xE0) to SSD, SSD enter standby mode.
2. SATA_P0CMD[ICC]=6. Put SATA PHY to SLUMBER mode.
3. i.MX6QSD enter deep sleep mode (DSM).
4. Wakeup by input of UART.
5. ARM Cortex A9 exit from WFI and start to run.
6. SATA_P0CMD[ICC]=1. Request a transition of the interface into the active state.
7. Delay 10ms.
8. Send command ATA_CMD_IDLE_IMMEDIATE(0xE1) to SSD.
1. PHY from ACTIVE to SLUMBER (step 2), are SATA_P0SERR[DIAG_X] and SATA_P0IS[PCS] bits set?
2. PHY from SLUMBER to ACTIVE (step 6), are SATA_P0SERR[DIAG_X] and SATA_P0IS[PCS] bits set?
3. Do SATA registers need to be saved befroe DSM and restored after DSM?
4. Do SATA need to re-intialize after DSM? Remove SSD and then attach it again.
5. Is above flow OK?
6. Do you have any document about SATA suspend/resume?