intelspi: Release LPSS reset on Sunrise Point controllers.

MacBookPro 14.1 SPI controller requires that to start functioning.

MFC after:	1 week
Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D41245
This commit is contained in:
Vladimir Kondratyev 2023-08-03 19:10:50 +03:00
parent f56dbe7ad9
commit b109946d75

View file

@ -109,6 +109,10 @@
#define SPI_CS_CTRL_HW_MODE (1 << 0)
#define SPI_CS_CTRL_CS_HIGH (1 << 1)
#define INTELSPI_RESETS 0x204
#define INTELSPI_RESET_HOST (1 << 0) | (1 << 1)
#define INTELSPI_RESET_DMA (1 << 2)
/* Same order as intelspi_vers */
static const struct intelspi_info {
uint32_t reg_lpss_base;
@ -477,6 +481,11 @@ intelspi_attach(device_t dev)
goto error;
}
/* Release LPSS reset */
if (sc->sc_vers == SPI_SUNRISEPOINT)
INTELSPI_WRITE(sc, INTELSPI_RESETS,
(INTELSPI_RESET_HOST | INTELSPI_RESET_DMA));
sc->sc_irq_res = bus_alloc_resource_any(sc->sc_dev,
SYS_RES_IRQ, &sc->sc_irq_rid, RF_ACTIVE | RF_SHAREABLE);
if (sc->sc_irq_res == NULL) {