Re: [PATCH v2 10/10] ARM: add optimized memmove

2024-09-26 Thread Marco Felsch
Hi Sascha, On 24-09-26, Sascha Hauer wrote: > Until now there has been no assembler optimized version of memmove() for > ARM. Add this from Linux-6.10 for both ARM32 and ARM64. This also updates > memcpy() for ARM64 from Linux-6.10. out of curiosity, did you made performance measurements? Regard

Re: [PATCH 0/9] AT24 EEPROM MTD Support

2024-08-26 Thread Marco Felsch
Hi Andy, On 24-08-23, Andy Shevchenko wrote: > On Mon, Jul 01, 2024 at 03:53:39PM +0200, Marco Felsch wrote: > > This series adds the intial support to handle EEPROMs via the MTD layer > > as well. This allow the user-space to have separate paritions since > > EEPROMs c

Re: [PATCH v2 7/9] i.MX8M: HABv4: add an option to allow key revocation

2024-07-30 Thread Marco Felsch
On 24-07-30, Ahmad Fatoum wrote: > Hello Marco, > > On 7/4/24 10:15, Marco Felsch wrote: > > Hi Ahmad, > > > > On 24-07-03, Ahmad Fatoum wrote: > >> Hello Marco, > >> > >> On 03.07.24 19:20, Marco Felsch wrote: > >>> The HAB code

Re: [PATCH master 1/3] resource: return NULL for error in request_barebox_region

2024-07-22 Thread Marco Felsch
Hi Ahmad, On 24-07-22, Ahmad Fatoum wrote: > The function currently returns NULL for error if the range is in SDRAM > and couldn't be requested or an error pointer if the range is outside. > > Reduce the confusion by using only one way to indicate error. As > request_barebox_region is used to rep

Re: [PATCH 4/9] mtd: devices: add AT24 eeprom support

2024-07-18 Thread Marco Felsch
Hi Miquel, On 24-07-17, Miquel Raynal wrote: > Hi Marco, > > > > > > Overall I think the idea of getting rid of these misc/ drivers is goes > > > > > into the right direction, but registering directly into NVMEM makes > > > > > more sense IMO. > > > > > > > > So you propose to have two place

Re: [PATCH v3 06/10] of: overlay: add FIT overlay support

2024-07-15 Thread Marco Felsch
Hi Sascha, On 24-07-15, Sascha Hauer wrote: > On Wed, Jul 03, 2024 at 06:58:34PM +0200, Marco Felsch wrote: > > This adds the support to load devicetree overlays from an FIT image. > > There are quite a few options to handle FIT overlays since the FIT > > overlay sp

Re: [PATCH 4/9] mtd: devices: add AT24 eeprom support

2024-07-09 Thread Marco Felsch
On 24-07-09, Miquel Raynal wrote: > Hi Marco, > > > > > > >> I also found a thread from 2013 by Maxime Ripard (+Cc) suggesting > > > > > >> adding > > > > > >> EEPROMs to MTD [1]. The main purpose would have been unifying the > > > > > >> EEPROM > > > > > >> drivers under a single interface. I a

Re: [PATCH 4/9] mtd: devices: add AT24 eeprom support

2024-07-09 Thread Marco Felsch
Hi Miquel, On 24-07-08, Miquel Raynal wrote: > Hi, > > > > >> >> Port the current misc/eeprom/at24.c driver to the MTD framework > > > >> >> since > > > >> >> EEPROMs are memory-technology devices and the framework already > > > >> >> supports > > > >> > > > > >> > I was under the impression

Re: [PATCH v3 10/10] FIT: add support to cache opened fit images

2024-07-04 Thread Marco Felsch
Hi Ahmad, On 24-07-03, Ahmad Fatoum wrote: > Hello Marco, > > On 03.07.24 18:58, Marco Felsch wrote: > > Cache the FIT image fit_open() calls to avoid loading the same FIT image > > twice. This is very useful if the same FIT image is used to provide the > > base devic

Re: [PATCH v2 7/9] i.MX8M: HABv4: add an option to allow key revocation

2024-07-04 Thread Marco Felsch
Hi Ahmad, On 24-07-03, Ahmad Fatoum wrote: > Hello Marco, > > On 03.07.24 19:20, Marco Felsch wrote: > > The HAB code needs an special [Unlock] instruction to keep the > > SRK_REVOKE fuse bank unlocked. This is required if a key needs to be > > revoked. > >

[PATCH v2 8/9] i.MX8M: HABv4: add option to allow burning the field-return fuse

2024-07-03 Thread Marco Felsch
This removes the quotes within the CSF file and the CST is happy. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/Kconfig| 25 + include/mach/imx/habv4-imx8-gencsf.h | 7 +++ scripts/Makefile.lib | 1 + 3 files changed, 33 insertions(+)

[PATCH v2 7/9] i.MX8M: HABv4: add an option to allow key revocation

2024-07-03 Thread Marco Felsch
The HAB code needs an special [Unlock] instruction to keep the SRK_REVOKE fuse bank unlocked. This is required if a key needs to be revoked. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/Kconfig| 8 include/mach/imx/habv4-imx8-gencsf.h | 6 ++ 2 files changed, 14

