diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 2df3dc4..a7fb1eb 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -256,6 +256,9 @@
 	   - MCP23008
 	   - MCP23017
 	   - MCP23018
+	   - MCP23S08
+	   - MCP23S17
+	   - MCP23S18
 
 config MSCC_SGPIO
 	bool "Microsemi Serial GPIO driver"
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index da3da5d..9071170 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -23,7 +23,7 @@
 obj-$(CONFIG_INTEL_BROADWELL_GPIO)	+= intel_broadwell_gpio.o
 obj-$(CONFIG_IPROC_GPIO)	+= iproc_gpio.o
 obj-$(CONFIG_KIRKWOOD_GPIO)	+= kw_gpio.o
-obj-$(CONFIG_MCP230XX_GPIO)	+= mcp230xx_gpio.o
+obj-$(CONFIG_$(SPL_TPL_)MCP230XX_GPIO)	+= mcp230xx_gpio.o
 obj-$(CONFIG_MXC_GPIO)	+= mxc_gpio.o
 obj-$(CONFIG_MXS_GPIO)	+= mxs_gpio.o
 obj-$(CONFIG_NPCM_GPIO)      	+= npcm_gpio.o
diff --git a/drivers/gpio/mcp230xx_gpio.c b/drivers/gpio/mcp230xx_gpio.c
index 9f02fd4..df99fde 100644
--- a/drivers/gpio/mcp230xx_gpio.c
+++ b/drivers/gpio/mcp230xx_gpio.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <dm.h>
 #include <i2c.h>
+#include <spi.h>
 #include <asm/gpio.h>
 #include <dm/device_compat.h>
 #include <dt-bindings/gpio/gpio.h>
@@ -20,8 +21,15 @@
 	MCP23008,
 	MCP23017,
 	MCP23018,
+	MCP23S08,
+	MCP23S17,
+	MCP23S18,
 };
 
+struct mcp230xx_info {
+	uint dev_addr;
+};
+
 #define MCP230XX_IODIR 0x00
 #define MCP230XX_GPPU 0x06
 #define MCP230XX_GPIO 0x09
@@ -29,29 +37,136 @@
 
 #define BANKSIZE 8
 
+#define MCP230XX_ADDR 0x20
+
+static int mcp230xx_read_spi(struct udevice *dev, uint reg_addr)
+{
+	struct mcp230xx_info *info = dev_get_plat(dev);
+	uint dev_addr, value = 0;
+	int ret;
+
+	/* set R/W bit for reading */
+	dev_addr = (info->dev_addr << 1) | 1;
+
+	ret = dm_spi_claim_bus(dev);
+	if (ret)
+		return ret;
+
+	ret = dm_spi_xfer(dev, 0, NULL, NULL, SPI_XFER_BEGIN);
+	if (ret < 0)
+		goto fail;
+	udelay(1);
+
+	ret = dm_spi_xfer(dev, 8, &dev_addr, NULL, 0);
+	if (ret < 0)
+		goto fail;
+
+	ret = dm_spi_xfer(dev, 8, &reg_addr, NULL, 0);
+	if (ret < 0)
+		goto fail;
+
+	ret = dm_spi_xfer(dev, 8, NULL, &value, 0);
+
+fail:
+	dm_spi_xfer(dev, 0, NULL, NULL,  SPI_XFER_END);
+	dm_spi_release_bus(dev);
+	if (ret < 0)
+		return ret;
+	return value;
+}
+
 static int mcp230xx_read(struct udevice *dev, uint reg, uint offset)
 {
 	struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
 	int bank = offset / BANKSIZE;
 	int mask = 1 << (offset % BANKSIZE);
 	int shift = (uc_priv->gpio_count / BANKSIZE) - 1;
-	int ret;
+	int reg_addr = (reg << shift) | bank;
+	int ret = 0;
+
+	switch (dev_get_driver_data(dev)) {
+	case MCP23008:
+	case MCP23017:
+	case MCP23018:
+		ret = dm_i2c_reg_read(dev, reg_addr);
+		break;
+	case MCP23S08:
+	case MCP23S17:
+	case MCP23S18:
+		ret = mcp230xx_read_spi(dev, reg_addr);
+		break;
+	default:
+		return -ENODEV;
+	}
 
-	ret = dm_i2c_reg_read(dev, (reg << shift) | bank);
 	if (ret < 0)
 		return ret;
 
 	return !!(ret & mask);
 }
 
