[PATCH v3 12/14] mci: sdhci: add tuning support

2024-03-15 Thread Steffen Trumtrar
The arasan SDHCI driver doesn't use MMC tuning but SDHCI tuning. Both are not supported yet in barebox. Add SDHCI tuning support from linux v6.7. Signed-off-by: Steffen Trumtrar Signed-off-by: Ahmad Fatoum --- drivers/mci/sdhci.c | 275 +++-

[PATCH v3 11/14] mci: mci-core: replace value with define

2024-03-15 Thread Steffen Trumtrar
Use the newly introduced define for High Speed timing mode instead of just '1'. Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum --- drivers/mci/mci-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index

[PATCH v3 14/14] mci: sdhci: replace sdhci_wait_idle

2024-03-15 Thread Steffen Trumtrar
Linux uses a different sdhci_wait_idle function than what barebox currently does. For HS200 support, the linux version needs to be used. As currently only arasan-sdhci is tested with HS200, keep the old sdhci_wait_idle as sdhci_wait_idle_data and convert all users of it. Signed-off-by: Ahmad

[PATCH v3 05/14] mci: arasan: read clk phases from DT

2024-03-15 Thread Steffen Trumtrar
Depending on the used SDHCI mode the clock phases are different. Import the helper function to get these values from the DT from linux v6.7. Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum --- drivers/mci/arasan-sdhci.c | 121 + 1 file

[PATCH v3 10/14] mci: mci-core: add HS200 support

2024-03-15 Thread Steffen Trumtrar
HS200 is a timing mode for eMMCs to work 8bit with 200MHz clocks. To be used, drivers need to set the correct drive strength, clock phases and then SDHCI can start tuning for HS200. Signed-off-by: Steffen Trumtrar Acked-by: Ahmad Fatoum --- drivers/mci/Kconfig| 7 ++

[PATCH v3 04/14] include: mci: sync mci_timing with linux

2024-03-15 Thread Steffen Trumtrar
The timings are used to check if mci_host->timing is equal to one of this values. Linux uses a different numbering. Adapt that for compatability. Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum --- include/mci.h | 18 ++ 1 file changed, 10 insertions(+), 8

[PATCH v3 00/14] mci: add HS200 support for eMMCs

2024-03-15 Thread Steffen Trumtrar
This series adds support for HS200 mode to mci-core and sdhci. As the host driver also needs to handle clock setup, pin control and host specific tuning, this series only adds HS200 support to the Arasan SDHCI driver. Tested on: ZynqMP Compile tested: for ZynqMP with/without CONFIG_MCI_TUNING

[PATCH v3 07/14] mci: arasan: register sdcard/sampleclk

2024-03-15 Thread Steffen Trumtrar
Read and register the sampleclk and sdcardclk. They are needed later for HS200 tuning support. Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum --- drivers/mci/arasan-sdhci.c | 316 + 1 file changed, 316 insertions(+) diff --git

[PATCH v3 09/14] mci: core: parse more host capabilities from DT

2024-03-15 Thread Steffen Trumtrar
Port the linux v6.7 mmc host caps2 parsing. While at it, remove the ->no_sd and ->no_sdio. These are bits in the caps2 field. Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum --- drivers/mci/mci-core.c | 36 ++-- include/mci.h | 32

[PATCH v3 03/14] mci: arasan: implement 25MHz quirk for zynqmp

2024-03-15 Thread Steffen Trumtrar
The Arasan on the zynqmp in version 8.9a doesn't meet the timing requirements at 25MHz. It works at 19MHz instead. Add the quirk from linux kernel v6.8-rc4. Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum --- drivers/mci/arasan-sdhci.c | 28 +++- 1 file

[PATCH v3 13/14] mci: arasan-sdhci: add HS200 tuning support on ZynqMP

2024-03-15 Thread Steffen Trumtrar
The ZynpMP 8.9a has an Arasan IP core that supports HS200 tuning. Register the callback with the mci-core. Arasan uses the SDHCI tuning method. Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum --- drivers/mci/arasan-sdhci.c | 62 +++--- 1 file

[PATCH v3 02/14] zynqmp: firmware: add functions to set tap delay

2024-03-15 Thread Steffen Trumtrar
Add a function to set the tap delay for the clk phase of the sd host controller. Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum --- arch/arm/mach-zynqmp/firmware-zynqmp.c | 42 ++ include/mach/zynqmp/firmware-zynqmp.h | 23 +++ 2