[PATCH v2 5/9] i.MX: HAB: add imx_hab_revoke_key support

2024-07-03 Thread Marco Felsch
Add an helper to revoke an i.MX SRK key. At the moment the helper supprts i.MX8M devices only, but adding support for other SoCs can be done easily by providing the .revoke_key() hook. Signed-off-by: Marco Felsch --- drivers/hab/hab.c| 45

[PATCH v2 6/9] i.MX: HABv4: add more i.MX8M fuse defines

2024-07-03 Thread Marco Felsch
Add more common i.MX8M fuse defines so they can be reused by board code. Signed-off-by: Marco Felsch --- include/mach/imx/ocotp-fusemap.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/mach/imx/ocotp-fusemap.h b/include/mach/imx/ocotp-fusemap.h index e6fa96b40ba9

[PATCH v2 2/9] nvmem: ocotp: add support to get/set srk_revoke sticky bit

2024-07-03 Thread Marco Felsch
The i.MX8M* devices do have an sticky bit which indicates if the srk_revoke fuse can be written. Add support to query and to set the lock bit. Signed-off-by: Marco Felsch --- drivers/nvmem/ocotp.c| 55 include/mach/imx/ocotp.h | 2 ++ 2

[PATCH v2 0/9] i.MX8M HAB and OCOTP additions and fixes

2024-07-03 Thread Marco Felsch
message - make use of 'bool permanent' parameter instead of introducing new IMX_SRK_* flags. --- Marco Felsch (9): i.MX: HABv4: fix SRK_LOCK for i.MX8M devices nvmem: ocotp: add support to get/set srk_revoke sticky bit nvmem: ocotp: add support to query the field-return

[PATCH v2 3/9] nvmem: ocotp: add support to query the field-return sticky bit

2024-07-03 Thread Marco Felsch
The i.MX8M* devices do have an sticky bit which indicates if the field-return fuse can be written. Add support to query the lock bit. To make it easy to read align the STICKY bit definitions as well. Signed-off-by: Marco Felsch --- drivers/nvmem/ocotp.c| 24

[PATCH v2 4/9] hab: convert flags to use BIT() macro

2024-07-03 Thread Marco Felsch
Make use of the BIT() macro to define the flags, no functional change. Signed-off-by: Marco Felsch --- include/hab.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/hab.h b/include/hab.h index da79a8ffea36..2cef3841d149 100644 --- a/include/hab.h +++ b/include

[PATCH v2 9/9] i.MX: HAB: add imx_hab_field_return support

2024-07-03 Thread Marco Felsch
Add a convenient helper to burn the field-return fuse which wraps the platform specific hook. At the moment only i.MX8M devices are supported. Adding support for other platforms can be done by providing the platform specific hook. Signed-off-by: Marco Felsch --- drivers/hab/hab.c

[PATCH v2 1/9] i.MX: HABv4: fix SRK_LOCK for i.MX8M devices

2024-07-03 Thread Marco Felsch
The fuse to lock the SRK hash on i.MX8M* SoCs is different than the one used for the i.MX6 SoCs. Fix this by refactoring imx_hab_write_srk_hash_ocotp() and make the lock fusing SoC specific. Fixes: 6c4d5bb5acfe ("i.MX: HABv4: implement interface for i.MX8MQ") Signed-off-by: Ma

[PATCH v3 06/10] of: overlay: add FIT overlay support

2024-07-03 Thread Marco Felsch
ional signature). - The "name" filter check is performed on the config-node name (the node under the configurations) and not the FIT overlay image name (the node name under the images node). - The "content" filter check does not differ from the file based overlay handling. Si

[PATCH v3 10/10] FIT: add support to cache opened fit images

2024-07-03 Thread Marco Felsch
Cache the FIT image fit_open() calls to avoid loading the same FIT image twice. This is very useful if the same FIT image is used to provide the base devicetree, kernel and initrd as well as devicetree overlays. Signed-off-by: Marco Felsch --- common/image-fit.c | 32

[PATCH v3 07/10] of: overlay: drop unnecessary empty check in of_overlay_global_fixup_dir

2024-07-03 Thread Marco Felsch
This is now done during of_overlay_global_fixup() so we can drop it here. Signed-off-by: Marco Felsch --- drivers/of/overlay.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index a980e7aa5e02..822487908ede 100644 --- a/drivers/of/overlay.c

[PATCH v3 05/10] FIT: expose useful helpers

2024-07-03 Thread Marco Felsch
The upcoming FIT overlay support requires these helpers for performing check on a fit image. Signed-off-by: Marco Felsch --- common/image-fit.c | 2 +- include/image-fit.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/image-fit.c b/common/image-fit.c index

[PATCH v3 03/10] of: overlay: make the pattern match function more generic

2024-07-03 Thread Marco Felsch
dropping the "file" prefix. Keep the backward compatibility by still providing the filepattern filter and the global of.overlay.filepattern variable but notice the user that the usage of those are deprecated. No functional change. Signed-off-by: Marco Felsch --- drivers/of/over

