[PATCH v2 14/18] drivers: tee: optee: add support for dynamic optee memory base address

2024-01-16 Thread Marco Felsch
Make use of the platform provided optee memory base address. Fallback to the current behaviour if the platform doesn't provide the optee memory base. Signed-off-by: Marco Felsch --- drivers/tee/optee/of_fixup.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff

[PATCH v2 06/18] common: limit BOOTM_OPTEE to 32bit systems

2024-01-16 Thread Marco Felsch
On ARM64 OP-TEE loading requires to be in EL3 so we can't load OP-TEE via bootm on these systems. Signed-off-by: Marco Felsch --- common/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/Kconfig b/common/Kconfig index 02f376c59757..c38cfaed0e9f 100644

[PATCH v2 05/18] ARM: i.MX8M: scratch: add optee_hdr area

2024-01-16 Thread Marco Felsch
Add a new scratch storage slot for possible optee-hdr information which have to passed between barebox-pbl and barebox-proper. Reserve 512 bytes between the bootrom-log and the optee-hdr in case the bootrom-log need more space in the future. Signed-off-by: Marco Felsch --- arch/arm/mach-imx

[PATCH v2 08/18] optee: add support to verify 64-bit headers as well

2024-01-16 Thread Marco Felsch
From: Rouven Czerwinski Guard the check by IS_ENABLED() to make it possible to verify 32-bit and 64-bit optee headers. Signed-off-by: Rouven Czerwinski Signed-off-by: Marco Felsch --- common/optee.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/common/optee.c

[PATCH v2 07/18] common: add OPTEE_SHM_SIZE to configure optee shared memory

2024-01-16 Thread Marco Felsch
An size of 4M seems quite large and upstream OP-TEE code mostly uses 2M for all i.MX platforms. However keep the 4M as default but make it configurable for integrators which want to use the autom. OF fixup logic. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/imx8m.c | 3

[PATCH v2 04/18] ARM: i.MX8M: romapi: refactor saving the bootrom log

2024-01-16 Thread Marco Felsch
Saving the bootrom log to the scratch area was the last open coded part. Move the code to the scratch module to make the scratch handling completely opaque. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/atf.c | 12 arch/arm/mach-imx/romapi.c | 6 ++ arch/arm/mach-imx

[PATCH v2 02/18] ARM: i.MX8M: bundle imx-scratch code

2024-01-16 Thread Marco Felsch
The scatch code spread over the code base which is ok as long as we use it for the bootrom-log only. This commit bundles the scratch code into a own module to make it easier to adapt later on and to make the scratch space independent of CONFIG_ARCH_IMX_ROMAPI. Signed-off-by: Marco Felsch

[PATCH v2 03/18] ARM: i.MX8M: scratch: make imx_scratch_space private

2024-01-16 Thread Marco Felsch
Make the scratch layout opaque and provide required accessor functions to make it easier to extent it later on. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/romapi.c | 6 ++ arch/arm/mach-imx/scratch.c | 12 +++- include/mach/imx/scratch.h | 6 ++ 3 files changed, 15

[PATCH v2 00/18] Dynamic OP-TEE Loading

2024-01-16 Thread Marco Felsch
on origin/next (c324e9ea7f8808ae069cd8bd0aa53021c1239bd2). Regards, Marco Marco Felsch (17): ARM: i.MX8M: atf: make use of imx8m*_save_bootrom_log macros ARM: i.MX8M: bundle imx-scratch code ARM: i.MX8M: scratch: make imx_scratch_space private ARM: i.MX8M: romapi: refactor saving

[PATCH v2 01/18] ARM: i.MX8M: atf: make use of imx8m*_save_bootrom_log macros

2024-01-16 Thread Marco Felsch
Make use of the already existing macros and fix the memory bus width for the i.MX8MQ. Signed-off-by: Marco Felsch Reviewed-by: Ahmad Fatoum --- arch/arm/mach-imx/atf.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-imx/atf.c b/arch/arm/mach-imx

[PATCH v2 09/18] optee: add header version check

2024-01-16 Thread Marco Felsch
OPTEE supports two header versions right now we do only support V1. Signed-off-by: Marco Felsch --- common/optee.c | 5 + include/tee/optee.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/common/optee.c b/common/optee.c index fd2b03d06d2d..6a8084839619 100644

[PATCH] fixup! habv4: use hab rom implementation of report_event

2024-01-16 Thread Marco Felsch
--- drivers/hab/habv4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c index 4e401ca9d362..87c96812c43e 100644 --- a/drivers/hab/habv4.c +++ b/drivers/hab/habv4.c @@ -318,7 +318,7 @@ static enum hab_status imx8m_report_event(enum

Re: [PATCH] firmware: fix external firmware dependencies

2024-01-16 Thread Marco Felsch
. > > > > Also, use $$(wildcard $(fwdir)/%) instead of $(fwdir)/% to successfully > > compile when the external firmware file is missing. > > > > Signed-off-by: Sascha Hauer > > Thanks for fixing! +1 :) > Reviewed-by: Ahmad Fatoum Reviewed-by: Marco Felsch &g

