Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spi: add SPI driver for STM32 family #12

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1d033ca
arm: Add build time consistency check for irq priority defines
galak Jun 9, 2017
d9d46d3
pinmux: pinmux_dev_k64 driver and related references are removed.
Jun 4, 2017
446ad9f
arm: nxp: mpu: Fix region descriptor 0 attributes
MaureenHelm Jun 13, 2017
443466f
arch: same70: Fix ERASE pin configuration
mnkp Jun 14, 2017
f73bf35
arm: Modify linker script to accomodate need for flash footer.
Jun 15, 2017
9fd57b4
drivers: serial: uart_stellaris: Remove UART_IRQ_FLAGS
Jun 15, 2017
93da617
flash: stm32: fix for l4 writing wrong data
jamike Jun 6, 2017
ba4def2
flash: stm32: distinguish read/write for flash range valid
jamike Jun 14, 2017
a2dae79
uart: Use DTS labels for Stellaris driver.
Jun 16, 2017
96280c8
arm: Add support for TI's CC2650 SoC.
Jun 16, 2017
4b16674
sensortag: Add TI's SensorTag board.
Jun 16, 2017
7404dd1
cc2650: Add GPIO driver.
Jun 16, 2017
c1ad307
cc2650: Add pinmux driver.
Jun 16, 2017
1277f8f
samples: gpio: Add support for SensorTag board.
Jun 16, 2017
ddfd216
boards: 96b_nitrogen: Add support for flash/debug with pyOCD
galak Jun 13, 2017
bd30f17
scripts: bossa-flash.sh: fix variable usage
galak Jun 13, 2017
942c1fc
scripts: pyocd.sh: Add support for passing board_id to pyocd commands
galak Jun 15, 2017
1ec8ac7
board: frdm_k64f: allow overriding default debug/flash scripts
galak Jun 15, 2017
091176e
boards: sam_e70_xplained: allow flashing via JTAG header
mnkp Jun 14, 2017
c6c7389
stm32cube: Fix warning when SPI LL API is compiled
erwango May 23, 2017
fa633c0
stm32cube: build stm32xxx_ll_spi if CONFIG_SPI
ldts May 24, 2017
ac9ad8f
pinmux: stm32f4: Add SPI1 pins on PA4, PA5, PA6 & PA7
ldts May 24, 2017
e8c5f5d
pinmux: stm32f4: Add SPI2 pins on PB12, PB13, PB14 & PB15
ldts May 24, 2017
392e754
spi: add SPI driver for STM32 family
superna9999 Sep 16, 2016
580313c
pinmux: stm32: nucleo_f401re: Add support for SPI
ldts May 24, 2017
cf2ba9f
pinmux: stm32: nucleo_f334r8: add support for SPI
erwango May 23, 2017
e243b1f
boards: nucleo_l476rg: Document default SPI pinmux
superna9999 Apr 28, 2017
5881297
pinmux: stm32: nucleo_l476rg: Fix SPI Pinmux
superna9999 Apr 28, 2017
6b90818
pinmux: stm32: nucleo_l432kc: Add SPI pins
superna9999 May 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/arm/soc/atmel_sam/same70/soc_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
static int atmel_same70_config(struct device *dev)
{
#ifdef SOC_ATMEL_SAME70_DISABLE_ERASE_PIN
#ifdef CONFIG_SOC_ATMEL_SAME70_DISABLE_ERASE_PIN
/* Disable ERASE function on PB12 pin, this is controlled by Bus Matrix */
MATRIX->CCFG_SYSIO |= CCFG_SYSIO_SYSIO12;
#endif
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/soc/nxp_kinetis/k6x/nxp_mpu_regions.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static struct nxp_mpu_region mpu_regions[] = {
MPU_REGION_ENTRY("DEBUGGER_0",
0,
0xFFFFFFFF,
0),
REGION_DEBUG_ATTR),
/* Region 1 */
MPU_REGION_ENTRY("FLASH_0",
CONFIG_FLASH_BASE_ADDRESS,
Expand Down
1 change: 1 addition & 0 deletions arch/arm/soc/st_stm32/stm32f3/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ enum stm32f3x_pin_config_mode {
#include <stm32f3xx_ll_bus.h>
#include <stm32f3xx_ll_rcc.h>
#include <stm32f3xx_ll_system.h>
#include <stm32f3xx_ll_spi.h>
#endif /* CONFIG_CLOCK_CONTROL_STM32_CUBE */

#endif /* !_ASMLANGUAGE */
Expand Down
1 change: 1 addition & 0 deletions arch/arm/soc/st_stm32/stm32f4/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ enum stm32f4x_pin_config_mode {
#include <stm32f4xx_ll_bus.h>
#include <stm32f4xx_ll_rcc.h>
#include <stm32f4xx_ll_system.h>
#include <stm32f4xx_ll_spi.h>
#endif /* CONFIG_CLOCK_CONTROL_STM32_CUBE */

#endif /* !_ASMLANGUAGE */
Expand Down
41 changes: 41 additions & 0 deletions arch/arm/soc/st_stm32/stm32f4/soc_pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,27 @@ static const stm32_pin_func_t pin_pa3_funcs[] = {
PINMUX_UART(PA3, UART2, RX)
};

/* SPI 1*/
static const stm32_pin_func_t pin_pa4_funcs[] = {
[STM32F4_PINMUX_FUNC_PA4_SPI1_NSS - 1] =
STM32F4X_PIN_CONFIG_AF_PUSH_PULL,
};

static const stm32_pin_func_t pin_pa5_funcs[] = {
[STM32F4_PINMUX_FUNC_PA5_SPI1_SCK - 1] =
STM32F4X_PIN_CONFIG_AF_PUSH_PULL,
};

static const stm32_pin_func_t pin_pa6_funcs[] = {
[STM32F4_PINMUX_FUNC_PA6_SPI1_MISO - 1] =
STM32F4X_PIN_CONFIG_AF_PUSH_PULL,
};

static const stm32_pin_func_t pin_pa7_funcs[] = {
[STM32F4_PINMUX_FUNC_PA7_SPI1_MOSI - 1] =
STM32F4X_PIN_CONFIG_AF_PUSH_PULL,
};

static const stm32_pin_func_t pin_pa8_funcs[] = {
PINMUX_UART(PA8, UART7, RX)
};
Expand Down Expand Up @@ -180,10 +201,24 @@ static const stm32_pin_func_t pin_pb11_funcs[] = {

static const stm32_pin_func_t pin_pb12_funcs[] = {
PINMUX_UART(PB12, UART5, RX)
[STM32F4_PINMUX_FUNC_PB12_SPI2_NSS - 1] =
STM32F4X_PIN_CONFIG_AF_PUSH_PULL,
};

static const stm32_pin_func_t pin_pb13_funcs[] = {
PINMUX_UART(PB13, UART5, TX)
[STM32F4_PINMUX_FUNC_PB13_SPI2_SCK - 1] =
STM32F4X_PIN_CONFIG_AF_PUSH_PULL,
};

static const stm32_pin_func_t pin_pb14_funcs[] = {
[STM32F4_PINMUX_FUNC_PB14_SPI2_MISO - 1] =
STM32F4X_PIN_CONFIG_AF_PUSH_PULL,
};

static const stm32_pin_func_t pin_pb15_funcs[] = {
[STM32F4_PINMUX_FUNC_PB15_SPI2_MOSI - 1] =
STM32F4X_PIN_CONFIG_AF_PUSH_PULL,
};

/* Port C */
Expand Down Expand Up @@ -325,6 +360,10 @@ static const struct stm32_pinmux_conf pins[] = {
STM32_PIN_CONF(STM32_PIN_PA1, pin_pa1_funcs),
STM32_PIN_CONF(STM32_PIN_PA2, pin_pa2_funcs),
STM32_PIN_CONF(STM32_PIN_PA3, pin_pa3_funcs),
STM32_PIN_CONF(STM32_PIN_PA4, pin_pa4_funcs),
STM32_PIN_CONF(STM32_PIN_PA5, pin_pa5_funcs),
STM32_PIN_CONF(STM32_PIN_PA6, pin_pa6_funcs),
STM32_PIN_CONF(STM32_PIN_PA7, pin_pa7_funcs),
STM32_PIN_CONF(STM32_PIN_PA8, pin_pa8_funcs),
STM32_PIN_CONF(STM32_PIN_PA9, pin_pa9_funcs),
STM32_PIN_CONF(STM32_PIN_PA10, pin_pa10_funcs),
Expand All @@ -344,6 +383,8 @@ static const struct stm32_pinmux_conf pins[] = {
STM32_PIN_CONF(STM32_PIN_PB11, pin_pb11_funcs),
STM32_PIN_CONF(STM32_PIN_PB12, pin_pb12_funcs),
STM32_PIN_CONF(STM32_PIN_PB13, pin_pb13_funcs),
STM32_PIN_CONF(STM32_PIN_PB14, pin_pb14_funcs),
STM32_PIN_CONF(STM32_PIN_PB15, pin_pb15_funcs),

/* Port C */
STM32_PIN_CONF(STM32_PIN_PC5, pin_pc5_funcs),
Expand Down
1 change: 1 addition & 0 deletions arch/arm/soc/st_stm32/stm32l4/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <stm32l4xx_ll_bus.h>
#include <stm32l4xx_ll_rcc.h>
#include <stm32l4xx_ll_system.h>
#include <stm32l4xx_ll_spi.h>
#endif /* CONFIG_CLOCK_CONTROL_STM32_CUBE */

#endif /* !_ASMLANGUAGE */
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/soc/ti_lm3s6965/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ extern "C" {
/* uart configuration settings */
#if defined(CONFIG_UART_STELLARIS)

#define UART_IRQ_FLAGS 0

#define UART_STELLARIS_CLK_FREQ SYSCLK_DEFAULT_IOSC_HZ

#endif /* CONFIG_UART_STELLARIS */
Expand Down
17 changes: 17 additions & 0 deletions arch/arm/soc/ti_simplelink/cc2650/Kconfig.defconfig.series
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-License-Identifier: Apache-2.0
#
# Kconfig.defconfig.series - TI SimpleLink CC2650
#

if SOC_SERIES_CC2650

config SOC_SERIES
default cc2650

config SYS_CLOCK_HW_CYCLES_PER_SEC
default 48000000

config NUM_IRQS
default 34

endif # SOC_SERIES_CC2650
13 changes: 13 additions & 0 deletions arch/arm/soc/ti_simplelink/cc2650/Kconfig.series
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-License-Identifier: Apache-2.0
#
# Kconfig.series - TI SimpleLink CC2650
#

config SOC_SERIES_CC2650
bool "TI SimpleLink Family CC2650"
select CPU_CORTEX_M
select CPU_CORTEX_M3
select SOC_FAMILY_TISIMPLELINK
select CPU_HAS_SYSTICK
help
Enable support for TI SimpleLink CC2650.
21 changes: 21 additions & 0 deletions arch/arm/soc/ti_simplelink/cc2650/Kconfig.soc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-License-Identifier: Apache-2.0
#
# Kconfig.soc - Texas Instruments CC2650
#

choice
prompt "TI SimpleLink MCU Selection"
depends on SOC_SERIES_CC2650

config SOC_CC2650
bool "CC2650"

endchoice

if SOC_SERIES_CC2650

config TI_CCFG_PRESENT
bool
default y

endif # SOC_SERIES_CC2650
3 changes: 3 additions & 0 deletions arch/arm/soc/ti_simplelink/cc2650/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: Apache-2.0

obj-y += soc.o
Loading