From f2b27d17b78c138e09a7997730c22e19dd6d8476 Mon Sep 17 00:00:00 2001 From: Russell Cloran Date: Thu, 17 Apr 2025 17:47:08 -0700 Subject: stm32: Add support for spi6 on stm32f42x chips Signed-off-by: Russell Cloran --- src/stm32/spi.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/stm32/spi.c b/src/stm32/spi.c index 648e9bcd..0c90dabf 100644 --- a/src/stm32/spi.c +++ b/src/stm32/spi.c @@ -42,6 +42,10 @@ DECL_CONSTANT_STR("BUS_PINS_spi1a", "PB4,PB5,PB3"); DECL_ENUMERATION("spi_bus", "spi2b", 6); DECL_CONSTANT_STR("BUS_PINS_spi2b", "PI2,PI3,PI1"); #endif + #ifdef SPI6 + DECL_ENUMERATION("spi_bus", "spi6_PG12_PG14_PG13", 7); + DECL_CONSTANT_STR("BUS_PINS_spi6_PG12_PG14_PG13", "PG12,PG14,PG13"); + #endif #endif #if CONFIG_MACH_STM32G0B1 DECL_ENUMERATION("spi_bus", "spi2_PB2_PB11_PB10", 5); @@ -76,6 +80,9 @@ static const struct spi_info spi_bus[] = { #elif defined(GPIOI) { SPI2, GPIO('I', 2), GPIO('I', 3), GPIO('I', 1), GPIO_FUNCTION_ALL(5) }, #endif + #ifdef SPI6 + { SPI6, GPIO('G', 12), GPIO('G', 14), GPIO('G', 13), SPI_FUNCTION_ALL} + #endif #endif #if CONFIG_MACH_STM32G0B1 { SPI2, GPIO('B', 2), GPIO('B', 11), GPIO('B', 10), -- cgit v1.2.3-70-g09d2