I am sorry, it was taken from example for MPC5645S, my fault.
Below you may find initialization code for MPC5606S and S25FL064P device. Possible differences between S25FL064P and S25FL064L please consult with Cypress:
https://www.cypress.com/
#define qspi_wait_for_ICR_complete() while(QUADSPI_0.SFMSR.B.BUSY)
#define qspi_get_receive_data() (*(vuint32_t *)(0x87FFFFFC));
#ifdef SPECTRUM
void QSPI_Init( void )
{
uint32_t qspi_rx_data;
SIU.PCR[PF10].R = 0x0A03;
SIU.PCR[PF11].R = 0x0B03;
SIU.PCR[PF12].R = 0x0203;
SIU.GPDO[PF12].B.PDO = 1;
SIU.PCR[PF13].R = 0x0703;
SIU.PCR[PF14].R = 0x0703;
SIU.PCR[PF15].R = 0x0603;
CGM.AC3_SC.B.SELCTL = 1; //set QSPI clock as sysclk/2
QUADSPI_0.MCR.R = 0x00000088;
QUADSPI_0.ICR.R = 0x00010035;
qspi_wait_for_ICR_complete();
qspi_rx_data = qspi_get_receive_data();
if ((qspi_rx_data & 0xFF000000uL) != 0x02000000uL)
{
SIU.PCR[PF11].R = 0x0203;
SIU.GPDO[PF11].B.PDO = 1;
QUADSPI_0.ICR.R = 0x00000006;
qspi_wait_for_ICR_complete();
QUADSPI_0.TBDR = 0x00020000;
QUADSPI_0.ICR.R = 0x00020001;
qspi_wait_for_ICR_complete();
SIU.PCR[PF11].R = 0x0B03;
}
SIU.PCR[PF12].R = 0x0B03;
QUADSPI_0.ACR.R = 0x000040EB;
}
#else
Hope it helps