Re: [PATCH 2/3] ARM: i.MX8M: return error if imx_load_image can't honour entry address

2024-01-16 Thread Marco Felsch
nd change the condition, so entry == address results > in an explicit warning message immediately. > > Reported-by: Marco Felsch > Signed-off-by: Ahmad Fatoum > --- > arch/arm/mach-imx/xload-common.c | 32 +++- > 1 file changed, 31 insertions(+), 1 d

Re: [PATCH 2/2] ARM: i.MX8M: convert the machine init to the soc driver

2024-01-11 Thread Marco Felsch
On 24-01-11, Sascha Hauer wrote: > On Thu, Jan 11, 2024 at 12:51:20PM +0100, Marco Felsch wrote: > > Convert the i.MX8M machine init code to the previously introduced soc > > framework. The soc driver was mostly copied from Linux with slightly > > adaptions for barebox. To the

Re: [PATCH 07/18] common: add OPTEE_SHM_SIZE to configure optee shared memory

2024-01-11 Thread Marco Felsch
On 24-01-11, Marco Felsch wrote: > An size of 4M seems quite large and upstream OP-TEE code mostly uses 2M > for all i.MX platforms. However keep the 4M as default but make it > configurable for integrators which want to use the autom. OF fixup > logic. > > Signed-of

Re: [PATCH 01/18] ARM: i.MX8M: atf: make use of imx8m*_save_bootrom_log macros

2024-01-11 Thread Marco Felsch
On 24-01-11, Ahmad Fatoum wrote: > On 11.01.24 12:48, Marco Felsch wrote: > > if (IS_ENABLED(CONFIG_FIRMWARE_IMX8MN_OPTEE)) { > > @@ -305,9 +305,9 @@ __noreturn void > > imx8mq_load_and_start_image_via_tfa(void) > > const void *bl31; > > size_t bl31

Re: [PATCH 12/18] ARM64: mmu: add dynamic optee memory mapping support

2024-01-11 Thread Marco Felsch
On 24-01-11, Ahmad Fatoum wrote: > On 11.01.24 12:48, Marco Felsch wrote: > > Use the dynamic optee memory base address for the early mapping if > > possible and fallback to the static mapping if the query failed. > > > > Signed-off-by: Marco Felsch > > This pa

[PATCH 1/2] Port SoC framework from Linux

2024-01-11 Thread Marco Felsch
required SoC information and provide a standard interface to query the data via device params. Signed-off-by: Marco Felsch --- drivers/base/Kconfig| 3 + drivers/base/Makefile | 1 + drivers/base/soc.c | 123 include/linux/sys_soc.h | 39

[PATCH 2/2] ARM: i.MX8M: convert the machine init to the soc driver

2024-01-11 Thread Marco Felsch
: string) | revision: 1.0 (type: string) | serial_number: 15182A09DAB5B3C9 (type: string) | soc_id: i.MX8MM (type: string) Signed-off-by: Marco Felsch --- Hi, this patch requires [1] to apply clean. [1] https://lore.barebox.org/barebox/2024014841.2676939-1-m.fel...@pengutronix.de

[PATCH 16/18] ARM: i.MX8M: allow board code to configure the bl33 loadaddr

2024-01-11 Thread Marco Felsch
and barebox afterwards e.g. if multiple DRAM setups are required for the platform/som-family. A nice side effect of this change is to bundle the usage of MX8M*_ATF_BL33_BASE_ADDR at a single place. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/atf.c| 42

[PATCH 17/18] ARM: i.MX8M: cleanup MX8M*_ATF_BL33_BASE_ADDR defines

2024-01-11 Thread Marco Felsch
Instead of having three defines for the same just use the base definition which is MX8M_ATF_BL33_BASE_ADDR and drop the others. Signed-off-by: Marco Felsch --- Documentation/boards/imx/zii-imx8mq-dev/openocd.cfg | 10 +- arch/arm/boards/phytec-som-imx8mq/lowlevel.c| 2 +- arch

[PATCH 15/18] ARM: i.MX8M: atf: add support for optee hdr parsing

2024-01-11 Thread Marco Felsch
The OP-TEE binary can contain a header with useful information like loadaddr and size. This commit adds the support to take the header loadaddr into account. If the header is not found the common builtin loadaddr is used. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/atf.c | 27

[PATCH 18/18] ARM: i.MX8M: fix optee of-fixup logic

2024-01-11 Thread Marco Felsch
ory region nodes but the barebox builtin dts don't we do add additional reserved memory nodes which may conflict due to different name scheme: vs. @. Move the "/firmware/optee" check into the of_optee_fixup() so the check is done on the correct dtb root nodes. Signed-off-by: Marco Felsch

[PATCH 13/18] ARM: i.MX8M: add dynamic optee memory of-fixup support

