Re: [RFC PATCH v1 11/20] drivers: gpio: add support of RP1 GPIO for Raspberry PI 5

2025-02-05 Thread Marek Behún
On Wed, Feb 05, 2025 at 12:09:02PM +0100, Marek Behún wrote: > > +#define FLD_GET(r, f) (((r) & (f ## _MASK)) >> (f ## _LSB)) > > +#define FLD_SET(r, f, v) r = (((r) & ~(f ## _MASK)) | ((v) << (f ## _LSB))) > > Use FIELD_GET and FIELD_SET. Sorry, FIELD_GET and FIELD_PREP.

Re: [RFC PATCH v1 11/20] drivers: gpio: add support of RP1 GPIO for Raspberry PI 5

2025-02-05 Thread Marek Behún
On Wed, Feb 05, 2025 at 10:15:45AM +, Oleksii Moisieiev wrote: ... > +#define RP1_PAD_DRIVE_LSB4 > +#define RP1_PAD_IN_ENABLE_MASK 0x0040 > +#define RP1_PAD_IN_ENABLE_LSB6 > +#define RP1_PAD_OUT_DISABLE_MASK 0x0080 > +#define RP1_PAD_OUT_D

Re: [PATCH 1/1] cmd/rng: fix long help text

2024-11-27 Thread Marek Behún
Acked-by: Marek Behún On Tue, Nov 26, 2024 at 03:20:26PM +0100, Heinrich Schuchardt wrote: > The number of bytes may only be specified if a device number id provided. > > Correct the formatting. > > Signed-off-by: Heinrich Schuchardt > --- > cmd/rng.c | 4

device that supports both usb host & usb device modes?

2024-10-10 Thread Marek Behún
Hi all, I am searching for HW that supports both USB host & USB device/gadget mode, on the same USB port, capable of switching between these modes at runtime. Preferably supported in upstream kernel. Has anyone done this for example with Raspberry Pi? Thanks. Marek

Re: [PATCH u-boot-marvell 2/3] arm: mvebu: turris_omnia: Use the i2c_eeprom misc driver for EEPROM reading in U-Boot proper

2024-09-03 Thread Marek Behún
On Tue, Sep 03, 2024 at 08:57:24AM +0200, Stefan Roese wrote: > On 8/29/24 10:08, Marek Behún wrote: > > Use the i2c_eeprom miscellaneous driver for reading Turris Omnia EEPROM > > in U-Boot proper. Keep using dm_i2c_read() in SPL build, since adding > > the i2c_eepro

[PATCH u-boot-marvell 3/3] arm: mvebu: turris_omnia: Switch DDR speed to 1333H when reset 9 is selected

2024-08-29 Thread Marek Behún
mode. Signed-off-by: Marek Behún --- board/CZ.NIC/turris_omnia/turris_omnia.c | 90 1 file changed, 77 insertions(+), 13 deletions(-) diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 46f20f05c05..eb88ee7f1ed 100644 --- a/

[PATCH u-boot-marvell 2/3] arm: mvebu: turris_omnia: Use the i2c_eeprom misc driver for EEPROM reading in U-Boot proper

2024-08-29 Thread Marek Behún
Use the i2c_eeprom miscellaneous driver for reading Turris Omnia EEPROM in U-Boot proper. Keep using dm_i2c_read() in SPL build, since adding the i2c_eeprom driver to SPL build increases the image by 1.5 KiB. Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/Kconfig | 1 + board

[PATCH u-boot-marvell 1/3] arm: mvebu: turris_omnia: Rename variable holding EEPROM udevice

2024-08-29 Thread Marek Behún
Rename the variable holding the EEPROM udevice from `chip` to `eeprom`. Signed-off-by: Marek Behún --- board/CZ.NIC/turris_omnia/turris_omnia.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia

[PATCH u-boot-marvell 0/3] Turris Omnia DDR speed change with reset button (for 2024.10)

2024-08-29 Thread Marek Behún
speed mode, and also write this setting to EEPROM, so that subsequent boots will also train in 1333H mode. The user can set back the default mode with the `eeprom` U-Boot command, or with the `omnia-eeprom` Linux command. Marek [1] https://docs.turris.cz/hw/omnia/rescue-modes/ Marek Behún (3

Re: [PATCH 6/6] powerpc: Add support for CZ.NIC Turris 1.x routers

2024-07-11 Thread Marek Behún
Reviewed-by: Marek Behún

Re: [PATCH 5/6] powerpc: use CONFIG_IS_ENABLED() when checking for DM_SERIAL in include/asm/config.h

2024-07-11 Thread Marek Behún
Reviewed-by: Marek Behún

Re: [PATCH 4/6] powerpc: mpc85xx: use CONFIG_VAL() for SYS_MONITOR_BASE in start.s

2024-07-11 Thread Marek Behún
Reviewed-by: Marek Behún

Re: [PATCH 3/6] powerpc: mpc8xxx: Extend find_law() to find_law_by_addr_id()

2024-07-11 Thread Marek Behún
Reviewed-by: Marek Behún

Re: [PATCH 2/6] board: freescale: p1_p2_rdb_pc: Add weak function p1_p2_rdb_pc_fix_fdt_model() for fixing DT model string