[PATCH v3 02/10] FIT: fit_open_configuration: add match function support

2024-07-03 Thread Marco Felsch
ed to the fit_open_configuration() to sort out config nodes which are not interessting. E.g. the bootm code is only interested in config nodes which do provide an "kernel" image. The new match function is only called if no explicit configuration node name was specified. Signed-off-by: Mar

[PATCH v3 00/10] Add FIT image overlay support

2024-07-03 Thread Marco Felsch
ing a single overlay takes ~20ms (depending on the overlay size) if the same FIT image is used to supply the kernel, initrd, devicetree and devicetree-overlays. This is an improvement compared to the v1 of this series which required ~1sec. Regards, Marco Signed-off-by: Marco F

[PATCH v3 04/10] of: overlay: make search dir/path more generic

2024-07-03 Thread Marco Felsch
directory handling into a separate of_overlay_global_fixup_dir() helper. No functional change. Signed-off-by: Marco Felsch --- drivers/of/overlay.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index

[PATCH v3 09/10] FIT: save filename during fit_open

2024-07-03 Thread Marco Felsch
This is in preparation of buffering fit_open() calls to not load the same fit twice if it is still open. Signed-off-by: Marco Felsch --- common/image-fit.c | 2 ++ include/image-fit.h | 1 + 2 files changed, 3 insertions(+) diff --git a/common/image-fit.c b/common/image-fit.c index

[PATCH v3 08/10] of: overlay: replace filename with an more unique name

2024-07-03 Thread Marco Felsch
-by: Marco Felsch --- drivers/of/overlay.c | 39 +-- include/of.h | 3 ++- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 822487908ede..6b76eafc966e 100644 --- a/drivers/of/overlay.c

[PATCH v3 01/10] FIT: fix missing free in fit_open error path

2024-07-03 Thread Marco Felsch
Free the handle if read_file_2() fails. Signed-off-by: Marco Felsch --- common/image-fit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/image-fit.c b/common/image-fit.c index 251fda97b3fc..008804e6a6c3 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -922,6 +922,7

Re: [PATCH 9/9] eeprom: at24: remove deprecated Kconfig symbol

2024-07-02 Thread Marco Felsch
Hi, On 24-07-02, Bartosz Golaszewski wrote: > On Mon, Jul 1, 2024 at 3:54 PM Marco Felsch wrote: > > > > All kernel users are shifted to the new MTD_EEPROM_AT24 Kconfig symbol > > so we can drop the old one. > > > > Nope, with this series arm64 still selects

Re: [PATCH 2/9] mtd: add mtd_is_master helper

2024-07-02 Thread Marco Felsch
On 24-07-01, Sergei Shtylyov wrote: > On 7/1/24 4:53 PM, Marco Felsch wrote: > > > Provide a simple helper to make it easy to detect an master mtd device. > > > > Signed-off-by: Marco Felsch > > --- > > include/linux/mtd/mtd.h | 5 + > > 1 file ch

[PATCH 4/9] mtd: devices: add AT24 eeprom support

2024-07-01 Thread Marco Felsch
MC551) += pmc551.o diff --git a/drivers/misc/eeprom/at24.c b/drivers/mtd/devices/at24.c similarity index 92% rename from drivers/misc/eeprom/at24.c rename to drivers/mtd/devices/at24.c index 4bd4f32bcdab..713f40a1d95c 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/mtd/devices/at24.c @@ -

[PATCH 0/9] AT24 EEPROM MTD Support

2024-07-01 Thread Marco Felsch
ied that the list of recipients is quite large due to the defconfig changes. Regards, Marco Signed-off-by: Marco Felsch --- Marco Felsch (9): mtd: core: add nvmem_write support mtd: add mtd_is_master helper mtd: add support to handle EEPROM devices mtd: devices: add AT24 eepr

[PATCH 2/9] mtd: add mtd_is_master helper

2024-07-01 Thread Marco Felsch
Provide a simple helper to make it easy to detect an master mtd device. Signed-off-by: Marco Felsch --- include/linux/mtd/mtd.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 8d10d9d2e830..bf3fc2ea7230 100644 --- a/include/linux

[PATCH 6/9] powerpc: convert to MTD_EEPROM_AT24

2024-07-01 Thread Marco Felsch
The EEPROM_AT24 Kconfig symbol is marked as deprecated. Make use of the new Kconfig symbol to select the I2C EEPROM driver support. Signed-off-by: Marco Felsch --- arch/powerpc/configs/44x/warp_defconfig | 2 +- arch/powerpc/configs/mpc512x_defconfig | 2 +- arch/powerpc/configs

[PATCH 5/9] ARM: defconfig: convert to MTD_EEPROM_AT24

2024-07-01 Thread Marco Felsch
The EEPROM_AT24 Kconfig symbol is marked as deprecated. Make use of the new Kconfig symbol to select the I2C EEPROM driver support. Signed-off-by: Marco Felsch --- arch/arm/configs/aspeed_g4_defconfig | 2 +- arch/arm/configs/aspeed_g5_defconfig | 2 +- arch/arm/configs/at91_dt_defconfig

