[PATCH] doc: usage: man-page for pinmux command

2021-06-02 Thread Patrick Delaunay
Provide a man-page for the pinmux command. Signed-off-by: Patrick Delaunay --- Dependency with [1] for the option for status: pinmux status [1] cmd: pinmux: support pin name in status command http://patchwork.ozlabs.org/project/uboot/patch/20210521094728.v3.2

[PATCH] doc: usage: man-page for ums command

2021-06-02 Thread Patrick Delaunay
Provide a man-page for the ums command for USB Mass Storage. Signed-off-by: Patrick Delaunay --- doc/usage/index.rst | 1 + doc/usage/ums.rst | 54 + 2 files changed, 55 insertions(+) create mode 100644 doc/usage/ums.rst diff --git a/doc/usage

Re: [PATCH] doc: usage: man-page for ums command

2021-06-04 Thread Patrick DELAUNAY
Hi On 6/2/21 8:06 PM, Heinrich Schuchardt wrote: On 6/2/21 3:52 PM, Patrick Delaunay wrote: Provide a man-page for the ums command for USB Mass Storage. Signed-off-by: Patrick Delaunay ---   doc/usage/index.rst |  1 +   doc/usage/ums.rst   | 54

Re: [PATCH] arm: bootm: wrong lmb region reservation when PRAM is used

2021-06-04 Thread Patrick DELAUNAY
; Patrick Delaunay ; Michal Simek ; . Simon Goldschmidt Cc: u-boot@lists.denx.de Subject: Re: [PATCH] arm: bootm: wrong lmb region reservation when PRAM is used On Fri, Feb 19, 2021 at 09:46:49PM +, Aleksandar Gerasimovski wrote: This is a draft patch to describe the problem and to initiate

[PATCH] board: stm32mp1: correct the property name for eth

2021-06-04 Thread Patrick Delaunay
l binding: linux/Documentation/devicetree/bindings/net/stm32-dwmac.yaml See Linux kernel commit "dt-bindings: net: stmmac: add phys config properties" merged in v5.1-rc1. This patch allow to reuse the kernel device tree directly in U-Boot. Signed-off-by: Patrick Delaunay --- board/d

[PATCH] board: stm32mp1: correct the property name for eth

2021-06-04 Thread Patrick Delaunay
l binding: linux/Documentation/devicetree/bindings/net/stm32-dwmac.yaml See Linux kernel commit "dt-bindings: net: stmmac: add phys config properties" merged in v5.1-rc1. This patch allow to reuse the kernel device tree directly in U-Boot. Signed-off-by: Patrick Delaunay --- board/d

[PATCH v2 2/2] doc: usage: man-page for ums command

2021-06-04 Thread Patrick Delaunay
Provide a man-page for the ums command - USB Mass Storage. Signed-off-by: Patrick Delaunay --- Changes in v2: - clarify description - add reference to and align parameter name - correct information for partition = 0 (expose all partitions) - update dependency doc/usage/index.rst | 1 + doc

[PATCH v2 0/2] doc: usage: man-page for ums command

2021-06-04 Thread Patrick Delaunay
correct information for partition = 0 (expose all partitions) - update dependency Patrick Delaunay (2): cmd: Add dependency for ums command doc: usage: man-page for ums command cmd/Kconfig | 5 +++- doc/usage/index.rst | 1 + doc/usage/ums.rs

[PATCH v2 1/2] cmd: Add dependency for ums command

2021-06-04 Thread Patrick Delaunay
Add the missing dependency for the command ums: - CONFIG_BLK: call of blk_* functions in usb_mass_storage.c - CONFIG_USB_GADGET: required to select CONFIG_USB_FUNCTION_MASS_STORAGE Signed-off-by: Patrick Delaunay --- Changes in v2: - NEW: Add dependency for ums command cmd/Kconfig | 5

Re: [Uboot-stm32] [PATCH] dfu: dfu_mtd: set max_buf_size to erasesize also for NOR devices

2021-06-04 Thread Patrick DELAUNAY
Thanks Patrice, On 4/20/21 12:24 PM, Patrice CHOTARD wrote: Hi Patrick On 3/4/21 5:47 PM, Patrick Delaunay wrote: For NOR devices the logical DFU buffer size is the sector_size, as it is done in dfu_sf.c or in spi/sf_mtd.c (sf_mtd_info.erasesize = flash->sector_size) For NAND the DFU s

Re: [PATCH] arch: cache: cp15: Add mmu_set_region_dcache_behaviour() when SYS_DCACHE_OFF is enable

2021-06-04 Thread Patrick DELAUNAY
(get_cr() & CR_C) != 0; } + +void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size, +enum dcache_option option) +{ + mmu_set_region_dcache_behaviour_phys(start, start, size, option); +} #endif Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [PATCH] arm64: Update memcpy_{from, to}io() helpers

2021-06-04 Thread Patrick DELAUNAY
5daa4..a8806dd295 100644 --- a/include/cpu_func.h +++ b/include/cpu_func.h @@ -59,6 +59,7 @@ int dcache_status(void); void dcache_enable(void); void dcache_disable(void); void mmu_disable(void); +int mmu_status(void); /* arch/$(ARCH)/lib/cache.c */ void enable_caches(void); Reviewed