2024-07-11 Thread Marek Behún
Reviewed-by: Marek Behún

Re: [PATCH 1/6] board_f: Add support for CONFIG_OF_BOARD_FIXUP for XIP images

2024-07-11 Thread Marek Behún
Reviewed-by: Marek Behún

[PATCH u-boot-marvell 16/16] arm: mvebu: turris_omnia: Support old DDR3 training

2024-06-18 Thread Marek Behún
field "Use old DDR training": eeprom update "Use old DDR training" 1 Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/Kconfig | 1 + board/CZ.NIC/turris_omnia/Makefile| 1 + board/CZ.NIC/turris_omnia/eeprom.c| 37 ++- board

[PATCH u-boot-marvell 15/16] arm: mvebu: a38x: Add optional support for using old DDR3 training code

2024-06-18 Thread Marek Behún
to support this need to select the ARMADA_38X_SUPPORT_OLD_DDR3_TRAINING config option and implement the old version of DDR topology provider, ddr3_get_topology_map(). Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/Kconfig | 4 + arch/arm/mach-mvebu/include/mach/cpu.h

[PATCH u-boot-marvell 14/16] ddr: marvell: a38x: old: Backport immutable debug settings

2024-06-18 Thread Marek Behún
Backport the option to compile with immutable debug settings also to the old implementation of the DDR3 training code. The original PR for mv-ddr-marvell can be seen at https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/pull/45/ Signed-off-by: Marek Behún --- drivers/ddr/marvell

[PATCH u-boot-marvell 13/16] ddr: marvell: a38x: old: Fix some compiler warning of the old code

2024-06-18 Thread Marek Behún
Fix some compilation warning in the old DDR training code. Signed-off-by: Marek Behún --- drivers/ddr/marvell/a38x/old/ddr3_a38x.c | 1 + drivers/ddr/marvell/a38x/old/ddr3_init.h | 2 ++ drivers/ddr/marvell/a38x/old/ddr3_training.c | 1 + drivers/ddr

[PATCH u-boot-marvell 09/16] arm: mvebu: turris_omnia: Enable the 'eeprom' command

2024-06-18 Thread Marek Behún
Enable the 'eeprom' command with support for EEPROM layout for Turris Omnia. Enable the i2c-eeprom driver so that the EEPROM is accessed via driver model. Signed-off-by: Marek Behún --- configs/turris_omnia_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH u-boot-marvell 11/16] arm: mvebu: turris_omnia: Read DDR speed from EEPROM

2024-06-18 Thread Marek Behún
, 1600K) and use it to overwrite the DDR topology parameters used by the DDR training algorithm. Signed-off-by: Marek Behún --- board/CZ.NIC/turris_omnia/eeprom.c | 41 +- board/CZ.NIC/turris_omnia/turris_omnia.c | 99 +++- 2 files changed, 135 insertions(+), 5

[PATCH u-boot-marvell 10/16] arm: mvebu: turris_omnia: Extend EEPROM info structure

2024-06-18 Thread Marek Behún
Extend the Omnia EEPROM information structure in preparation for more variables to be stored there. Signed-off-by: Marek Behún --- board/CZ.NIC/turris_omnia/eeprom.c | 11 ++- board/CZ.NIC/turris_omnia/turris_omnia.c | 42 2 files changed, 46 insertions(+), 7

[PATCH u-boot-marvell 08/16] arm: mvebu: turris_omnia: Implement EEPROM layout for the 'eeprom' command

2024-06-18 Thread Marek Behún
34a04103 RAM size in GB2 Wi-Fi Region CRC32 checksum cecbc2a1 Signed-off-by: Marek Behún --- board/CZ.NIC/turris_omnia/Makefile | 1 + board/CZ.NIC/turris_omnia/eeprom.c | 109 + 2 files changed, 110 insertions(+) create mode 1006

[PATCH u-boot-marvell 07/16] arm: mvebu: turris_omnia: Fix ethernet PHY reset gpio FDT fixup

2024-06-18 Thread Marek Behún
use reset-gpios so that we can get rid of these drivers parsing this property. Fixes: 1da53ae26afc ("arm: mvebu: turris_omnia: Add support for design with SW reset signals") Signed-off-by: Marek Behún --- board/CZ.NIC/turris_omnia/turris_omnia.c | 44 ++-

[PATCH u-boot-marvell 06/16] arm: mvebu: turris_omnia: Enable immutable debug settings in DDR3 training by default

2024-06-18 Thread Marek Behún
Save 10 KiB in Turris Omnia's SPL binary by enabling immutable debug settings for DDR3 training code. Signed-off-by: Marek Behún --- configs/turris_omnia_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig

[PATCH u-boot-marvell 05/16] ddr: marvell: a38x: debug: Allow compiling with immutable debug settings to reduce binary size

2024-06-18 Thread Marek Behún
Allow compiling with immutable debug settings: - DEBUG_LEVEL is always set to DEBUG_LEVEL_ERROR - register dumps are disabled This can save around 10 KiB of space in the resulting binary, which is a lot in U-Boot SPL. Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/Kconfig | 10