[PATCH 8/9] LoongArch: convert to MTD_EEPROM_AT24

2024-07-01 Thread Marco Felsch
The EEPROM_AT24 Kconfig symbol is marked as deprecated. Make use of the new Kconfig symbol to select the I2C EEPROM driver support. Signed-off-by: Marco Felsch --- arch/loongarch/configs/loongson3_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch

[PATCH 9/9] eeprom: at24: remove deprecated Kconfig symbol

2024-07-01 Thread Marco Felsch
All kernel users are shifted to the new MTD_EEPROM_AT24 Kconfig symbol so we can drop the old one. Signed-off-by: Marco Felsch --- drivers/misc/eeprom/Kconfig | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig index 3a9aaec2f2c7

[PATCH 3/9] mtd: add support to handle EEPROM devices

2024-07-01 Thread Marco Felsch
must be set to the I2C device instead of the MTD device and the name must be either the I2C device name or the name specified via the label. Signed-off-by: Marco Felsch --- drivers/mtd/mtdcore.c | 32 +++- include/uapi/mtd/mtd-abi.h | 2 ++ 2 files changed, 33

[PATCH 7/9] MIPS: configs: convert to MTD_EEPROM_AT24

2024-07-01 Thread Marco Felsch
The EEPROM_AT24 Kconfig symbol is marked as deprecated. Make use of the new Kconfig symbol to select the I2C EEPROM driver support. Signed-off-by: Marco Felsch --- arch/mips/configs/cavium_octeon_defconfig | 2 +- arch/mips/configs/db1xxx_defconfig| 2 +- 2 files changed, 2 insertions

[PATCH 1/9] mtd: core: add nvmem_write support

2024-07-01 Thread Marco Felsch
The MTD framework does support the NVMEM framework already but only the read support was implemented. This commit adds the write support if the MTD device supports writing (MTD_WRITEABLE is set). Signed-off-by: Marco Felsch --- drivers/mtd/mtdcore.c | 17 - 1 file changed, 16

[PATCH v2 1/2] dt-bindings: display: simple: Add Jiangsu Smartwin SMMT043480272A-A19

2024-07-01 Thread Marco Felsch
Add compatible to panel-simple for Jiangsu Smartwin Electronics SMMT043480272A-A19 4.3" 480x272 LCD-TFT panel. Acked-by: Conor Dooley Signed-off-by: Marco Felsch --- Changelog: v2: - rebased ontop of drm-misc-next - added Conor's acked-by .../devicetree/bindings/display/p

[PATCH v2 2/2] drm/panel: simple: Add Jiangsu Smartwin SMMT043480272A-A19 panel

2024-07-01 Thread Marco Felsch
From: Rouven Czerwinski Add support for the Jiangsu Smartwin SMMT043480272A-A19 4.3" 480x272 TFT-LCD panel. The timings are based on the ILI6485 controller IC datasheet. Signed-off-by: Rouven Czerwinski Reviewed-by: Neil Armstrong Signed-off-by: Marco Felsch --- Changelog: v2: - re

[PATCH 1/2] dt-bindings: display: simple: Add Jiangsu Smartwin SMMT043480272A-A19

2024-06-26 Thread Marco Felsch
Add compatible to panel-simple for Jiangsu Smartwin Electronics SMMT043480272A-A19 4.3" 480x272 LCD-TFT panel. Signed-off-by: Marco Felsch --- .../devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bin

[PATCH 2/2] drm/panel: simple: Add Jiangsu Smartwin SMMT043480272A-A19 panel

2024-06-26 Thread Marco Felsch
From: Rouven Czerwinski Add support for the Jiangsu Smartwin SMMT043480272A-A19 4.3" 480x272 TFT-LCD panel. The timings are based on the ILI6485 controller IC datasheet. Signed-off-by: Rouven Czerwinski Signed-off-by: Marco Felsch --- drivers/gpu/drm/panel/panel-simple.c

Re: [PATCH v2 10/11] FIT: save filename during fit_open

2024-06-26 Thread Marco Felsch
On 24-06-17, Sascha Hauer wrote: > On Thu, Jun 13, 2024 at 02:58:17PM +0200, Marco Felsch wrote: > > This is in preparation of buffering fit_open() calls to not load the > > same fit twice if it is still open. > > > > Signed-off-by: Marco Felsch > >

Re: [PATCH v2 11/11] FIT: add support to cache opened fit images

2024-06-26 Thread Marco Felsch
On 24-06-17, Sascha Hauer wrote: > On Thu, Jun 13, 2024 at 02:58:18PM +0200, Marco Felsch wrote: > > Cache the FIT image fit_open() calls to avoid loading the same FIT image > > twice. This is very useful if the same FIT image is used to provide the > > base devicetree, kern

Re: [PATCH 2/8] FIT: skip possible overlay config nodes

2024-06-26 Thread Marco Felsch
On 24-06-17, Sascha Hauer wrote: > On Tue, Jun 11, 2024 at 10:36:47AM +0200, Marco Felsch wrote: > > Hi, > > > > sorry for the delay on this patchset. > > > > On 24-03-25, Sascha Hauer wrote: > > > Hi Marco, > > > > > > On Fri, Mar 2

