BMI160 has primary I2C/SPI interface. It also has secondary I2C interface for external magnetometer or SPI interface for OIS (optical image stabilization) application. Can I use SPI for both primary and secondary interface?
No this is not possible, as if you are using the secondary interface as SPI slave, the main interface has to be configured as an I²C slave, and If you are using the secondary interface as I²C master, then you may use the primary interface as either SPI or I²C.