2024-01-11 Thread Marco Felsch
Try to set the dynamic optee memory base address if the builtin optee binary had an header. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/imx8m.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c index 90dc12ca18cc..6f8574199113

[PATCH 14/18] drivers: tee: optee: add support for dynamic optee memory base address

2024-01-11 Thread Marco Felsch
Make use of the platform provided optee memory base address. Fallback to the current behaviour if the platform doesn't provide the optee memory base. Signed-off-by: Marco Felsch --- drivers/tee/optee/of.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git

[PATCH 04/18] ARM: i.MX8M: romapi: refactor saving the bootrom log

2024-01-11 Thread Marco Felsch
Saving the bootrom log to the scratch area was the last open coded part. Move the code to the scratch module to make the scratch handling completely opaque. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/atf.c | 12 arch/arm/mach-imx/romapi.c | 6 ++ arch/arm/mach-imx

[PATCH 02/18] ARM: i.MX8M: bundle imx-scratch code

2024-01-11 Thread Marco Felsch
The scatch code spread over the code base which is ok as long as we use it for the bootrom-log only. This commit bundles the scratch code into a own module to make it easier to adapt later on and to make the scratch space independent of CONFIG_ARCH_IMX_ROMAPI. Signed-off-by: Marco Felsch

[PATCH 12/18] ARM64: mmu: add dynamic optee memory mapping support

2024-01-11 Thread Marco Felsch
Use the dynamic optee memory base address for the early mapping if possible and fallback to the static mapping if the query failed. Signed-off-by: Marco Felsch --- arch/arm/cpu/mmu_64.c | 14 -- arch/arm/mach-imx/esdctl.c | 4 common/Makefile| 2 +- 3 files

[PATCH 11/18] optee: optee_verify_header: constify optee_header

2024-01-11 Thread Marco Felsch
Signed-off-by: Marco Felsch --- common/optee.c | 2 +- include/tee/optee.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/optee.c b/common/optee.c index 2ae28b172bbb..34667f1f51e0 100644 --- a/common/optee.c +++ b/common/optee.c @@ -8,7 +8,7 @@ static u64

[PATCH 05/18] ARM: i.MX8M: scratch: add optee_hdr area

2024-01-11 Thread Marco Felsch
Add a new scratch storage slot for possible optee-hdr information which have to passed between barebox-pbl and barebox-proper. Reserve 512 bytes between the bootrom-log and the optee-hdr in case the bootrom-log need more space in the future. Signed-off-by: Marco Felsch --- arch/arm/mach-imx

[PATCH 07/18] common: add OPTEE_SHM_SIZE to configure optee shared memory

2024-01-11 Thread Marco Felsch
An size of 4M seems quite large and upstream OP-TEE code mostly uses 2M for all i.MX platforms. However keep the 4M as default but make it configurable for integrators which want to use the autom. OF fixup logic. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/imx8m.c | 2 +- common/Kconfig

[PATCH 09/18] optee: add header version check

2024-01-11 Thread Marco Felsch
OPTEE supports two header versions right now we do only support V1. Signed-off-by: Marco Felsch --- common/optee.c | 5 + include/tee/optee.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/common/optee.c b/common/optee.c index fd2b03d06d2d..6a8084839619 100644

[PATCH 03/18] ARM: i.MX8M: scratch: make imx_scratch_space private

2024-01-11 Thread Marco Felsch
Make the scratch layout opaque and provide required accessor functions to make it easier to extent it later on. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/romapi.c | 6 ++ arch/arm/mach-imx/scratch.c | 12 +++- include/mach/imx/scratch.h | 6 ++ 3 files changed, 15

[PATCH 10/18] optee: add helper functions to set/get the optee memory base

2024-01-11 Thread Marco Felsch
Provide helper functions to set/get the optee memory base address gathered previously from the builtin optee binary header. Signed-off-by: Marco Felsch --- common/optee.c | 27 +++ include/tee/optee.h | 2 ++ 2 files changed, 29 insertions(+) diff --git a/common

[PATCH 00/18] Dynamic OP-TEE Loading

2024-01-11 Thread Marco Felsch
the eMMC and QSPI boot mode. The USB boot mode was tested on i.MX8MM only. Regards, Marco Marco Felsch (17): ARM: i.MX8M: atf: make use of imx8m*_save_bootrom_log macros ARM: i.MX8M: bundle imx-scratch code ARM: i.MX8M: scratch: make imx_scratch_space private ARM: i.MX8M: romapi: refactor

[PATCH 08/18] optee: add support to verify 64-bit headers as well

2024-01-11 Thread Marco Felsch
From: Rouven Czerwinski Guard the check by IS_ENABLED() to make it possible to verify 32-bit and 64-bit optee headers. Signed-off-by: Rouven Czerwinski Signed-off-by: Marco Felsch --- common/optee.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/common/optee.c

[PATCH 06/18] common: limit BOOTM_OPTEE to 32bit systems