[PATCH v3 01/14] ARM: zynqmp: add sd_dll_reset call

2024-03-15 Thread Steffen Trumtrar
Add a function to reset DLL logic for SD devices. Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum --- arch/arm/mach-zynqmp/firmware-zynqmp.c | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm/mach-zynqmp/firmware-zynqmp.c

[PATCH v3 06/14] mci: core: save the set clock as actual_clock

2024-03-15 Thread Steffen Trumtrar
Linux mmc_host saves the actual_clock set on the HC. Do the same to use it later. Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum --- drivers/mci/mci-core.c | 2 ++ include/mci.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/mci/mci-core.c

[PATCH v3 08/14] include: mci: add more EXT_CSD_CARD_TYPE_*

2024-03-15 Thread Steffen Trumtrar
Import missing EXT_CSD_CARD_TYPE_ defines from linux v6.7. EXT_CSD_CARD_TYPE_SDR_1_8V/1_2V is unused in barebox. Replace with the defines from linux. Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum --- include/mci.h | 15 +-- 1 file changed, 13 insertions(+), 2

Re: [PATCH v2 13/14] mci: arasan-sdhci: add HS200 tuning support on ZynqMP

2024-03-15 Thread Steffen Trumtrar
Hi, On 2024-03-15 at 13:18 +01, Sascha Hauer wrote: Thist hunk conflicts with b80c0e1ec6 ("mci: arasan: add dma support"): <<< HEAD ret = sdhci_wait_for_done(>sdhci, SDHCI_INT_CMD_COMPLETE); === /* CMD19/21 generate _only_ Buffer Read Ready interrupt */ if

Re: [PATCH v2 13/14] mci: arasan-sdhci: add HS200 tuning support on ZynqMP

2024-03-15 Thread Sascha Hauer
On Thu, Mar 14, 2024 at 07:47:36PM +0100, Steffen Trumtrar wrote: > The ZynpMP 8.9a has an Arasan IP core that supports HS200 tuning. > Register the callback with the mci-core. > > Arasan uses the SDHCI tuning method. > > Signed-off-by: Steffen Trumtrar > Reviewed-by: Ahmad Fatoum > --- >

Re: [PATCH v2 00/14] mci: add HS200 support for eMMCs

2024-03-15 Thread Sascha Hauer
On Thu, 14 Mar 2024 19:47:23 +0100, Steffen Trumtrar wrote: > This series adds support for HS200 mode to mci-core and sdhci. > As the host driver also needs to handle clock setup, pin control and > host specific tuning, this series only adds HS200 support to the Arasan > SDHCI driver. > >

Re: [PATCH v2 10/14] mci: mci-core: add HS200 support

2024-03-15 Thread Ahmad Fatoum
On 14.03.24 19:47, Steffen Trumtrar wrote: > HS200 is a timing mode for eMMCs to work 8bit with 200MHz clocks. > To be used, drivers need to set the correct drive strength, clock phases > and then SDHCI can start tuning for HS200. > > Signed-off-by: Steffen Trumtrar Acked-by: Ahmad Fatoum >

Re: [PATCH v2 12/14] mci: sdhci: add tuning support

2024-03-15 Thread Ahmad Fatoum
On 14.03.24 19:47, Steffen Trumtrar wrote: > The arasan SDHCI driver doesn't use MMC tuning but SDHCI tuning. Both > are not supported yet in barebox. > Add SDHCI tuning support from linux v6.7. > > Signed-off-by: Steffen Trumtrar > Signed-off-by: Ahmad Fatoum Reviewed-by: Ahmad Fatoum > ---

Re: [PATCH v2 14/14] mci: sdhci: replace sdhci_wait_idle

2024-03-15 Thread Ahmad Fatoum
On 14.03.24 19:47, Steffen Trumtrar wrote: > Linux uses a different sdhci_wait_idle function than what barebox > currently does. For HS200 support, the linux version needs to be used. > As currently only arasan-sdhci is tested with HS200, keep the old > sdhci_wait_idle as sdhci_wait_idle_data and

Re: [PATCH v2 11/14] mci: mci-core: replace value with define

