aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-pxa2xx.c
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@linux.intel.com>2015-10-28 09:13:42 -0400
committerMark Brown <broonie@kernel.org>2015-10-29 22:18:05 -0400
commitb7c08cf85c9a3a4b05474b7acacc9fbce8fb3eaf (patch)
tree9dbec39b606014d645f16cc0195de40ff43b2f58 /drivers/spi/spi-pxa2xx.c
parent8b136baa5892f25bba0373d6eb0f5f84efc93986 (diff)
spi: pxa2xx: Add support for Intel Broxton
LPSS SPI in Intel Broxton is otherwise the same than in Intel Sunrisepoint but it supports up to four chip selects per port and has different FIFO thresholds. Patch adds support for two Broxton SoC variants. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-pxa2xx.c')
-rw-r--r--drivers/spi/spi-pxa2xx.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index a5c2dce7d0a3..f759c082f0f7 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -116,6 +116,16 @@ static const struct lpss_config lpss_platforms[] = {
116 .tx_threshold_lo = 32, 116 .tx_threshold_lo = 32,
117 .tx_threshold_hi = 56, 117 .tx_threshold_hi = 56,
118 }, 118 },
119 { /* LPSS_BXT_SSP */
120 .offset = 0x200,
121 .reg_general = -1,
122 .reg_ssp = 0x20,
123 .reg_cs_ctrl = 0x24,
124 .reg_capabilities = 0xfc,
125 .rx_threshold = 1,
126 .tx_threshold_lo = 16,
127 .tx_threshold_hi = 48,
128 },
119}; 129};
120 130
121static inline const struct lpss_config 131static inline const struct lpss_config
@@ -130,6 +140,7 @@ static bool is_lpss_ssp(const struct driver_data *drv_data)
130 case LPSS_LPT_SSP: 140 case LPSS_LPT_SSP:
131 case LPSS_BYT_SSP: 141 case LPSS_BYT_SSP:
132 case LPSS_SPT_SSP: 142 case LPSS_SPT_SSP:
143 case LPSS_BXT_SSP:
133 return true; 144 return true;
134 default: 145 default:
135 return false; 146 return false;
@@ -1152,6 +1163,7 @@ static int setup(struct spi_device *spi)
1152 case LPSS_LPT_SSP: 1163 case LPSS_LPT_SSP:
1153 case LPSS_BYT_SSP: 1164 case LPSS_BYT_SSP:
1154 case LPSS_SPT_SSP: 1165 case LPSS_SPT_SSP:
1166 case LPSS_BXT_SSP:
1155 config = lpss_get_config(drv_data); 1167 config = lpss_get_config(drv_data);
1156 tx_thres = config->tx_threshold_lo; 1168 tx_thres = config->tx_threshold_lo;
1157 tx_hi_thres = config->tx_threshold_hi; 1169 tx_hi_thres = config->tx_threshold_hi;
@@ -1313,6 +1325,14 @@ static const struct pci_device_id pxa2xx_spi_pci_compound_match[] = {
1313 /* SPT-H */ 1325 /* SPT-H */
1314 { PCI_VDEVICE(INTEL, 0xa129), LPSS_SPT_SSP }, 1326 { PCI_VDEVICE(INTEL, 0xa129), LPSS_SPT_SSP },
1315 { PCI_VDEVICE(INTEL, 0xa12a), LPSS_SPT_SSP }, 1327 { PCI_VDEVICE(INTEL, 0xa12a), LPSS_SPT_SSP },
1328 /* BXT */
1329 { PCI_VDEVICE(INTEL, 0x0ac2), LPSS_BXT_SSP },
1330 { PCI_VDEVICE(INTEL, 0x0ac4), LPSS_BXT_SSP },
1331 { PCI_VDEVICE(INTEL, 0x0ac6), LPSS_BXT_SSP },
1332 /* APL */
1333 { PCI_VDEVICE(INTEL, 0x5ac2), LPSS_BXT_SSP },
1334 { PCI_VDEVICE(INTEL, 0x5ac4), LPSS_BXT_SSP },
1335 { PCI_VDEVICE(INTEL, 0x5ac6), LPSS_BXT_SSP },
1316 { }, 1336 { },
1317}; 1337};
1318 1338