Re: [PATCH v2 2/2] ARM: i.MX8M: add support to handle ROM SError ERR050350

2024-06-25 Thread Marco Felsch
On 24-06-17, Sascha Hauer wrote: > On Thu, Jun 13, 2024 at 03:06:59PM +0200, Marco Felsch wrote: > > This ports U-Boot commit: > > > > | commit 2f3c92060dcd6bc9cfd3e2e344a3e1745ca39f09 > > | Author: Peng Fan > > | Date: Thu Jul 9 13:39:26 2020 +0800 > > |

Re: [PATCH 5/9] i.MX: HAB: add imx_hab_revoke_key support

2024-06-25 Thread Marco Felsch
On 24-06-14, Sascha Hauer wrote: > On Thu, Jun 13, 2024 at 03:09:40PM +0200, Marco Felsch wrote: > > Add an helper to revoke an i.MX SRK key. At the moment the helper > > supprts i.MX8M devices only, but adding support for other SoCs can be > > done easily by providing t

Re: [PATCH v2 3/5] nvmem: expose nvmem cells as cdev

2024-06-14 Thread Marco Felsch
On 24-06-14, Sascha Hauer wrote: > On Thu, Jun 13, 2024 at 03:15:29PM +0200, Marco Felsch wrote: > > Expose the nvmem cells via cdevs which is our equivalent to the Linux > > sysfs exposure. This allows the easier user queries for board code and > > shell. Keep the Linux fun

Re: [PATCH 1/9] i.MX: HABv4: fix SRK_LOCK for i.MX8M devices

2024-06-14 Thread Marco Felsch
On 24-06-14, Sascha Hauer wrote: > On Thu, Jun 13, 2024 at 03:09:36PM +0200, Marco Felsch wrote: > > All current known i.MX8M devices: i.MX8MQ, i.MX8MP, i.MX8MN, i.MX8MM use > > an other fuse to lock the SRK hash. Fix this by refactoring > > This looks a bit inaccurate or

[PATCH v2 09/11] of: overlay: replace filename with an more unique name

2024-06-13 Thread Marco Felsch
-by: Marco Felsch --- drivers/of/overlay.c | 39 +-- include/of.h | 3 ++- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index dad4e05ca27f..90e5ebcf6765 100644 --- a/drivers/of/overlay.c

[PATCH v2 01/11] FIT: fix missing free in fit_open error path

2024-06-13 Thread Marco Felsch
Free the handle if read_file_2() fails. Signed-off-by: Marco Felsch --- common/image-fit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/image-fit.c b/common/image-fit.c index 251fda97b3fc..008804e6a6c3 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -922,6 +922,7

[PATCH v2 5/5] eeprom: at24: fix device name handling

2024-06-13 Thread Marco Felsch
not add an additional id. Furthermore the devname can be static since the name gets later allocated by the dev_set_name(). Fix these three issues by just using the alias or the static "eeprom" sting and supply the correct NVMEM_DEVID_NONE or NVMEM_DEVID_AUTO to the core. Signed-off

[PATCH v2 1/5] nvmem: fix nvmem_register error path

2024-06-13 Thread Marco Felsch
Currently the nvmem memory is freed without removing/unregister the nvmem->dev if nvmem_register_cdev() fails. Fix this by unregister the device first, free the memory and return the error code. Signed-off-by: Marco Felsch --- v2: - new patch drivers/nvmem/core.c | 12 1 f

[PATCH 2/9] nvmem: ocotp: add support to get/set srk_revoke sticky bit

2024-06-13 Thread Marco Felsch
The i.MX8M* devices do have an sticky bit which indicates if the srk_revoke fuse can be written. Add support to query and to set the lock bit. Signed-off-by: Marco Felsch --- drivers/nvmem/ocotp.c| 55 include/mach/imx/ocotp.h | 2 ++ 2 files

[PATCH 9/9] i.MX: HAB: add imx_hab_field_return support

2024-06-13 Thread Marco Felsch
Add a convenient common helper to burn the field-return fuse which wraps the platform specific hook. At the moment only i.MX8M devices are supported. Adding support for other platforms can be done by providing the platform specific hook. Signed-off-by: Marco Felsch --- drivers/hab/hab.c

[PATCH 7/9] i.MX8M: HABv4: add an option to allow key revocation

2024-06-13 Thread Marco Felsch
The HAB code needs an special [Unlock] instruction to keep the SRK_REVOKE fuse bank unlocked. This is required if a key needs to be revoked. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/Kconfig| 8 include/mach/imx/habv4-imx8-gencsf.h | 6 ++ 2 files changed, 14

[PATCH 8/9] i.MX8M: HABv4: add option to allow burning the field-return fuse

2024-06-13 Thread Marco Felsch
This removes the quotes within the CSF file and the CST is happy. Signed-off-by: Marco Felsch --- arch/arm/mach-imx/Kconfig| 25 + include/mach/imx/habv4-imx8-gencsf.h | 7 +++ scripts/Makefile.lib | 1 + 3 files changed, 33 insertions(+)

