Re: [PATCH 1/2] clk: imx27: add nand clock

2024-04-16 Thread Sascha Hauer
On Tue, 16 Apr 2024 08:31:25 +0200, Sascha Hauer wrote: > The NAND clock is currently missing. The NAND driver doesn't use it > currently, but will be using it later once we update the driver. Add > this missing clock. > > Applied, thanks! [1/2] clk: imx27: add nand clock

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

2024-04-16 Thread Sascha Hauer
On Fri, Apr 12, 2024 at 03:33:00PM +0200, 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 patches. > >> > >>> DNM: dts: arm64: rockchip:

Re: [PATCH v2] of: do not copy properties if they already exist in the destination

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 14:26:04 +0200, Jonas Richardsen wrote: > Currently `of_copy_property` copies the given property even if a property > with the same name already exists on the destination node. > This leads to kernel warnings about duplicate properties: > ``` > [0.014063] Duplicate name

Re: [PATCH v2] gpio: Add Intel gpio controller support

2024-04-16 Thread Sascha Hauer
On Wed, 10 Apr 2024 18:34:46 +0200, Tomas Marek wrote: > Applied, thanks! [1/1] gpio: Add Intel gpio controller support https://git.pengutronix.de/cgit/barebox/commit/?id=e476edd5322f (link may not be stable) Best regards, -- Sascha Hauer

Re: [PATCH] scripts: config: add script to manipulate .config files on the command line

2024-04-16 Thread Sascha Hauer
On Wed, 10 Apr 2024 14:26:45 +0200, Ahmad Fatoum wrote: > This ports over the Linux v6.9-rc3 state of the config script, which > allows easy enabling and disabling of options from the command line, e.g.: > > scripts/config --file build/.config -d CONFIG_WERROR > > By having the script in the

Re: [PATCH v2 0/4] arm: boards: add wolfvision pf5 mainboard

2024-04-16 Thread Sascha Hauer
On Fri, 12 Apr 2024 15:32:11 +0200, Michael Riesch wrote: > Habidere, > > This series adds support for the WolfVision PF5 mainboard, which serves > as base for recent WolfVision products. It features the Rockchip RK3568 > and can be extended with several different extension boards. The >

Re: [PATCH] ARM64: let 'end' point after the range in cache functions

2024-04-16 Thread Enrico Scholz
Sascha Hauer writes: > So 129 bytes are sent from barebox, right? Which network driver driver > is involved on the barebox side here? How did you force sending excatly > 129 bytes? drivers/net/bcmgenet.c; I made a diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c index

Re: [PATCH] ARM64: let 'end' point after the range in cache functions

2024-04-16 Thread Sascha Hauer
Hi Enrico, On Fri, Apr 12, 2024 at 06:28:35PM +0200, Enrico Scholz wrote: > From: Enrico Scholz > > v8_flush_dcache_range() and v8_inv_dcache_range() are implemented > under the assumption that their 'end' parameter points *after* the > range. > > Fix callers to use it in this way. > > This

Re: [PATCH] ARM64: let 'end' point after the range in cache functions

2024-04-16 Thread Sascha Hauer
On Fri, 12 Apr 2024 18:28:35 +0200, Enrico Scholz wrote: > v8_flush_dcache_range() and v8_inv_dcache_range() are implemented > under the assumption that their 'end' parameter points *after* the > range. > > Fix callers to use it in this way. > > This fixes e.g. spurious corruptions in the last

Re: [PATCH] of: do not acccess 'prop->value' directly

2024-04-16 Thread Sascha Hauer
On Fri, 12 Apr 2024 18:29:25 +0200, Enrico Scholz wrote: > Use of_property_get_value() accessor. Else, wrong results are > returned when working with fit images. > > Applied, thanks! [1/1] of: do not acccess 'prop->value' directly

Re: [PATCH master] mci: core: don't fail MMC probe if HS200 isn't supported in HW

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 07:27:34 +0200, Ahmad Fatoum wrote: > A MMC may support HS200 in theory, but it's unusable due to I/O > voltage. Unlike Linux, barebox doesn't check the I/O voltage, so it > will attempt enabling HS200 and get told no by the card. > > This no currently triggered a failure of

Re: [PATCH 1/3] ARM: Rockchip: bbu: rename rk3568_bbu_mmc_register to rockchip_*

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 07:28:13 +0200, Ahmad Fatoum wrote: > The update handler isn't restricted to the RK3568, but is also usable > for other RKNS SoCs. With minor modification, it is also usable for the > RK3399 and perhaps even older SoCs, so let's rename it to > rockchip_bbu_mmc_handler

Re: [PATCH] gpiolib: implement gpiod_slice_acquired

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 07:28:50 +0200, Ahmad Fatoum wrote: > For use by poller code that makes use of GPIO descriptors instead of the > unstable indices, add a gpiod variant of the existing > gpiod_slice_acquird. > > Applied, thanks! [1/1] gpiolib: implement gpiod_slice_acquired

Re: [PATCH master] partitions: efi: fix NULL dereference on corrupted GPT

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 07:31:20 +0200, Ahmad Fatoum wrote: > When processing a corrupted GPT, the initial magic check may succeed, > but later partition parsing may terminate unsuccessfully. In such case, > we returned an invalid pointer that happened to be NULL, but didn't do > much about it

Re: [PATCH master] soc: rockchip: io-domain: handle missing supply correctly

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 07:31:30 +0200, Ahmad Fatoum wrote: > The original Linux code calls regulator_get_optional and handles its > -ENODEV return code, which morphed into regulator_get when ported to > barebox. The error handling stayed as-is leading to causing supplies to > trigger errors instead

Re: [PATCH master] gpio: rockchip: fix support for RK3588/RK3566

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 07:31:37 +0200, Ahmad Fatoum wrote: > The GPIO controller on newer Rockchip SoCs isn't compatible with the > older ones. Back when GPIOv2 support was added, RK3568 was the only > SoC supported using it, but since then support for the very similar > RK3566 as well as the newer

Re: [PATCH] clk: rk3568: sync PLL rates with Linux

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 07:31:54 +0200, Ahmad Fatoum wrote: > The Linux driver has gained additional PLL rates since we last > synchronized. Add their parameters to barebox as well. > > Applied, thanks! [1/1] clk: rk3568: sync PLL rates with Linux

Re: [PATCH] ARM: dts: rockchip: drop unreferenced rockchip-pinconf.dtsi

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 07:32:12 +0200, Ahmad Fatoum wrote: > This file is no longer used in barebox and existing drivers instead use > the upstream variant. Therefore drop our unreferenced and possibly stale > copy. > > Applied, thanks! [1/1] ARM: dts: rockchip: drop unreferenced

Re: [PATCH] ARM: dts: rk356x: describe serial reboot mode

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 07:32:53 +0200, Ahmad Fatoum wrote: > The PMUGRF (Power Management Unit - General Register File) of the RK3568 > has a general purpose register checked by the BootROM on power-on to > decide on whether to drop to recovery mode (rk-usb-loader/rkdeveloptool). > > Describe this

Re: [PATCH 0/7] PWM: rockchip: add driver support

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 07:35:53 +0200, Ahmad Fatoum wrote: > This series aligns the barebox PWM framework more with the current Linux > state in v6.8 and then ports over the Rockchip PWM driver. > > This has been tested on the RK3566 controlling backlight and PWM LEDs. > > Ahmad Fatoum (7): >

Re: [PATCH] common: factor out debugging options into separate files

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 07:36:30 +0200, Ahmad Fatoum wrote: > We have a lot of debugging options, especially for DEBUG_LL, which make > common/Kconfig quite a bit crowded. Releive some pressure there by > factoring the debugging options and DEBUG_LL out into separate files. > > Applied, thanks!

Re: [PATCH] pinctrl: rockchip: check for invalid pull settings

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 09:21:35 +0200, Ahmad Fatoum wrote: > Commit e877582e9875 ("pinctrl: rockchip: fix bias settings") reinstated > the translation done to pull settings via the bank->pull_type array, > like the original Linux driver does. What it didn't do is actually check > that the

Re: [PATCH master] Documentation: aarch64-qemu-virt: add name of defconfig

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 11:14:48 +0200, Ahmad Fatoum wrote: > Commit d00b07dd14bc ("ARM: Remove qemu_virt64_defconfig") dropped the > defconfig in favor of multi_v8_defconfig, but missed updating the > documentation. Remedy this. > > Applied, thanks! [1/1] Documentation: aarch64-qemu-virt: add

Re: [PATCH master] Documentation: devel: project-ideas: remove outdated info on MMC speed

2024-04-16 Thread Sascha Hauer
On Mon, 15 Apr 2024 11:17:07 +0200, Ahmad Fatoum wrote: > This is now doubly outdated. We have support for DDR in a number of > drivers and HS200 for one SoC (ZynqMP) and more is likely to come with > time, so remove that outdate info. > > Applied, thanks! [1/1] Documentation: devel:

[PATCH 1/8] bch: update from Kernel

2024-04-16 Thread Sascha Hauer
This updates BCH support from Linux as of Linux-6.9-rc2. Among other things in Linux the bch function names changed from a _bch suffix to a bch_ prefix. Link: https://lore.barebox.org/20240416062147.1337233-1-s.ha...@pengutronix.de Signed-off-by: Sascha Hauer --- common/imx-bbu-nand-fcb.c |

[PATCH 5/8] mtd: nand: replace nand_imx driver with kernel driver

2024-04-16 Thread Sascha Hauer
The barebox nand_imx driver has diverged a lot from the corresponding Kernel driver. To reduce maintenance effort replace the driver with the Kernel driver. The driver is mostly taken from the Kernel and only adjusted to compile with barebox. The only significant change is that the driver creates

[PATCH 7/8] mtd: nand: mxc_nand: implement exec_op

2024-04-16 Thread Sascha Hauer
This converts the driver to the more modern exec_op which gets us rid of a bunch of legacy code. Tested on i.MX27 and i.MX25. Signed-off-by: Sascha Hauer --- drivers/mtd/nand/raw/mxc_nand.c | 426 ++-- 1 file changed, 132 insertions(+), 294 deletions(-) diff --git

[PATCH 8/8] mtd: nand: mxc_nand: support software ECC

2024-04-16 Thread Sascha Hauer
To support software ECC we still need the driver provided read_oob, read_page_raw and write_page_raw ops, so set them unconditionally no matter which engine_type we use. The OOB layout on the other hand represents the layout the i.MX ECC hardware uses, so set this only when

[PATCH 0/8] Update NAND layer

2024-04-16 Thread Sascha Hauer
This series comes out of the need to support software BCH ECC for the i.MX NAND driver, as the ancient i.MX27 hardware only supports 1-bit Hamming ECC which is not sufficient on more modern NAND chips. 1st of all the NAND layer is updated to Linux-6.9-rc2, because this has better support for

[PATCH 2/8] mtd: nand: move to drivers/mtd/nand/raw/

2024-04-16 Thread Sascha Hauer
Linux moved the raw NAND drivers from drivers/mtd/nand/ to drivers/mtd/nand/raw/ years ago. Follow suit and do the same for barebox to be more consistent with Linux. Signed-off-by: Sascha Hauer --- commands/Kconfig | 6 +- drivers/mtd/Makefile

[PATCH 3/8] mtd: update _lock/_unlock prototype

2024-04-16 Thread Sascha Hauer
In Linux the _lock/_unlock hooks now take a uint64_t as length argument. Follow suit to be more consistent with Linux. Signed-off-by: Sascha Hauer --- drivers/mtd/mtdconcat.c | 4 ++-- drivers/mtd/nand/raw/nand_base.c | 4 ++-- drivers/mtd/nor/cfi_flash.c | 4 ++--

[PATCH 6/8] mtd: nand: mxc_nand: separate page read from ecc calc

2024-04-16 Thread Sascha Hauer
Our read_page hook currently reads out a page and also counts and returns the number of bitflips. In upcoming exec_op conversion we'll need to read the page data in exec_op, but the bitflip information will be needed in mxc_nand_read_page(). To ease exec_op conversion separate the page read out

[PATCH 1/2] clk: imx27: add nand clock

2024-04-16 Thread Sascha Hauer
The NAND clock is currently missing. The NAND driver doesn't use it currently, but will be using it later once we update the driver. Add this missing clock. Signed-off-by: Sascha Hauer --- drivers/clk/imx/clk-imx27.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 2/2] clk: imx27: add watchdog clock

2024-04-16 Thread Sascha Hauer
Since 87cad17964 the imxwd watchdog driver needs a clock to probe. Add this clock for i.MX27 to make the watchdog driver work again. Fixes: 87cad17964 ("watchdog: imxwd: get and enable clock") Signed-off-by: Sascha Hauer --- drivers/clk/imx/clk-imx27.c | 2 ++ 1 file changed, 2 insertions(+)

[PATCH] bch: update from Kernel

2024-04-16 Thread Sascha Hauer
This updates BCH support from Linux as of Linux-6.9-rc2. Among other things in Linux the bch function names changed from a _bch suffix to a bch_ prefix. Signed-off-by: Sascha Hauer --- common/imx-bbu-nand-fcb.c | 12 +-- drivers/mtd/devices/docg3.c | 8 +- drivers/mtd/nand/nand_bch.c | 10

[PATCH 1/2] fs: jffs2: remove NAND write support entirely

2024-04-16 Thread Sascha Hauer
From: Juergen Borleis Our JFFS2 implementation refuses to work on NAND flashes because we lack support for CONFIG_JFFS2_FS_WRITEBUFFER currently. JFFS2 is barely used anymore and it seems unlikely that write support for it will ever be added, so remove write support altogether. With this we can

[PATCH 2/2] fs: jffs2: ignore cleanup hints

2024-04-16 Thread Sascha Hauer
From: Juergen Borleis Without any kind of write support cleanup hints make no sense and cannot fixed inside the bootloader. Thus, ignore them entirely. Signed-off-by: Juergen Borleis Signed-off-by: Sascha Hauer --- fs/jffs2/os-linux.h | 10 +- 1 file changed, 9 insertions(+), 1

[PATCH] mtd: nand: stm32: fix wrong regmap_bulk_read() usage

2024-04-16 Thread Sascha Hauer
Compilation of the STM32 NAND driver fails with: error: call to '__regmap_bulk_api_changed' declared with attribute error: Last argument is now number of registers, not bytes. Fix it and include --- drivers/mtd/nand/stm32_fmc2_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)