2024-03-15 Thread Ahmad Fatoum
On 14.03.24 19:47, Steffen Trumtrar wrote: > Use the newly introduced define for High Speed timing mode instead of > just '1'. > > Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum > --- > drivers/mci/mci-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH v2 09/14] mci: core: parse more host capabilities from DT

2024-03-15 Thread Ahmad Fatoum
On 14.03.24 19:47, Steffen Trumtrar wrote: > Port the linux v6.7 mmc host caps2 parsing. > While at it, remove the ->no_sd and ->no_sdio. These are bits in the > caps2 field. > > Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum > --- > drivers/mci/mci-core.c | 36

Re: [PATCH v2 07/14] mci: arasan: register sdcard/sampleclk

2024-03-15 Thread Ahmad Fatoum
On 14.03.24 19:47, Steffen Trumtrar wrote: > Read and register the sampleclk and sdcardclk. They are needed later for > HS200 tuning support. > > Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum > --- > drivers/mci/arasan-sdhci.c | 316 >

Re: [PATCH v2 06/14] mci: core: save the set clock as actual_clock

2024-03-15 Thread Ahmad Fatoum
On 14.03.24 19:47, Steffen Trumtrar wrote: > Linux mmc_host saves the actual_clock set on the HC. Do the same to use > it later. > > Signed-off-by: Steffen Trumtrar Reviewed-by: Ahmad Fatoum > --- > drivers/mci/mci-core.c | 2 ++ > include/mci.h | 1 + > 2 files changed, 3

v2024.03.0

2024-03-15 Thread Sascha Hauer
Hi All, I am happy to announce barebox-2024.03.0. This release brings us runtime partitioning support. We have a new command that allows us to create new partition tables and to manipulate existing partition tables. Also the partition tables are now reparsed when partitions have changed. Marco

Re: [PATCH 1/4] fastboot: add support to set fastboot_bbu from board code

2024-03-15 Thread Sascha Hauer
On Wed, 13 Mar 2024 20:56:03 +0100, Marco Felsch wrote: > Add a helper to set the fastboot_bbu variable to be independent of the > initlevel. > > Applied, thanks! [1/4] fastboot: add support to set fastboot_bbu from board code

Re: [PATCH] ARM: i.MX: define MUX_MODE_SION for use in board code

2024-03-15 Thread Sascha Hauer
On Wed, 13 Mar 2024 19:00:27 +0100, Ahmad Fatoum wrote: > While we set SION for all I2C pinmux configurations, board code may > need to set SION for other pads as well. Provide a MUX_MODE_SION > definition that can be OR-d into the pinmux argument of > imx8mm_setup_pad(). > > Applied, thanks!

Re: [PATCH] net: cpsw: map/unmap buffers used for DMA

2024-03-15 Thread Sascha Hauer
On Wed, 13 Mar 2024 18:50:02 +0100, Ahmad Fatoum wrote: > This doesn't fix any bugs, but it allows CONFIG_DMA_API_DEBUG to check > for any future issues that may be introduced. > > Applied, thanks! [1/1] net: cpsw: map/unmap buffers used for DMA

Re: [PATCH] ddr: imx8m: add deprecation warnings for ddrphy_trained_csr

2024-03-15 Thread Sascha Hauer
On Wed, 13 Mar 2024 16:42:17 +0100, Ahmad Fatoum wrote: > ddrphy_trained_csr and ddrphy_trained_csr_num are generated by the > spreadsheet, but are unused. Instead a default array with fixed values > is unconditionally used. Add a deprecation warning to alert to this > fact. > > It seems GCC

Re: [PATCH master 1/2] ARM: i.MX8MQ: fix early boot hang

2024-03-15 Thread Sascha Hauer
On Wed, 13 Mar 2024 15:41:35 +0100, Ahmad Fatoum wrote: > Commit 6ea731079140 ("ARM: i.MX8MQ: Streamline lowlevel startup code") > changed i.MX8MQ PBL code to mimic the code introduced for later i.MX8M > variants. The mimicry went a bit too far though and it exchanged i.MX8MQ > boot source

Re: [PATCH 00/12] hw_random: add 6 more RNG drivers

2024-03-15 Thread Sascha Hauer
On Wed, 13 Mar 2024 11:56:19 +0100, Ahmad Fatoum wrote: > While stack protector support can be used without HWRNG, it will > print a warning about the fixed canary to alert to the fact that it > requires a random canary to be able to withstand an attacker. > > Linux HWRNG drivers are