[PATCH 4/9] hab: convert flags to use BIT() macro

2024-06-13 Thread Marco Felsch
Make use of the BIT() macro to define the flags, no functional change. Signed-off-by: Marco Felsch --- include/hab.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/hab.h b/include/hab.h index da79a8ffea36..2cef3841d149 100644 --- a/include/hab.h +++ b/include

[PATCH v2 2/5] nvmem: sync with linux code base

2024-06-13 Thread Marco Felsch
during of_nvmem_cell_get() - The registered cells are now tracked per nvmem device, no longer in a global nvmem_cells list This prepares our code base also to include the new nvmem-layout drivers and to expose cells via cdevs. Signed-off-by: Marco Felsch --- v2: - squash constification patch

[PATCH v2 3/5] nvmem: expose nvmem cells as cdev

2024-06-13 Thread Marco Felsch
Expose the nvmem cells via cdevs which is our equivalent to the Linux sysfs exposure. This allows the easier user queries for board code and shell. Keep the Linux function name scheme for nvmem_populate_sysfs_cells() to reduce the diff for nvmem_register() function. Signed-off-by: Marco Felsch

[PATCH v2 4/5] nvmem: allow single and dynamic device ids

2024-06-13 Thread Marco Felsch
() by using the dev_name() which honors the DEVICE_ID_* cases else we end up with different names for the devfs and the device itself. Signed-off-by: Marco Felsch --- v2: - no changes drivers/nvmem/core.c | 16 +++- include/linux/nvmem-provider.h | 4 2 files changed, 15

[PATCH v2 2/2] ARM: i.MX8M: add support to handle ROM SError ERR050350

2024-06-13 Thread Marco Felsch
we don't support exceptions in PBL and therefore we can handle it simpler by installing an dummy exception table to handle the pending exception. Later on the TF-A overrides the dummy table. Signed-off-by: Marco Felsch --- v2: - Adapt the Makefile - Drop the ifdef guard from the errata.h - Mak

[PATCH 6/9] i.MX: HABv4: add more i.MX8M fuse defines

2024-06-13 Thread Marco Felsch
Add more common i.MX8M fuse defines so they can be reused by board code. Signed-off-by: Marco Felsch --- include/mach/imx/ocotp-fusemap.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/mach/imx/ocotp-fusemap.h b/include/mach/imx/ocotp-fusemap.h index e6fa96b40ba9

[PATCH 5/9] i.MX: HAB: add imx_hab_revoke_key support

2024-06-13 Thread Marco Felsch
Add an helper to revoke an i.MX SRK key. At the moment the helper supprts i.MX8M devices only, but adding support for other SoCs can be done easily by providing the .revoke_key() hook. Signed-off-by: Marco Felsch --- drivers/hab/hab.c| 45

[PATCH 1/9] i.MX: HABv4: fix SRK_LOCK for i.MX8M devices

2024-06-13 Thread Marco Felsch
All current known i.MX8M devices: i.MX8MQ, i.MX8MP, i.MX8MN, i.MX8MM use an other fuse to lock the SRK hash. Fix this by refactoring imx_hab_write_srk_hash_ocotp() and make the lock fusing device specific. Fixes: 6c4d5bb5acfe ("i.MX: HABv4: implement interface for i.MX8MQ") Signed-off

[PATCH 3/9] nvmem: ocotp: add support to query the field-return sticky bit

2024-06-13 Thread Marco Felsch
The i.MX8M* devices do have an sticky bit which indicates if the field-return fuse can be written. Add support to query the lock bit. To make it easy to read align the STICKY bit definitions as well. Signed-off-by: Marco Felsch --- drivers/nvmem/ocotp.c| 24

[PATCH v2 1/2] ARM: aarch64: align scr_el3 register setup with U-Boot

2024-06-13 Thread Marco Felsch
bits to make it possible to handle early exceptions within the PBL at EL3. Early exception handling requires platform support since it involves exception table and DAIF handling. Signed-off-by: Marco Felsch --- v2: - adapt the commit message arch/arm/cpu/lowlevel_64.S | 4 ++-- 1 file ch

[PATCH v2 11/11] FIT: add support to cache opened fit images

2024-06-13 Thread Marco Felsch
Cache the FIT image fit_open() calls to avoid loading the same FIT image twice. This is very useful if the same FIT image is used to provide the base devicetree, kernel and initrd as well as devicetree overlays. Signed-off-by: Marco Felsch --- common/image-fit.c | 38

[PATCH v2 07/11] of: overlay: add FIT overlay support

2024-06-13 Thread Marco Felsch
ional signature). - The "name" filter check is performed on the config-node name (the node under the configurations) and not the FIT overlay image name (the node name under the images node). - The "content" filter check does not differ from the file based overlay handling. Si

[PATCH v2 05/11] of: overlay: make search dir/path more generic

2024-06-13 Thread Marco Felsch
directory handling into a separate of_overlay_global_fixup_dir() helper. No functional change. Signed-off-by: Marco Felsch --- drivers/of/overlay.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index

