[PATCH] mmc: stm32_sdmmc2: avoid infinite while loop

2025-08-12 Thread Christophe Kerello
Avoid unlimited while loop by adding a timeout. The timeout is calculated based on a minimal throughput of 256 KB/s. The timeout is set at least to 2 seconds. Signed-off-by: Christophe Kerello --- drivers/mmc/stm32_sdmmc2.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion

[PATCH] mtd: rawnand: stm32_fmc2: set available OOB bytes per page

2025-08-12 Thread Christophe Kerello
File system such as YAFFS2 need to know the number of available OOB bytes per page to be able to choose if they should locate their metadata in the data area or in the spare area. Signed-off-by: Christophe Kerello --- drivers/mtd/nand/raw/stm32_fmc2_nand.c | 1 + 1 file changed, 1 insertion

[PATCH] mtd: rawnand: stm32_fmc2: add MP25 support

2024-03-06 Thread Christophe Kerello
FMC2 IP supports up to 4 chip select. On MP1 SoC, only 2 of them are available when on MP25 SoC, the 4 chip select are available. Let's use a platform data structure for parameters that will differ. Signed-off-by: Christophe Kerello --- drivers/mtd/nand/raw/stm32_fmc2_nand.c

[PATCH v1 0/2] memory: stm32-fmc2-ebi: Add MP25 FMC2 support

2024-03-06 Thread Christophe Kerello
the SoC, so there is no more restrictions. MP1 SoC also embeds revision 1.1 of the FMC2 IP when MP25 SoC embeds revision 2.0 of the FMC2 IP. Christophe Kerello (2): memory: stm32-fmc2-ebi: add MP25 support memory: stm32-fmc2-ebi: add MP25 RIF support drivers/memory/stm32-fmc2-ebi.c | 449

[PATCH v1 2/2] memory: stm32-fmc2-ebi: add MP25 RIF support

2024-03-06 Thread Christophe Kerello
register. - 1: EBI controller for Chip Select 1. - 2: EBI controller for Chip Select 2. - 3: EBI controller for Chip Select 3. - 4: EBI controller for Chip Select 4. - 5: NAND controller. Signed-off-by: Christophe Kerello --- drivers/memory/stm32-fmc2-ebi.c | 140

[PATCH v1 1/2] memory: stm32-fmc2-ebi: add MP25 support

2024-03-06 Thread Christophe Kerello
cture for parameters that will differ between MP1 and MP25. Signed-off-by: Christophe Kerello --- drivers/memory/stm32-fmc2-ebi.c | 313 ++-- 1 file changed, 301 insertions(+), 12 deletions(-) diff --git a/drivers/memory/stm32-fmc2-ebi.c b/drivers/memory/stm32-fmc2-

[PATCH] ARM: dts: stm32: add FMC support on STM32MP13x SoC family

2023-03-30 Thread Christophe Kerello
Add FMC support on STM32MP13x SoC family. Signed-off-by: Christophe Kerello --- arch/arm/dts/stm32mp131.dtsi | 33 + 1 file changed, 33 insertions(+) diff --git a/arch/arm/dts/stm32mp131.dtsi b/arch/arm/dts/stm32mp131.dtsi index 3cf51f09bcb..cf1171bc9bb 100644

[PATCH] mtd: rawnand: stm32_fmc2: remove unsupported EDO mode

2023-03-30 Thread Christophe Kerello
Remove the EDO mode support from as the FMC2 controller does not support the feature. Signed-off-by: Christophe Kerello --- drivers/mtd/nand/raw/stm32_fmc2_nand.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw

[PATCH] mtd: rawnand: stm32_fmc2: add NAND Write Protect support

2022-02-22 Thread Christophe Kerello
This patch adds the support of the WP# signal. WP will be disabled before the first access to the NAND flash. Signed-off-by: Christophe Kerello --- drivers/mtd/nand/raw/stm32_fmc2_nand.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b

[PATCH 11/11] ARM: dts: stm32: add FMC2 EBI support for stm32mp157c

2020-07-31 Thread Christophe Kerello
This patch adds FMC2 External Bus Interface support on stm32mp157c. Signed-off-by: Christophe Kerello --- arch/arm/dts/stm32mp151.dtsi | 43 +++- arch/arm/dts/stm32mp157c-ev1.dts | 16 --- 2 files changed, 38 insertions(+), 21 deletions