[PATCH u-boot-marvell 04/16] ddr: marvell: a38x: debug: Define DDR_VIEWER_TOOL variables only if needed, and make them static

2024-06-18 Thread Marek Behún
The variables is_validate_window_per_if, is_validate_window_per_pup, sweep_cnt and is_run_leveling_sweep_tests are only used if DDR_VIEWER_TOOL macro is defined, so define them only in that case. Make them static since they are only used in ddr3_debug.c. Signed-off-by: Marek Behún --- drivers

[PATCH u-boot-marvell 03/16] ddr: marvell: a38x: debug: Remove unused variables

2024-06-18 Thread Marek Behún
The variables is_default_centralization, is_tune_result and is_bist_reset_bit are never used. Signed-off-by: Marek Behún --- drivers/ddr/marvell/a38x/ddr3_debug.c | 3 --- drivers/ddr/marvell/a38x/ddr3_init.h | 1 - 2 files changed, 4 deletions(-) diff --git a/drivers/ddr/marvell/a38x

[PATCH u-boot-marvell 01/16] arm: mvebu: turris_omnia: Disable ext4 write support in defconfig

2024-06-18 Thread Marek Behún
: Marek Behún --- configs/turris_omnia_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig index 225a76f993..d5699782d7 100644 --- a/configs/turris_omnia_defconfig +++ b/configs/turris_omnia_defconfig @@ -124,4 +124,3

[PATCH u-boot-marvell 02/16] ddr: marvell: a38x: debug: return from ddr3_tip_print_log() early if we won't print anything

2024-06-18 Thread Marek Behún
Return from ddr3_tip_print_log() early if we won't print anything anyway. This way the compiler can optimize away the VALIDATE_IF_ACTIVE() calls in the for-loop, so if the SILENT_LIB macro is defined, no code is generated for the rest of the function, which saves some space. Signed-off-by:

[PATCH u-boot-marvell 00/16] Turris Omnia DDR training changes

2024-06-18 Thread Marek Behún
Hi Stefan, this is v2 of the series adds some changes to DDR3 training for Armada 38x and Turris Omnia. I also put one unrelated patch (Fix ethernet PHY reset gpio FDT fixup) here. It depends on stuff in Tom's next branch. Marek Marek Behún (16): arm: mvebu: turris_omnia: Disable ext4

Re: [PATCH] fs: btrfs: fix out of bounds write

2024-06-18 Thread Marek Behún
On Mon, 17 Jun 2024 22:49:47 +0300 Alex Shumsky wrote: > Fix btrfs_read/read_and_truncate_page write out of bounds of destination > buffer. Old behavior break bootstd malloc'd buffers of exact file size. > Previously this OOB write have not been noticed because distroboot usually > read files int

[PATCH 11/11] cmd: eeprom: Extend to EEPROMs probed via driver model

2024-05-21 Thread Marek Behún
fier for the 'eeprom' command, in addition to the legacy [[bus] devaddr] specifier. Moreover if no device specifier is given, then the first UCLASS_I2C_EEPROM device is used, if found. Signed-off-by: Marek Behún --- cmd/eeprom.c | 122 ++-

[PATCH 10/11] cmd: eeprom: Don't read/write whole EEPROM if not necessary

2024-05-21 Thread Marek Behún
Don't read/write whole EEPROM if not necessary when printing / updating EEPROM layout fields. Only read/write layout.data_size bytes. Signed-off-by: Marek Behún --- cmd/eeprom.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/cmd/eeprom.c b/cmd/eeprom.c

[PATCH 08/11] cmd: eeprom: Refactor eeprom device specifier parsing

2024-05-21 Thread Marek Behún
In preparation for allowing to access eeprom by driver-model device name, refactor the eeprom device specifier parsing. Instead of filling two parameters (i2c_bus, i2c_addr), the parsing function now fills one parameter of type struct eeprom_dev_spec. Signed-off-by: Marek Behún --- cmd/eeprom.c

[PATCH 09/11] cmd: eeprom: Refactor command execution into function by action

2024-05-21 Thread Marek Behún
Refactor the eeprom_execute_command() function into separate functions do_eeprom_rw(), do_eeprom_print() and do_eeprom_update(). Signed-off-by: Marek Behún --- cmd/eeprom.c | 111 --- 1 file changed, 71 insertions(+), 40 deletions(-) diff --git a

[PATCH 07/11] cmd: eeprom: Deduplicate parse_i2c_bus_addr() calls

2024-05-21 Thread Marek Behún
Deduplicate the calls to parse_i2c_bus_addr(). Signed-off-by: Marek Behún --- cmd/eeprom.c | 36 +--- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/cmd/eeprom.c b/cmd/eeprom.c index d610dc9931..12902e812e 100644 --- a/cmd/eeprom.c +++ b/cmd

[PATCH 06/11] cmd: eeprom: Hide eeprom layout versioning behind a Kconfig option

2024-05-21 Thread Marek Behún
ROM layout versioning. Signed-off-by: Marek Behún --- cmd/Kconfig | 9 - cmd/eeprom.c | 20 +++- configs/cm_fx6_defconfig | 1 + configs/cm_t43_defconfig | 1 + 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kco