2024-01-11 Thread Marco Felsch
On ARM64 OP-TEE loading requires to be in EL3 so we can't load OP-TEE via bootm on these systems. Signed-off-by: Marco Felsch --- common/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/Kconfig b/common/Kconfig index 76b28ceaafe0..1de76651fddf 100644

[PATCH 01/18] ARM: i.MX8M: atf: make use of imx8m*_save_bootrom_log macros

2024-01-11 Thread Marco Felsch
Make use of the already existing macros and fix the memory bus width for the i.MX8MQ. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/atf.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-imx/atf.c b/arch/arm/mach-imx/atf.c index e1a89ef543cd

[PATCH] firmware: fix missing firmware handling for external firmware

2024-01-10 Thread Marco Felsch
file is created and the build continues till the linking process (like we do for the other firmware). Signed-off-by: Marco Felsch --- firmware/Makefile| 6 +++--- images/Makefile | 2 +- scripts/Makefile.lib | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/firmware

Re: [PATCH 2/4] ARM: boars: i.MX8MQ: align SPDX header with other imxcfg files

2024-01-02 Thread Marco Felsch
Hi Sascha, On 24-01-02, Marco Felsch wrote: > Align the SPDX-License-Identifier information with the other .imxcfg > files. While on it add a space to separate the gencsf header from the > the remaining options. No functional changes. > > Signed-off-by: Marco Felsch I notice

[PATCH 1/4] ARM: boards: i.MX8M: add HAB support

2024-01-02 Thread Marco Felsch
The gencsf header is required to build HAB (secure-boot) compatible images. This commit add the support for this for all i.MX8M boards. To finally build HAB compatible images the CONFIG_HABV4 and CONFIG_HABV4_IMAGE_SIGNED must be enabled. Signed-off-by: Marco Felsch --- .../boards/innocomm

[PATCH 3/4] images: Makefile.imx: add i.MX9 comment

2024-01-02 Thread Marco Felsch
We have separate sections for each i.MX SoC within the makefile, add one for the i.MX9 SoC too. Signed-off-by: Marco Felsch --- images/Makefile.imx | 1 + 1 file changed, 1 insertion(+) diff --git a/images/Makefile.imx b/images/Makefile.imx index 693f7ca12a7e..a4f50892eb0d 100644 --- a/images

[PATCH 4/4] ARM: boards: polyhex-debix: fix file mode for 8g-lpddr4-timing.c

2024-01-02 Thread Marco Felsch
Drop the execution mode from the file. Signed-off-by: Marco Felsch --- arch/arm/boards/polyhex-debix/8g-lpddr4-timing.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 arch/arm/boards/polyhex-debix/8g-lpddr4-timing.c diff --git a/arch/arm/boards/polyhex-de

[PATCH 2/4] ARM: boars: i.MX8MQ: align SPDX header with other imxcfg files

2024-01-02 Thread Marco Felsch
Align the SPDX-License-Identifier information with the other .imxcfg files. While on it add a space to separate the gencsf header from the the remaining options. No functional changes. Signed-off-by: Marco Felsch --- arch/arm/boards/mnt-reform/flash-header-mnt-reform.imxcfg | 3 ++- arch

[PATCH] mtd: spi-nor: add support for Winbond w25q256jwm

2024-01-02 Thread Marco Felsch
Add entry for Winbond w25q256jwm. Flags are aligned with the Linux spi-nor/winbond driver. Signed-off-by: Marco Felsch --- drivers/mtd/spi-nor/spi-nor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 5ad95ff50d1b

Re: [PATCH 1/2] ARM: boards: polyhex-debix: enable HAB support

2023-12-20 Thread Marco Felsch
On 23-12-20, Ahmad Fatoum wrote: > Hello Marco, > > On 20.12.23 15:54, Marco Felsch wrote: > > From: Rouven Czerwinski > > > > Include the gencsf header to enable the secure-boot images. > > > > Signed-off-by: Rouven Czerwinski > > Any down

[PATCH 2/2] ARM: boards: polyhex-debix: fix file mode for 8g-lpddr4-timing.c

2023-12-20 Thread Marco Felsch
Drop the execution mode from the file. Signed-off-by: Marco Felsch --- arch/arm/boards/polyhex-debix/8g-lpddr4-timing.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 arch/arm/boards/polyhex-debix/8g-lpddr4-timing.c diff --git a/arch/arm/boards/polyhex-de

[PATCH 1/2] ARM: boards: polyhex-debix: enable HAB support

2023-12-20 Thread Marco Felsch
From: Rouven Czerwinski Include the gencsf header to enable the secure-boot images. Signed-off-by: Rouven Czerwinski --- arch/arm/boards/polyhex-debix/flash-header-polyhex-debix.imxcfg | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH] ARM: i.MX8M: bootrom: fix load image size

