summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-19rockchip: Only call binman when TPL availableKever Yang
Rockchip platform use TPL to do the DRAM initialize for all the SoCs, if TPL is not available, means no available DRAM init program, and the u-boot-rockchip.bin is not functionable. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Change-Id: I2299f1eddce5aa7d5fb1a3fb4d8aeaa995b397fa
2022-12-15Merge https://source.denx.de/u-boot/custodians/u-boot-x86Tom Rini
- Adjust CONFIG_TEXT_BASE for BayTrail based platforms - 2 cosmetic issue fixes
2022-12-14x86: cosmetic: Fix a typo in the reserve_arch() commentsBin Meng
It should be fsp_continue(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-14x86: som-db5800-som-6867: Adjust CONFIG_TEXT_BASEBin Meng
At present U-Boot no longer builds as a complete rom for som-db5800-som-6867. BINMAN .binman_stamp Wrote map file './rom.map' to show errors binman: Section '/binman/rom': contents size 0x80302c (8400940) exceeds section size 0x800000 (8388608) Checking rom.map we see 'intel-vga' section is overlapped with other sections: <none> fff00000 0009f7c8 u-boot-with-ucode-ptr <none> fff90000 00010000 intel-vga <none> fff9f7c8 00001aae u-boot-dtb-with-ucode Let's adjust CONFIG_TEXT_BASE to allow more space for U-Boot codes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2022-12-14x86: dfi-bt700: Adjust CONFIG_TEXT_BASEBin Meng
At present U-Boot no longer builds as a complete rom for all the configs of dfi-bt700. BINMAN .binman_stamp Wrote map file './rom.map' to show errors binman: Section '/binman/rom': contents size 0x80e836 (8448054) exceeds section size 0x800000 (8388608) Checking rom.map we see 'intel-vga' section is overlapped with other sections: <none> fff00000 000aac90 u-boot-with-ucode-ptr <none> fffa0000 00010000 intel-vga <none> fffaac90 00001df0 u-boot-dtb-with-ucode <none> fffaca80 00019800 u-boot-ucode Let's adjust CONFIG_TEXT_BASE to allow more space for U-Boot codes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-12-14x86: conga-qeval20-qa3-e3845: Adjust CONFIG_TEXT_BASEBin Meng
At present U-Boot no longer builds as a complete rom for all the configs of conga-qeval20-qa3-e3845. BINMAN .binman_stamp Wrote map file './rom.map' to show errors binman: Section '/binman/rom': contents size 0x80b680 (8435328) exceeds section size 0x800000 (8388608) Checking rom.map we see 'intel-vga' section is overlapped with other sections: <none> fff00000 000a7cb0 u-boot-with-ucode-ptr <none> fffa0000 00010000 intel-vga <none> fffa7cb0 00001c1a u-boot-dtb-with-ucode <none> fffa98d0 00019800 u-boot-ucode Let's adjust CONFIG_TEXT_BASE to allow more space for U-Boot codes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2022-12-14x86: minnowmax: Adjust CONFIG_TEXT_BASEBin Meng
At present U-Boot no longer builds as a complete rom for minnowmax. BINMAN .binman_stamp Wrote map file './rom.map' to show errors binman: Section '/binman/rom': contents size 0x803146 (8401222) exceeds section size 0x800000 (8388608) Checking rom.map we see 'fdtmap' section is overlapped with 'intel-vga' section: <none> fffa1390 00019800 u-boot-ucode <none> fffb0000 00010000 intel-vga <none> fffbab90 00000539 fdtmap Let's adjust CONFIG_TEXT_BASE to allow more space for U-Boot codes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-14x86: bayleybay: Adjust CONFIG_TEXT_BASEBin Meng
At present U-Boot no longer builds as a complete rom for bayleybay. BINMAN .binman_stamp Wrote map file './rom.map' to show errors binman: Section '/binman/rom': contents size 0x814706 (8472326) exceeds section size 0x800000 (8388608) Checking rom.map we see 'fdtmap' section is overlapped with 'intel-vga' and 'intel-fsp' sections: <none> fffa2150 0002a000 u-boot-ucode <none> fffb0000 00010000 intel-vga <none> fffc0000 00038000 intel-fsp <none> fffcc150 00000539 fdtmap Let's adjust CONFIG_TEXT_BASE to allow more space for U-Boot codes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2022-12-14x86: Fix i8259 ifdef include guardAlistair Delva
When building U-Boot with clang, it notices that the i8259.h include guard does not work correctly due to a typo. Fix it. Signed-off-by: Alistair Delva <adelva@google.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2022-12-13Revert "cmd: pxe_utils: Check fdtcontroladdr in label_boot"Tom Rini
With the change here, all extlinux.conf files with only "KERNEL /fitImage" don't work anymore. One common example of this would be those files generated by thee Poky/OE WIC bootimg-partition bootloader partition generator. This reverts commit d5ba6188dfbf6bb68354bec86e483623f1f6dae2. Reported-by: Neil Armstrong <neil.armstrong@linaro.org> Reported-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-12Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini
- mvebu: Espressobin: Fix default env variables (Derek)
2022-12-12Merge tag 'u-boot-stm32-20221212' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-stm phy: usbphyc: use regulator_set_enable_if_allowed for disabling vbus supply dm: pmic: ignore disabled node in pmic_bind_children
2022-12-12dm: pmic: ignore disabled node in pmic_bind_childrenPatrick Delaunay
Ignore the disabled children node in pmic_bind_children() so the disabled regulators in device tree are not registered. This patch is based on the dm_scan_fdt_node() code - only the activated nodes are bound - and it solves possible issue when a deactivated regulator is bound, error for duplicated regulator name for example. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-12phy: usbphyc: use regulator_set_enable_if_allowed for disabling vbus supplyPatrick Delaunay
Use regulator_set_enable_if_allowed() api instead of regulator_set_enable() while disabling vbus supply. This way the driver doesn't see an error when it disable an always-on regulator for VBUS. This patch is needed for STM32MP157C-DK2 board when the regulator v3v3: buck4 used as the phy vbus supply in kernel device tree is always on with the next hack for low power use-case: &usbphyc_port0 { ... /* * Hack to keep hub active until all connected devices are suspended * otherwise the hub will be powered off as soon as the v3v3 is disabled * and it can disturb connected devices. */ connector { compatible = "usb-a-connector"; vbus-supply = <&v3v3>; }; }; Without this patch and the previous update in DT the command "usb stop" failed and the next command "usb start" cause a crash. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Marek Vasut <marex@denx.de>
2022-12-12arm: mvebu: Espressobin: Fix default env variablesDerek LaHousse
Default env variables on Espressobin boards are broken since commit c4df0f6f315c ("arm: mvebu: Espressobin: Set default value for $fdtfile env variable") as well as the 'env default -a' command. The algorithm to find free space in the default_environment[] array returns after the first env variable instead of the correct position of the last variable, where there is allocated free space. This causes that U-Boot board_late_init() function to overwrite a portion of the default environment with $ethXaddr and $fdtfile variables immediately after the first env variable and so it is overwriting other variables. This patch also adds an additional null byte to terminate the environment array. But U-Boot board_late_init() function do not fill this nul byte explicitly. And because of that, U-Boot is later trying to interpret remaining buffer as a continuation of variable list. Normally buffer should be empty but due to the above issue, it contains garbage from remaining env variables. For example 'env default -a' command results in damaging variable names. It was observed that scritaddr variable name was changed to criptaddr (without leading 's'). This bug was reported and discussed on the Armbian forum: https://forum.armbian.com/topic/19564-making-espressobin-v7-work-in-2022/?do=findComment&comment=138136 Fix these issues in two steps: 1) Change code which finds free space for dynamic env variables in default_environment[] array by jumping to the end of the variable list instead of jumping after the first defined variable. [By Derek] 2) Add code which appends terminating nul byte as indication of the end of the env list, after the last nul term env string. [By Pali] Fixes: c4df0f6f315c ("arm: mvebu: Espressobin: Set default value for $fdtfile env variable") Signed-off-by: Derek LaHousse <derek@seaofdirac.org> Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Stefan Roese <sr@denx.de>
2022-12-11Merge tag 'u-boot-nand-20221211' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-nand-flash Merge tag 'u-boot-nand-20221211' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash - cmd: nand: Extend nand info to print ecc information - rawnand: omap_gpmc: driver model support (the first patches of the series) - mtd: nand: make Samsung SLC NAND usable again - cmd: mtd: check if a block has to be skipped or erased - spl: spl_legacy: fix invalid offset in SPL_COPY_PAYLOAD_ONLY
2022-12-10spl: spl_legacy: fix invalid offset in SPL_COPY_PAYLOAD_ONLYDai Okamura
This fixes the header offset calculation. This issue was found on uniphier v7 SoCs with SPL. Fixes: 06377c5a1f ("spl: spl_legacy: Fix NAND boot on OMAP3 BeagleBoard") Signed-off-by: Dai Okamura <okamura.dai@socionext.com> Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com> Acked-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221209114021.3074978-1-okamura.dai@socionext.com Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: nand: mxs_nand_spl: don't read useless pagesDario Binacchi
The patch prevents pages beyond the last from being unnecessarily read. This occurs when the last page to be read is not the last page of the last block. Before this change we would have read all the pages up to the end of the last block. Suggested-by: Michael Trimarchi <michael@amarulasolutions.com> Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Acked-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221120095705.3019295-1-dario.binacchi@amarulasolutions.com
2022-12-10mtd: nand: drop EXPORT_SYMBOL_GPL for nanddev_erase()Dario Binacchi
This function is only used within this module, so it is no longer necessary to use EXPORT_SYMBOL_GPL(). This patch parallels the work done in the following patch: https://lore.kernel.org/linux-mtd/20221018170205.1733958-1-dario.binacchi@amarulasolutions.com Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221108090719.3631621-1-dario.binacchi@amarulasolutions.com
2022-12-10cmd: mtd: check if a block has to be skipped or erasedDario Binacchi
As reported by patch [1], the `mtd erase' command should not erase bad blocks. To force bad block erasing you have to use the `mtd erase.dontskipbad' command. This patch tries to fix the same issue without modifying code taken from the linux kernel, in order to make further upgrades easier. [1] https://lore.kernel.org/all/20221006031501.110290-2-mikhail.kshevetskiy@iopsys.eu/ Suggested-by: Michael Trimarchi <michael@amarulasolutions.com> Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Co-developed-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Tested-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: nand: make Samsung SLC NAND usable againMichael Trimarchi
Upstream linux commit 69fc01296c9281 commit a1286a1fc416 ("mtd: nand: Move Samsung specific init/detection logic in nand_samsung.c") introduced a regression for Samsung SLC NAND chips. Prior to this commit chip->bits_per_cell was initialized by calling nand_get_bits_per_cell() before using nand_is_slc(). With the offending commit this call is skipped, leaving chip->bits_per_cell cleared to zero when the manufacturer specific '.detect' function calls nand_is_slc() which in turn interprets bits_per_cell != 1 as indication for an MLC chip. The effect is that e.g. a K9F1G08U0F NAND chip is falsely detected as MLC NAND with 4KiB page size rather than SLC with 2KiB page size. Add a call to nand_get_bits_per_cell() before calling the .detect hook function in nand_manufacturer_detect(), so that the nand_is_slc() calls in the manufacturer specific code will return correct results. Reported-by: Marcin Gołaś <marcingol30@gmail.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://lore.kernel.org/all/20221021060536.11747-1-michael@amarulasolutions.com Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: rawnand: omap_gpmc: Reduce .bss usageRoger Quadros
Allocate omap_ecclayout on the heap as we have limited .bss space on AM64 R5 SPL configuration. Reduces .bss usage by 2984 bytes. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221011115012.6181-9-rogerq@kernel.org Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: rawnand: nand_spl_loaders: Fix cast type build warningRoger Quadros
Fixes the below build warning on 64-bit platforms. drivers/mtd/nand/raw/nand_spl_loaders.c:26:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] dst = (void *)((int)dst - page_offset); Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221011115012.6181-8-rogerq@kernel.org Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: rawnand: omap_gpmc: Optimize NAND readsRoger Quadros
Rename omap_nand_read() to omap_nand_read_buf() to reflect actual behaviour. Use FIFO read address instead of raw read address for reads. The GPMC automatically converts 32-bit/16-bit reads to NAND device specific reads (8/16 bit). Use the largest possible read granularity size for more efficient reads. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221011115012.6181-5-rogerq@kernel.org Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: rawnand: omap_gpmc: Fix build warning on 64-bit platformsRoger Quadros
Pointer size cannot be assumed to be 32-bit, so use use uintptr_t instead of uint32_t. Fixes the below build warning on 64-bit builds. drivers/mtd/nand/raw/omap_gpmc.c:439:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] head = ((uint32_t) buf) % 4; Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221011115012.6181-4-rogerq@kernel.org Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: rawnand: omap_gpmc: Enable build for K2/K3 platformsRoger Quadros
The GPMC module is present on some K2 and K3 SoCs. Enable building GPMC NAND driver for K2/K3 platforms. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221011115012.6181-3-rogerq@kernel.org Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10mtd: rawnand: omap_gpmc: Deprecate asm/arch/mem.hRoger Quadros
We want to get rid of <asm/arch/mem.h> so don't enforce it for new platforms. This also means GPMC_MAX CS doesn't have to be defined by platform code. Define it locally here for now. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221011115012.6181-2-rogerq@kernel.org Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-10cmd: nand: Extend nand info to print ecc informationMichael Trimarchi
Extract the information about ecc strength and ecc step size from mtd controller. This information is usefull to check if what we think as ecc is what we really configured. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://lore.kernel.org/all/20220922133937.277463-1-michael@amarulasolutions.com Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2022-12-08Merge tag 'u-boot-stm32-20221207' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-stm - Drop MMCI interrupt-names in STM32H743, STM32MP15 and STM322MP13 DT DHSOM: - Enable assorted ST specific commands - Add version variable - Add boot counter STM32MP13: - Add sdmmc cd-gpios for STM32MP135F-DK - Add clock & reset support STM32 ADC: - Split channel init into several routines - Add support of generic channels binding
2022-12-08Merge https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini
- DFU and RNDIS fixes
2022-12-08usb: gadget: rndis: Prevent InformationBufferOffset manipulationSzymon Heidrich
Prevent access to arbitrary memory locations in gen_ndis_set_resp via manipulation of buf->InformationBufferOffset. Original implementation permits manipulation of InformationBufferOffset to exploit OID_GEN_CURRENT_PACKET_FILTER to set arbitrary memory contents within a 32byte offset as the devices packet filter. The packet filter value may be next retrieved using gen_ndis_query_resp so it is possible to extract specific memory regions two bytes a time. The rndis_query_response was not modified as neither the buffer offset nor length passed to gen_ndis_query_resp is used. Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
2022-12-08dfu: Make DFU virtual backend SPL friendlyPatrick Delaunay
Define stub for dfu_*_virt function in SPL, because CONFIG_SPL_DFU_VIRT is not defined. This patch avoids compilation issue in dfu_fill_entity() when CONFIG_SPL_DFU is activated because the dfu_fill_entity_virt() function is not available. Fixes: ec44cace4b8d2 ("dfu: add DFU virtual backend") Reported-by: Marek Vasut <marex@denx.de> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Marek Vasut <marex@denx.de> Tested-by: Marek Vasut <marex@denx.de>
2022-12-08usb: gadget: dfu: Fix check of transfer directionHugo SIMELIERE
Commit fbce985e28eaca3af82afecc11961aadaf971a7e to fix CVE-2022-2347 blocks DFU usb requests. The verification of the transfer direction was done by an equality but it is a bit mask. Signed-off-by: Hugo SIMELIERE <hsimeliere.opensource@witekio.com> Reviewed-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Sultan Qasim Khan <sultan.qasimkhan@nccgroup.com> Reviewed-by: Marek Vasut <marex@denx.de> Tested-by: Marek Vasut <marex@denx.de>
2022-12-08Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini
- Kautuk's semihosting patch: move semihosting library from arm directory to common place and add RISC-V support - Zong's Kconfig patch: use "imply" instead of "select" to allow user to decide if SPL_SEPARATE_BSS should be selected
2022-12-08Merge tag 'u-boot-at91-fixes-2023.01-b' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-at91 Second set of u-boot-at91 fixes for the 2023.01 cycle: This is a single tiny fix that allows the correct name for one pin on sama7g5 device. People with DT coming from Linux will have build errors without this if they add NAND device.
2022-12-08riscv: use imply instead of select for SPL_SEPARATE_BSSZong Li
Use imply instead of select, then it can still be disabled by board-specific defconfig, or be set to n manually. Signed-off-by: Zong Li <zong.li@sifive.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Bin Meng <bmeng@tinylab.org>
2022-12-08common/spl/Kconfig: add dependency on SPL_SEMIHOSTING for SPL payloadKautuk Consul
When we enable CONFIG_SPL and CONFIG_SPL_SEMIHOSTING then the code in common/spl/spl_semihosting.c tries to use the CONFIG_SPL_FS_LOAD_PAYLOAD_NAME string which remains undeclared unless SPL_FS_EXT4 || SPL_FS_FAT || SPL_FS_SQUASHFS are configured. Add a dependency of SPL_SEMIHOSTING in the depends for SPL_FS_LOAD_PAYLOAD_NAME so that the code compiles fine. Signed-off-by: Kautuk Consul <kconsul@ventanamicro.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-12-08arch/riscv: add semihosting support for RISC-VKautuk Consul
We add RISC-V semihosting based serial console for JTAG based early debugging. The RISC-V semihosting specification is available at: https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc Signed-off-by: Anup Patel <apatel@ventanamicro.com> Signed-off-by: Kautuk Consul <kconsul@ventanamicro.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-12-08lib: Add common semihosting libraryKautuk Consul
We factor out the arch-independent parts of the ARM semihosting implementation as a common library so that it can be shared with RISC-V. Signed-off-by: Kautuk Consul <kconsul@ventanamicro.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-12-07ARM: stm32: Increment WDT by default on DHSOMMarek Vasut
Enable watchdog timer on the DHSOM by default, both in U-Boot proper and in SPL. This can be used in combination with boot counter by either SPL or U-Boot proper to boot either copy of system software, e.g. in case of full A/B update strategy. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-12-07ARM: stm32: Increment boot counter in SPL on DHSOMMarek Vasut
Increment the boot counter already in U-Boot SPL instead of incrementing it only later in U-Boot proper. This can be used by SPL to boot either of two U-Boot copies and improve redundancy of software on the platform, e.g. in case of full A/B update strategy. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-12-07ARM: stm32: Enable assorted ST specific commands on DHSOMMarek Vasut
Enable the stm32prog, stm32key, stboard commands on DHSOM. Those can be used e.g. to implement verified boot. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-12-07ARM: stm32: Add version variable to DHSOMMarek Vasut
Enable insertion of version variable into U-Boot environment on DHSOM, to make it possible to check U-Boot version e.g. in U-Boot scripts. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-12-07ARM: stm32: Add boot counter to DHSOMMarek Vasut
Add boot counter to STM32MP15xx DHSOM. This aligns the software with other upstream DHSOM products which already do enable boot counter. The boot counter on STM32MP15xx is placed in the TAMP block TAMP_BKPxR register 19, right past register 17 and 18 used for CM4 resource table and state by the Linux kernel. The TAMP_BKPxR register block is used because its contents survives warm reset, but not cold reset. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-12-07ARM: dts: stm32: Drop MMCI interrupt-namesMarek Vasut
The pl18x MMCI driver does not use the interrupt-names property, the binding document has been updated to recommend this property be unused, remove it. Backport of Marek's Linux patch: https://lore.kernel.org/linux-arm-kernel/20221013221242.218808-3-marex@denx.de/ Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Yann Gautier <yann.gautier@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> Signed-off-by: Yann Gautier <yann.gautier@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-12-07ARM: dts: stm32: add sdmmc cd-gpios for STM32MP135F-DKYann Gautier
On STM32MP135F-DK, the SD card detect GPIO is GPIOH4. Backport of the Linux patch: https://lore.kernel.org/linux-arm-kernel/20220921160334.3227138-1-yann.gautier@foss.st.com/ Signed-off-by: Yann Gautier <yann.gautier@foss.st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-12-07adc: stm32mp15: add support of generic channels bindingOlivier Moysan
Add support of generic IIO channels binding: ./devicetree/bindings/iio/adc/adc.yaml Keep support of st,adc-channels for backward compatibility. Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-12-07adc: stm32mp15: split channel init into several routinesOlivier Moysan
Split stm32_adc_chan_of_init channel initialization function into several routines to increase readability and prepare channel generic binding handling. Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-12-07arm: dts: stm32mp13: add support of RCC driverGabriel Fernandez
Adds support of Clock and Reset drivers for STM32MP13 platform. Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-12-07clk: stm32mp13: introduce STM32MP13 RCC driverGabriel Fernandez
STM32MP13 RCC driver uses Common Clock Framework and also a 'clk-stm32-core' API. Then STM32MPx RCC driver will contain only data configuration (gates, mux, dividers and the way to check security) or some specific clocks. This API will be used by all new other generations of ST Socs. Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Tested-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>