[PATCH v2 00/11] Add FIT image overlay support

2024-06-13 Thread Marco Felsch
etree-overlays. This is an improvement compared to the v1 of this series which required ~1sec. Regards, Marco [1] https://lore.pengutronix.de/barebox/20240322164953.1772129-1-m.fel...@pengutronix.de/ Marco Felsch (11): FIT: fix missing free in fit_open error path of: overlay

[PATCH v2 08/11] of: overlay: drop unnecessary empty check in of_overlay_global_fixup_dir

2024-06-13 Thread Marco Felsch
This is now done during of_overlay_global_fixup() so we can drop it here. Signed-off-by: Marco Felsch --- drivers/of/overlay.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 941cd3d51883..dad4e05ca27f 100644 --- a/drivers/of/overlay.c

[PATCH v2 02/11] of: overlay: add of.overlay.fitconfigpattern param

2024-06-13 Thread Marco Felsch
Add the a parameter which will be used by image-fit to decide if a config node belongs to a devicetree-overlay. Signed-off-by: Marco Felsch --- drivers/of/overlay.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 73c7a91db9b5

[PATCH v2 06/11] FIT: expose useful helpers

2024-06-13 Thread Marco Felsch
The upcoming FIT overlay support requires these helpers for performing check on a fit image. Signed-off-by: Marco Felsch --- common/image-fit.c | 4 ++-- include/image-fit.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/image-fit.c b/common/image-fit.c index

[PATCH v2 04/11] of: overlay: make the pattern match function more generic

2024-06-13 Thread Marco Felsch
dropping the "file" prefix. Keep the backward compatibility by still providing the filepattern filter and the global of.overlay.filepattern variable but notice the user that the usage of those are deprecated. No functional change. Signed-off-by: Marco Felsch --- drivers/of/over

[PATCH v2 03/11] FIT: skip possible overlay config nodes

2024-06-13 Thread Marco Felsch
ip all config nodes matching the pattern from global.of.overlay.fitconfigpattern. Signed-off-by: Marco Felsch --- common/image-fit.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/common/image-fit.c b/common/image-fit.c index 008804e6a6c3..71

[PATCH v2 10/11] FIT: save filename during fit_open

2024-06-13 Thread Marco Felsch
This is in preparation of buffering fit_open() calls to not load the same fit twice if it is still open. Signed-off-by: Marco Felsch --- common/image-fit.c | 4 include/image-fit.h | 1 + 2 files changed, 5 insertions(+) diff --git a/common/image-fit.c b/common/image-fit.c index

Re: [OSS-Tools] [PATCH platsch V2 1/3] convert to meson build

2024-06-12 Thread Marco Felsch
Hi, On 24-06-12, LI Qingwu wrote: > convert to meson build, add set dir and base const to fix build > warnings. Please split the patch into two: 1st) platsch: fix build warnings 2nd) build: convert to meson > Signed-off-by: LI Qingwu > --- > Makefile.am | 23 --- > README

Re: [OSS-Tools] [PATCH platsch 2/3] platsch: split into platsch and libplatsch

2024-06-12 Thread Marco Felsch
On 24-06-12, LI Qingwu wrote: > Signed-off-by: LI Qingwu > --- > cairo.c | 4 +- Please make sure that your patches are based on the upstream status. Regards, Marco > libplatsch.c | 614 ++ > platsch.h => libplatsch.h | 45

Re: [OSS-Tools] [PATCH platsch 1/3] convert to meson build

2024-06-12 Thread Marco Felsch
Hi Qingwu, thank you for your patch. On 24-06-12, LI Qingwu wrote: > Signed-off-by: LI Qingwu > --- > Makefile.am | 29 - > README.rst| 27 +++ > cairo.c | 4 ++-- > configure.ac | 32 -

Re: [PATCH 6/8] of: overlay: add FIT overlay support

2024-06-11 Thread Marco Felsch
On 24-03-25, Sascha Hauer wrote: > On Fri, Mar 22, 2024 at 05:49:51PM +0100, Marco Felsch wrote: > > This adds the support to load devicetree overlays from an FIT image. > > There are quite a few options to handle FIT overlays since the FIT > > overlay spec is not very strict

Re: [PATCH 2/8] FIT: skip possible overlay config nodes

2024-06-11 Thread Marco Felsch
Hi, sorry for the delay on this patchset. On 24-03-25, Sascha Hauer wrote: > Hi Marco, > > On Fri, Mar 22, 2024 at 05:49:47PM +0100, Marco Felsch wrote: > > The FIT spec is not very specific when it comes to device-tree overlay > > handling. > > By FIT spec you mean

[PATCH 2/2] usbgadget: split usbgadget_register into prepare and register

2024-05-21 Thread Marco Felsch
duplication. This way it's easy to reuse the preparation code and add the custom fastboot_opts afterwards. In addition usbgadget_prepare_register() is added to keep the simplicity of the single prepare and register functionality. Signed-off-by: Marco Felsch --- commands/dfu.c

[PATCH 1/2] usbgadget: fix error code in common code base

