For SPI, The SSEL, SCK, MOSI pin will be configured as SPI function, digital mode enabled, pull-up enabled, faster Slew rate for detection. and keep MISO pin to default state.
Once detection is done, all pins will be configured as SPI function, digital mode enabled, faster Slew rate