[PATCH 09/11] board: stm32mp1: update fdt fixup partitions table

2020-07-31 Thread Christophe Kerello
This patch adds "st,stm32mp1-fmc2-nfc" compatible string in the fdt fixup partitions table. Signed-off-by: Christophe Kerello --- board/st/stm32mp1/stm32mp1.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c index 1d274c

[PATCH 10/11] configs: stm32mp: add CONFIG_STM32_FMC2_EBI

2020-07-31 Thread Christophe Kerello
This patch enables the support of FMC2 EBI. Signed-off-by: Christophe Kerello --- configs/stm32mp15_basic_defconfig | 1 + configs/stm32mp15_trusted_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/stm32mp15_basic_defconfig b/configs/stm32mp15_basic_defconfig index

[PATCH 05/11] mtd: rawnand: stm32_fmc2: use FIELD_PREP/FIELD_GET macros

2020-07-31 Thread Christophe Kerello
This patch removes custom macros and uses FIELD_PREP and FIELD_GET macros. Signed-off-by: Christophe Kerello --- drivers/mtd/nand/raw/stm32_fmc2_nand.c | 120 +++-- 1 file changed, 56 insertions(+), 64 deletions(-) diff --git a/drivers/mtd/nand/raw

[PATCH 06/11] mtd: rawnand: stm32_fmc2: use clrsetbits_le32

2020-07-31 Thread Christophe Kerello
This patch uses clrsetbits_le32 function instead of multiple instructions. Signed-off-by: Christophe Kerello --- drivers/mtd/nand/raw/stm32_fmc2_nand.c | 56 +- 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/drivers/mtd/nand/raw

[PATCH 07/11] memory: stm32-fmc2-ebi: add STM32 FMC2 EBI controller driver

2020-07-31 Thread Christophe Kerello
The driver adds the support for the STMicroelectronics FMC2 EBI controller found on STM32MP SOCs. Signed-off-by: Christophe Kerello --- drivers/memory/Kconfig |9 + drivers/memory/Makefile |1 + drivers/memory/stm32-fmc2-ebi.c | 1056

[PATCH 04/11] mtd: rawnand: stm32_fmc2: cosmetic change to use nfc instead of fmc2 where relevant

2020-07-31 Thread Christophe Kerello
This patch renames functions and local variables. This cleanup is done to get all functions starting by stm32_fmc2_nfc in the FMC2 raw NAND driver when all functions will start by stm32_fmc2_ebi in the FMC2 EBI driver. Signed-off-by: Christophe Kerello --- drivers/mtd/nand/raw

[PATCH 08/11] mtd: rawnand: stm32_fmc2: get resources from parent node

2020-07-31 Thread Christophe Kerello
ned-off-by: Christophe Kerello --- drivers/mtd/nand/raw/stm32_fmc2_nand.c | 87 +++--- 1 file changed, 59 insertions(+), 28 deletions(-) diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c index 1e4d757..47fe610 100644 --- a/driver

[PATCH 02/11] mtd: rawnand: stm32_fmc2: remove useless inline comments

2020-07-31 Thread Christophe Kerello
Remove inline comments that are useless since function label are self explanatory. Signed-off-by: Christophe Kerello --- drivers/mtd/nand/raw/stm32_fmc2_nand.c | 25 - 1 file changed, 25 deletions(-) diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd

[PATCH 03/11] mtd: rawnand: stm32_fmc2: use FMC2_TIMEOUT_5S for timeouts

2020-07-31 Thread Christophe Kerello
FMC2_TIMEOUT_5S will be used each time that we need to wait. It was seen, during stress tests in an overloaded system, that we could be close to 1 second, even if we never met this value. To be safe, FMC2_TIMEOUT_MS is set to 5 seconds. Signed-off-by: Christophe Kerello --- drivers/mtd/nand

[PATCH 00/11] Add STM32 FMC2 EBI controller driver

2020-07-31 Thread Christophe Kerello
meet the access time requirements of the external devices All external devices share the addresses, data and control signals with the controller. Each external device is accessed by means of a unique Chip Select. The FMC2 performs only one access at a time to an external device. Christophe Kerello

[PATCH 01/11] mtd: rawnand: stm32_fmc2: fix a buffer overflow