2023-11-15 Thread Marco Felsch
On 23-11-15, Sascha Hauer wrote: > On Mon, Nov 13, 2023 at 10:04:38AM +0100, Marco Felsch wrote: > > Without the proper aligned image size we may encounter host load errors > > like: > > > > | found i.MX8MP USB device [1fc9:0146] > > | No dcd table in this ivt &g

[PATCH] scripts: imx-image: don't pad the final binary for i.MX8M devices

2023-11-14 Thread Marco Felsch
these SoCs. Signed-off-by: Marco Felsch --- scripts/imx/imx-image.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c index 1f96b383901f..a5639d696931 100644 --- a/scripts/imx/imx-image.c +++ b/scripts/imx/i

Re: [PATCH] mci: core: add partitioning_completed device parameter

2023-11-14 Thread Marco Felsch
On 23-11-14, Marco Felsch wrote: > Add mmcX.partitioning_completed parameter so it can be queried by > scripts and board code. > > Signed-off-by: Marco Felsch Please ignore this patch, I send the wrong patch. Regards, Marco

[PATCH 2/8] mci: core: check switch error for switch command

2023-11-14 Thread Marco Felsch
From: LI Qingwu check whether SWITCH_ERROR is set, if set the device did not switch to the expected mode as requested by the SWITCH command. Signed-off-by: LI Qingwu [m.fel...@pengutronix.de: align commit message and minor cleanups] Signed-off-by: Marco Felsch --- drivers/mci/mci-core.c | 15

[PATCH 6/8] mci: export mci_get_ext_csd as helper

2023-11-14 Thread Marco Felsch
Make the mci_get_ext_csd() function a helper to make it usable for others. Signed-off-by: Marco Felsch --- commands/mmc.c | 17 - drivers/mci/mci-core.c | 17 + include/mci.h | 1 + 3 files changed, 18 insertions(+), 17 deletions(-) diff --git

[PATCH 4/8] commands: mmc: add partition_complete subcommand

2023-11-14 Thread Marco Felsch
From: LI Qingwu A separate command is less error prone in case both the "write reliability" and the "enhanced area" feature should be set. Signed-off-by: LI Qingwu Signed-off-by: Marco Felsch --- commands/mmc.c | 35 ++- 1 file changed,

[PATCH 1/8] mci: correct ENH_ATTRIBUTE_EN_MASK bit mask

2023-11-14 Thread Marco Felsch
From: LI Qingwu Extended CSD register PARTITIONING_SUPPORT ENH_ATTRIBUTE_EN is bit 1 instead of 0 Signed-off-by: LI Qingwu Signed-off-by: Marco Felsch --- include/mci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mci.h b/include/mci.h index 3e93f378e4a3

[PATCH 7/8] mci: core: cosmetic cleanup mci_register

2023-11-14 Thread Marco Felsch
Just use one generic 'struct param_d' variable instead of having two. Signed-off-by: Marco Felsch --- drivers/mci/mci-core.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index 8ce97b5d5cdd..70e367997763

[PATCH 5/8] commands: mmc: deprecate -c option

2023-11-14 Thread Marco Felsch
Deprecate the -c options since it's now more error prone in case both the "enhanced area" and the "write reliability" feature should be enabled. Instead users should use the separate "partition_complete" command to make it more clear. Signed-off-by: Marco Felsch

[PATCH 8/8] mci: core: add partitioning_completed device parameter

2023-11-14 Thread Marco Felsch
Add mmcX.partitioning_completed parameter so it can be queried by scripts and board code. Signed-off-by: Marco Felsch --- drivers/mci/mci-core.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index 70e367997763

[PATCH 3/8] commands: mmc: add write_reliability subcommand

2023-11-14 Thread Marco Felsch
From: LI Qingwu Add new sub-command to enable the write reliability. Signed-off-by: LI Qingwu [m.fel...@pengutronix.de: minor cleanups] Signed-off-by: Marco Felsch --- commands/mmc.c | 68 +- include/mci.h | 4 +++ 2 files changed, 71

[PATCH] mci: core: add partitioning_completed device parameter

2023-11-14 Thread Marco Felsch
Add mmcX.partitioning_completed parameter so it can be queried by scripts and board code. Signed-off-by: Marco Felsch --- drivers/mci/mci-core.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index 70e367997763

Re: [PATCH master] ARM: i.MX8M: bootrom: fix load image size

2023-11-13 Thread Marco Felsch
Hi all, On 23-11-13, Marco Felsch wrote: > Without the proper aligned image size we may encounter host load errors > like: > > | found i.MX8MP USB device [1fc9:0146] > | No dcd table in this ivt > | dl_command err=-1, last_trans=-1 > | 4 in err=-4, last_trans=0 00 00

[PATCH master] ARM: i.MX8M: bootrom: fix load image size

2023-11-13 Thread Marco Felsch
the host tries to send the complete image which may contain alignment bytes at the end. Fix this by request always 4K aligned sizes. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/romapi.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-imx/romapi.c b/arch/arm/mach-imx

