summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32
AgeCommit message (Collapse)AuthorFilesLines
2021-07-28Rename DRIVERS_MISC_SUPPORT to DRIVERS_MISCSimon Glass1-1/+1
Rename these options so that CONFIG_IS_ENABLED can be used with them. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-28Rename GPIO_SUPPORT to GPIOSimon Glass1-1/+1
Rename these options so that CONFIG_IS_ENABLED can be used with them. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-04-09board: Add rt-thread art-pi board supportdillon min1-0/+4
All these files are add for support rt-thread art-pi board - add board/st/stm32h750-art-pi, defconfig, header support for u-boot for more information about art-pi, please goto: https://art-pi.gitee.io/website/ Signed-off-by: dillon min <dillon.minfei@gmail.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2020-12-09treewide: Update email address Patrick Delaunay and Patrice ChotardPatrice Chotard1-1/+1
Update Patrick and my email address with the one dedicated to upstream activities. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-05-19common: Drop init.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-15rename symbol: CONFIG_STM32 -> CONFIG_ARCH_STM32Trevor Woerner1-1/+1
Have this symbol follow the pattern of all other such symbols. Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2019-06-28mach-stm32: Fix MPU region size dedicated to SDRAM for STM32F4Patrice Chotard1-1/+1
The MPU region dedicated for SDRAM for STM32F4 SoCs family was set to 16MB, but STM32F429 Evaluation board have 32MB of SDRAM. When kernel starts, only first 16MB of SDRAM are configured with XN (eXecute Never) bit disabled, whereas kernel is using 32MB. To avoid such situation in the future, extend this MPU region to 512MB as for STM32F7/H7. It fixes the following user land exception on STM32F429 Evaluation board : [ 1.713002] VFS: Mounted root (ext4 filesystem) readonly on device 179:2. [ 1.722605] devtmpfs: mounted [ 1.733057] Freeing unused kernel memory: 72K [ 1.737622] This architecture does not have kernel memory protection. [ 1.744070] Run /sbin/init as init process [ 1.906850] [ 1.906850] Unhandled exception: IPSR = 00000004 LR = fffffffd [ 1.914282] CPU: 0 PID: 1 Comm: init Not tainted 5.1.0-00002-gcf9ca5719954 #6 [ 1.921433] Hardware name: STM32 (Device Tree Support) [ 1.926601] PC is at 0x1a00b64 [ 1.929642] LR is at (null) [ 1.932669] pc : [<01a00b64>] lr : [<00000000>] psr: 01000000 [ 1.938993] sp : 01a5cfb0 ip : 00000000 fp : 00000000 [ 1.944269] r10: 01a43b00 r9 : 00000000 r8 : 00000000 [ 1.949564] r7 : 00000000 r6 : 00000000 r5 : 00000000 r4 : 00000000 [ 1.956168] r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000000 [ 1.962701] xPSR: 01000000 [ 1.965506] CPU: 0 PID: 1 Comm: init Not tainted 5.1.0-00002-gcf9ca5719954 #6 [ 1.972658] Hardware name: STM32 (Device Tree Support) [ 1.978132] [<0000c009>] (unwind_backtrace) from [<0000b24f>] (show_stack+0xb/0xc) [ 1.986024] [<0000b24f>] (show_stack) from [<0000b947>] (__invalid_entry+0x4b/0x4c) Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-05-06mach-stm32: Add MPU region for spi-nor memory mapped regionPatrice Chotard1-0/+3
The Quad-SPI interface is able to manage up to 256Mbytes Flash memory starting from 0x90000000 to 0x9FFFFFFF in the memory mapped mode. Add a dedicated MPU region into stm32_region_config. See application note AN4760 available at www.st.com Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-10-06mach-stm32: Set MPU SDRAM size to 512MB for STM32F7/H7Patrice Chotard1-7/+2
This allows to boot all STM32F7 and STM32H7 boards independently of the amount of embedded SDRAM. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2018-07-30Kconfig: Sort bool, default, select and imply optionsMichal Simek1-10/+10
Another round of sorting Kconfig entries aplhabetically. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-13mach-stm32: Rename CONFIG_SPL_RESET_SUPPORT to CONFIG_SPL_DM_RESETLey Foon Tan1-1/+1
CONFIG_SPL_RESET_SUPPORT has been renamed to CONFIG_SPL_DM_RESET, update this Kconfig file. Fixes: bfc6bae8fa1f ("reset: Rename CONFIG_SPL_RESET_SUPPORT to CONFIG_SPL_DM_RESET") Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
2018-06-06mach-stm32: Enable SPL_RESET_SUPPORT flagPatrice Chotard1-0/+1
Since commit 0e373c0ade8c ("spl: add SPL_RESET_SUPPORT"), reset is supported in SPL, enable this flag for STM32F SoCs family. This allows to remove a specific case in RCC mfd driver. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-05-07arm: v7R: Add support for MPULokesh Vutla1-1/+1
The Memory Protection Unit(MPU) allows to partition memory into regions and set individual protection attributes for each region. In absence of MPU a default map[1] will take effect. Add support for configuring MPU on Cortex-R, by reusing the existing support for Cortex-M processor. [1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0460d/I1002400.html Tested-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2-5/+2
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-03-14mach-stm32: Use default memory map as background regionPatrice Chotard1-25/+11
On linux kernel side, on STM32F7 and STM32H7 SoCs, DMA requires uncachable regions. These regions are defined in DT. Since kernel linux v4.15, on ARMv7-M Cortex, kernel is able to configure MPU regions depending on DT settings. As kernel is able to configure MPU, this allows to remove MPU region settings in bootloader. On Cortex M processors, MPU allows to use a default memory map. (see B3.5.4 MPU Control Register, MPU_CTRL in https://developer.arm.com/products/architecture/m-profile/docs/ddi0403/latest/armv7-m-architecture-reference-manual) Use the default memory map as background region for all STM32 SoCs family with an additional MPU region corresponding to the SDRAM area. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-03-14board: stm32: switch to DM STM32 timerPatrice Chotard6-249/+7
Use available DM stm32_timer driver instead of dedicated mach-stm32/stm32fx/timer.c. Remove all defines or files previously used for timer usage in arch/arm/include/asm/arch-stm32fx and in arch/arm/mach-stm32/stm32fx Enable DM STM32_TIMER for STM32F4/F7 and H7. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-01-29board: stm32: Fix stm32f746-disco bootPatrice Chotard1-0/+1
Since 'commit af2f44267 ("fdc spl: use different BOARD_INIT MACRO for spl and tpl")' board stm32f746-disco can't boot. The macro CONFIG_IS_ENABLED() can't evaluate the value of CONFIG_SPL_BOARD_INIT as it was defined in include/configs/stm32f746-disco.h without attributed value. Moving CONFIG_SPL_BOARD_INIT from stm32f746-disco.h to mach-stm32/Kconfig fixes this issue. Fixes: af2f44267 ("fdc spl: use different BOARD_INIT MACRO for spl and tpl") Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-01-28board: stm32: Add stm32f429-evaluation board supportPatrice Chotard1-0/+4
Add stm32f429-evaluation board support. For more information, please visit: http://www.st.com/en/evaluation-tools/stm32429i-eval.html Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-01-19configs: stm32: move config flag from defconfig to KconfigPatrice Chotard1-0/+22
Move system flags from defconfig to mach-stm32/Kconfig Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2018-01-19serial: stm32: Rename serial_stm32x7.c to serial_stm32.cPatrice Chotard1-1/+1
Now this driver is used across stm32f4, stm32f7 and stm32h7 SoCs family, give it a generic name. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2018-01-10board: stm32: add stm32f469-discovery board supportPatrice Chotard1-0/+4
This board offers : _ STM32F469NIH6 microcontroller featuring 2 Mbytes of Flash memory and 324 Kbytes of RAM in BGA216 package _ On-board ST-LINK/V2-1 SWD debugger, supporting USB reenumeration capability: _ Mbed-enabled (mbed.org) _ USB functions: USB virtual COM port, mass storage, debug port _ 4 inches 800x480 pixel TFT color LCD with MIPI DSI interface and capacitive touch screen _ SAI Audio DAC, with a stereo headphone output jack _ 3 MEMS microphones _ MicroSD card connector _ I2C extension connector _ 4Mx32bit SDRAM _ 128-Mbit Quad-SPI NOR Flash _ Reset and wake-up buttons _ 4 color user LEDs _ USB OTG FS with Micro-AB connector _ Three power supply options: _ Expansion connectors and Arduinoâ„¢ UNO V3 connectors Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-01-10board: stm32f429-disco: switch to DM STM32 clock driverPatrice Chotard2-259/+1
Use available DM clk_stm32f.c driver instead of dedicated mach-stm32/stm32f4/clock.c. Migrate periph_clock defines from stm32_periph.h directly in CLK driver. These periph_clock defines will be removed when STMMAC, TIMER2 and SYSCFG drivers will support DM CLK. Enable also CLK flag. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-01-10mach-stm32: stmf32f4: timer: remove clock_get() callPatrice Chotard1-6/+2
In order to use common clock driver between STM32F4 and STM32F7, remove clock_get() call As APB_PSC is always set to 2, only case when clock_get(CLOCK_AHB) != clock_get(CLOCK_APB1) is kept Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-11-30mach-stm32: Factorize MPU's region config for STM32 SoCsPatrice Chotard7-116/+14
MPU's region setup can be factorized between STM32F4/F7/H7 SoCs family and used a common MPU's region config. Only one exception for STM32H7 which doesn't have device area located at 0xA000 0000. For STM32F4, configure_clocks() need to be moved from arch_cpu_init() to board_early_init_f(). Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-11-30stm32: migrate clock structs in include/stm32_rcc.hPatrice Chotard3-26/+3
In order to factorize code between STM32F4 and STM32F7 migrate all structs related to RCC clocks in include/stm32_rcc.h Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-11-06stm32: fix STMicroelectronics copyrightPatrice Chotard4-8/+8
Uniformize STMicroelectronics copyrights headers for STM32 related code. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08ARM: stm32f7: fix prescaler calculation of timerBo Shen1-1/+1
As the timer 2 is on APB1 bus, the maximum of clock frequency of APB1 timer clock is half of SYSCLK. Then to calculate the timer prescaler for timer 2 which need to be divided by 2. Signed-off-by: Bo Shen <voice.shen@gmail.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-09-22board: Add stm32h7 SoC, discovery and evaluation boards supportPatrice Chotard5-0/+97
This patch adds support for stm32h7 soc family, stm32h743 discovery and evaluation boards. For more information about STM32H7 series, please visit: http://www.st.com/en/microcontrollers/stm32h7-series.html Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-26spl: stm32: make falcon mode activation configurableVikas Manocha1-1/+1
With this change, it will be possible to de-select falcon mode & spl will only boot U-Boot. Signed-off-by: Vikas Manocha <vikas.manocha@st.com> Suggested-by: Bo Shen <voice.shen@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-13stm32f1: remove stm32f1 supportPatrice Chotard8-555/+0
A few years ago STM32F1 SoCs support has been added : 0144caf22ce6acd5c gpio: stm32: add stm32f1 support 2d18ef2364fd3561a ARMv7M: add STM32F1 support But neither STM32F1 dedicated defconfig nor board was associated to these commits. Got confirmation from Tom Rini and Matt Porter to remove all this code [1] [1] http://u-boot.10912.n7.nabble.com/Remove-STM32F1-support-td301603.html Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-13stm32: remove redundant 'else if'xypron.glpk@gmx.de1-1/+1
The if in the else branch is superfluous. We can use a simple if. The problem was indicated by cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2017-08-05stmf32f4: soc: fix buildman compilation errorPatrice Chotard1-1/+3
fix the following compilation error reported by buidlman: arm: + stm32f429-discovery +arch/arm/mach-stm32/stm32f4/soc.c: In function 'arch_cpu_init': +arch/arm/mach-stm32/stm32f4/soc.c:30:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode + for (int i = 0; i < ARRAY_SIZE(stm32_region_config); i++) + ^ +arch/arm/mach-stm32/stm32f4/soc.c:30:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code +make[3]: *** [arch/arm/mach-stm32/stm32f4/soc.o] Error 1 +make[2]: *** [arch/arm/mach-stm32/stm32f4] Error 2 +make[1]: *** [arch/arm/mach-stm32] Error 2 +make: *** [sub-make] Error 2 Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Vikas Manocha <vikas.manocha@st.com>
2017-07-06stm32: Correct positioning of declarationSimon Glass1-1/+3
The current code gives a warning: arch/arm/mach-stm32/stm32f7/soc.c: In function 'arch_cpu_init': arch/arm/mach-stm32/stm32f7/soc.c:38:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode for (int i = 0; i < ARRAY_SIZE(stm32_region_config); i++) ^ arch/arm/mach-stm32/stm32f7/soc.c:38:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code Fix it by moving the declaration to the top of the function. Signed-off-by: Simon Glass <sjg@chromium.org> Series-cc trini
2017-06-09spl: stm32f7: configure for xip bootingVikas Manocha1-0/+1
With xip booting configuration, we don't need to copy the next image (U-Boot or linux xipimage) from flash to sdram area. Flash memory organization is like this: spl-U-Boot: u-boot-spl.bin : 0x0800_0000 U-Boot : u-boot-dtb.bin : 0x0800_8000 linux : xipImage : 0x0800_8000 It is also possible to have U-Boot binary & linux binaries configured at different addresses of flash memory like U-Boot at 0x0800_8000 & linux xipImage at 0x0800_4000. But in any case, spl-U-Boot needs to be compiled for U-Boot as next binary with SPL_OS_BOOT option disabled. By default, spl is configured to boot linux xipImage. Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2017-06-09spl: stm32f7: add kernel boot supportVikas Manocha1-0/+1
Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2017-06-09stm32: stm32f7: add spl build supportVikas Manocha1-0/+17
This commit supports booting from stm32 internal nor flash. spl U-Boot initializes the sdram memory, copies next image (e.g. standard U-Boot) to sdram & then jumps to entry point. Here are the flash memory addresses for U-Boot-spl & standard U-Boot: - spl U-Boot : 0x0800_0000 - standard U-Boot : 0x0800_8000 To compile u-boot without spl: Remove SUPPORT_SPL configuration (arch/arm/mach-stm32/Kconfig) Signed-off-by: Vikas Manocha <vikas.manocha@st.com> [trini: Rework Kconfig logic a bit] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-12stm32f7: configure mpu valid for f7 familyVikas Manocha1-3/+12
This configuration should be valid for all F7 family devices in general. Here is the regions info: - Region0 : 4GB : cacheable & executable. - Region1 : 512MB : text area : strogly ordered & executable. - Region2 : 512MB : peripherals : device memory & non-executable. - Region3 : 512MB : peripherals : device memory & non-executable. - Region4 : 512MB : cortexM area: strongly ordered & non-executable. Higher region number overrides the lower region configuration. Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2017-05-12stm32: use armv7m MPU configuration supportVikas Manocha2-58/+22
Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2017-04-08stm32f7: enable instruction & data cacheVikas Manocha1-0/+2
It also enables commands for cache enable/disable/status. Signed-off-by: Vikas Manocha <vikas.manocha@st.com> cc: Christophe KERELLO <christophe.kerello@st.com>
2017-03-17clk: stm32f7: add clock driver for stm32f7 familyVikas Manocha3-278/+1
add basic clock driver support for stm32f7 to enable clocks required by the peripherals. Signed-off-by: Vikas Manocha <vikas.manocha@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-01-28ARM: SPI: stm32: add stm32f746 qspi driverMichael Kurz1-0/+3
This patch adds support for the QSPI IP found in stm32f7 devices. Signed-off-by: Michael Kurz <michi.kurz@gmail.com>
2017-01-28net: stm32: add designware mac glue code for stm32Michael Kurz1-0/+5
This patch adds glue code required for enabling the designware mac on stm32f7 devices. Signed-off-by: Michael Kurz <michi.kurz@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-01-28ARM: stm32: use clock setup function defined in clock.cMichael Kurz2-2/+11
Use the clock setup function defined in clock.c instead of setting the clock bits directly in the drivers. Remove register definitions of RCC in rcc.h as these are already defined in the struct in stm32.h Signed-off-by: Michael Kurz <michi.kurz@gmail.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-01-28ARM: stm32: cleanup stm32f7 filesMichael Kurz1-90/+64
Cleanup stm32f7 files: - use BIT macro - use GENMASK macro - use rcc struct instead of macro additions Add missing stm32f7 register in rcc struct Signed-off-by: Michael Kurz <michi.kurz@gmail.com> Acked-by: Vikas MANOCHA<vikas.manocha@st.com>
2016-07-21Revert "stm32: Change USART port to USART6 for stm32f746 discovery board"Tom Rini1-3/+0
Per Vikas' request, the problem this commit is supposed to be solving is something he doesn't see and further this introduces additional hardware requirements. This reverts commit 4b2fd720a7b2f78c42d1565edf4c67f378c65440. Signed-off-by: Tom Rini <trini@konsulko.com>
2016-07-15stm32: Change USART port to USART6 for stm32f746 discovery boardToshifumi NISHINAGA1-0/+3
This change is to remove a halt at about 200KiB while sending a large(1MiB) binary to a micro controller using USART1. USART1 is connected to a PC via an on-board ST-Link debugger that also functions as a USB-Serial converter. However, it seems to loss some data occasionally. So I changed the serial port to USART6 and connected it to the PC using an FTDI USB-Serial cable, therefore the transmission was successfully completed. Signed-off-by: Toshifumi NISHINAGA <tnishinaga.dev@gmail.com>
2016-07-15stm32: Add SDRAM support for stm32f746 discovery boardToshifumi NISHINAGA1-0/+49
This patch adds SDRAM support for stm32f746 discovery board. This patch depends on previous patch. This patch is based on STM32F4 and emcraft's[1]. [1]: https://github.com/EmcraftSystems/u-boot Signed-off-by: Toshifumi NISHINAGA <tnishinaga.dev@gmail.com>
2016-07-15stm32: clk: Add 200MHz clock configuration for stm32f746 discovery boardToshifumi NISHINAGA3-1/+256
This patch adds 200MHz clock configuration for stm32f746 discovery board. This patch is based on STM32F4 and emcraft's[1]. [1]: https://github.com/EmcraftSystems/u-boot Signed-off-by: Toshifumi NISHINAGA <tnishinaga.dev@gmail.com>
2016-03-27stm32: stm32f4: move flash driver to mtd driver locationVikas Manocha3-156/+2
Same flash driver can be used by other stm32 families like stm32f7. Better place for this driver would be mtd driver location. Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2016-02-25stm32: add support for stm32f7 & stm32f746 discovery boardVikas Manocha6-0/+189
This patch adds support for stm32f7 family & stm32f746 board. Signed-off-by: Vikas Manocha <vikas.manocha@st.com>