Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: pxa2xx: Add support for Intel Cannonlake

Intel Cannonlake LPSS SPI has up to four chip selects per port like in
Broxton and is clocked like Sunrisepoint and Kaby Lake. Add a new type
LPSS_CNL_SSP and configuration that enable runtime chip select detection
and use the same FIFO thresholds than in Sunrisepoint.

Patch adds support for both Cannonlake SoC and PCH.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jarkko Nikula and committed by
Mark Brown
fc0b2acc 2ea659a9

+23
+22
drivers/spi/spi-pxa2xx.c
··· 151 151 .cs_sel_shift = 8, 152 152 .cs_sel_mask = 3 << 8, 153 153 }, 154 + { /* LPSS_CNL_SSP */ 155 + .offset = 0x200, 156 + .reg_general = -1, 157 + .reg_ssp = 0x20, 158 + .reg_cs_ctrl = 0x24, 159 + .reg_capabilities = 0xfc, 160 + .rx_threshold = 1, 161 + .tx_threshold_lo = 32, 162 + .tx_threshold_hi = 56, 163 + .cs_sel_shift = 8, 164 + .cs_sel_mask = 3 << 8, 165 + }, 154 166 }; 155 167 156 168 static inline const struct lpss_config ··· 179 167 case LPSS_BSW_SSP: 180 168 case LPSS_SPT_SSP: 181 169 case LPSS_BXT_SSP: 170 + case LPSS_CNL_SSP: 182 171 return true; 183 172 default: 184 173 return false; ··· 1288 1275 case LPSS_BSW_SSP: 1289 1276 case LPSS_SPT_SSP: 1290 1277 case LPSS_BXT_SSP: 1278 + case LPSS_CNL_SSP: 1291 1279 config = lpss_get_config(drv_data); 1292 1280 tx_thres = config->tx_threshold_lo; 1293 1281 tx_hi_thres = config->tx_threshold_hi; ··· 1484 1470 { PCI_VDEVICE(INTEL, 0x5ac2), LPSS_BXT_SSP }, 1485 1471 { PCI_VDEVICE(INTEL, 0x5ac4), LPSS_BXT_SSP }, 1486 1472 { PCI_VDEVICE(INTEL, 0x5ac6), LPSS_BXT_SSP }, 1473 + /* CNL-LP */ 1474 + { PCI_VDEVICE(INTEL, 0x9daa), LPSS_CNL_SSP }, 1475 + { PCI_VDEVICE(INTEL, 0x9dab), LPSS_CNL_SSP }, 1476 + { PCI_VDEVICE(INTEL, 0x9dfb), LPSS_CNL_SSP }, 1477 + /* CNL-H */ 1478 + { PCI_VDEVICE(INTEL, 0xa32a), LPSS_CNL_SSP }, 1479 + { PCI_VDEVICE(INTEL, 0xa32b), LPSS_CNL_SSP }, 1480 + { PCI_VDEVICE(INTEL, 0xa37b), LPSS_CNL_SSP }, 1487 1481 { }, 1488 1482 }; 1489 1483
+1
include/linux/pxa2xx_ssp.h
··· 196 196 LPSS_BSW_SSP, 197 197 LPSS_SPT_SSP, 198 198 LPSS_BXT_SSP, 199 + LPSS_CNL_SSP, 199 200 }; 200 201 201 202 struct ssp_device {