[RFC PATCH] dfu: handle short frame result of UPLOAD in state_dfu_idle

2021-06-15 Thread Patrick Delaunay
s the control-read operation (go to DFU_STATE_dfuIDLE) when the first UPLOAD response has a short frame as an end of file (EOF) indicator even if it is not explicitly allowed in the DFU specification but this seems logical. [1] https://www.usb.org/sites/default/files/DFU_1.1.pdf Signed-off-by: Pa

[PATCH] configs: stm32mp1: remove splashimage and add fdtoverlay_addr_r

2021-06-28 Thread Patrick Delaunay
ACKGROUND" image found in extlinux.conf to manage splashscreen on stm32mp1 boards. Signed-off-by: Patrick Delaunay --- include/configs/stm32mp1.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h index 440efa1a55..2

[PATCH] stm32mp: stm32prog: fix the content of short help message

2021-06-28 Thread Patrick Delaunay
Reduce the content of short help message for stm32prog command and removed the carriage return to fix the display of 'help' command when this command is activated. Fixes: 954bd1a923a6 ("stm32mp: add the command stm32prog") Signed-off-by: Patrick Delaunay --- arch/arm/mach-s

[PATCH 0/7] stm32mp: cmd_stm32key: updates

2021-06-28 Thread Patrick Delaunay
field of the chip part number. Otherwise the chip will be bricked and could not be used anymore. This command is activated by default on STMicroelectronics evaluation boards but these OTP can also be updated directly by customer application or with Secure Secret Provisioning (SSP). Patrick

[PATCH 1/7] stm32mp: configs: activate the command stm32key only for ST boards

2021-06-28 Thread Patrick Delaunay
This command is used to evaluate the secure boot on stm32mp SOC, it is deactivated by default in real products. We activate this command only in STMicroelectronics defconfig used with the evaluation boards. Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp/Kconfig | 4

[PATCH 2/7] stm32mp: cmd_stm32key: use sub command

2021-06-28 Thread Patrick Delaunay
Simplify parsing the command argument by using the macro U_BOOT_CMD_WITH_SUBCMDS. Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp/cmd_stm32key.c | 55 ++-- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/arch/arm/mach-stm32mp/cmd_stm32key.c b

[PATCH 3/7] stm32mp: cmd_stm32key: handle error in fuse_hash_value

2021-06-28 Thread Patrick Delaunay
Handle errors in fuse_hash_value function. Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp/cmd_stm32key.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-stm32mp/cmd_stm32key.c b/arch/arm/mach-stm32mp/cmd_stm32key.c index

[PATCH 5/7] stm32mp: cmd_stm32key: add get_misc_dev function

2021-06-28 Thread Patrick Delaunay
Add a helper function to access to BSEC misc driver. Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp/cmd_stm32key.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-stm32mp/cmd_stm32key.c b/arch/arm/mach-stm32mp/cmd_stm32key.c

[PATCH 6/7] stm32mp: cmd_stm32key: add read OTP subcommand

2021-06-28 Thread Patrick Delaunay
Allow to read the OTP value and lock status with the command $> stm32key read. This patch also protects the stm32key fuse command. Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp/cmd_stm32key.c | 93 ++-- 1 file changed, 87 insertions(+), 6 deletions(-) d

[PATCH 4/7] stm32mp: cmd_stm32key: lock of PKH OTP after fuse

2021-06-28 Thread Patrick Delaunay
Lock the OTP value of key's hash after the command $> stm32key fuse This operation forbids a second update of these OTP as they are ECC protected in BSEC: any update of these OTP with a different value causes a BSEC disturb error and the closed chip will be bricked. Signed-off-by:

[PATCH 7/7] stm32mp: cmd_stm32key: add subcommand close

2021-06-28 Thread Patrick Delaunay
ommand should be deactivated by default in real product. Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp/cmd_stm32key.c | 54 ++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-stm32mp/cmd_stm32key.c b/arch/arm/mach-s

[PATCH] arm: dts: stm32mp15: alignment with v5.13

2021-06-29 Thread Patrick Delaunay
t on stm32mp15x UART nodes - ARM: dts: stm32: add #clock-cells property to usbphyc node on stm32mp151 - ARM: dts: stm32: Add STM32MP1 I2C6 SDA/SCL pinmux - ARM: dts: stm32: Rename mmc controller nodes to mmc@ - ARM: dts: stm32: Add additional init state for SDMMC1 pins Signed-off-by: Patrick Dela

[PATCH 1/2] clk: stm32mp1: add support of SYSCFG clock

2021-06-29 Thread Patrick Delaunay
yscfg", "syscon"; reg = <0x5002 0x400>; clocks = <&rcc SYSCFG>; }; It is safe to support this clock in U-Boot driver with RCC_MC_APB3ENSETR, Bit 11 SYSCFGEN: SYSCFG peripheral clocks enable. Signed-off-by: Patrick Delaunay --- drivers/clk/clk

[PATCH 2/2] stm32mp: syscon: manage clock when present in device tree

2021-06-29 Thread Patrick Delaunay
Enable the clocks during syscon probe when they are present in device tree. This patch avoids a freeze when the SYSCFG clock is not enabled by TF-A / OP-TEE. Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp/syscon.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a

[PATCH] configs: stm32mp1: activate command rng

2021-06-29 Thread Patrick Delaunay
Activate the command rng with CONFIG_CMD_RNG, used to test the rng driver Signed-off-by: Patrick Delaunay --- configs/stm32mp15_basic_defconfig | 2 +- configs/stm32mp15_trusted_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/stm32mp15_basic_defconfig

[PATCH] stm32mp: stm32prog: use defines for virtual partition size

2021-07-05 Thread Patrick Delaunay
Use the existing defines PMIC_SIZE and OTP_SIZE and a new define CMD_SIZE for virtual partition size. This patch corrects the size for OTP partition in alternate name (1024 instead of 512) and avoids other alignment issues. Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp

Re: [PATCH] net: dwc_eth_qos: cosmetic: remove unused define EQOS_DESCRIPTOR_ALIGN

2021-07-05 Thread Patrick DELAUNAY
Hi Ramon, On 3/31/21 4:43 PM, Ramon Fried wrote: On Tue, Mar 30, 2021 at 5:12 PM Marek Vasut wrote: On 3/30/21 2:34 PM, Patrick Delaunay wrote: Remove the define EQOS_DESCRIPTOR_ALIGN unused since the commit 6f1e668d964e ("net: dwc_eth_qos: Pad descriptors to cacheline size") Sig

[PATCH 1/2] stm32mp: use device sequence number in boot_instance variable

2021-07-06 Thread Patrick Delaunay
g between the ROM code boot device = "${boot_device}${boot_instance}" and the MMC device in U-Boot. With this patch the 'mmc0' device (used in mmc commands) is always used when only one instance sdmmc is activated in device tree, even if it is only the sdmmc2 or sdmmc3. Signed-off

[PATCH 2/2] ARM: dts: stm32mp15: remove mmc alias

2021-07-06 Thread Patrick Delaunay
Remove the mmc alias no more required as the sequence number of mmc device is used for boot_instance. Signed-off-by: Patrick Delaunay --- arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi | 1 - arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi | 2 -- 2 files changed, 3 deletions(-) diff --git a/arch/arm/dts

[PATCH] arm: stm32mp1: force boot_device variable for invalid TAMP register value

2021-07-08 Thread Patrick Delaunay
d boot mode" is displayed - display trace "Boot over invalid!" in bootcmd_stm32mp - execute "run distro_bootcmd" to try all the possible target Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -

[PATCH 0/5] stm32mp1: handle TF-A boot with FIP

2021-07-08 Thread Patrick Delaunay
s.io/en/latest/design/auth-framework.html Patrick Delaunay (5): arm: stm32mp: add config for STM32IMAGE support arm: stm32mp: handle the OP-TEE nodes in DT with FIP support arm: stm32mp: add defconfig for trusted boot with FIP doc: st: stm32mp1: Add FIP support for trusted boot stm32

[PATCH 1/5] arm: stm32mp: add config for STM32IMAGE support

2021-07-08 Thread Patrick Delaunay
CONFIG_STM32MP15x_STM32IMAGE to request the STM32 image generation for SOC STM32MP15x when FIP container is not used (u-boot.stm32 is loaded by TF-A as done previously to keep the backward compatibility). Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp/Kconfig | 7 +++ arch/arm/mach-stm32mp

[PATCH 5/5] stm32mp1: stm32prog: remove stm32prog_get_tee_partitions with FIP

2021-07-08 Thread Patrick Delaunay
ll be removed after TF-A migration to FIP support. Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c | 2 ++ arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 4 arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h | 2 ++ arch/arm/mach-stm32mp/include

[PATCH 2/5] arm: stm32mp: handle the OP-TEE nodes in DT with FIP support

2021-07-08 Thread Patrick Delaunay
with STM32IMAGE header, in this case OP-TEE can't update the U-Boot device tree. Moreover in trusted boot mode with FIP, as the OP-TEE nodes are present in U-Boot device tree only when needed the function stm32_fdt_disable_optee can be removed. Signed-off-by: Patrick Delaunay --- arch/ar

[PATCH 3/5] arm: stm32mp: add defconfig for trusted boot with FIP

2021-07-08 Thread Patrick Delaunay
ENV_OFFSET / CONFIG_ENV_OFFSET_REDUND) need to be modified. With FIP the TEE MTD partitions are removed because the OP-TEE binray are included in the FIP containers. Signed-off-by: Patrick Delaunay --- arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi | 6 +- arch/arm/dts/stm32mp157c-ed1-u-boot.dtsi | 6 +- board/st/comm

[PATCH 4/5] doc: st: stm32mp1: Add FIP support for trusted boot

2021-07-08 Thread Patrick Delaunay
) which is no more generated. Signed-off-by: Patrick Delaunay --- doc/board/st/stm32mp1.rst | 166 ++ 1 file changed, 97 insertions(+), 69 deletions(-) diff --git a/doc/board/st/stm32mp1.rst b/doc/board/st/stm32mp1.rst index f0c2b09b98..6048fa36a7 100644 --- a/doc

[PATCH] stm32mp1: add pull-up for gpio button PA13 and PA14

2021-07-09 Thread Patrick Delaunay
internal pull-up in order to clearly fix the voltage at PA13/PA14 when button is released and to wait a short delay before to read the GPIO value only when the pull-up is correctly configured. Signed-off-by: Patrick Delaunay --- arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi | 4 ++-- arch/arm/dts

Re: [PATCH v4 4/5] stm32mp1: spl: Configure TrustZone controller for OP-TEE

2021-07-09 Thread Patrick DELAUNAY
d, 92 insertions(+) Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [PATCH v2 0/6] net: dwc_eth_qos: add support of device tree configuration for reset delay

2021-07-09 Thread Patrick DELAUNAY
Hi Ramon, On 4/26/21 5:46 PM, Patrick Delaunay wrote: It is the V2 version of [1] after Marek remarks: all commit are new. I change the DWC_ETH_QOS STM32 variant by using generic eth phy driver. This driver is updated to use the gpio reset and assert/deassert delay from DT with the generic

[PATCH] efi_loader: replace board_get_usable_ram_top by gd->ram_top

2021-07-09 Thread Patrick Delaunay
As gd->ram_top = board_get_usable_ram_top() in board_r the EFI loader don't need to call this function again and after relocation. This patch avoid issue if board assumed that this function is called only one time and before relocation. Signed-off-by: Patrick Delaunay --

[PATCH] clk: stm32mp1: add support of I2C6_K

2021-01-22 Thread Patrick Delaunay
Add support of missing I2C6_K with bit 3 of RCC_MC_APB5ENSETR = I2C6EN: I2C6 peripheral clocks enable. This patch allows customer to use I2C6 in SPL or in U-Boot as other I2C instance, already support in clk driver. Signed-off-by: Patrick Delaunay --- drivers/clk/clk_stm32mp1.c | 1 + 1 file

Re: FW: [PATCH 1/4] fastboot: mmc: Add CONFIG_FASTBOOT_MMC_USER_SUPPORT

2021-01-27 Thread Patrick DELAUNAY
On 1/26/21 4:48 PM, Patrick DELAUNAY wrote: From: Lukasz Majewski Sent: samedi 23 janvier 2021 13:16 Hi Patrick, Hi Lukasz, From: Patrick DELAUNAY Sent: mercredi 9 septembre 2020 15:23 To: u-boot@lists.denx.de Cc: Patrick DELAUNAY ; Jagan Teki ; Kever Yang ; Mingming lee ; Miquel Raynal

[PATCH v2 3/4] fastboot: add command to select the default emmc hwpart for boot

2021-01-27 Thread Patrick Delaunay
-by: Patrick Delaunay --- (no changes since v1) doc/android/fastboot.rst | 2 ++ drivers/fastboot/Kconfig | 7 +++ drivers/fastboot/fb_command.c | 36 +++ include/fastboot.h| 3 +++ 4 files changed, 48 insertions(+) diff --git a/

[PATCH v2 4/4] fastboot: add command to select the eMMC boot configuration

2021-01-27 Thread Patrick Delaunay
Add command oem bootbus which executes the command ``mmc bootbus `` on the current fastboot mmc device ( = CONFIG_FASTBOOT_FLASH_MMC_DEV) to set the eMMC boot configuration on first update, with = boot_bus_width reset_boot_bus_width boot_mode $> fastboot oem bootbus: Signed-off-by: Patr

[PATCH v2 0/4] fastboot: mmc: Add CONFIG_FASTBOOT_MMC_USER_SUPPORT

2021-01-27 Thread Patrick Delaunay
oot support of eMMC boot partition" http://patchwork.ozlabs.org/project/uboot/list/?series=200510 Regards Patrick Changes in v2: - rebase on master branch - new impact on pumpkin_defconfig and mt8512_bm1_emmc_defconfig - new impact on pumpkin_defconfig and mt8512_bm1_emmc_defc

[PATCH v2 1/4] fastboot: mmc: Add CONFIG_FASTBOOT_MMC_USER_SUPPORT

2021-01-27 Thread Patrick Delaunay
the unnecessary dependency with ARCH_MEDIATEK and EFI_PARTITION. Signed-off-by: Patrick Delaunay --- Changes in v2: - rebase on master branch - new impact on pumpkin_defconfig and mt8512_bm1_emmc_defconfig configs/mt8512_bm1_emmc_defconfig | 1 + configs/mt8518_ap1_emmc_defconfig | 1

[PATCH v2 2/4] fastboot: mmc: extend flash/erase for both emmc hwpart 1 and 2

2021-01-27 Thread Patrick Delaunay
ot; This patch also removes the unnecessary dependency with ARCH_MEDIATEK and EFI_PARTITION. Signed-off-by: Patrick Delaunay --- Changes in v2: - new impact on pumpkin_defconfig and mt8512_bm1_emmc_defconfig configs/mt8512_bm1_emmc_defconfig | 2 +- configs/mt8518_ap1_emmc_defcon

Re: [PATCH 1/2] pinctrl: stmfx: Fix pin configuration issue

2021-01-27 Thread Patrick DELAUNAY
38d30cdcd65c73eeefac5efa328ad444a53b77dd. Signed-off-by: Patrice Chotard Tested-by: Patrick DELAUNAY --- drivers/pinctrl/pinctrl-stmfx.c | 8 ---- 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [PATCH 2/2] pinctrl: stmfx: Use PINNAME_SIZE for pin's name size

2021-01-27 Thread Patrick DELAUNAY
ed-by: Patrick Delaunay Thanks Patrick

Re: [Uboot-stm32] [PATCH 1/4] mtd: spi-nor: Add WATCHDOG_RESET() in spi_nor_core callbacks

2021-01-27 Thread Patrick DELAUNAY
size is a power of two, the offset can be quickly Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [Uboot-stm32] [PATCH 2/4] spi: stm32_qspi: Add WATCHDOG_RESET in _stm32_qspi_read_fifo()

2021-01-27 Thread Patrick DELAUNAY
_stm32_qspi_read_fifo(u8 *val, void __iomem *addr) { *val = readb(addr); + WATCHDOG_RESET(); } static void _stm32_qspi_write_fifo(u8 *val, void __iomem *addr) Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [Uboot-stm32] [PATCH 3/4] mtd: nand: Add WATCHDOG_RESET() in nanddev_mtd_erase()

2021-01-27 Thread Patrick DELAUNAY
v_pos_cmp(&pos, &last) <= 0) { + WATCHDOG_RESET(); ret = nanddev_erase(nand, &pos); if (ret) { einfo->fail_addr = nanddev_pos_to_offs(nand, &pos); Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [Uboot-stm32] [PATCH 4/4] mtd: spinand: Add WATCHDOG_RESET() in spinand_mtd_read/write()

2021-01-27 Thread Patrick DELAUNAY
s.target); if (ret) break; Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [PATCH v4 1/6] lib: Rename rsa-checksum.c to hash-checksum.c

2021-01-27 Thread Patrick DELAUNAY
Hi, On 1/8/21 8:17 PM, Alexandru Gagniuc wrote: rsa-checksum.c sontains the hash_calculate() implementations. Despite the "rsa-" file prefix, this function is useful for other algorithms. To prevent confusion, move this file to lib/crypto, and rename it to Today the file is moved in lib and n

Re: [PATCH v4 2/6] lib/rsa: Make fdt_add_bignum() available outside of RSA code

2021-01-27 Thread Patrick DELAUNAY
Hi, On 1/8/21 8:17 PM, Alexandru Gagniuc wrote: fdt_add_bignum() is useful for algorithms other than just RSA. To allow its use for ECDSA, move it to a common file under lib/. The new file is suffixed with '-libcrypto' because it has a direct dependency on openssl. This is due to the use of the

Re: [PATCH v4 0/6] Add support for ECDSA image signing (with test)

2021-01-28 Thread Patrick DELAUNAY
Hi Alexandru, On 1/8/21 8:17 PM, Alexandru Gagniuc wrote: ## Purpose and intent > > The purpose of this series is to enable ECDSA as an alternative to > RSA for FIT signing. As new chips have built-in support for ECDSA > verified boot, it makes sense to stick to one signing algorithm, > inst

[PATCH 5/5] configs: stm32mp15: increase the number of reserved memory region in lmb

2021-02-02 Thread Patrick Delaunay
the max number of supported reserved memory in lmb library. Signed-off-by: Patrick Delaunay --- configs/stm32mp15_basic_defconfig | 1 + configs/stm32mp15_trusted_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/stm32mp15_basic_defconfig b/configs

[PATCH 3/5] lmb: Move lmb property arrays in struct lmb

2021-02-02 Thread Patrick Delaunay
memblock.c and make their size a variable") Signed-off-by: Patrick Delaunay --- include/lmb.h | 31 ++- lib/lmb.c | 8 +++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index a3247544c1..df543028d5 100644

[PATCH 2/5] lmb: remove lmb_region.size

2021-02-02 Thread Patrick Delaunay
Remove the unused field size of struct lmb_region as it is initialized to 0 and never used after in lmb library. See Linux kernel commit 4734b594c6ca ("memblock: Remove memblock_type.size and add memblock.memory_size instead") Signed-off-by: Patrick Delaunay --- include/lmb.h | 1 -

[PATCH 4/5] lmb: Add 2 config to define the max number of regions

2021-02-02 Thread Patrick Delaunay
relocated U-Boot + 1 region for initrd + 1 region for relocated linux device tree + reserved memory regions present in Linux device tree. The current limit of 8 regions is reached with only 5 reserved regions in DT. Signed-off-by: Patrick Delaunay --- include/lmb.h | 6 ++ lib/Kconfig

[PATCH 1/5] lmb: move CONFIG_LMB in Kconfig

2021-02-02 Thread Patrick Delaunay
Migrate CONFIG_LMB in Kconfig. Signed-off-by: Patrick Delaunay --- arch/arc/include/asm/config.h| 2 -- arch/arm/include/asm/config.h| 1 - arch/m68k/include/asm/config.h | 1 - arch/microblaze/include/asm/config.h | 2 -- arch/mips/include/asm/config.h | 1 - arch

[PATCH 0/5] lmb: Add config for the number of memory and reserved regions

2021-02-02 Thread Patrick Delaunay
platform, as the kernel device tree defines many and non contiguous reserved regions. Patrick Delaunay (5): lmb: move CONFIG_LMB in Kconfig lmb: remove lmb_region.size lmb: Move lmb property arrays in struct lmb lmb: Add 2 config to define the max number of regions configs: stm32mp15

[PATCH 1/8] stm32mp: update MMU config before the relocation

2021-02-05 Thread Patrick Delaunay
DACR is correctly managed. Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp/dram_init.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c index 32b177bb79..5fc8c6e15d 100644 --- a/arch

[PATCH 2/8] stm32mp: update the mmu configuration for SPL and prereloc

2021-02-05 Thread Patrick Delaunay
executable (by calling mmu_set_region_dcache_behaviour with DCACHE_DEFAULT_OPTION) after MMU setup and domain access permission activation with DACR in dcache_enable. Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp/cpu.c | 40 +++-- 1 file changed, 30 insertions

[PATCH 6/8] arm: omap2: remove arm_init_domains

2021-02-05 Thread Patrick Delaunay
Remove the arm_init_domains and the DACR update, as it is now done in ARMv7 CP15 level. Signed-off-by: Patrick Delaunay --- arch/arm/mach-omap2/omap-cache.c | 17 - 1 file changed, 17 deletions(-) diff --git a/arch/arm/mach-omap2/omap-cache.c b/arch/arm/mach-omap2/omap-cache.c

[PATCH 5/8] arm: cp15: update DACR value to activate access control

2021-02-05 Thread Patrick Delaunay
peculative prefetch aborts seen on OMAP5 secure devices. [1] https://developer.arm.com/documentation/ddi0406/b/System-Level-Architecture/Virtual-Memory-System-Architecture--VMSA-/Memory-access-control/The-Execute-Never--XN--attribute-and-instruction-prefetching Signed-off-by: Patrick Delaunay R

[PATCH 3/8] arm: remove TTB_SECT_XN_MASK in DCACHE_WRITETHROUGH

2021-02-05 Thread Patrick Delaunay
The normal memory (other that DCACHE_OFF) should be executable by default, only the device memory (DCACHE_OFF) used for peripheral access should have the bit execute never (TTB_SECT_XN_MASK). Signed-off-by: Patrick Delaunay --- arch/arm/include/asm/system.h | 2 +- 1 file changed, 1 insertion

[PATCH 4/8] arm: cosmetic: align TTB_SECT define value

2021-02-05 Thread Patrick Delaunay
Align TTB_SECT define value with previous value. Signed-off-by: Patrick Delaunay --- arch/arm/include/asm/system.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 9db64dd69d..289b820a6d 100644 --- a/arch

[PATCH 7/8] arm: cp15: remove weak function arm_init_domains

2021-02-05 Thread Patrick Delaunay
Remove the unused weak function arm_init_domains used to change the DACR value. Signed-off-by: Patrick Delaunay --- arch/arm/cpu/armv7/cache_v7.c | 3 --- arch/arm/include/asm/cache.h | 1 - arch/arm/lib/cache-cp15.c | 6 -- 3 files changed, 10 deletions(-) diff --git a/arch/arm/cpu

[PATCH 0/8]

2021-02-05 Thread Patrick Delaunay
no-map property http://u-boot.10912.n7.nabble.com/PATCH-0-7-arm-cache-cp15-don-t-map-reserved-region-with-no-map-property-tt428715.html Patrick Delaunay (8): stm32mp: update MMU config before the relocation stm32mp: update the mmu configuration for SPL and prereloc arm: r

[PATCH 8/8] arm: remove set_dacr/get_dacr functions

2021-02-05 Thread Patrick Delaunay
Remove the unused function set_dacr/get_dacr Serie-cc: Ard Biesheuvel Serie-cc: R Sricharan Signed-off-by: Patrick Delaunay --- arch/arm/include/asm/system.h | 14 -- 1 file changed, 14 deletions(-) diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index

[PATCH] lib: optee: migration optee_copy_fdt_nodes for OF_LIVE support

2021-02-08 Thread Patrick Delaunay
ons, compatible with OF_LIVE and remove this parameter "old_blob". The generated "device tree" is checked on stm32mp platform with OF_LIVE activated. Signed-off-by: Patrick Delaunay --- common/image-fdt.c | 2 +- include/tee/optee.h | 4 ++-- l

[PATCH v2 1/7] lmb: Add support of flags for no-map properties

2021-02-08 Thread Patrick Delaunay
s patch is partially based on flags support done in Linux kernel mm/memblock .c (previously lmb.c); it is why LMB_NOMAP = 0x4, it is aligned with MEMBLOCK_NOMAP value. Signed-off-by: Patrick Delaunay Signed-off-by: Patrick Delaunay --- Changes in v2: - remove unnecessary comments in lmb.h -

[PATCH v2 4/7] test: lmb: add test for lmb_reserve_flags

2021-02-08 Thread Patrick Delaunay
Add a test to check the management of reserved region with flags. Signed-off-by: Patrick Delaunay Signed-off-by: Patrick Delaunay --- (no changes since v1) test/lib/lmb.c | 89 ++ 1 file changed, 89 insertions(+) diff --git a/test/lib/lmb.c b

[PATCH v2 2/7] lmb: add lmb_is_reserved_flags

2021-02-08 Thread Patrick Delaunay
Add a new function lmb_is_reserved_flags to check is a address is reserved with a specific flags. This function can be used to check if an address had be reserved with no-map flags with: lmb_is_reserved_flags(lmb, addr, LMB_NOMAP); Signed-off-by: Patrick Delaunay Signed-off-by: Patrick

[PATCH v2 6/7] stm32mp: don't map the reserved region with no-map property

2021-02-08 Thread Patrick Delaunay
No more map the reserved region with "no-map" property by marking the corresponding TLB entries with invalid entry (=0) to avoid speculative access. This patch fixes an issue where predictive read access on secure DDR OP-TEE reserved area are caught by firewall. Signed-off-by: Patric

[PATCH v2 0/7] arm: cache: cp15: don't map reserved region with no-map property

2021-02-08 Thread Patrick Delaunay
atchwork.ozlabs.org/project/uboot/patch/20200903000106.5016-1-marek.bykow...@gmail.com/ Regards Patrick Changes in v2: - remove unnecessary comments in lmb.h - rebase on latest lmb patches - NEW: update in stm32mp specific MMU setup functions Patrick Delaunay (7): lmb: Add support of flags for

[PATCH v2 7/7] arm: cache: cp15: don't map the reserved region with no-map property

2021-02-08 Thread Patrick Delaunay
No more map the reserved region with "no-map" property by marking the corresponding TLB entries with invalid entry (=0) to avoid speculative access. This patch fixes potential issue when predictive access is done by ARM core. Signed-off-by: Patrick Delaunay Signed-off-by: Patric

[PATCH v2 3/7] lmb: add lmb_dump_region() function

2021-02-08 Thread Patrick Delaunay
reserved[4][0xfbaea344-0xfdff], 0x02515cbc bytes flags: 0 reserved[5][0xfe00-0x], 0x0200 bytes flags: 4 arch_number = 0x TLB addr= 0xfdff Signed-off-by: Patrick Delaunay Signed-off-by: Patrick Delaunay --- (no changes since v1) lib/lmb.c | 40

[PATCH v2 5/7] image-fdt: save no-map parameter of reserve-memory

2021-02-08 Thread Patrick Delaunay
Save the no-map information present in 'reserved-memory' node to allow correct handling when the MMU is configured in board to avoid speculative access. Signed-off-by: Patrick Delaunay Signed-off-by: Patrick Delaunay --- (no changes since v1) common/image-

Re: [PATCH 01/10] README: Add doumentation for version information

2021-02-08 Thread Patrick DELAUNAY
++ 1 file changed, 84 insertions(+) Just one remark, this information could be integrated in generated U-Boot documentation for example => develop/version.rst (under "Implementation") Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [PATCH 02/10] Makefile: Provide numeric versions

2021-02-08 Thread Patrick DELAUNAY
2 files changed, 12 insertions(+) Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [RFC PATCH v2 1/2] optee: obtain emmc rpmb info from dt

2021-02-08 Thread Patrick DELAUNAY
Hi Igor, On 1/24/21 10:39 AM, Igor Opaniuk wrote: From: Igor Opaniuk Add support for rpmb-dev property in optee node. Prioritize that provided eMMC info from DT for RPMB operations over the one provided by OP-TEE OS core in RPC calls. Signed-off-by: Igor Opaniuk --- Changes in v2: - Return

Re: [PATCH 13/13] arm: stm32: Disable ATAGs support

2021-02-08 Thread Patrick DELAUNAY
Hi Tom, On 2/4/21 3:24 AM, Tom Rini wrote: These platforms never had to support an ATAGs-based Linux Kernel, so remove the options. Cc: Kamil Lulko Cc: Patrick Delaunay Cc: Patrice Chotard Cc: Vikas Manocha Cc: Marek Vasut Signed-off-by: Tom Rini --- I'm assuming, please correct

Re: [PATCH v4] fastboot: add UUU command UCmd and ACmd support

2021-02-08 Thread Patrick DELAUNAY
t.c @@ -494,6 +494,18 @@ static void do_bootm_on_complete(struct usb_ep *ep, struct usb_request *req) do_exit_on_complete(ep, req); } (...) Anyway, except this remark. Acked-by: Patrick Delaunay Regards Patrick

Re: [PATCH v4 10/16] dm: gpio: Add a way to update flags

2021-02-08 Thread Patrick DELAUNAY
flags first Changes in v3: - Incorporate GPIOD_FLAGS_OUTPUT() changes from Patrick Delaunay drivers/gpio/gpio-uclass.c | 75 ++ drivers/gpio/stm32_gpio.c | 3 +- drivers/pinctrl/pinctrl-stmfx.c | 5 +- include/asm-generic/gpio.h | 31 ++-- test/dm

Re: [PATCH v4 16/16] gpio: Add a way to read 3-way strapping pins

2021-02-08 Thread Patrick DELAUNAY
Hi Simon, On 2/5/21 5:22 AM, Simon Glass wrote: Using the internal vs. external pull resistors it is possible to get 27 different combinations from 3 strapping pins. Add an implementation of this. This involves updating the sandbox GPIO driver to model external and (weaker) internal pull resist

Re: [PATCH 1/2] pinctrl: stmfx: Fix pin configuration issue

2021-02-09 Thread Patrick DELAUNAY
ns at probe because pins is identified by its name (see pinctrl_pin_name_to_selector() in pinctrl-generic.c) and stmfx pin "gpio14" can't be found. To fix this issue, come back to the original stmfx pin's name. Revert "pinctrl: stmfx: update pin name" This reverts commit 38d30cdc

Re: [PATCH 2/2] pinctrl: stmfx: Use PINNAME_SIZE for pin's name size

2021-02-09 Thread Patrick DELAUNAY
Hi, On 1/20/21 1:43 PM, Patrice Chotard wrote: Instead of redefining a pin's name size, use PINNAME_SIZE defined in include/dm/pinctrl.h Signed-off-by: Patrice Chotard --- drivers/pinctrl/pinctrl-stmfx.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) Applied to u-boot-stm

Re: [PATCH 1/2] pinctrl: stm32: correct management pin display of OTYPE

2021-02-09 Thread Patrick DELAUNAY
Hi, On 1/21/21 5:39 PM, Patrick Delaunay wrote: OTYPE can be used for output or for alternate function to select PP = push-pull or OP = open-drain mode, according reference manual (Table 81. Port bit configuration table). This patch removes this indication for input pins and adds it for AF and

Re: [PATCH 2/2] pinctrl: stm32: bind only the enabled GPIO subnode

2021-02-09 Thread Patrick DELAUNAY
Hi, On 1/21/21 5:39 PM, Patrick Delaunay wrote: Bind only the enabled GPIO subnode, to avoid to probe the node "gpio-controller" present in SOC dtsi (disabled by default) but not enabled in the included pincontrol dtsi file. For example, in stm32mp15xxac-pinctrl.dtsi 2 gpio bank

