summaryrefslogtreecommitdiff
path: root/board/st
AgeCommit message (Collapse)AuthorFilesLines
2023-06-16board: st: remove board_mtdparts_defaultPatrick Delaunay3-244/+0
Remove the function board_mtdparts_default and the associated file or configs, only used by the CONFIG_SYS_MTDPARTS_RUNTIME now removed. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-06-16board: stm32mp1: use fdt_copy_fixed_partitionsPatrick Delaunay1-15/+1
Copy the fixed partition nodes from U-Boot device tree to Linux kernel device tree to dynamically configure the MTD partitions. fdt_copy_fixed_partitions is only based on device tree and replace the function fdt_fixup_mtdparts based on mtdparts variable; the variable mtdid and mtdparts are not more required. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-06-08efi_loader: add the number of image entries in efi_capsule_update_infoMasahisa Kojima1-1/+1
The number of image array entries global variable is required to support EFI capsule update. This information is exposed as a num_image_type_guids variable, but this information should be included in the efi_capsule_update_info structure. This commit adds the num_images member in the efi_capsule_update_info structure. All board files supporting EFI capsule update are updated. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-04-19stm32mp: fix various array bounds checksRasmus Villemoes1-1/+1
In all these cases, the index on the LHS is immediately afterwards used to access the array appearing in the ARRAY_SIZE() on the RHS - so if that index is equal to the array size, we'll access one-past-the-end of the array. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-02-10Correct SPL uses of MTDSimon Glass1-1/+1
This converts 2 usages of this option to the non-SPL form, since there is no SPL_MTD defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL use of FDT_SIMPLEFBSimon Glass1-1/+1
This converts 1 usage of this option to the non-SPL form, since there is no SPL_FDT_SIMPLEFB defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL uses of ENV_IS_IN_UBISimon Glass1-1/+1
This converts 2 usages of this option to the non-SPL form, since there is no SPL_ENV_IS_IN_UBI defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL uses of EFI_HAVE_CAPSULE_SUPPORTSimon Glass1-2/+2
This converts 13 usages of this option to the non-SPL form, since there is no SPL_EFI_HAVE_CAPSULE_SUPPORT defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL use of CMD_STM32PROGSimon Glass1-1/+1
This converts 1 usage of this option to the non-SPL form, since there is no SPL_CMD_STM32PROG defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL use of CMD_STBOARDSimon Glass1-1/+1
This converts 1 usage of this option to the non-SPL form, since there is no SPL_CMD_STBOARD defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-12board: st: Add support of STM32MP13x boards in stm32board cmdPatrick Delaunay2-4/+5
Add board identifiers for STMicroelectronics STM32MP13x boards: - DISCO board: MB1635 Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-12stm32mp: Add OP-TEE support in bsec driverPatrick Delaunay1-2/+3
When OP-TEE is used, the SMC for BSEC management are not available and the STM32MP BSEC pseudo TA must be used (it is mandatory for STM32MP13 and it is a new feature for STM32MP15x). The BSEC driver try to open a session to this PTA BSEC at probe and use it for OTP read or write access to fuse or to shadow. This patch also adapts the commands stm32key and stboard to handle the BSEC_LOCK_PERM lock value instead of 1. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-10-31FWU: STM32MP1: Add support to read boot index from backup registerSughosh Ganu1-0/+21
The FWU Multi Bank Update feature allows the platform to boot the firmware images from one of the partitions(banks). The first stage bootloader(fsbl) passes the value of the boot index, i.e. the bank from which the firmware images were booted from to U-Boot. On the STM32MP157C-DK2 board, this value is passed through one of the SoC's backup register. Add a function to read the boot index value from the backup register. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
2022-10-31stm32mp1: Add image information for capsule updatesSughosh Ganu1-0/+18
Enabling capsule update functionality on the platform requires populating information on the images that are to be updated using the functionality. Do so for the DK2 board. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
2022-10-30video: Drop use of the lcd header fileSimon Glass1-1/+0
This file is being removed so drop remaining references to it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-18stm32mp: fix compilation issue with DEBUG_UARTPatrick Delaunay3-28/+31
Fix the compilation issue when CONFIG_DEBUG_UART is activated drivers/serial/serial_stm32.o: in function `debug_uart_init': drivers/serial/serial_stm32.c:291: undefined reference to \ `board_debug_uart_init' The board_debug_uart_init is needed for SPL boot, called in cpu.c::mach_cpu_init(); it is defined in board/st/stm32mp1/spl.c. But with the removal #ifdefs patch, the function debug_uart_init() is always compiled even if not present in the final U-Boot image. This patch adds a file to provided this function when DEBUG_UART and SPL are activated. Fixes: c8b2eef52b6c ("stm32mp15: tidy up #ifdefs in cpu.c") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-09-27Merge tag 'u-boot-stm32-20220927' of ↵Tom Rini1-2/+2
https://source.denx.de/u-boot/custodians/u-boot-stm into next - Increase SYS_MALLOC_F_LEN for STM32 MCU's board - SPL fixes for STM32F7 MCUs - Device tree alignement with kernelv6.0-rc4 for MCU's board - Device tree alignement with kernelv6.0-rc3 for MPU's board - Update DDR node for STM32MP15 - Cleanup config file for STM32MP1 - Update for cmd_stm32key command - Fix compatible string to add partitions for STM32MP1 - Update for stm32programmer tool
2022-09-25blk: Rename if_type to uclass_idSimon Glass1-1/+1
Use the word 'uclass' instead of 'if_type' to complete the conversion. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-23board: st: stm32mp1: use of correct compatible string to add partitionsChristophe Kerello1-2/+2
Current compatible string used to update SPI NAND and SPI NOR devices can lead to a wrong partitions update (for example, SPI NAND partitions added to SPI NOR node in the device tree). To avoid this wrong behavior, use jedec,spi-nor compatible string for SPI NOR devices and spi-nand compatible string for SPI NAND devices. Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-09-19Merge branch 'master' into nextTom Rini1-6/+2
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-09-18cyclic: Use schedule() instead of WATCHDOG_RESET()Stefan Roese1-1/+1
Globally replace all occurances of WATCHDOG_RESET() with schedule(), which handles the HW_WATCHDOG functionality and the cyclic infrastructure. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
2022-09-06board: stm32mp1: remove test on CONFIG_DM_REGULATORPatrick Delaunay1-6/+2
The tests on CONFIG_DM_REGULATOR, added to avoid compilation issues, can now be removed, they are no more needed since the commit 16cc5ad0b439 ("power: regulator: add dummy helper"). Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-06-17stm32mp: stpmic1: remove the debug unit request by debuggerPatrick Delaunay1-14/+0
Depending on backup register value, U-Boot SPL maintains the debug unit powered-on for debugging purpose; only BUCK1 is required for powering the debug unit, so revert the setting for all the other power lanes, except BUCK3 that has to be always on. To be functional this patch requires a modification in the debugger ,openocd for example, to update the STM32MP15 backup register when it is required to debug SPL after reset. After deeper analysis this behavior will be never supported in tools so the associated code, will be never used and the associated code can be removed. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-06-17board: stm32mp1: convert to livetreePatrick Delaunay1-9/+4
Replace gd->fdt_blob access with fdt_getprop() function to the function ofnode_get_property() to support a live tree. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-06-17configs: add stm32mp13 defconfigPatrick Delaunay1-0/+1
Add a initial config for STM32M13x SOC family, using the stm32mp135f-dk device tree. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-06-17board: stm32pm1: add stm32mp13 board supportPatrick Delaunay1-9/+9
Add stm32mp15x prefix to all STM32MP15x board specific functions, this patch is a preliminary step for STM32MP13x support. This patch also adds the RCC probe to avoid circular access with usbphyc probe as clk provider. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-06-17arm: stm32mp: add support of STM32MP13xPatrick Delaunay2-0/+17
Introduce the code in mach-stm32mp and the configuration file stm32mp13_defconfig for the new STM32MP family. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-06-17ARM: dts: stm32: add STM32MP13 SoCs supportPatrick Delaunay1-0/+1
Add initial support of STM32MP13 family based on v5.18-rc2 Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-05-10doc: Add documentation for STM32 MCUsPatrice Chotard7-0/+7
Add documentation for STM32 MCUs (F4, F7 and H7 series). Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10configs: stm32746g-eval: Add stm32746g-eval_spl_defconfigPatrice Chotard1-0/+1
Add stm32746g-eval_spl_defconfig for stm32746g evaluation board to build SPL. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10configs: stm32746g-eval: Add stm32746g-eval_defconfigPatrice Chotard1-0/+1
Add stm32746g-eval_defconfig for stm32746g evaluation board to build U-Boot proper. Full board description can be found here : https://www.st.com/en/evaluation-tools/stm32746g-eval.html Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10board: stm32f746-disco: Fix dram_init() in none SPL configPatrice Chotard1-1/+1
Replace CONFIG_SUPPORT_SPL by CONFIG_SPL_BUILD to allow dram_init() execution when using none SPL defconfig (stm32f746-disco_defconfig). Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10configs: stm32f769-disco: Rename stm32f769-disco_defconfig to ↵Patrice Chotard1-0/+1
stm32f769-disco_spl_defconfig The current stm32f769-disco_defconfig file supports SPL, rename it to stm32f769-disco_spl_defconfig to reflect the supported configuration. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10configs: stm32f746-disco: Rename stm32f746-disco_defconfig to ↵Patrice Chotard1-0/+1
stm32f746-disco_spl_defconfig The current stm32f746-disco_defconfig file supports SPL, rename it to stm32f746-disco_spl_defconfig to reflect the supported configuration. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10board: st: stm32mp1: Consider USB cable connected when boot device is USBPatrice Chotard1-0/+7
Always consider USB cable is connected when USB boot device is detected. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-05-10board: st: common: fix the error messages in stboard commandPatrick Delaunay1-2/+2
Add missing \n at the end of the error trace Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-04-28led: Drop led_default_state()Marek Vasut1-3/+0
This function is empty, drop it. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Cc: Sean Anderson <seanga2@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Steven Lawrance <steven.lawrance@softathome.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-04-15Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-netTom Rini1-8/+5
- DM9000 DM support - tftp server bug fix - mdio ofnode support functions - Various phy fixes and improvements. [trini: Fixup merge conflicts in drivers/net/phy/ethernet_id.c drivers/net/phy/phy.c include/phy.h]
2022-04-10net: introduce helpers to get PHY interface mode from a device/ofnodeMarek Behún1-8/+5
Add helpers ofnode_read_phy_mode() and dev_read_phy_mode() to parse the "phy-mode" / "phy-connection-type" property. Add corresponding UT test. Use them treewide. This allows us to inline the phy_get_interface_by_name() into ofnode_read_phy_mode(), since the former is not used anymore. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-04-08stm32f429-discovery: Migrate CONFIG_*_LED out of CONFIG namespaceTom Rini1-8/+11
These values are only used in one file, reference them more directly. Cc: Kamil Lulko <kamil.lulko@gmail.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: uboot-stm32@st-md-mailman.stormreply.com Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-03-15board: st: common: update test on misc_read result in command stboardPatrick Delaunay1-4/+4
Update management of misc_read/misc_write, which now returns length of data after the commit 8729b1ae2cbd ("misc: Update read() and write() methods to return bytes xfered"): raise a error when the result is not the expected length. Fixes: 658fde8a36ff ("board: stm32mp1: stboard: lock the OTP after programming") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-01-24board: stm32mp1: solve compilation issue when ENV_IS_IN_MMC is deactivatedPatrick Delaunay1-2/+4
Solve compilation issue on undefined CONFIG_SYS_MMC_ENV_DEV when CONFIG_ENV_IS_IN_MMC is deactivated on STMicroelectronics boards defconfig Fixes: 9f97193616f1 ("board: stm32mp1: use CONFIG_SYS_MMC_ENV_DEV when available") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-01-24stm32mp: fix board_get_alt_info_mmc()Heinrich Schuchardt1-1/+1
MAX_SEARCH_PARTITIONS is the highest possible partition number. Do not skip the last partition in board_get_alt_info_mmc(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-11-30board: stm32mp1: add support of nor1 device in dfu commandPatrick Delaunay1-0/+4
Add support of mtd backend for nor1 when this device is present on the board, on STM32MP157C-EV1 for example, as the support of several MTD spi-nor instance are now supported with commit b7f060565e31 ("mtd: spi-nor: allow registering multiple MTDs when DM is enabled"). Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-11-30board: stm32mp1: enable simple framebuffer node for splashscreenPatrick Delaunay1-0/+4
Enable an existing simple framebuffer node in the Linux kernel device tree and the add the associated reserved memory node to preserved the resources (clock, memory) used by the stm32 video driver to display the splashscreen = background in exlinux.conf file. These resources will be released by the Linux driver only when the associated driver is ready to avoid transition issues during the Linux kernel initialization between U-Boot splash screen and the final display. See Linux documentation for details: Documentation/devicetree/bindings/display/simple-framebuffer.yaml Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-11-10stm32mp15: replace CONFIG_TFABOOT when it is possiblePatrick Delaunay1-1/+5
In some part of STM32MP15 support the CONFIG_TFABOOT can be replaced by other config: CONFIG_ARMV7_PSCI and CONFIG_ARM_SMCCC. This patch also simplifies the code in cpu.c, stm32mp1_ram.c and clk_stml32mp1.c as execution of U-Boot in sysram (boot without SPL and without TFA) is not supported: the associated initialization code is present only in SPL. This cleanup patch is a preliminary step to support SPL load of OP-TEE in secure world, with SPL in secure world and U-Boot in no-secure world. Reported-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-11-10gpio: stm32: create include file for driver private dataPatrick Delaunay1-1/+0
The stm32 gpio driver private data are not needed in arch include files, they are not used by code except for stm32 gpio and pincontrol drivers, using the same IP; the defines for this IP is moved in a new file "stm32_gpio_priv.h" in driver/gpio. This patch avoids to have duplicated file gpio.h for each SOC in MPU directory mach-stm32mp and in each MCU directory arch-stm32* and allows to remove CONFIG_GPIO_EXTRA_HEADER for all STM32. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-11-10board: stmp32mp1: split board and SOC STM32MP15 configurationPatrick Delaunay2-2/+3
Add a configuration file "stm32mp15_st_common.h" to handle the STMicroelectronics boards configuration and rename stm32mp1.h to "stm32mp15_common.h" to handle the generic STM32MP15x series configuration. The configuration file "dh_stm32mp1.h" is also renamed to "stm32mp15_dh_dhcom" for the configuration of board based on the dhelectronics STM32MP15x SOM. In the STMicroelectronics board configuration the default bootcmd "bootcmd_stm32mp" is updated to only select the extlinux file found on SD-Card on STM32MP15x EV1 for boot from NOR device. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-10-12Merge tag 'u-boot-stm32-20211012' of ↵Tom Rini8-17/+0
https://source.denx.de/u-boot/custodians/u-boot-stm - Disable ATAGS for STM32 MCU and MPU boards - Disable bi_boot_params for STM32 MCU and MPU boards - Update stm32-usbphyc node management - Convert CONFIG_STM32_FLASH to Kconfig for STM32 MCU boards - Convert some USB config flags to Kconfig for various boards - Convert CONFIG_BOOTCOMMAND flag to Kconfig for STM32 F429 board - Remove specific CONFIG_STV0991 flags - Remove unused CONFIG_USER_LOWLEVEL_INIT flag - Add ofdata_to_platdata() callback for stm32_spi driver - Update for stm32f7_i2c driver - Remove gpio_hog_probe_all() from STM32 MP1 board - Fix bind command Signed-off-by: Tom Rini <trini@konsulko.com>
2021-10-08board: stm32mp1: Remove gpio_hog_probe_all() from boardPatrice Chotard1-3/+0
DM_GPIO_HOG flag has been replaced by GPIO_HOG flag since a while in commit 49b10cb49262 ("gpio: fixes for gpio-hog support"). And furthermore, gpio_hog_probe_all() is already called in board_r.c. So gpio_hog_probe() can be removed from stm32mp1.c. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>