Commit 2a7c2694 authored by Yuri Tikhonov's avatar Yuri Tikhonov

RM-770 stm32f7: support for UCL-SOM-BSB (common config)

Signed-off-by: default avatarYuri Tikhonov <yur@emcraft.com>
parent 83abe151
...@@ -3245,8 +3245,15 @@ stm-som-1a_config : unconfig ...@@ -3245,8 +3245,15 @@ stm-som-1a_config : unconfig
} }
@$(MKCONFIG) -a stm-som arm arm_cortexm3 stm-som emcraft stm32 @$(MKCONFIG) -a stm-som arm arm_cortexm3 stm-som emcraft stm32
stm32f7-som_config : unconfig stm32f7-som_config \
@$(MKCONFIG) $(@:_config=) arm arm_cortexm3 stm32f7-som emcraft stm32 stm32f7-som-ext-bsb_config: unconfig
@if [ "$(findstring ext-bsb, $@)" ] ; then \
echo "...for EXT-BSB" ; \
else \
echo "#define CONFIG_SYS_BOARD_UCL_BSB" >>$(obj)include/config.h ; \
echo "...for UCL-BSB" ; \
fi;
@$(MKCONFIG) -a stm32f7-som arm arm_cortexm3 stm32f7-som emcraft stm32
stm32f429-discovery_config : unconfig stm32f429-discovery_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm_cortexm3 stm32f429-discovery \ @$(MKCONFIG) $(@:_config=) arm arm_cortexm3 stm32f429-discovery \
......
...@@ -224,6 +224,20 @@ static const struct stm32f2_gpio_dsc ltdc_iomux[] = { ...@@ -224,6 +224,20 @@ static const struct stm32f2_gpio_dsc ltdc_iomux[] = {
}; };
#endif /* CONFIG_VIDEO_STM32F4_LTDC */ #endif /* CONFIG_VIDEO_STM32F4_LTDC */
#ifdef CONFIG_SYS_BOARD_UCL_BSB
/*
* Enable peripheral power
*/
static int pwr_setup_gpio(void)
{
struct stm32f2_gpio_dsc pwr_en_gpio = {
STM32F2_GPIO_PORT_F, STM32F2_GPIO_PIN_10
};
return stm32f2_gpout_set(&pwr_en_gpio, 1);
}
#endif /* CONFIG_SYS_BOARD_UCL_BSB */
/* /*
* Init FMC/FSMC GPIOs based * Init FMC/FSMC GPIOs based
*/ */
...@@ -277,6 +291,12 @@ int board_init(void) ...@@ -277,6 +291,12 @@ int board_init(void)
{ {
int rv; int rv;
#if defined(CONFIG_SYS_BOARD_UCL_BSB)
rv = pwr_setup_gpio();
if (rv)
printf("WARN: pwr_setup_gpio() error %d\n", rv);
#endif
rv = fmc_fsmc_setup_gpio(); rv = fmc_fsmc_setup_gpio();
if (rv) if (rv)
return rv; return rv;
......
/* /*
* (C) Copyright 2011-2015 * (C) Copyright 2011-2016
* *
* Yuri Tikhonov, Emcraft Systems, yur@emcraft.com * Yuri Tikhonov, Emcraft Systems, yur@emcraft.com
* Alexander Potashev, Emcraft Systems, aspotashev@emcraft.com * Alexander Potashev, Emcraft Systems, aspotashev@emcraft.com
...@@ -30,10 +30,6 @@ ...@@ -30,10 +30,6 @@
#ifndef __CONFIG_H #ifndef __CONFIG_H
#define __CONFIG_H #define __CONFIG_H
#if !defined(CONFIG_SYS_BOARD_REV)
#define CONFIG_SYS_BOARD_REV 0x1A
#endif
/* /*
* Disable debug messages * Disable debug messages
*/ */
...@@ -64,16 +60,14 @@ ...@@ -64,16 +60,14 @@
#define CONFIG_DISPLAY_CPUINFO 1 #define CONFIG_DISPLAY_CPUINFO 1
#define CONFIG_DISPLAY_BOARDINFO 1 #define CONFIG_DISPLAY_BOARDINFO 1
#if CONFIG_SYS_BOARD_REV == 0x1A #define CONFIG_SYS_BOARD_REV_STR "1.A"
# define CONFIG_SYS_BOARD_REV_STR "1.A"
#else
# error "wrong board revision"
#endif
/* /*
* Monitor prompt * Monitor prompt
*/ */
#if CONFIG_SYS_BOARD_REV == 0x1A #ifdef CONFIG_SYS_BOARD_UCL_BSB
# define CONFIG_SYS_PROMPT "STM32F7-SOM-UCL> "
#else
# define CONFIG_SYS_PROMPT "STM32F7-SOM> " # define CONFIG_SYS_PROMPT "STM32F7-SOM> "
#endif #endif
...@@ -307,15 +301,29 @@ ...@@ -307,15 +301,29 @@
/* /*
* Framebuffer configuration * Framebuffer configuration
*/ */
#define CONFIG_LCD #if defined(CONFIG_SYS_BOARD_UCL_BSB)
# define CONFIG_LCD
# define LCD_EMCRAFT_TN43_LCD
#elif defined(CONFIG_SYS_BOARD_IOT_BSB)
# define CONFIG_LCD
# define LCD_EMCRAFT_IOT_LCD
#else
# undef CONFIG_LCD
#endif
#ifdef CONFIG_LCD #ifdef CONFIG_LCD
#define CONFIG_FB_ADDR CONFIG_DMAMEM_BASE #define CONFIG_FB_ADDR CONFIG_DMAMEM_BASE
#define CONFIG_VIDEO_STM32F4_LTDC #define CONFIG_VIDEO_STM32F4_LTDC
#define CONFIG_STM32_LTDC_PIXCLK (9 * 1000 * 1000)
#define LCD_EMCRAFT_IOT_LCD #if defined(LCD_EMCRAFT_TN43_LCD)
# define CONFIG_STM32_LTDC_PIXCLK (9 * 1000 * 1000)
#elif defined(LCD_EMCRAFT_IOT_LCD)
# define CONFIG_STM32_LTDC_PIXCLK (9 * 1000 * 1000)
#else
# error "STM32F7 LTDC is enabled but no LCD configured"
#endif
#define CONFIG_SPLASH_SCREEN #define CONFIG_SPLASH_SCREEN
#define CONFIG_SPLASH_SCREEN_ALIGN #define CONFIG_SPLASH_SCREEN_ALIGN
...@@ -325,7 +333,8 @@ ...@@ -325,7 +333,8 @@
#define CONFIG_BMP_24BPP #define CONFIG_BMP_24BPP
#define LCD_BPP LCD_COLOR32 #define LCD_BPP LCD_COLOR32
#ifdef LCD_EMCRAFT_IOT_LCD #if defined(LCD_EMCRAFT_TN43_LCD) || \
defined(LCD_EMCRAFT_IOT_LCD)
# define CONFIG_STM32F4_LTDC_XRES 480 # define CONFIG_STM32F4_LTDC_XRES 480
# define CONFIG_STM32F4_LTDC_YRES 272 # define CONFIG_STM32F4_LTDC_YRES 272
# define CONFIG_STM32F4_LTDC_BPP LCD_BPP # define CONFIG_STM32F4_LTDC_BPP LCD_BPP
...@@ -337,9 +346,6 @@ ...@@ -337,9 +346,6 @@
# define CONFIG_STM32F4_LTDC_UPPER_MARGIN 2 # define CONFIG_STM32F4_LTDC_UPPER_MARGIN 2
# define CONFIG_STM32F4_LTDC_VSYNC_LEN 10 # define CONFIG_STM32F4_LTDC_VSYNC_LEN 10
# define CONFIG_STM32F4_LTDC_LOWER_MARGIN 2 # define CONFIG_STM32F4_LTDC_LOWER_MARGIN 2
#elif defined(CONFIG_VIDEO_STM32F4_LTDC)
# error "STM32F7 LTDC is enabled but no LCD configured"
#endif #endif
#endif /* CONFIG_LCD */ #endif /* CONFIG_LCD */
...@@ -362,12 +368,7 @@ ...@@ -362,12 +368,7 @@
#undef CONFIG_CMD_NFS #undef CONFIG_CMD_NFS
#undef CONFIG_CMD_SOURCE #undef CONFIG_CMD_SOURCE
#undef CONFIG_CMD_XIMG #undef CONFIG_CMD_XIMG
#undef CONFIG_CMD_BUFCOPY
#if CONFIG_SYS_BOARD_REV == 0x1A
# undef CONFIG_CMD_BUFCOPY
#else
# define CONFIG_CMD_BUFCOPY
#endif
/* /*
* To save memory disable long help * To save memory disable long help
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment