Re: [PATCH 10/10] stm32mp1: spl: Copy optee nodes to target FDT for OP-TEE payloads

2021-09-03 Thread Patrick DELAUNAY
Hi Alex On 9/2/21 7:34 PM, Alex G. wrote: Hi Patrick, On 9/1/21 10:10 AM, Alex G. wrote: Hi Patrick, On 8/31/21 12:24 PM, Patrick DELAUNAY wrote: Hi, On 8/26/21 11:42 PM, Alexandru Gagniuc wrote: OP-TEE does not take a devicetree for its own use. However, it does pass the devicetree to

Re: [PATCH 2/2] board: dh_stm32mp1: Remove gpio_hog_probe_all() from board

2021-09-03 Thread Patrick DELAUNAY
io_hog_probe_all(); - board_key_check(); #ifdef CONFIG_DM_REGULATOR Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [PATCH 1/2] board: stm32mp1: Remove gpio_hog_probe_all() from board

2021-09-03 Thread Patrick DELAUNAY
stm32mp1.c @@ -649,9 +649,6 @@ int board_init(void) /* address of boot parameters */ gd->bd->bi_boot_params = STM32_DDR_BASE + 0x100; - if (CONFIG_IS_ENABLED(DM_GPIO_HOG)) - gpio_hog_probe_all(); - board_key_check(); if (board_is_ev1()) Reviewed-by:

Re: [PATCH] stm32mp: Fix board_get_usable_ram_top()

2021-09-03 Thread Patrick DELAUNAY
d memory to relocated U-Boot */ lmb_init(&lmb); Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [PATCH 1/2] arm: stm32: Disable ATAGs support

2021-09-03 Thread Patrick DELAUNAY
Hi Tom, On 9/2/21 3:12 PM, Tom Rini wrote: On Thu, Sep 02, 2021 at 12:02:06PM +0200, Patrick Delaunay wrote: These platforms never had to support an ATAGs-based Linux Kernel, so remove the options. Cc: Marek Vasut Signed-off-by: Tom Rini Signed-off-by: Patrick Delaunay --- Hi, this patch

[PATCH] arm: use CONFIG_SUPPORT_PASSING_ATAGS

2021-09-03 Thread Patrick Delaunay
Simplify the bootm and the spl code by using the new config CONFIG_SUPPORT_PASSING_ATAGS. Signed-off-by: Patrick Delaunay --- This patch depends of Tom Rini patch [1] for CONFIG_SUPPORT_PASSING_ATAGS addition. [1] "arm: Disable ATAGs support" https://patchwork.ozlabs.org/project/u

[PATCH 2/2] board: stm32: Remove the bi_boot_params initialization

2021-09-02 Thread Patrick Delaunay
The stm32 platforms never had to support an ATAGs-based Linux Kernel, so remove the bi_boot_params initialization. Signed-off-by: Patrick Delaunay --- board/dhelectronics/dh_stm32mp1/board.c | 3 --- board/engicam/stm32mp1/stm32mp1.c| 3 --- board/st/stm32f429

[PATCH 1/2] arm: stm32: Disable ATAGs support

2021-09-02 Thread Patrick Delaunay
These platforms never had to support an ATAGs-based Linux Kernel, so remove the options. Cc: Marek Vasut Signed-off-by: Tom Rini Signed-off-by: Patrick Delaunay --- Hi, this patch is a rebased version of the STM32 part [1] of Tom's patchset [2]. I also update the new file include/co

[PATCH 1/2] lib: optee: remove the duplicate CONFIG_OPTEE

2021-09-02 Thread Patrick Delaunay
ect behavior: - CONFIG_IS_ENABLED(OPTEE_IMAGE) => Load of OP-TEE image is supported - CONFIG_IS_ENABLED(OPTEE) => OP-TEE driver is supported Signed-off-by: Patrick Delaunay --- arch/arm/mach-rockchip/sdram.c | 2 +- common/spl/Kconfig | 6 +++--- common/spl/Makefile| 2 +-

[PATCH 2/2] tee: add a stub for tee_find_device

2021-09-02 Thread Patrick Delaunay
Add stub for tee_find_device function when CONFIG_TEE is not activated to simplify the caller code. This patch allows to remove the CONFIG_IS_ENABLED(OPTEE) tests for stm32 platform. Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp/fdt.c| 1 - board/st/common

Re: [RFC PATCH] stm32mp1: Replace STM32IMAGE config with TFABOOT_FIP

2021-09-01 Thread Patrick DELAUNAY
Hi Marek, On 8/31/21 6:42 PM, Marek Vasut wrote: On 8/31/21 4:54 PM, Patrick DELAUNAY wrote: Hi Alexandru, Hi, On 8/26/21 11:47 PM, Alexandru Gagniuc wrote: Hi Patrick, I proposing a better fix fir the issues I outlined earlier, I made a classification of the currently supported boot

Re: [PATCH 09/10] ARM: dts: stm32mp: Add OP-TEE "/firmware" node to SPL dtb

2021-08-31 Thread Patrick DELAUNAY
Hi, On 8/26/21 11:42 PM, Alexandru Gagniuc wrote: This node is required in SPL when booting an OP-TEE payload. Add it to the SPL devicetree. Signed-off-by: Alexandru Gagniuc --- arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/dts/stm32mp

Re: [PATCH 10/10] stm32mp1: spl: Copy optee nodes to target FDT for OP-TEE payloads

2021-08-31 Thread Patrick DELAUNAY
Hi, On 8/26/21 11:42 PM, Alexandru Gagniuc wrote: OP-TEE does not take a devicetree for its own use. However, it does pass the devicetree to the normal world OS. In most cases that will be some other devicetree-bearing platform, such as linux. As in other cases where there's an OPTEE payload (e

Re: [PATCH 08/10] lib: Makefile: Make optee library available in SPL

2021-08-31 Thread Patrick DELAUNAY
Hi On 8/26/21 11:42 PM, Alexandru Gagniuc wrote: We want the optee_copy_fdt_nodes symbols in SPL. This is for cases when booting an OPTEE payload directly. Signed-off-by: Alexandru Gagniuc --- lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile b/li

Re: [PATCH 07/10] stm32mp1: spl: Configure MAC address when booting OP-TEE

2021-08-31 Thread Patrick DELAUNAY
Hi, On 8/26/21 11:42 PM, Alexandru Gagniuc wrote: When OP-TEE is booted as the SPL payload, the stage after OP-TEE is not guaranteed to be u-boot. Thus the FDT patching in u-boot is not guaranteed to occur. Add this step to SPL. The patching by stm32_fdt_setup_mac_addr() is done in SPL, and pa

Re: [PATCH 05/10] arm: stm32mp: bsec: Do not skip .probe() for SPL

2021-08-31 Thread Patrick DELAUNAY
Hi On 8/26/21 11:42 PM, Alexandru Gagniuc wrote: stm32mp_bsec_probe() was skipped for TFABOOT and SPL_BUILD. The idea of skipping probe() is that we can't access BSEC from the normal world. This is true with TFABOOT. However, in SPL, we are in the secure world, so skipping probe is incorrect. I

Re: [PATCH 03/10] board: stm32mp1: Implement board_fit_config_name_match() for SPL

2021-08-31 Thread Patrick DELAUNAY
Hi Add in CC the MAINTAINERS. On 8/26/21 11:42 PM, Alexandru Gagniuc wrote: This function is needed when loading a FIT image from SPL. It selects the correct configuration node for the current board. Implement it. Signed-off-by: Alexandru Gagniuc --- board/st/stm32mp1/spl.c | 10 ++

Re: [PATCH 02/10] stm32mp1: Add support for falcon mode boot from SD card

2021-08-31 Thread Patrick DELAUNAY
Hi, Add in CC the MAINTAINERS On 8/26/21 11:42 PM, Alexandru Gagniuc wrote: Falcon mode requires a board-specific mechanism to select between fast and normal boot. This is done via spl_start_uboot() Use the B2 button as the selection mechanism. This is connected to GPIO PA13. Incidentally, thi

Re: [PATCH 01/10] stm32mp1: Add support for baudrates higher than 115200

2021-08-31 Thread Patrick DELAUNAY
} + /* * Configuration of the external SRAM memory used by U-Boot */ Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [RFC PATCH] stm32mp1: Replace STM32IMAGE config with TFABOOT_FIP

2021-08-31 Thread Patrick DELAUNAY
Hi Alexandru, On 8/26/21 11:47 PM, Alexandru Gagniuc wrote: Hi Patrick, I proposing a better fix fir the issues I outlined earlier, I made a classification of the currently supported boot modes. 1) BL1 -> SPL -> U-Boot 2) BL1 -> SPL -> OP-TEE ---

[PATCH] dm: migrate the dm_warn to use the log macro

2021-07-30 Thread Patrick Delaunay
Migrate the dm_warn function to log macro with LOGC_DM category and LOGL_WARNING level. This macro allows filtering with log command and allows output on all log backend. Signed-off-by: Patrick Delaunay --- drivers/core/util.c | 11 --- include/dm/util.h | 2 +- 2 files changed, 1

[PATCH 2/2] dm: add debug message when failed to select the default pinctrl

2021-07-30 Thread Patrick Delaunay
Add a message on probe in driver model core when the default pinctrl selection failed. This message is displayed only when the pinctrl API is implemented, i.e. when result is not ENOSYS. Signed-off-by: Patrick Delaunay --- drivers/core/device.c | 16 1 file changed, 12

[PATCH 1/2] pinctrl: change result for unsupported API

2021-07-30 Thread Patrick Delaunay
Use the return value ENOSYS for unsupported API - pinctrl_generic_set_state - pinctrl_select_state Signed-off-by: Patrick Delaunay --- include/dm/pinctrl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h index 695e78ad0d

Re: [PATCH 5/5] test: dm: Add test for ECDSA UCLASS support

2021-07-30 Thread Patrick DELAUNAY
ons(+) create mode 100644 test/dm/ecdsa.c Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [PATCH 4/5] Kconfig: FIT_SIGNATURE should not select RSA_VERIFY

2021-07-30 Thread Patrick DELAUNAY
one to explicitly disable RSA support. Signed-off-by: Alexandru Gagniuc Reviewed-by: Simon Glass Reviewed-by: Igor Opaniuk --- common/Kconfig.boot | 8 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [PATCH 3/5] arm: stm32mp1: Implement ECDSA signature verification

2021-07-30 Thread Patrick DELAUNAY
-stm32mp/Makefile | 1 + arch/arm/mach-stm32mp/ecdsa_romapi.c | 102 +++ 3 files changed, 112 insertions(+) create mode 100644 arch/arm/mach-stm32mp/ecdsa_romapi.c Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [PATCH 2/5] lib: ecdsa: Implement UCLASS_ECDSA verification on target

2021-07-30 Thread Patrick DELAUNAY
mode 100644 lib/ecdsa/Kconfig create mode 100644 lib/ecdsa/Makefile create mode 100644 lib/ecdsa/ecdsa-verify.c Reviewed-by: Patrick Delaunay Thanks Patrick

Re: [PATCH 1/5] dm: crypto: Define UCLASS API for ECDSA signature verification

2021-07-30 Thread Patrick DELAUNAY
implementations, such as stm32mp. Signed-off-by: Alexandru Gagniuc --- include/crypto/ecdsa-uclass.h | 39 +++ include/dm/uclass-id.h| 1 + 2 files changed, 40 insertions(+) create mode 100644 include/crypto/ecdsa-uclass.h Reviewed-by: Patrick Delaunay Thanks

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

2021-07-27 Thread Patrick Delaunay
rl on microdev2.0-of7 Signed-off-by: Patrick Delaunay --- arch/arm/dts/stm32mp15-pinctrl.dtsi | 33 +++ arch/arm/dts/stm32mp151.dtsi | 16 - ...157a-microgea-stm32mp1-microdev2.0-of7.dts | 2 +- 3 files changed, 42 insertions(+), 9 deletions(-)

Re: [PATCH 1/1] lib: disable CONFIG_SPL_HEXDUMP by default

2021-07-27 Thread Patrick DELAUNAY
1 deletion(-) Acked-by: Patrick Delaunay # for stm32mp15_*_defconfig but it is strange for "stm32mp15_trusted_defconfig" as this configuration don't enable the SPL support(see after). diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig index 5fb1da49e4

[PULL] Pull request for u-boot master / v2021.10 = u-boot-stm32-20210727

2021-07-27 Thread Patrick DELAUNAY
spl_board_prepare_for_optee() hook   arm: stm32mp: Implement support for TZC 400 controller   stm32mp1: spl: Configure TrustZone controller for OP-TEE   ARM: dts: stm32mp: Add OP-TEE reserved memory to SPL dtb Marek Vasut (1):   ARM: dts: stm32: Fix AV96 eMMC pinmux Patrick Delaunay (3

Re: [PATCH v5 5/5] ARM: dts: stm32mp: Add OP-TEE reserved memory to SPL dtb

2021-07-27 Thread Patrick DELAUNAY
Hi, On 7/15/21 9:19 PM, Alexandru Gagniuc wrote: Add the "/reserved-memory/optee" node to the SPL devicetree. The purpose is to allow configuring TZC regions when booting OP-TEE. Signed-off-by: Alexandru Gagniuc Reviewed-by: Simon Glass --- arch/arm/dts/stm32mp157a-dk1-u-boot.dtsi | 3 +++

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

2021-07-27 Thread Patrick DELAUNAY
hI, On 7/15/21 9:19 PM, Alexandru Gagniuc wrote: OP-TEE is very particular about how the TZC should be configured. When booting an OP-TEE payload, an incorrect TZC configuration will result in a panic. Most information can be derived from the SPL devicetree. The only information we don't have i

Re: [PATCH v5 3/5] arm: stm32mp: Implement support for TZC 400 controller

2021-07-27 Thread Patrick DELAUNAY
-by: Patrick Delaunay --- arch/arm/mach-stm32mp/Makefile | 1 + arch/arm/mach-stm32mp/include/mach/tzc.h | 33 ++ arch/arm/mach-stm32mp/tzc400.c | 136 +++ 3 files changed, 170 insertions(+) create mode 100644 arch/arm/mach-stm32mp/include/mach

Re: [PATCH v5 2/5] spl: Introduce spl_board_prepare_for_optee() hook

2021-07-27 Thread Patrick DELAUNAY
-by: Patrick Delaunay --- common/spl/spl.c | 5 + include/spl.h| 14 ++ 2 files changed, 19 insertions(+) Applied to u-boot-stm/master, thanks! Regards Patrick

Re: [PATCH v5 1/5] spl: mmc: Support OP-TEE payloads in Falcon mode

2021-07-27 Thread Patrick DELAUNAY
: Tom Rini Reviewed-by: Patrick Delaunay --- common/spl/spl_mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Applied to u-boot-stm/master, thanks! Regards Patrick

Re: [PATCH] ARM: dts: stm32: Fix AV96 eMMC pinmux

2021-07-27 Thread Patrick DELAUNAY
t was only added in commit 1ad6e36ec266 ("ARM: dts: stm32: Fix sdmmc2 pins on AV96") . Update the AV96 DT pinmux phandle, otherwise eMMC 8bit mode does not work and access to eMMC takes a very long time to fall back to 4bit mode. Signed-off-by: Marek Vasut Cc: Patrick Delaunay

Re: [PATCH] clk: stm32mp1: add support of missing SPI clocks

2021-07-27 Thread Patrick DELAUNAY
Hi, On 7/9/21 2:24 PM, Patrick Delaunay wrote: Add the missing SPI clock even if these instances are not available on STMicroelectronics boards: SPI2_K, SPI3_K, SPI4_K, SPI6_K. With this patch, the SPI2 / SPI3 / SPI4 / SPI6 instances can be used on customer design without the clock driver

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

2021-07-27 Thread Patrick DELAUNAY
Hi, On 7/9/21 9:53 AM, Patrick Delaunay wrote: When a push-button is released and PA13/PA14 are defined as input (high-Z) the LED should not be active as the circuit is open but a small current leak through PCB or push-button close the circuit and allows a small LED bias giving erroneous level

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

2021-07-27 Thread Patrick DELAUNAY
Hi, On 7/8/21 10:53 AM, Patrick Delaunay wrote: When the TAMP register 20 have an invalid value (0x0 for example after TAMPER error) the "boot_device" U-Boot env variable have no value and no error is displayed in U-Boot log. The STM32MP boot command bootcmd_stm32mp failed with str

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

2021-07-27 Thread Patrick DELAUNAY
Hi, On 7/8/21 10:53 AM, Patrick Delaunay wrote: When the TAMP register 20 have an invalid value (0x0 for example after TAMPER error) the "boot_device" U-Boot env variable have no value and no error is displayed in U-Boot log. The STM32MP boot command bootcmd_stm32mp failed with str

Re: [PATCH v5 5/5] test: dm: Add test for ECDSA UCLASS support

2021-07-27 Thread Patrick DELAUNAY
Hi Alexandru, On 5/17/21 8:39 PM, Alexandru Gagniuc wrote: This test verifies that ECDSA_UCLASS is implemented, and that ecdsa_verify() works as expected. The definition of "expected" is "does not find a device, and returns -ENODEV". The lack of a hardware-independent ECDSA implementation preve

[PATCH] stm32mp: correctly handle board_get_usable_ram_top(0)

2021-07-26 Thread Patrick Delaunay
be used. It is the case today in lib/efi_loader/efi_memory.c:efi_add_known_memory() and this patch avoids that the reserved memory for OP-TEE is not part of the EFI available memory regions. Signed-off-by: Patrick Delaunay --- Patch to correct the UEFI support for STM32MP platform after Heinrich&#

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

2021-07-26 Thread Patrick Delaunay
50.html Changes in v3: - add reference for STM32 WIKI, TF-A and OP-TEE - add information about TF-A compilation and clarify the output files Changes in v2: - synchronize defconfig with latest change - fix one typo: s/ enought / enough Patrick Delaunay (5): arm: stm32mp: add config for STM32IMAGE

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

2021-07-26 Thread Patrick Delaunay
) which is no more generated. Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- Changes in v3: - add reference for STM32 WIKI, TF-A and OP-TEE - add information about TF-A compilation and clarify the output files Changes in v2: - fix one typo: s/ enought / enough doc/board/st

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

2021-07-26 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 Reviewed-by: Patrice Chotard --- (no changes since v2) Changes in v2: - synchronize defconfig with latest change ar

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

2021-07-26 Thread Patrick Delaunay
ll be removed after TF-A migration to FIP support. Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- (no changes since v1) arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c | 2 ++ arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 4 arch/arm/mach-stm32mp/cmd_stm3

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

2021-07-26 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 Reviewed-by: Patrice Chotard --- (no changes since v1) arch/arm/mach-stm32mp

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

2021-07-26 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 Reviewed-by: Pa

[PATCH v2] patman: add warning for invalid tag

2021-07-22 Thread Patrick Delaunay
Add a error in patman tool when the commit message contents an invalid tag "Serie-.*" instead of "Series-.*". Signed-off-by: Patrick Delaunay --- I create this patch to avoid my frequent mistake: using "Serie-" tag instead of "Series-" as it is done in [

Re: U-BOOT 2021.07 and STM32MP15x issues for Trusted Boot Chain

2021-07-22 Thread Patrick DELAUNAY
Hi Gianluca, On 7/22/21 10:01 AM, gianluca wrote: Hello list, I was wondering what I am doing wrong following the procedure explained in the doc/board/st/stm32mp1.rst documentation file. I am using the latest git version (the Makefile says 2021.07). My goal is to run from sdcard in trusted b

[PATCH] patman: add warning for invalid tag

2021-07-21 Thread Patrick Delaunay
Add a error in patman tool when the commit message contents an invalid tag "Serie-.*" instead of "Series-.*". Signed-off-by: Patrick Delaunay --- I create this patch to avoid my frequent mistake: using "Serie-" tag instead of "Series-" as it is done in [

Re: [PATCH] build: remove the variable NM in gen_ll_addressable_symbols.sh

2021-07-21 Thread Patrick DELAUNAY
On 7/20/21 8:50 PM, Simon Glass wrote: Hi Patrick, On Tue, 20 Jul 2021 at 12:34, Patrick Delaunay wrote: With LTO activated, the buildman tools failed with an error on my configuration (Ubuntu 20.04, stm32mp15_trusted_defconfig) with the error: ../arm-linux-gnueabi/bin/nm: scripts

[RESEND PATCH] build: remove the variable NM in gen_ll_addressable_symbols.sh

2021-07-21 Thread Patrick Delaunay
pu/built-in.o \ ... net/built-in.o > keep-syms-lto.c Reviewed-by: Simon Glass Signed-off-by: Patrick Delaunay --- Resend with correct commit message for patman s/Serie-cc/Series-cc/ Makefile | 2 +- scripts/Makefile.spl | 2

Re: [PATCH] ARM: dts: stm32: Fix AV96 eMMC pinmux

2021-07-21 Thread Patrick DELAUNAY
and it was only added in commit 1ad6e36ec266 ("ARM: dts: stm32: Fix sdmmc2 pins on AV96") . Update the AV96 DT pinmux phandle, otherwise eMMC 8bit mode does not work and access to eMMC takes a very long time to fall back to 4bit mode. Signed-off-by: Marek Vasut Cc: Patrick Delaunay

[PATCH] build: remove the variable NM in gen_ll_addressable_symbols.sh

2021-07-20 Thread Patrick Delaunay
pu/built-in.o \ ... net/built-in.o > keep-syms-lto.c Serie-cc: Marek Behún Serie-cc: sjg Signed-off-by: Patrick Delaunay --- Makefile | 2 +- scripts/Makefile.spl | 2 +- scripts/gen_ll_addressable_symbols.sh | 5 - 3 files changed, 6 inser

[RESEND PATCH 3/3] net: define LOG_CATEGORY

2021-07-20 Thread Patrick Delaunay
Define LOG_CATEGORY to allow filtering with log command. Signed-off-by: Patrick Delaunay Reviewed-by: Ramon Fried --- net/eth-uclass.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/eth-uclass.c b/net/eth-uclass.c index 5146bd..c2a97d723a 100644 --- a/net/eth-uclass.c +++ b/net

[RESEND PATCH 2/3] net: dwc_eth_qos: define LOG_CATEGORY

2021-07-20 Thread Patrick Delaunay
Define LOG_CATEGORY to allow filtering with log command. Signed-off-by: Patrick Delaunay Reviewed-by: Ramon Fried --- drivers/net/dwc_eth_qos.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index f048e9d585..3358dc3514 100644 --- a

[RESEND PATCH 1/3] net: eth-phy: define LOG_CATEGORY

2021-07-20 Thread Patrick Delaunay
Define LOG_CATEGORY to allow filtering with log command. Signed-off-by: Patrick Delaunay Reviewed-by: Ramon Fried --- drivers/net/eth-phy-uclass.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/eth-phy-uclass.c b/drivers/net/eth-phy-uclass.c index 07aebd935e..abb658bf21

[PATCH v3 6/6] net: dwc: add a common empty ops eqos_null_ops

2021-07-20 Thread Patrick Delaunay
Add a common empty ops: eqos_null_ops() to remove the duplicated empty functions and reduce the driver size for stm32 and imx config. This patch also aligns the prototype of ops 'eqos_stop_clks' with other eqos ops by adding return value. Reviewed-by: Ramon Fried Signed-off-by: Patric

[PATCH v3 5/6] net: dwc_eth_qos: use generic ethernet phy for stm32 variant

2021-07-20 Thread Patrick Delaunay
Use the generic ethernet phy which already manages the correct binding for gpio reset, including the assert an deassert delays. Reviewed-by: Ramon Fried Signed-off-by: Patrick Delaunay --- (no changes since v2) Changes in v2: - use generic ethernet phy for stm32 variant, this patch is a

[PATCH v3 4/6] net: dwc_eth_qos: remove the field phyaddr of the struct eqos_priv

2021-07-20 Thread Patrick Delaunay
rces_stm32() it can be removed. Reviewed-by: Ramon Fried Signed-off-by: Patrick Delaunay --- (no changes since v2) Changes in v2: - remove unused element in the struct eqos_priv (NEW) drivers/net/dwc_eth_qos.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/net/dwc_eth_qos.c

[PATCH v3 3/6] net: eth-phy: manage subnode mdio0

2021-07-20 Thread Patrick Delaunay
Bind any subnode with name beginning by mdio, mdio0 for example, and not only the "mdio" as namei of subnode. Reviewed-by: Ramon Fried Signed-off-by: Patrick Delaunay --- (no changes since v2) Changes in v2: - update eth-phy driver to support STM32 binding with a mdio0 subnode (NEW)

[PATCH v3 2/6] net: eth-phy: use dev_dbg and log_notice

2021-07-20 Thread Patrick Delaunay
eviewed-by: Ramon Fried Signed-off-by: Patrick Delaunay --- (no changes since v2) Changes in v2: - use log macro in eth-phy driver (NEW) drivers/net/eth-phy-uclass.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/net/eth-phy-uclass.c b/drive

[PATCH v3 1/6] net: eth-phy: add support of device tree configuration for gpio reset

2021-07-20 Thread Patrick Delaunay
phy drivers for this uclass UCLASS_ETH_PHY. Signed-off-by: Patrick Delaunay --- Changes in v3: - allow compilation without DM_GPIO Changes in v2: - Update eth-phy driver (NEW) drivers/net/eth-phy-uclass.c | 56 1 file changed, 56 insertions(+) diff --git a

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

2021-07-20 Thread Patrick Delaunay
a common null ops (NEW) Patrick Delaunay (6): net: eth-phy: add support of device tree configuration for gpio reset net: eth-phy: use dev_dbg and log_notice net: eth-phy: manage subnode mdio0 net: dwc_eth_qos: remove the field phyaddr of the struct eqos_priv net: dwc_eth_qos: use generic

Re: [PATCH v2 1/6] net: eth-phy: add support of device tree configuration for gpio reset

2021-07-20 Thread Patrick DELAUNAY
Hi Ramon, On 4/26/21 5:46 PM, Patrick Delaunay wrote: The gpio reset and the assert or deassert delay are defined in generic binding of the ethernet phy in Linux: Documentation/devicetree/bindings/net/ethernet-phy.yaml reset-gpios: maxItems: 1 description: The GPIO phandle

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

2021-07-20 Thread Patrick DELAUNAY
Hi Ahmad On 7/15/21 7:11 PM, Ahmad Fatoum wrote: Hello Patrick, On 15.07.21 17:22, Patrick Delaunay wrote: With FIP support in TF-A (when CONFIG_STM32MP15x_STM32IMAGE is not activated), the DT nodes needed by OP-TEE are added by OP-TEE firmware in U-Boot device tree, present in FIP. What

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

2021-07-19 Thread Patrick DELAUNAY
Hi Heinrich On 7/18/21 9:29 AM, Heinrich Schuchardt wrote: On 7/9/21 12:46 PM, Patrick Delaunay wrote: 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 t

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

2021-07-19 Thread Patrick DELAUNAY
: mark.kette...@xs4all.nl Reviewed-by: Patrick Delaunay Sorry for the delay. If this is still needed, you'll need to address the build failures on platforms such as cgtqmx8: +(cgtqmx8) board/congatec/cgtqmx8/cgtqmx8.c:377:6: error: conflicting types for 'reset_cpu' +(cgtqmx8) void reset

[PATCH v2 0/2] arm64: Update memcpy_{from, to}io() helpers

2021-07-19 Thread Patrick Delaunay
when cpu_func.h is included Patrice Chotard (1): arm64: Update memcpy_{from, to}io() helpers Patrick Delaunay (1): arm: use the correct prototype for reset_cpu function arch/arm/cpu/armv8/cache_v8.c | 10 ++ arch/arm/include/asm/io.h | 25 +++--

[PATCH v2 1/2] arm: use the correct prototype for reset_cpu function

2021-07-19 Thread Patrick Delaunay
Align reset_cpu function with the next prototypes in sysreset.h or in cpu_func.h to solve compilation issue: void reset_cpu(void); This patch solves the prototype conflict when cpu_func.h is included. Signed-off-by: Patrick Delaunay --- Changes in v2: - NEW: solve conflicts when cpu_func.h

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

2021-07-19 Thread Patrick Delaunay
in AARCH64 in case the normal memory address is not 64Bits aligned. To avoid such situation, forbid usage of normal memory cast to (u64 *) in case MMU is not enabled. Signed-off-by: Patrice Chotard Reviewed-by: Patrick Delaunay Cc: mark.kette...@xs4all.nl Signed-off-by: Patrick Delaunay

[PULL] Pull request for u-boot master / v2021.10 = u-boot-stm32-20210715

2021-07-16 Thread Patrick DELAUNAY
clock - STM32MP1: remove mmc alias and directly use device instance in boot_instance variable Patrick Delaunay (16):   configs: stm32mp1: remove splashimage and add fdtoverlay_addr_r   stm32mp: stm32prog: fix the content of

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

2021-07-16 Thread Patrick DELAUNAY
Hi, On 7/6/21 5:19 PM, Patrick Delaunay wrote: Use the device sequence number in boot_instance variable and no more the SDMMC instance provided by ROM code/TF-A. After this patch we don't need to define the mmc alias in device tree, for example: mmc0 = &sdmmc1; mmc1 = &sd

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

2021-07-16 Thread Patrick DELAUNAY
Hi, On 7/6/21 5:19 PM, Patrick Delaunay wrote: 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

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

2021-07-16 Thread Patrick DELAUNAY
Hi, On 7/5/21 9:39 AM, Patrick Delaunay wrote: 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

Re: [PATCH] configs: stm32mp1: activate command rng

2021-07-16 Thread Patrick DELAUNAY
Hi, On 6/29/21 12:08 PM, Patrick Delaunay wrote: 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

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

2021-07-16 Thread Patrick DELAUNAY
Hi, On 6/29/21 12:04 PM, Patrick Delaunay wrote: 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

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

2021-07-16 Thread Patrick DELAUNAY
Hi, On 6/29/21 12:04 PM, Patrick Delaunay wrote: Add the support of SYSCFG clock used by syscon driver to prepare the clock management of STM32MP_SYSCON_SYSCFG. This clock is already defined in kernel device tree, stm32mp151.dtsi but not yet supported in the syscon driver: syscfg: syscon

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

2021-07-16 Thread Patrick DELAUNAY
Hi, On 6/28/21 2:56 PM, Patrick Delaunay wrote: The expected sequence to close the device 1/ Load key in DDR with any supported load command 2/ Update OTP with key: STM32MP> stm32key read At this point the device is able to perform image authentication but non-authenticated images can st

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

2021-07-16 Thread Patrick DELAUNAY
Hi, On 6/28/21 2:56 PM, Patrick Delaunay wrote: 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 ++--

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

2021-07-16 Thread Patrick DELAUNAY
Hi, On 6/28/21 2:56 PM, Patrick Delaunay wrote: 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(-) Applied to u-boot-stm/master, thanks

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

2021-07-16 Thread Patrick DELAUNAY
Hi, On 6/28/21 2:56 PM, Patrick Delaunay wrote: 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 th

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

2021-07-16 Thread Patrick DELAUNAY
Hi, On 6/28/21 2:55 PM, Patrick Delaunay wrote: 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(-) Applied to u-boot-stm/master, thanks

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

2021-07-16 Thread Patrick DELAUNAY
Hi, On 6/28/21 2:55 PM, Patrick Delaunay wrote: 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

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

2021-07-16 Thread Patrick DELAUNAY
Hi, On 6/28/21 2:55 PM, Patrick Delaunay wrote: 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

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

2021-07-16 Thread Patrick DELAUNAY
Hi, On 6/28/21 2:44 PM, Patrick Delaunay wrote: 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") Si

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

2021-07-16 Thread Patrick DELAUNAY
Hi, On 6/28/21 2:42 PM, Patrick Delaunay wrote: Add the variable used by PXE command for fdtoverlays support since the commit 69076dff2284 ("cmd: pxe: add support for FDT overlays"). Reused the unused "splashimage" address as CONFIG_SPLASH_SOURCE and CONFIG_VIDEO_LOGO are

[PATCH] clk: stm32mp1: add support of BSEC clock

2021-07-16 Thread Patrick Delaunay
cure clock are not provided by secure world with SCMI. Signed-off-by: Patrick Delaunay --- drivers/clk/clk_stm32mp1.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c index 48c9514ba0..96e175f221 100644 --- a/drivers/clk/clk_stm32mp1.c +++

Re: [PATCH v4 1/5] spl: mmc: Support OP-TEE payloads in Falcon mode

2021-07-15 Thread Patrick DELAUNAY
: Tom Rini Reviewed-by: Patrick Delaunay --- common/spl/spl_mmc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index add2785b4e3..bab558d055f 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -230,8 +230,10 @@

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

2021-07-15 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 Reviewed-by: Patrice Chotard --- Changes in v2: - synchronize defconfig with latest change arch/arm/dts/stm32mp

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

2021-07-15 Thread Patrick Delaunay
) which is no more generated. Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- Changes in v2: - fix one typo: s/ enought / enough doc/board/st/stm32mp1.rst | 166 ++ 1 file changed, 97 insertions(+), 69 deletions(-) diff --git a/doc/board/st

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

2021-07-15 Thread Patrick Delaunay
ll be removed after TF-A migration to FIP support. Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- (no changes since v1) arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c | 2 ++ arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 4 arch/arm/mach-stm32mp/cmd_stm3

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

2021-07-15 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 Reviewed-by: Patrice Chotard --- (no changes since v1) arch/arm/mach-stm32mp

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

2021-07-15 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 Reviewed-by: Pa

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

2021-07-15 Thread Patrick Delaunay
ndle TF-A boot with FIP http://patchwork.ozlabs.org/project/uboot/list/?series=252477&state=* Changes in v2: - synchronize defconfig with latest change - fix one typo: s/ enought / enough Patrick Delaunay (5): arm: stm32mp: add config for STM32IMAGE support arm: stm32mp: handle the OP-T

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

2021-07-15 Thread Patrick DELAUNAY
Hi Simon On 7/11/21 2:01 AM, Simon Glass wrote: Hi Patrick, On Thu, 8 Jul 2021 at 03:17, Patrick Delaunay wrote: In next TF-A version the stm32mp1 platform will support the Firmware Image Package (FIP) [1], a container filled with: - the U-Boot binary = u-boot-nodtb.bin - the U-Boot device

[PATCH] clk: stm32mp1: add support of missing SPI clocks

2021-07-09 Thread Patrick Delaunay
Reviewed-by: Patrice Chotard Signed-off-by: Patrick Delaunay --- drivers/clk/clk_stm32mp1.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c index 0c0ef366a1..599c2e7095 100644 --- a/drivers/clk/clk_stm32mp1.c +++ b/drivers

[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 --

<    5   6   7   8   9   10   11   12   13   14   >