[PATCH 05/11] cmd: eeprom: Fix usage help for the eeprom command

2024-05-21 Thread Marek Behún
The bus and devaddr arguments of the eeprom command are optional, and if only one is given, it is assumed to be devaddr. Change the usage help from to [[bus] [devaddr] Signed-off-by: Marek Behún --- cmd/eeprom.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a

[PATCH 04/11] common: eeprom_field: Drop unnecessary comparison

2024-05-21 Thread Marek Behún
The byte variable is of type unsigned char, it is never less than zero. The error case is handled by *endptr, so drop the comparison altogether. Signed-off-by: Marek Behún --- common/eeprom/eeprom_field.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/eeprom

[PATCH 03/11] common: eeprom_field: Fix updating binary field

2024-05-21 Thread Marek Behún
The __eeprom_field_update_bin() function is expected to parse a hex string into bytes (potentially in reverse order), but the simple_strtoul() function is given 0 as base. This does not work since the string does not contain '0x' prefix. Add explicit base 16. Signed-off-by: M

[PATCH 02/11] common: eeprom_layout: Split field finding code from the field update function

2024-05-21 Thread Marek Behún
Split the eeprom layout field finding code from the eeprom_layout_update_field() function in order to make it usable in alternative implementations of update method. Signed-off-by: Marek Behún --- common/eeprom/eeprom_layout.c | 46 +++ include/eeprom_layout.h

[PATCH 01/11] common: eeprom_layout: Assign default layout methods and parameters before specific ones

2024-05-21 Thread Marek Behún
Assign the default eeprom layout parameter .data_size and methods .print() and .update() before calling eeprom_layout_assign() in eeprom_layout_setup(). This allows eeprom_layout_assign() to overwrite these if needed. Signed-off-by: Marek Behún --- common/eeprom/eeprom_layout.c | 8 1

[PATCH 00/11] 'eeprom' command improvements

2024-05-21 Thread Marek Behún
eries is a dependency for some DDR issue fixes for Turris Omnia. I will be sending that one separately. github PR link (with CI): https://github.com/u-boot/u-boot/pull/540 - there is a failure for test.py for sandbox sandbox_clang but it seems unrelated to these changes Marek Behún (11)

Re: [PATCH u-boot-mvebu 10/10] arm: mvebu: turris_omnia: Support old DDR3 training, selectable via env var

2024-05-15 Thread Marek Behún
On Wed, 15 May 2024 11:10:09 +0200 Stefan Roese wrote: > Hi Marek, > > On 5/15/24 10:59, Marek Behún wrote: > > On Mon, 6 May 2024 12:03:55 +0200 > > Stefan Roese wrote: > > > >> Hi Marek, > >> > >> On 4/15/24 18:30, Marek Behún wrote:

Re: [PATCH u-boot-mvebu 10/10] arm: mvebu: turris_omnia: Support old DDR3 training, selectable via env var

2024-05-15 Thread Marek Behún
On Mon, 6 May 2024 12:03:55 +0200 Stefan Roese wrote: > Hi Marek, > > On 4/15/24 18:30, Marek Behún wrote: > > Support old DDR3 training code on Turris Omnia, selectable by U-Boot > > enviroment variable. > > > > Users experiencing DDR3 initialization

Re: [PATCH 0/3] Add eFuse access for ZynqMP

2024-05-15 Thread Marek Behún
On Tue, 14 May 2024 16:04:13 +0200 lukas.funke-...@weidmueller.com wrote: > From: Lukas Funke > > > This series adds a driver to read and write ZynqMP eFuses [1]. The > driver can be accessed by the 'efuse_read' and 'efuse_write' subcommands > of the 'zynqmp' command. Vendor specific commands

[PATCH u-boot-mvebu] arm: mvebu: turris_omnia: Fix ethernet PHY reset gpio FDT fixup

2024-04-30 Thread Marek Behún
use reset-gpios so that we can get rid of these drivers parsing this property. Fixes: 1da53ae26afc ("arm: mvebu: turris_omnia: Add support for design with SW reset signals") Signed-off-by: Marek Behún --- board/CZ.NIC/turris_omnia/turris_omnia.c | 44 ++-

Re: [PATCH v2 5/5] common: Convert *.c/h from UTF-8 to ASCII enconfing

2024-04-16 Thread Marek Behún
Acked-by: Marek Behún

Re: [PATCH u-boot-mvebu 00/10] Turris Omnia DDR training changes

2024-04-16 Thread Marek Behún
on such as > 14.0.1. > > All the best, > Tony > > On Mon, Apr 15, 2024 at 9:39 AM Marek Behún wrote: > > > > Hi Stefan, > > > > this series adds some changes to DDR3 training for Armada 38x and > > Turris Omnia. > > > > - patches 1-4 are

[PATCH u-boot-mvebu 10/10] arm: mvebu: turris_omnia: Support old DDR3 training, selectable via env var

2024-04-15 Thread Marek Behún
the environment variable env set omnia_ddr3_training old env save Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/Kconfig | 1 + board/CZ.NIC/turris_omnia/Makefile| 1 + board/CZ.NIC/turris_omnia/old_ddr3_training.c | 79 +++ board/CZ.NIC

[PATCH u-boot-mvebu 09/10] arm: mvebu: a38x: Add optional support for using old DDR3 training code

2024-04-15 Thread Marek Behún
to support this need to select the ARMADA_38X_SUPPORT_OLD_DDR3_TRAINING config option and implement the old version of DDR topology provider, ddr3_get_topology_map(). Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/Kconfig | 4 + arch/arm/mach-mvebu/include/mach/cpu.h

[PATCH u-boot-mvebu 08/10] ddr: marvell: a38x: old: Backport immutable debug settings

2024-04-15 Thread Marek Behún
Backport the option to compile with immutable debug settings also to the old implementation of the DDR3 training code. The original PR for mv-ddr-marvell can be seen at https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/pull/45/ Signed-off-by: Marek Behún --- drivers/ddr/marvell

[PATCH u-boot-mvebu 07/10] ddr: marvell: a38x: old: Fix some compiler warning of the old code

2024-04-15 Thread Marek Behún
Fix some compilation warning in the old DDR training code. Signed-off-by: Marek Behún --- drivers/ddr/marvell/a38x/old/ddr3_a38x.c | 1 + drivers/ddr/marvell/a38x/old/ddr3_init.h | 2 ++ drivers/ddr/marvell/a38x/old/ddr3_training.c | 1 + drivers/ddr

[PATCH u-boot-mvebu 05/10] arm: mvebu: turris_omnia: Enable immutable debug settings in DDR3 training by default

2024-04-15 Thread Marek Behún
Save 10 KiB in Turris Omnia's SPL binary by enabling immutable debug settings for DDR3 training code. Signed-off-by: Marek Behún --- configs/turris_omnia_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig

[PATCH u-boot-mvebu 04/10] ddr: marvell: a38x: debug: Allow compiling with immutable debug settings to reduce binary size

2024-04-15 Thread Marek Behún
Allow compiling with immutable debug settings: - DEBUG_LEVEL is always set to DEBUG_LEVEL_ERROR - register dumps are disabled This can save around 10 KiB of space in the resulting binary, which is a lot in U-Boot SPL. Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/Kconfig | 10

[PATCH u-boot-mvebu 03/10] ddr: marvell: a38x: debug: Define DDR_VIEWER_TOOL variables only if needed, and make them static

2024-04-15 Thread Marek Behún
The variables is_validate_window_per_if, is_validate_window_per_pup, sweep_cnt and is_run_leveling_sweep_tests are only used if DDR_VIEWER_TOOL macro is defined, so define them only in that case. Make them static since they are only used in ddr3_debug.c. Signed-off-by: Marek Behún --- drivers

[PATCH u-boot-mvebu 01/10] ddr: marvell: a38x: debug: return from ddr3_tip_print_log() early if we won't print anything

2024-04-15 Thread Marek Behún
Return from ddr3_tip_print_log() early if we won't print anything anyway. This way the compiler can optimize away the VALIDATE_IF_ACTIVE() calls in the for-loop, so if the SILENT_LIB macro is defined, no code is generated for the rest of the function, which saves some space. Signed-off-by:

[PATCH u-boot-mvebu 02/10] ddr: marvell: a38x: debug: Remove unused variables

2024-04-15 Thread Marek Behún
The variables is_default_centralization, is_tune_result and is_bist_reset_bit are never used. Signed-off-by: Marek Behún --- drivers/ddr/marvell/a38x/ddr3_debug.c | 3 --- drivers/ddr/marvell/a38x/ddr3_init.h | 1 - 2 files changed, 4 deletions(-) diff --git a/drivers/ddr/marvell/a38x

[PATCH u-boot-mvebu 00/10] Turris Omnia DDR training changes

2024-04-15 Thread Marek Behún
explained in patch 6 - patch 9 glues the old DDR3 training code to current U-Boot - patch 10 allows for dynamic selection of old DDR3 training code on Turris Omnia, via an U-Boot environment variable Marek Marek Behún (10): ddr: marvell: a38x: debug: return from ddr3_tip_print_log() early if we

[PATCH u-boot-mvebu v4 18/18] arm: mvebu: turris_omnia: Enable rng command in defconfig

2024-04-04 Thread Marek Behún
Now that Turris Omnia has a rng driver provided in the MCU driver, enable the rng command in defconfig. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- configs/turris_omnia_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/turris_omnia_defconfig b/configs

[PATCH u-boot-mvebu v4 17/18] misc: turris_omnia_mcu: Add support for rng provided by MCU

2024-04-04 Thread Marek Behún
Add support for true random number generator provided by the MCU on Turris Omnia. The MCU firmware supports TRNG if the FEAT_TRNG bit is set in features. In that case we bind the rng driver. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- configs/turris_omnia_defconfig | 1

[PATCH u-boot-mvebu v4 16/18] cmd: rng: Print "Abort" on -EINTR

2024-04-04 Thread Marek Behún
In the rng command, print Abort instead of Reading RNG failed if the error number is -EINTR, which can happen if the user pressed CTRL-C. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- cmd/rng.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/rng.c

[PATCH u-boot-mvebu v4 15/18] arm: mvebu: turris_omnia: Enable poweroff command via sysreset in defconfig

2024-04-04 Thread Marek Behún
Enable support for the poweroff command via sysreset for Turris Omnia. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- configs/turris_omnia_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig index 9d5171c6a8

[PATCH u-boot-mvebu v4 14/18] gpio: turris_omnia_mcu: Add support for system power off via sysreset

2024-04-04 Thread Marek Behún
device are bound as child devices of the MCU device. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- configs/turris_omnia_defconfig| 1 + drivers/gpio/Kconfig | 7 - drivers/gpio/Makefile | 1 - drivers/misc/Kconfig

[PATCH u-boot-mvebu v4 13/18] gpio: turris_omnia_mcu: Update firmware features reading

2024-04-04 Thread Marek Behún
Update firmware features reading to try reading 32 bits of features and fallback to reading 16 bits. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- drivers/gpio/turris_omnia_mcu.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a

[PATCH u-boot-mvebu v4 12/18] gpio: turris_omnia_mcu: Use byteorder conversion functions

2024-04-04 Thread Marek Behún
Use byteorder conversion function instead of manually assembling data from/to MCU. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- drivers/gpio/turris_omnia_mcu.c | 80 +++-- 1 file changed, 46 insertions(+), 34 deletions(-) diff --git a/drivers/gpio

[PATCH u-boot-mvebu v4 11/18] arm: mvebu: system-controller: Add support for SYSRESET

2024-04-04 Thread Marek Behún
Add driver model support for sysreset via mvebu system controller. This is currently only available for U-Boot proper. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- arch/arm/mach-mvebu/Kconfig | 18 +- arch/arm/mach-mvebu/Makefile| 2 +- arch/arm/mach

[PATCH u-boot-mvebu v4 10/18] arm: mvebu: system-controller: Select mvebu-reset if DM_RESET && PCI_MVEBU

2024-04-04 Thread Marek Behún
The mvebu-reset driver is only needed by the mvebu PCIe driver, but currently it is automatically selected if DM_RESET is enabled. Add the condition of PCI_MVEBU also being enabled for mvebu-reset to be selected. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- arch/arm/mach-mvebu

[PATCH u-boot-mvebu v4 09/18] arm: mvebu: system-controller: Rework to use UCLASS_SYSCON

2024-04-04 Thread Marek Behún
The system-controller driver for 32-bit Armada is currently registered as UCLASS_RESET, since it only provides enabling/disabling PCIe ports. Rework it as UCLASS_SYSCON and bind mvebu-reset as a child device. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- arch/arm/mach-mvebu/Kconfig

[PATCH u-boot-mvebu v4 08/18] arm: mvebu: spl: Do not build mvebu-reset in SPL

2024-04-04 Thread Marek Behún
uld not be built for SPL. Indeed the PCI_MVEBU driver is not supported in SPL now, and so the mvebu-reset driver is not needed. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- arch/arm/mach-mvebu/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/

[PATCH u-boot-mvebu v4 07/18] arm: mvebu: turris_omnia: Disable Atmel SHA node if not present

2024-04-04 Thread Marek Behún
If the FEAT_CRYPTO feature bit is present in MCU features, the board crypto is implemented by MCU and the Atmel SHA chip is not present. Disable Atmel SHA device-tree node in that case. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- board/CZ.NIC/turris_omnia/turris_omnia.c | 23

[PATCH u-boot-mvebu v4 06/18] arm: mvebu: turris_omnia: Print board ECDSA public key if available

2024-04-04 Thread Marek Behún
If MCU supports the FEAT_CRYPTO feature, read board ECDSA public key from MCU and print it. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- board/CZ.NIC/turris_omnia/turris_omnia.c | 25 +++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/board

[PATCH u-boot-mvebu v4 05/18] arm: mvebu: turris_omnia: Implement getting board information from MCU

2024-04-04 Thread Marek Behún
Implement reading board serial number, first MAC address and board version from MCU. MCU supports board information if the FEAT_BOARD_INFO feature bit is set in MCU features. Prefer getting board information from MCU if supported, fallback to Atmel SHA chip. Signed-off-by: Marek Behún Reviewed

[PATCH u-boot-mvebu v4 04/18] arm: mvebu: turris_omnia: Update MCU status and features reading

2024-04-04 Thread Marek Behún
. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- board/CZ.NIC/turris_omnia/turris_omnia.c | 100 +++ 1 file changed, 68 insertions(+), 32 deletions(-) diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 87e33d88c4

[PATCH u-boot-mvebu v4 03/18] arm: mvebu: turris_{omnia, mox}: Don't print model two times

2024-04-04 Thread Marek Behún
he second print. Fixes: 8cd4bf7dc9ba ("turris: Use checkboard() instead of show_board_info()") Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- board/CZ.NIC/turris_mox/turris_mox.c | 5 + board/CZ.NIC/turris_omnia/turris_omnia.c | 1 - 2 files changed, 1 insertion(+), 5 d

[PATCH u-boot-mvebu v4 02/18] arm: mvebu: turris_omnia: Add header containing MCU command interface and use it

2024-04-04 Thread Marek Behún
Add header containing all MCU command definitions and use it in board code and in MCU driver. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- board/CZ.NIC/turris_omnia/turris_omnia.c | 81 +++- drivers/gpio/turris_omnia_mcu.c | 54 + include/turris-omnia-mcu

[PATCH u-boot-mvebu v4 01/18] arm: mvebu: turris_omnia: Enable LTO by default on Turris Omnia

2024-04-04 Thread Marek Behún
U-Boot builds for Turris Omnia are approaching the limit of 0xf bytes, which is the size of the U-Boot partition on Omnia. Enable LTO to get more size optimized binaries. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- configs/turris_omnia_defconfig | 1 + 1 file changed, 1

[PATCH u-boot-mvebu v4 00/18] Turris Omnia - New board revision support

2024-04-04 Thread Marek Behún
://patchwork.ozlabs.org/project/uboot/cover/20240323180711.5498-1-ka...@kernel.org/ https://patchwork.ozlabs.org/project/uboot/cover/20240327162355.24584-1-ka...@kernel.org/ Marek Behún (18): arm: mvebu: turris_omnia: Enable LTO by default on Turris Omnia arm: mvebu: turris_omnia: Add header containing MCU

Re: [PATCH u-boot-mvebu v3 00/18] Turris Omnia - New board revision support

2024-04-04 Thread Marek Behún
On Thu, 4 Apr 2024 08:38:02 +0200 Stefan Roese wrote: > Hi Marek, > > On 3/27/24 17:23, Marek Behún wrote: > > Hi Stefan, > > > > this is v3 of series adding support for new board revision of Turris > > Omnia. > > > > Changes since v2: > &

Re: [PATCH u-boot-mvebu v3 11/18] arm: mvebu: system-controller: Add support for SYSRESET

2024-03-28 Thread Marek Behún
On Thu, 28 Mar 2024 14:01:22 +0100 Stefan Roese wrote: > On 3/28/24 12:21, Marek Behún wrote: > > On Thu, 28 Mar 2024 11:04:45 +0100 > > Stefan Roese wrote: > > > >>> +static int mvebu_sysreset_request(struct udevice *dev, enum sysreset_t > >>>

Re: [PATCH u-boot-mvebu v3 11/18] arm: mvebu: system-controller: Add support for SYSRESET

2024-03-28 Thread Marek Behún
On Thu, 28 Mar 2024 11:04:45 +0100 Stefan Roese wrote: > > +static int mvebu_sysreset_request(struct udevice *dev, enum sysreset_t > > type) > > +{ > > + struct regmap *regmap = syscon_get_regmap(dev->parent); > > + uint bit; > > + > > + if (type != SYSRESET_COLD) > > + return -E

Re: [PATCH u-boot-mvebu v3 05/18] arm: mvebu: turris_omnia: Implement getting board information from MCU

2024-03-28 Thread Marek Behún
On Thu, 28 Mar 2024 10:56:01 +0100 Stefan Roese wrote: > On 3/27/24 17:23, Marek Behún wrote: > > Implement reading board serial number, first MAC address and board > > version from MCU. MCU supports board information if the FEAT_BOARD_INFO > > feature bit is set in MCU feat

[PATCH u-boot-mvebu v3 18/18] arm: mvebu: turris_omnia: Enable rng command in defconfig

2024-03-27 Thread Marek Behún
Now that Turris Omnia has a rng driver provided in the MCU driver, enable the rng command in defconfig. Signed-off-by: Marek Behún --- configs/turris_omnia_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig index

[PATCH u-boot-mvebu v3 17/18] misc: turris_omnia_mcu: Add support for rng provided by MCU

2024-03-27 Thread Marek Behún
Add support for true random number generator provided by the MCU on Turris Omnia. The MCU firmware supports TRNG if the FEAT_TRNG bit is set in features. In that case we bind the rng driver. Signed-off-by: Marek Behún --- configs/turris_omnia_defconfig | 1 + drivers/misc/Kconfig

[PATCH u-boot-mvebu v3 16/18] cmd: rng: Print "Abort" on -EINTR

2024-03-27 Thread Marek Behún
In the rng command, print Abort instead of Reading RNG failed if the error number is -EINTR, which can happen if the user pressed CTRL-C. Signed-off-by: Marek Behún --- cmd/rng.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/rng.c b/cmd/rng.c index

[PATCH u-boot-mvebu v3 15/18] arm: mvebu: turris_omnia: Enable poweroff command via sysreset in defconfig

2024-03-27 Thread Marek Behún
Enable support for the poweroff command via sysreset for Turris Omnia. Signed-off-by: Marek Behún --- configs/turris_omnia_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig index 9d5171c6a8..0df0f3c90b 100644 --- a

[PATCH u-boot-mvebu v3 14/18] gpio: turris_omnia_mcu: Add support for system power off via sysreset

2024-03-27 Thread Marek Behún
device are bound as child devices of the MCU device. Signed-off-by: Marek Behún --- configs/turris_omnia_defconfig| 1 + drivers/gpio/Kconfig | 7 - drivers/gpio/Makefile | 1 - drivers/misc/Kconfig | 10 ++ drivers

[PATCH u-boot-mvebu v3 13/18] gpio: turris_omnia_mcu: Update firmware features reading

2024-03-27 Thread Marek Behún
Update firmware features reading to try reading 32 bits of features and fallback to reading 16 bits. Signed-off-by: Marek Behún --- drivers/gpio/turris_omnia_mcu.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/drivers/gpio

[PATCH u-boot-mvebu v3 12/18] gpio: turris_omnia_mcu: Use byteorder conversion functions

2024-03-27 Thread Marek Behún
Use byteorder conversion function instead of manually assembling data from/to MCU. Signed-off-by: Marek Behún --- drivers/gpio/turris_omnia_mcu.c | 80 +++-- 1 file changed, 46 insertions(+), 34 deletions(-) diff --git a/drivers/gpio/turris_omnia_mcu.c b/drivers

[PATCH u-boot-mvebu v3 10/18] arm: mvebu: system-controller: Select mvebu-reset if DM_RESET && PCI_MVEBU

2024-03-27 Thread Marek Behún
The mvebu-reset driver is only needed by the mvebu PCIe driver, but currently it is automatically selected if DM_RESET is enabled. Add the condition of PCI_MVEBU also being enabled for mvebu-reset to be selected. Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/Kconfig | 2 +- 1 file changed

[PATCH u-boot-mvebu v3 11/18] arm: mvebu: system-controller: Add support for SYSRESET

2024-03-27 Thread Marek Behún
Add driver model support for sysreset via mvebu system controller. This is currently only available for U-Boot proper. Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/Kconfig | 18 +- arch/arm/mach-mvebu/Makefile| 2 +- arch/arm/mach-mvebu/cpu.c

[PATCH u-boot-mvebu v3 09/18] arm: mvebu: system-controller: Rework to use UCLASS_SYSCON

2024-03-27 Thread Marek Behún
The system-controller driver for 32-bit Armada is currently registered as UCLASS_RESET, since it only provides enabling/disabling PCIe ports. Rework it as UCLASS_SYSCON and bind mvebu-reset as a child device. Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/Kconfig | 11

[PATCH u-boot-mvebu v3 08/18] arm: mvebu: spl: Do not build mvebu-reset in SPL

2024-03-27 Thread Marek Behún
uld not be built for SPL. Indeed the PCI_MVEBU driver is not supported in SPL now, and so the mvebu-reset driver is not needed. Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/

[PATCH u-boot-mvebu v3 07/18] arm: mvebu: turris_omnia: Disable Atmel SHA node if not present

2024-03-27 Thread Marek Behún
If the FEAT_CRYPTO feature bit is present in MCU features, the board crypto is implemented by MCU and the Atmel SHA chip is not present. Disable Atmel SHA device-tree node in that case. Signed-off-by: Marek Behún --- board/CZ.NIC/turris_omnia/turris_omnia.c | 23 +++ 1 file

[PATCH u-boot-mvebu v3 06/18] arm: mvebu: turris_omnia: Print board ECDSA public key if available

2024-03-27 Thread Marek Behún
If MCU supports the FEAT_CRYPTO feature, read board ECDSA public key from MCU and print it. Signed-off-by: Marek Behún --- board/CZ.NIC/turris_omnia/turris_omnia.c | 25 +++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/board/CZ.NIC/turris_omnia

[PATCH u-boot-mvebu v3 05/18] arm: mvebu: turris_omnia: Implement getting board information from MCU

2024-03-27 Thread Marek Behún
Implement reading board serial number, first MAC address and board version from MCU. MCU supports board information if the FEAT_BOARD_INFO feature bit is set in MCU features. Prefer getting board information from MCU if supported, fallback to Atmel SHA chip. Signed-off-by: Marek Behún

[PATCH u-boot-mvebu v3 04/18] arm: mvebu: turris_omnia: Update MCU status and features reading

2024-03-27 Thread Marek Behún
. Signed-off-by: Marek Behún --- board/CZ.NIC/turris_omnia/turris_omnia.c | 100 +++ 1 file changed, 68 insertions(+), 32 deletions(-) diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 87e33d88c4..6dfde5ee7a 100644 --- a

[PATCH u-boot-mvebu v3 02/18] arm: mvebu: turris_omnia: Add header containing MCU command interface and use it

2024-03-27 Thread Marek Behún
Add header containing all MCU command definitions and use it in board code and in MCU driver. Signed-off-by: Marek Behún --- board/CZ.NIC/turris_omnia/turris_omnia.c | 81 +++- drivers/gpio/turris_omnia_mcu.c | 54 + include/turris-omnia-mcu-interface.h | 248

[PATCH u-boot-mvebu v3 03/18] arm: mvebu: turris_{omnia, mox}: Don't print model two times

2024-03-27 Thread Marek Behún
he second print. Fixes: 8cd4bf7dc9ba ("turris: Use checkboard() instead of show_board_info()") Signed-off-by: Marek Behún --- board/CZ.NIC/turris_mox/turris_mox.c | 5 + board/CZ.NIC/turris_omnia/turris_omnia.c | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git

  1   2   3   4   5   6   7   8   9   10   >