manual spi_rework merge