Re: [PATCH] clk: stm32mp1: add support of I2C6_K

2021-02-09 Thread Patrick DELAUNAY
Hi, On 1/22/21 3:34 PM, Patrick Delaunay wrote: Add support of missing I2C6_K with bit 3 of RCC_MC_APB5ENSETR = I2C6EN: I2C6 peripheral clocks enable. This patch allows customer to use I2C6 in SPL or in U-Boot as other I2C instance, already support in clk driver. Signed-off-by: Patrick

Re: [PATCH] ARM: dts: stm32: Fix cosmetic typo: use 'kHz' as kilohertz abbreviation

2021-02-09 Thread Patrick DELAUNAY
Hi, On 1/15/21 1:55 PM, Fabrice GIRARDOT wrote: The kilohertz unit abbreviation should read 'kHz'. Note to STM32 team: modified files were generated, it may be worth to fix STM32CubeMX tool. Signed-off-by: Fabrice GIRARDOT --- arch/arm/dts/stm32mp15-ddr3-1x4Gb-1066-binG.dtsi | 2 +- arch/ar

[PATCH] usb: dwc2: change compatible st, stm32mp1-hsotg to st, stm32mp15-hsotg

2021-02-09 Thread Patrick Delaunay
-Boot dtsi and keeps the compatible defined in SOC dtsi arch/arm/dts/stm32mp151.dtsi: usbotg_hs: usb-otg@4900 { compatible = "st,stm32mp15-hsotg", "snps,dwc2"; reg = <0x4900 0x10000>; ... }; Signed-off-by: Patrick Delaunay --- arch/arm/dts/stm

[PATCH 1/3] env: add ENV_ERASE_PTR macro

2021-02-09 Thread Patrick Delaunay
Add ENV_ERASE_PTR macro to handle erase opts and remove the associated ifdef. This patch is a extension of previous commit 82b2f4135719 ("env_internal.h: add alternative ENV_SAVE_PTR macro"). Signed-off-by: Patrick Delaunay --- env/ext4.c | 3 +-- env/mmc.c

[PATCH 0/3] env: sf: add support of command env erase

2021-02-09 Thread Patrick Delaunay
Hi, I add support of env erase command for SPI flash backend (sf). To erase the environment, this patch only invalidate the content at CONFIG_ENV_OFFSET and at CONFIG_ENV_OFFSET_REDUND (force a bad CRC). The 2 first patchs of the serie are preliminary and clenaup steps. Patrick Patrick

[PATCH 3/3] env: sf: add support of command env erase

2021-02-09 Thread Patrick Delaunay
er than the env (i.e. embedded when CONFIG_ENV_SECT_SIZE > CONFIG_ENV_SIZE). The needed sector erase will be managed in the next "env save" command, using the opt ".save", before to update the environment in SPI flash. Signed-off-by: Patrick Delaunay --- env/sf.c | 34

[PATCH 2/3] env: sf: update the use of macro ENV_SAVE_PTR

2021-02-09 Thread Patrick Delaunay
Remove CONFIG_IS_ENABLED(SAVEENV) as it is already tested in the ENV_SAVE_PTR macro. Signed-off-by: Patrick Delaunay --- env/sf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/sf.c b/env/sf.c index 42d762714e..3f2fbbec12 100644 --- a/env/sf.c +++ b/env/sf.c @@ -405,6

<    3   4   5   6   7   8   9   10   11   12   >