aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-01-04 01:53:48 -0500
committerKevin O'Connor <kevin@koconnor.net>2021-01-04 01:54:41 -0500
commitcc39beba0e081c4843c7789eb7a46a22fee0e45c (patch)
tree7d3dbfbb2355697891e0853e4d519397bb7f6cd7 /src
parente68cf08d15a985ecce7497b58408ee233dd54eb9 (diff)
downloadkutter-cc39beba0e081c4843c7789eb7a46a22fee0e45c.tar.gz
kutter-cc39beba0e081c4843c7789eb7a46a22fee0e45c.tar.xz
kutter-cc39beba0e081c4843c7789eb7a46a22fee0e45c.zip
stm32: Add support for spi4 bus on stm32f446 chip
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r--src/stm32/spi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stm32/spi.c b/src/stm32/spi.c
index 5e306fd1..8927bd23 100644
--- a/src/stm32/spi.c
+++ b/src/stm32/spi.c
@@ -31,6 +31,10 @@ DECL_CONSTANT_STR("BUS_PINS_spi3", "PB4,PB5,PB3");
#if CONFIG_MACH_STM32F4
DECL_ENUMERATION("spi_bus", "spi3a", 5);
DECL_CONSTANT_STR("BUS_PINS_spi3a", "PC11,PC12,PC10");
+ #ifdef SPI4
+DECL_ENUMERATION("spi_bus", "spi4", 6);
+DECL_CONSTANT_STR("BUS_PINS_spi4", "PE13,PE14,PE12");
+ #endif
#endif
#endif
@@ -45,6 +49,9 @@ static const struct spi_info spi_bus[] = {
{ SPI3, GPIO('B', 4), GPIO('B', 5), GPIO('B', 3), GPIO_FUNCTION(6) },
#if CONFIG_MACH_STM32F4
{ SPI3, GPIO('C', 11), GPIO('C', 12), GPIO('C', 10), GPIO_FUNCTION(6) },
+ #ifdef SPI4
+ { SPI4, GPIO('E', 13), GPIO('E', 14), GPIO('E', 12), GPIO_FUNCTION(5) },
+ #endif
#endif
#endif
};