stm32: add alternate pinouts for spi1/2
In addition to spi3, spi1 and spi2 also have alternate pins. Add them as spi1a and spi2a, similar to spi3. Signed-off-by: Arne Jansen <arne@die-jansens.de>
This commit is contained in:
parent
a2c309a2b0
commit
5ce86bd005
|
@ -17,13 +17,17 @@ struct spi_info {
|
||||||
|
|
||||||
DECL_ENUMERATION("spi_bus", "spi2", 0);
|
DECL_ENUMERATION("spi_bus", "spi2", 0);
|
||||||
DECL_CONSTANT_STR("BUS_PINS_spi2", "PB14,PB15,PB13");
|
DECL_CONSTANT_STR("BUS_PINS_spi2", "PB14,PB15,PB13");
|
||||||
DECL_ENUMERATION("spi_bus", "spi1", 1);
|
DECL_ENUMERATION("spi_bus", "spi2a", 1);
|
||||||
|
DECL_CONSTANT_STR("BUS_PINS_spi2a", "PC2,PC3,PB10");
|
||||||
|
DECL_ENUMERATION("spi_bus", "spi1", 2);
|
||||||
DECL_CONSTANT_STR("BUS_PINS_spi1", "PA6,PA7,PA5");
|
DECL_CONSTANT_STR("BUS_PINS_spi1", "PA6,PA7,PA5");
|
||||||
|
DECL_ENUMERATION("spi_bus", "spi1a", 3);
|
||||||
|
DECL_CONSTANT_STR("BUS_PINS_spi1a", "PB4,PB5,PB3");
|
||||||
#ifdef SPI3
|
#ifdef SPI3
|
||||||
DECL_ENUMERATION("spi_bus", "spi3", 2);
|
DECL_ENUMERATION("spi_bus", "spi3", 4);
|
||||||
DECL_CONSTANT_STR("BUS_PINS_spi3", "PB4,PB5,PB3");
|
DECL_CONSTANT_STR("BUS_PINS_spi3", "PB4,PB5,PB3");
|
||||||
#if CONFIG_MACH_STM32F4
|
#if CONFIG_MACH_STM32F4
|
||||||
DECL_ENUMERATION("spi_bus", "spi3a", 3);
|
DECL_ENUMERATION("spi_bus", "spi3a", 5);
|
||||||
DECL_CONSTANT_STR("BUS_PINS_spi3a", "PC11,PC12,PC10");
|
DECL_CONSTANT_STR("BUS_PINS_spi3a", "PC11,PC12,PC10");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -32,7 +36,9 @@ DECL_CONSTANT_STR("BUS_PINS_spi3a", "PC11,PC12,PC10");
|
||||||
|
|
||||||
static const struct spi_info spi_bus[] = {
|
static const struct spi_info spi_bus[] = {
|
||||||
{ SPI2, GPIO('B', 14), GPIO('B', 15), GPIO('B', 13), SPI_FUNCTION },
|
{ SPI2, GPIO('B', 14), GPIO('B', 15), GPIO('B', 13), SPI_FUNCTION },
|
||||||
|
{ SPI2, GPIO('C', 2), GPIO('C', 3), GPIO('B', 10), SPI_FUNCTION },
|
||||||
{ SPI1, GPIO('A', 6), GPIO('A', 7), GPIO('A', 5), SPI_FUNCTION },
|
{ SPI1, GPIO('A', 6), GPIO('A', 7), GPIO('A', 5), SPI_FUNCTION },
|
||||||
|
{ SPI1, GPIO('B', 4), GPIO('B', 5), GPIO('B', 3), SPI_FUNCTION },
|
||||||
#ifdef SPI3
|
#ifdef SPI3
|
||||||
{ SPI3, GPIO('B', 4), GPIO('B', 5), GPIO('B', 3), GPIO_FUNCTION(6) },
|
{ SPI3, GPIO('B', 4), GPIO('B', 5), GPIO('B', 3), GPIO_FUNCTION(6) },
|
||||||
#if CONFIG_MACH_STM32F4
|
#if CONFIG_MACH_STM32F4
|
||||||
|
|
Loading…
Reference in New Issue