2024-05-21 Thread Marco Felsch
Don't use command error codes in the common code base. Instead the commands should convert common error codes into command error codes. Signed-off-by: Marco Felsch --- commands/dfu.c | 2 +- commands/usbgadget.c | 5 +++-- common/usbgadget.c | 2 +- 3 files changed, 5 insertions(

Re: [PATCH 0/7] replace cdev_by_name() with cdev_open_by_name()

2024-05-16 Thread Marco Felsch
Hi Sascha, On 24-05-16, Sascha Hauer wrote: > As Ahmad noticed cdev_by_name() doesn't increase the reference counting > on the returned cdev which causes problems further down the road. This > series replaces some of the easier occurences of cdev_by_name() with > cdev_open_by_name(). Can we kindl

Re: [PATCH] fastboot: add possibility to register OEM commands

2024-05-13 Thread Marco Felsch
Hi Ahmad, On 24-05-13, Ahmad Fatoum wrote: > Hello Thomas, > > On 13.05.24 15:49, Thomas Haemmerle wrote: > > Currently it is not possible to add additional OEM commands without > > extending the array `cmd_oem_dispatch_info[]`. > > Add the possibility to register commands from e.g. board files b

Re: [PATCH 2/2] ARM: i.MX8M: add support to handle ROM SError ERR050350

2024-05-06 Thread Marco Felsch
On 24-05-03, Sascha Hauer wrote: > On Tue, Apr 30, 2024 at 01:29:41PM +0200, Marco Felsch wrote: > > This ports U-Boot commit: > > > > | commit 2f3c92060dcd6bc9cfd3e2e344a3e1745ca39f09 > > | Author: Peng Fan > > | Date: Thu Jul 9 13:39:26 2020 +0800 > > |

Re: [PATCH 1/2] ARM: aarch64: fix scr_el3 register setup

2024-04-30 Thread Marco Felsch
Hi, On 24-04-30, Marco Felsch wrote: > The current code moved '1' as immediate into x0 and does OR with > BIT(10). This doesn't look right since it will set the scr_el3 to 0. > > Instead read the scr_el3 and OR the interessting bits to fix this. The > interessting b

Re: [PATCH 2/2] ARM: i.MX8M: add support to handle ROM SError ERR050350

2024-04-30 Thread Marco Felsch
On 24-04-30, Marco Felsch wrote: > This ports U-Boot commit: > > | commit 2f3c92060dcd6bc9cfd3e2e344a3e1745ca39f09 > | Author: Peng Fan > | Date: Thu Jul 9 13:39:26 2020 +0800 > | > | imx8m: workaround ROM serror > | > | ROM SError happens on two cases: &

[PATCH 2/2] ARM: i.MX8M: add support to handle ROM SError ERR050350

2024-04-30 Thread Marco Felsch
we don't support exceptions in PBL and therefore we can handle it simpler by installing an dummy exception table which does nothing. The table gets overriden by TF-A later on anyway. Signed-off-by: Marco Felsch --- Hi all, I'm not sure if the relocation should be done within the erratum

[PATCH 1/2] ARM: aarch64: fix scr_el3 register setup

2024-04-30 Thread Marco Felsch
The current code moved '1' as immediate into x0 and does OR with BIT(10). This doesn't look right since it will set the scr_el3 to 0. Instead read the scr_el3 and OR the interessting bits to fix this. The interessting bits are taken from the current U-Boot implementation. Signe

Re: [PATCH] scripts: imx: fix header entry offset

2024-04-18 Thread Marco Felsch
Hi Benjamin, On 24-04-18, Benjamin Gaignard wrote: > Header entry is at a fixed offset and doesn't rely on header lenght. > Use header lenght create a bug when adding a signed firmware like > the HDMI firmware for IMX8MQ. NAK, please see b6e2b263f304 ("scripts: imx-image: header_v2: add header_le

Re: [PATCH] file-list: remove unused variable

2024-04-16 Thread Marco Felsch
On 24-04-17, Sascha Hauer wrote: > struct file_list::num_entries is only ever used to check if a file list > is empty. Do this check with list_empty() instead and remove the unused > member. > > Signed-off-by: Sascha Hauer Reviewed-by: Marco Felsch

Re: [PATCH 1/4] DNM: dts: arm64: rockchip: copy pf5 device tree from mainline Linux

2024-04-12 Thread Marco Felsch
On 24-04-12, Ahmad Fatoum wrote: > Hi, > > On 12.04.24 15:02, Michael Riesch wrote: > > Hi Marco, > > > > Thanks for your response! > > > > On 4/5/24 19:02, Marco Felsch wrote: > >> Hi Michael, > >> > >> thanks for your patche

[PATCH] mci: sdhci: fix dma mapping

2024-04-08 Thread Marco Felsch
In case of MMC_DATA_READ the dest address should be used and in case of MMC_DATA_WRITE the src address should be used. We had no issues for now since both dest and src point to same address due to the union. Signed-off-by: Marco Felsch --- drivers/mci/sdhci.c | 4 ++-- 1 file changed, 2

  1   2   3   4   5   6   7   8   9   10   >