+static int mcp230xx_clrset_spi(struct udevice *dev, uint reg_addr, uint clr, uint set)
+{
+	struct mcp230xx_info *info = dev_get_plat(dev);
+	int dev_addr, value;
+	int ret;
+
+	/* R/W bit = 0 for writing */
+	dev_addr = (info->dev_addr << 1);
+
+	ret = mcp230xx_read_spi(dev, reg_addr);
+	if (ret < 0)
+		return ret;
+
+	value = ret;
+	value &= ~clr;
+	value |= set;
+
+	ret = dm_spi_claim_bus(dev);
+	if (ret)
+		return ret;
+
+	ret = dm_spi_xfer(dev, 0, NULL, NULL, SPI_XFER_BEGIN);
+	if (ret < 0)
+		goto fail;
+	udelay(1);
+
+	ret = dm_spi_xfer(dev, 8, &dev_addr, NULL, 0);
+	if (ret < 0)
+		goto fail;
+
+	ret = dm_spi_xfer(dev, 8, &reg_addr, NULL, 0);
+	if (ret < 0)
+		goto fail;
+
+	ret = dm_spi_xfer(dev, 8, &value, NULL,  0);
+
+fail:
+	dm_spi_xfer(dev, 0, NULL, NULL,  SPI_XFER_END);
+	dm_spi_release_bus(dev);
+	return ret;
+}
+
 static int mcp230xx_write(struct udevice *dev, uint reg, uint offset, bool val)
 {
 	struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
 	int bank = offset / BANKSIZE;
 	int mask = 1 << (offset % BANKSIZE);
 	int shift = (uc_priv->gpio_count / BANKSIZE) - 1;
+	int reg_addr = (reg << shift) | bank;
 
-	return dm_i2c_reg_clrset(dev, (reg << shift) | bank, mask, val ? mask : 0);
+	switch (dev_get_driver_data(dev)) {
+	case MCP23008:
+	case MCP23017:
+	case MCP23018:
+		return dm_i2c_reg_clrset(dev, reg_addr, mask, val ? mask : 0);
+	case MCP23S08:
+	case MCP23S17:
+	case MCP23S18:
+		return mcp230xx_clrset_spi(dev, reg_addr, mask, val ? mask : 0);
+	default:
+		return -ENODEV;
+	}
 }
 
 static int mcp230xx_get_value(struct udevice *dev, uint offset)
@@ -181,22 +296,37 @@
 static int mcp230xx_probe(struct udevice *dev)
 {
 	struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
-	char name[32], label[8], *str;
+	struct mcp230xx_info *info = dev_get_plat(dev);
+	char name[32], label[32], *str;
 	int addr, gpio_count, size;
 	const u8 *tmp;
 
 	switch (dev_get_driver_data(dev)) {
 	case MCP23008:
+	case MCP23S08:
 		gpio_count = 8;
 		break;
 	case MCP23017:
 	case MCP23018:
+	case MCP23S17:
+	case MCP23S18:
 		gpio_count = 16;
 		break;
 	default:
 		return -ENODEV;
 	}
 
+	switch (dev_get_driver_data(dev)) {
+	case MCP23S08:
+	case MCP23S17:
+	case MCP23S18:
+		info->dev_addr = dev_read_u32_default(dev, "addr", MCP230XX_ADDR);
+		break;
+	default:
+		info->dev_addr = 0;
+		break;
+	}
+
 	addr = dev_read_addr(dev);
 	tmp = dev_read_prop(dev, "label", &size);
 	if (tmp) {
@@ -220,9 +350,14 @@
 }
 
 static const struct udevice_id mcp230xx_ids[] = {
+	/* i2c interface */
 	{ .compatible = "microchip,mcp23008", .data = MCP23008, },
 	{ .compatible = "microchip,mcp23017", .data = MCP23017, },
 	{ .compatible = "microchip,mcp23018", .data = MCP23018, },
+	/* spi interface */
+	{ .compatible = "microchip,mcp23s08", .data = MCP23S08, },
+	{ .compatible = "microchip,mcp23s17", .data = MCP23S17, },
+	{ .compatible = "microchip,mcp23s18", .data = MCP23S18, },
 	{ }
 };
 
@@ -231,5 +366,6 @@
 	.id		= UCLASS_GPIO,
 	.ops		= &mcp230xx_ops,
 	.probe		= mcp230xx_probe,
+	.plat_auto	= sizeof(struct mcp230xx_info),
 	.of_match	= mcp230xx_ids,
 };