[PATCH] ARM: i.MX8M: bootrom: fix load image size

2023-11-13 Thread Marco Felsch
the host tries to send the complete image which may contain alignment bytes at the end. Fix this by request always 4K aligned sizes. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/romapi.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-imx/romapi.c b/arch/arm/mach-imx

Re: [PATCH v2 1/2] usb: gadget: initialize serialnumber

2023-10-27 Thread Marco Felsch
On 23-10-27, Sascha Hauer wrote: > On Fri, Oct 27, 2023 at 10:09:43AM +0200, Marco Felsch wrote: > > On 23-10-27, Sascha Hauer wrote: > > > On Thu, Oct 26, 2023 at 11:32:10PM +0200, Ahmad Fatoum wrote: > > > > On 26.10.23 16:43, Marco Felsch wrote: > > >

Re: [PATCH v2 1/2] usb: gadget: initialize serialnumber

2023-10-27 Thread Marco Felsch
On 23-10-27, Sascha Hauer wrote: > On Thu, Oct 26, 2023 at 11:32:10PM +0200, Ahmad Fatoum wrote: > > On 26.10.23 16:43, Marco Felsch wrote: > > > Windows hosts do require the serial number to be set to any ascii string > > > to enumerate correctly. Set the serial numb

Re: [PATCH v2 1/2] usb: gadget: initialize serialnumber

2023-10-26 Thread Marco Felsch
On 23-10-26, Ahmad Fatoum wrote: > On 26.10.23 16:43, Marco Felsch wrote: > > Windows hosts do require the serial number to be set to any ascii string > > to enumerate correctly. Set the serial number if provided or to "unset" > > if not to provide a sane def

[PATCH v2 2/2] scripts: get_maintainers: drop --status enforcement

2023-10-26 Thread Marco Felsch
The status parameter is never used so drop it and stop bother the user of the script. Signed-off-by: Marco Felsch --- scripts/get_maintainer.pl | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 7c0d50333400..a19c0e7305d0 100755

[PATCH v2 1/2] usb: gadget: initialize serialnumber

2023-10-26 Thread Marco Felsch
Windows hosts do require the serial number to be set to any ascii string to enumerate correctly. Set the serial number if provided or to "unset" if not to provide a sane default which works for both hosts. Reported-by: Andrey Zhizhikin Signed-off-by: Marco Felsch --- Changelog v

Re: [PATCH 2/2] scripts: get_maintainers: drop --status enforcement

2023-10-26 Thread Marco Felsch
On 23-10-26, Ahmad Fatoum wrote: > On 26.10.23 16:27, Marco Felsch wrote: > > On 23-10-26, Ahmad Fatoum wrote: > >> On 26.10.23 14:46, Marco Felsch wrote: > >>> The status parameter is never used so drop it and stop bother the user > >>> of the scrip

Re: [PATCH 1/2] usb: gadget: initialize serialnumber as empty string

2023-10-26 Thread Marco Felsch
On 23-10-26, Ahmad Fatoum wrote: > Hello Marco, > > On 26.10.23 14:46, Marco Felsch wrote: > > Windows hosts do require the serial number to be set to any ascii string > > to enumerate correctly. Set the serial number to "empty" to provide a > > sane default

Re: [PATCH 2/2] scripts: get_maintainers: drop --status enforcement

2023-10-26 Thread Marco Felsch
On 23-10-26, Ahmad Fatoum wrote: > On 26.10.23 14:46, Marco Felsch wrote: > > The status parameter is never used so drop it and stop bother the user > > of the script. > > > > Signed-off-by: Marco Felsch > > Our get_maintainer.pl script doesn't

[PATCH 2/2] scripts: get_maintainers: drop --status enforcement

2023-10-26 Thread Marco Felsch
The status parameter is never used so drop it and stop bother the user of the script. Signed-off-by: Marco Felsch --- scripts/get_maintainer.pl | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 7c0d50333400..a19c0e7305d0 100755

[PATCH 1/2] usb: gadget: initialize serialnumber as empty string

2023-10-26 Thread Marco Felsch
Signed-off-by: Marco Felsch --- drivers/usb/gadget/udc/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c index b58498680ad1..dc5d1daa14bf 100644 --- a/drivers/usb/gadget/udc/core.c +++ b/drivers/usb/gadget/

Re: [PATCH] ARM: i.MX8M: limit PBL size to 0x3f000

2023-10-20 Thread Marco Felsch
On 23-10-20, Ahmad Fatoum wrote: > On 20.10.23 15:03, Marco Felsch wrote: > > On 23-10-20, Ahmad Fatoum wrote: > >> On i.MX8M(Q/M/N/P), barebox PBL is loaded 0x1000 bytes into ITCM > > > > Nit: only the i.MX8MQ-EVK was converted. Don't know if the rest is > >

Re: [PATCH] ARM: i.MX8M: limit PBL size to 0x3f000

2023-10-20 Thread Marco Felsch
ng get_builtin_firmware_ext > to offload binaries into barebox proper. > > Signed-off-by: Ahmad Fatoum Reviewed-by: Marco Felsch > --- > images/Makefile.imx | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/images/Makefile.imx b/images/Makefile.imx > index 50f0a64

[PATCH] scripts: imx: add Makefile.mingw64

2023-10-18 Thread Marco Felsch
Add a small Makfile for building the imx-usb-loader.exe outside the Kbuild system. The user can compile the tool for windows by: make -f scripts/imx/Makfile.mingw64 LIBUSB_DIR=~/libusb-1.0.26 or by make -f scripts/imx/Makfile.mingw64 LIBUSB_DIR=~/libusb-1.0.26 O=win Signed-off-by: Marco

Re: [PATCH 4/4] imx-usb-loader: fix windows usage

2023-10-18 Thread Marco Felsch
On 23-10-18, Ahmad Fatoum wrote: > On 18.10.23 14:53, Marco Felsch wrote: > > On 23-10-18, Ahmad Fatoum wrote: > >> On 17.10.23 23:36, Marco Felsch wrote: > >>> This ports commit 561f0377db5e ("Transfer always specified report 2 > >>> length

Re: [PATCH 4/4] imx-usb-loader: fix windows usage

2023-10-18 Thread Marco Felsch
On 23-10-18, Ahmad Fatoum wrote: > On 17.10.23 23:36, Marco Felsch wrote: > > This ports commit 561f0377db5e ("Transfer always specified report 2 > > length") from imx_usb_loader[1] to our implementation. > > > > | commit 561f0377db5e1a36f5ab5e17f97d77

[PATCH 2/4] scripts: common: fix buffer freeing

2023-10-17 Thread Marco Felsch
We pass the wrong address to free in case of an error occured in preceding while-read loop if the loop is executed more than once. Fix this by use the outbuf which stores the original malloc'ed address. Signed-off-by: Marco Felsch --- scripts/common.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 4/4] imx-usb-loader: fix windows usage

2023-10-17 Thread Marco Felsch
9f1e22ab Signed-off-by: Marco Felsch --- scripts/imx/imx-usb-loader.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c index 676f077c25..ece4603b2b 100644 --- a/scripts/imx/imx-usb-loader.c +++ b/scripts/

[PATCH 3/4] usb: gadget: fsl_udc: lower state_complete constraints

2023-10-17 Thread Marco Felsch
Signal state_complete if the host send more data than specified first. This may become crucial with different host usb loader tools and different host OSes. Signed-off-by: Marco Felsch --- drivers/usb/gadget/udc/fsl_udc_pbl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 0/4] i.MX USB Loader Windows Fixes

2023-10-17 Thread Marco Felsch
Hi all, this small series enable our imx-usb-loader and barebox-pbl implementation to get loaded via Windows. Regards, Marco Marco Felsch (4): scripts: common: fix read_file_2 for windows scripts: common: fix buffer freeing usb: gadget: fsl_udc: lower state_complete constraints imx

[PATCH 1/4] scripts: common: fix read_file_2 for windows

2023-10-17 Thread Marco Felsch
From: Marco Felsch We need to specify the O_BINARY flag for Windows else the followed read() may detected a EOF condition. Signed-off-by: Marco Felsch --- scripts/common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/common.c b/scripts/common.c index

Re: [PATCH 21/26] scripts: imx: add helper to write CSF Blocks command

2023-10-17 Thread Marco Felsch
On 23-10-16, Sascha Hauer wrote: > On Mon, Oct 16, 2023 at 09:44:50AM +0200, Marco Felsch wrote: > > Hi Sascha, > > > > On 23-10-16, Marco Felsch wrote: > > > On 23-10-13, Sascha Hauer wrote: > > > > On Tue, Oct 10, 2023 at 04:33:09PM +0200, Marco Felsch

[PATCH v2 22/29] scripts: imx: add hab_qspi support

2023-10-17 Thread Marco Felsch
Add 'hab_qspi' command which can be specified by .imxcfg board config files to request building HAB compatible QSPI images. Signed-off-by: Marco Felsch --- Changelog: v2: - new patch - v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.fel...@pengutronix.de/T/#t include/mach

[PATCH v2 12/29] ARM: boards: i.MX8M: make use of new flexspi-imx8m{m,p}-cfg.h header

2023-10-17 Thread Marco Felsch
Use the new config header to make it more user-friendly. Signed-off-by: Marco Felsch --- Changelog: v2: - unchanged - v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.fel...@pengutronix.de/T/#t arch/arm/boards/nxp-imx8mm-evk/flash-header-imx8mm-evk.imxcfg | 3 +-- arch/arm

[PATCH v2 13/29] ARM: lds: introduce HAB_CSF_LEN define for the hab_csf section

2023-10-17 Thread Marco Felsch
Introduce the HAB_CSF_LEN to make conditional size changes easier later on. No functional change. Signed-off-by: Marco Felsch --- Changelog: v2: - unchanged - v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.fel...@pengutronix.de/T/#t arch/arm/lib/pbl.lds.S | 4 +++- 1

[PATCH v2 18/29] scripts: imx: add imx8m_get_offset_size helper

2023-10-17 Thread Marco Felsch
No functional change, just move the offset and signed_size calculation into a dedicated helper. Signed-off-by: Marco Felsch --- Changelog: v2: - unchanged - v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.fel...@pengutronix.de/T/#t scripts/imx/imx.c | 29

[PATCH v2 17/29] scripts: imx: fix i.MX8M CSF header placement

2023-10-17 Thread Marco Felsch
The current boot flow is broken if both the FlexSPI image and the HAB support is enabled. The HAB/CST tool need to take the additional FlexSPI IVT header into account which is added in between the first IVT header and the barebox pbl code. Signed-off-by: Marco Felsch --- Changelog: v2

[PATCH v2 16/29] scripts: imx: move flexspi_image() into header

2023-10-17 Thread Marco Felsch
Move the flexspi_image() into the imx.h header to make the code reusable between imx.c and imx-image.c. No functional change. Signed-off-by: Marco Felsch --- Changelog: v2: - unchanged - v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.fel...@pengutronix.de/T/#t scripts

[PATCH v2 21/29] scripts: imx: replace static string allocation

2023-10-17 Thread Marco Felsch
Make the CSF command string allocation more dynamic by introducing strcata(lloc)(). To make it more straight forward. Suggested-by: Sascha Hauer Signed-off-by: Marco Felsch --- Changelog: v2: - new patch suggested by Sascha - v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1

[PATCH v2 20/29] scripts: imx-image: hab_sign: refactor function

2023-10-17 Thread Marco Felsch
Refactor the code to make it possible to write multiple CSF blocks. This is required for the upcoming FlexSPI CSF data fix. Signed-off-by: Marco Felsch --- Changelog: v2: - unchanged - v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.fel...@pengutronix.de/T/#t scripts/imx

[PATCH v2 19/29] scripts: imx-image: header_v2: add CSF slots

2023-10-17 Thread Marco Felsch
Place the MMC/SD CSF data int slot-0 and the FlexSPI CSF data into slot-1. This must be done since the MMC/SD and FlexSPI CSF data are different. Signed-off-by: Marco Felsch --- Changelog: v2: - unchanged - v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.fel

[PATCH v2 25/29] scripts: imx-image: add missing close()

2023-10-17 Thread Marco Felsch
Close the csfbin file after we read it into buf. Signed-off-by: Marco Felsch --- Changelog: v2: - unchaned - v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.fel...@pengutronix.de/T/#t scripts/imx/imx-image.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts

[PATCH v2 27/29] ARM: i.MX: add hab qspi support if enabled

2023-10-17 Thread Marco Felsch
Set the 'hab_qspi' commando if CONFIG_HABV4_QSPI is enabled to build QSPI HAB images. Signed-off-by: Marco Felsch --- Changelog: v2: - new patch - v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.fel...@pengutronix.de/T/#t include/mach/imx/habv4-imx8-gencsf.h | 3 +++ 1

[PATCH v2 26/29] scripts: imx-image: add support for CST_EXTRA_CMDLINE_OPTIONS

2023-10-17 Thread Marco Felsch
Add CST_EXTRA_CMDLINE_OPTIONS environment variable to allow build tools like PTXdist or Yocto to pass additional cst command line options. This becomes important for newer cst versions (> 3.3.1) since they support multiple backends: ssl (default) and pkcs11. Signed-off-by: Marco Fel

[PATCH v2 15/29] scripts: imx: force flexspi and hab option order

2023-10-17 Thread Marco Felsch
. Signed-off-by: Marco Felsch --- Changelog: v2: - unchanged - v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.fel...@pengutronix.de/T/#t scripts/imx/imx.c | 12 1 file changed, 12 insertions(+) diff --git a/scripts/imx/imx.c b/scripts/imx/imx.c index e3169bace6a6

[PATCH v2 23/29] scripts: imx: add helper to write CSF Blocks command

2023-10-17 Thread Marco Felsch
re we need to handle the blocks command separately which is done by this commit. Please note that the struct config_data 'flexspi_csf' member is added in the follow up commit. Signed-off-by: Marco Felsch --- Changelog: v2: - use new strcata() helper - v1-link: https://lore.barebox.o

[PATCH v2 09/29] ARM: i.MX: convert i.MX8M to helper

2023-10-17 Thread Marco Felsch
-off-by: Rouven Czerwinski [m.fel...@pengutronix.de: convert all possible make targets] [m.fel...@pengutronix.de: adapt commit message] Signed-off-by: Marco Felsch --- Changelog: v2: - unchanged - v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.fel...@pengutronix.de/T/#t

<    1   2   3   4   5   6   7   8   >