boards: stm32f4: Extract common config options
Move common config options one level up to try to simplify the per-board defconfig Change-Id: I3d80fa494050634d0f877af2015b01b85df20d1d Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
eb0f8ab9fc
commit
fdfa958d5f
3 changed files with 64 additions and 24 deletions
|
@ -26,4 +26,68 @@ config NUM_IRQ_PRIO_BITS
|
|||
int
|
||||
default 4
|
||||
|
||||
config SERIAL
|
||||
def_bool y
|
||||
|
||||
if SERIAL
|
||||
|
||||
config CONSOLE
|
||||
def_bool y
|
||||
|
||||
config UART_CONSOLE
|
||||
def_bool y
|
||||
|
||||
config UART_STM32
|
||||
def_bool y
|
||||
|
||||
config UART_STM32_PORT_0
|
||||
def_bool y
|
||||
|
||||
config UART_STM32_PORT_0_NAME
|
||||
default UART_0
|
||||
|
||||
config UART_STM32_PORT_0_BAUD_RATE
|
||||
default 115200
|
||||
|
||||
config UART_STM32_PORT_1
|
||||
def_bool y
|
||||
|
||||
config UART_STM32_PORT_1_NAME
|
||||
default UART_1
|
||||
|
||||
config UART_STM32_PORT_1_BAUD_RATE
|
||||
default 115200
|
||||
|
||||
endif #SERIAL
|
||||
|
||||
if CLOCK_CONTROL
|
||||
|
||||
config CLOCK_CONTROL_STM32F4X
|
||||
def_bool y
|
||||
|
||||
endif #CLOCK_CONTROL
|
||||
|
||||
if GPIO
|
||||
|
||||
config GPIO_STM32
|
||||
def_bool y
|
||||
|
||||
config GPIO_STM32_PORTA
|
||||
def_bool y
|
||||
|
||||
config GPIO_STM32_PORTB
|
||||
def_bool y
|
||||
|
||||
config GPIO_STM32_PORTC
|
||||
def_bool y
|
||||
|
||||
endif #GPIO
|
||||
|
||||
if PINMUX
|
||||
|
||||
config PINMUX_STM32
|
||||
def_bool y
|
||||
|
||||
endif #PINMUX
|
||||
|
||||
endif # SOC_SERIES_STM32F4X
|
||||
|
|
|
@ -1,38 +1,26 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_BOARD_96B_CARBON=y
|
||||
CONFIG_SOC_FAMILY_STM32=y
|
||||
CONFIG_SOC_SERIES_STM32F4X=y
|
||||
CONFIG_SOC_STM32F401RE=y
|
||||
# 84MHz system clock
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000
|
||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
|
||||
|
||||
# enable uart driver
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_STM32=y
|
||||
# enable USART1 - passthrough to FT230XQ
|
||||
CONFIG_UART_STM32_PORT_0=y
|
||||
CONFIG_UART_STM32_PORT_0_BAUD_RATE=115200
|
||||
# enable console on this port by default
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_0"
|
||||
|
||||
# enable pinmux
|
||||
CONFIG_PINMUX=y
|
||||
CONFIG_PINMUX_STM32=y
|
||||
|
||||
# enable GPIO ports A, B, C, D
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_GPIO_STM32=y
|
||||
CONFIG_GPIO_STM32_PORTA=y
|
||||
CONFIG_GPIO_STM32_PORTB=y
|
||||
CONFIG_GPIO_STM32_PORTC=y
|
||||
CONFIG_GPIO_STM32_PORTD=y
|
||||
|
||||
# clock configuration
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
CONFIG_CLOCK_CONTROL_STM32F4X=y
|
||||
CONFIG_CLOCK_STM32F4X_SYSCLK_SRC_PLL=y
|
||||
# use HSE as PLL input
|
||||
CONFIG_CLOCK_STM32F4X_PLL_SRC_HSE=y
|
||||
|
|
|
@ -1,37 +1,25 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_BOARD_NUCLEO_F401RE=y
|
||||
CONFIG_SOC_FAMILY_STM32=y
|
||||
CONFIG_SOC_SERIES_STM32F4X=y
|
||||
CONFIG_SOC_STM32F401RE=y
|
||||
# 84MHz system clock
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000
|
||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
|
||||
|
||||
# enable uart driver
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_STM32=y
|
||||
# enable USART2 - passthrough to STLINK v2 connector
|
||||
CONFIG_UART_STM32_PORT_1=y
|
||||
CONFIG_UART_STM32_PORT_1_BAUD_RATE=115200
|
||||
# enable console on this port by default
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_1"
|
||||
|
||||
# enable pinmux
|
||||
CONFIG_PINMUX=y
|
||||
CONFIG_PINMUX_STM32=y
|
||||
|
||||
# enable GPIO ports A, B, C
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_GPIO_STM32=y
|
||||
CONFIG_GPIO_STM32_PORTA=y
|
||||
CONFIG_GPIO_STM32_PORTB=y
|
||||
CONFIG_GPIO_STM32_PORTC=y
|
||||
|
||||
# clock configuration
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
CONFIG_CLOCK_CONTROL_STM32F4X=y
|
||||
CONFIG_CLOCK_STM32F4X_SYSCLK_SRC_PLL=y
|
||||
# use HSE as PLL input
|
||||
CONFIG_CLOCK_STM32F4X_PLL_SRC_HSE=y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue