atsam: Reserve USART interface when using SPI

This commit is contained in:
Desuuuu 2022-05-22 18:25:06 +02:00
parent 53de6fb578
commit 4d97ca0445
No known key found for this signature in database
GPG Key ID: 85943F4B2C2CE0DC
1 changed files with 10 additions and 10 deletions

View File

@ -31,28 +31,28 @@ struct spi_info {
DECL_ENUMERATION("spi_bus", "spi0", 0); DECL_ENUMERATION("spi_bus", "spi0", 0);
DECL_ENUMERATION_RANGE("spi_bus", "usart0", 1, 3); DECL_ENUMERATION_RANGE("spi_bus", "usart0", 1, 3);
DECL_CONSTANT_STR("BUS_PINS_spi0", "PA25,PA26,PA27"); DECL_CONSTANT_STR("BUS_PINS_spi0", "PA25,PA26,PA27");
DECL_CONSTANT_STR("BUS_PINS_usart0", "PA10,PA11,PA17"); DECL_CONSTANT_STR("BUS_PINS_usart0@spi_bus", "[_],PA10,PA11,PA17");
DECL_CONSTANT_STR("BUS_PINS_usart1", "PA12,PA13,PA16"); DECL_CONSTANT_STR("BUS_PINS_usart1@spi_bus", "[_],PA12,PA13,PA16");
DECL_CONSTANT_STR("BUS_PINS_usart2", "PB21,PB20,PB24"); DECL_CONSTANT_STR("BUS_PINS_usart2@spi_bus", "[_],PB21,PB20,PB24");
#elif CONFIG_MACH_SAM4S #elif CONFIG_MACH_SAM4S
DECL_ENUMERATION("spi_bus", "spi", 0); DECL_ENUMERATION("spi_bus", "spi", 0);
DECL_ENUMERATION_RANGE("spi_bus", "usart0", 1, 2); DECL_ENUMERATION_RANGE("spi_bus", "usart0", 1, 2);
DECL_CONSTANT_STR("BUS_PINS_spi", "PA12,PA13,PA14"); DECL_CONSTANT_STR("BUS_PINS_spi", "PA12,PA13,PA14");
DECL_CONSTANT_STR("BUS_PINS_usart0", "PA5,PA6,PA2"); DECL_CONSTANT_STR("BUS_PINS_usart0@spi_bus", "[_],PA5,PA6,PA2");
DECL_CONSTANT_STR("BUS_PINS_usart1", "PA21,PA22,PA23"); DECL_CONSTANT_STR("BUS_PINS_usart1@spi_bus", "[_],PA21,PA22,PA23");
#elif CONFIG_MACH_SAM4E #elif CONFIG_MACH_SAM4E
DECL_ENUMERATION("spi_bus", "spi", 0); DECL_ENUMERATION("spi_bus", "spi", 0);
DECL_ENUMERATION_RANGE("spi_bus", "usart0", 1, 2); DECL_ENUMERATION_RANGE("spi_bus", "usart0", 1, 2);
DECL_CONSTANT_STR("BUS_PINS_spi", "PA12,PA13,PA14"); DECL_CONSTANT_STR("BUS_PINS_spi", "PA12,PA13,PA14");
DECL_CONSTANT_STR("BUS_PINS_usart0", "PB0,PB1,PB13"); DECL_CONSTANT_STR("BUS_PINS_usart0@spi_bus", "[_],PB0,PB1,PB13");
DECL_CONSTANT_STR("BUS_PINS_usart1", "PA21,PA22,PA23"); DECL_CONSTANT_STR("BUS_PINS_usart1@spi_bus", "[_],PA21,PA22,PA23");
#elif CONFIG_MACH_SAME70 #elif CONFIG_MACH_SAME70
DECL_ENUMERATION_RANGE("spi_bus", "spi0", 0, 2); DECL_ENUMERATION_RANGE("spi_bus", "spi0", 0, 2);
DECL_ENUMERATION_RANGE("spi_bus", "usart0", 2, 3); DECL_ENUMERATION_RANGE("spi_bus", "usart0", 2, 3);
DECL_CONSTANT_STR("BUS_PINS_spi0", "PD20,PD21,PD22"); DECL_CONSTANT_STR("BUS_PINS_spi0", "PD20,PD21,PD22");
DECL_CONSTANT_STR("BUS_PINS_usart0", "PB0,PB1,PB13"); DECL_CONSTANT_STR("BUS_PINS_usart0@spi_bus", "[_],PB0,PB1,PB13");
DECL_CONSTANT_STR("BUS_PINS_usart1", "PA21,PB4,PA23"); DECL_CONSTANT_STR("BUS_PINS_usart1@spi_bus", "[_],PA21,PB4,PA23");
DECL_CONSTANT_STR("BUS_PINS_usart2", "PD15,PD16,PD17"); DECL_CONSTANT_STR("BUS_PINS_usart2@spi_bus", "[_],PD15,PD16,PD17");
#endif #endif
static const struct spi_info spi_bus[] = { static const struct spi_info spi_bus[] = {