2020-07-31 Thread Christophe Kerello
The chip select defined in the device tree could only be 0 or 1. Signed-off-by: Christophe Kerello --- drivers/mtd/nand/raw/stm32_fmc2_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c

Re: [PATCH V3] ARM: dts: stm32: Add KS8851-16MLL ethernet on FMC2

2020-04-14 Thread Christophe Kerello
On 4/14/20 1:56 PM, Marek Vasut wrote: On 4/14/20 9:23 AM, Christophe Kerello wrote: On 4/10/20 8:11 PM, Marek Vasut wrote: On 4/9/20 7:38 PM, Patrick DELAUNAY wrote: Hi, [...] That looks like a hack, it would collide with the actual FMC2 driver and it seems the FMC2 DT compatible

Re: [PATCH V3] ARM: dts: stm32: Add KS8851-16MLL ethernet on FMC2

2020-04-14 Thread Christophe Kerello
T bindings stabilize and revisit it then. Thanks Hi Marek, I have already prepared a set of patches to add the full FMC2 support in U-Boot based on kernel drivers. I am currently waiting for the bindings and the drivers being reviewed on kernel side. Regards, Christophe Kerello.

[U-Boot] [PATCH] spi: stm32_qspi: move to exec_op

2019-04-05 Thread Christophe Kerello
Signed-off-by: Christophe Kerello --- drivers/spi/Kconfig | 3 +- drivers/spi/stm32_qspi.c | 625 ++- 2 files changed, 245 insertions(+), 383 deletions(-) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 098372e..a700f24 100644 --- a

[U-Boot] [PATCH v2 1/2] dt-bindings: mtd: stm32_fmc2: add STM32 FMC2 NAND controller documentation

2019-04-05 Thread Christophe Kerello
This patch adds the documentation of the device tree bindings for the STM32 FMC2 NAND controller. Signed-off-by: Christophe Kerello --- Changes in v2: None doc/device-tree-bindings/mtd/stm32-fmc2-nand.txt | 59 1 file changed, 59 insertions(+) create mode 100644 doc

[U-Boot] [PATCH v2 2/2] mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver

2019-04-05 Thread Christophe Kerello
This patch has been tested on Micron MT29F8G08ABACAH4. Signed-off-by: Christophe Kerello --- Changes in v2: - fix oob free offset drivers/mtd/nand/raw/Kconfig | 11 + drivers/mtd/nand/raw/Makefile |1 + drivers/mtd/nand/raw/stm32_fmc2_nand.c | 1092 +++

[U-Boot] [PATCH v2 0/2] mtd: rawnand: add STM32 FMC2 NAND flash controller driver

2019-04-05 Thread Christophe Kerello
12> (BCH8) - nand-ecc-strength = <4>, nand-ecc-step-size = <512> (BCH4) - nand-ecc-strength = <1>, nand-ecc-step-size = <512> (Extended ecc based on HAMMING) This patchset has been tested on Micron MT29F8G08ABACAH4 (8-bit SLC NAND). Changes in v

[U-Boot] [PATCH 2/2] mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver

2019-02-20 Thread Christophe Kerello
This patch has been tested on Micron MT29F8G08ABACAH4. Signed-off-by: Christophe Kerello --- drivers/mtd/nand/raw/Kconfig | 11 + drivers/mtd/nand/raw/Makefile |1 + drivers/mtd/nand/raw/stm32_fmc2_nand.c | 1092 3 files changed, 1104 insertion

[U-Boot] [PATCH 1/2] dt-bindings: mtd: stm32_fmc2: add STM32 FMC2 NAND controller documentation

2019-02-20 Thread Christophe Kerello
This patch adds the documentation of the device tree bindings for the STM32 FMC2 NAND controller. Signed-off-by: Christophe Kerello --- doc/device-tree-bindings/mtd/stm32-fmc2-nand.txt | 59 1 file changed, 59 insertions(+) create mode 100644 doc/device-tree-bindings

[U-Boot] [PATCH 0/2] mtd: rawnand: add STM32 FMC2 NAND flash controller driver

2019-02-20 Thread Christophe Kerello
12> (BCH8) - nand-ecc-strength = <4>, nand-ecc-step-size = <512> (BCH4) - nand-ecc-strength = <1>, nand-ecc-step-size = <512> (Extended ecc based on HAMMING) This patchset has been tested on Micron MT29F8G08ABACAH4 (8-bit SLC NAND). Christ