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

2024-05-21 Thread Marek Behún
' 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 ++- 1 file changed, 112 insertions

[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 index

[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

[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
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/Kconfig index

[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

[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: Marek Behún

[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
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): common

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 initiali

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
to 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
h 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 meant to

[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
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| 1

[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 index

[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: Marek

[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
is 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

[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
ver should 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
cond 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 dele

[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

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

[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
ver should 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

[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
cond 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 a/boa

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

2024-03-27 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 --- configs/turris_omnia_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git

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

2024-03-27 Thread Marek Behún
message (added the bit about ctrl+c) v1 and v2 at: https://patchwork.ozlabs.org/project/uboot/cover/20240304152148.3847-1-ka...@kernel.org/ https://patchwork.ozlabs.org/project/uboot/cover/20240323180711.5498-1-ka...@kernel.org/ Marek Behún (18): arm: mvebu: turris_omnia: Enable LTO

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

2024-03-25 Thread Marek Behún
On Sat, 23 Mar 2024 19:06:59 +0100 Marek Behún wrote: > 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 c

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

2024-03-23 Thread Marek Behún
On Sat, 23 Mar 2024 19:30:20 +0100 Heinrich Schuchardt wrote: > Am 23. März 2024 19:07:09 MEZ schrieb "Marek Behún" : > >In the rng command, print > > Abort > >instead of > > Reading RNG failed > >if the error number is -EINTR. > >

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

2024-03-23 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 v2 18/18] arm: mvebu: turris_omnia: Enable rng command in defconfig

2024-03-23 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 v2 16/18] cmd: rng: Print "Abort" on -EINTR

2024-03-23 Thread Marek Behún
In the rng command, print Abort instead of Reading RNG failed if the error number is -EINTR. 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 52f722c7af..48ba67061b 100644 --- a/cmd/rng.c +++ b

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

2024-03-23 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

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

2024-03-23 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 v2 13/18] gpio: turris_omnia_mcu: Update firmware features reading

2024-03-23 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 v2 12/18] gpio: turris_omnia_mcu: Use byteorder conversion functions

2024-03-23 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 v2 10/18] arm: mvebu: system-controller: Select mvebu-reset if DM_RESET && PCI_MVEBU

2024-03-23 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 v2 11/18] arm: mvebu: system-controller: Add support for SYSRESET

2024-03-23 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 v2 09/18] arm: mvebu: system-controller: Rework to use UCLASS_SYSCON

2024-03-23 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 v2 08/18] arm: mvebu: spl: Do not build mvebu-reset in SPL

2024-03-23 Thread Marek Behún
ver should 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 v2 07/18] arm: mvebu: turris_omnia: Disable Atmel SHA node if not present

2024-03-23 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 v2 05/18] arm: mvebu: turris_omnia: Implement getting board information from MCU

2024-03-23 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 v2 06/18] arm: mvebu: turris_omnia: Print board ECDSA public key if available

2024-03-23 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 v2 04/18] arm: mvebu: turris_omnia: Update MCU status and features reading

2024-03-23 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

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

2024-03-23 Thread Marek Behún
cond 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 a/boa

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

2024-03-23 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 --- configs/turris_omnia_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git

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

2024-03-23 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 | 238

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

2024-03-23 Thread Marek Behún
, otherwise it won't fit into the space reserved for U-Boot with these changes - enabled the poweroff command (via sysreset) in defconfig (new MCU firmware can power off the board voltage regulators) - enabled the rng command in defconfig Marek Behún (18): arm: mvebu: turris_omnia: Enable LTO

Re: [PATCH u-boot-mvebu 0/4] Turris Omnia - New board revision support

2024-03-23 Thread Marek Behún
Hello Stefan, I've been doing some work on this and will be sending version 2 of this series. Marek

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

2024-03-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 --- board/CZ.NIC/turris_omnia/turris_omnia.c | 23 +++ 1 file

[PATCH u-boot-mvebu 3/4] arm: mvebu: turris_omnia: Print board ECDSA public key if available

2024-03-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 --- board/CZ.NIC/turris_omnia/turris_omnia.c | 29 +++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/board/CZ.NIC/turris_omnia

[PATCH u-boot-mvebu 1/4] arm: mvebu: turris_omnia: Refactor MCU status and features reading

2024-03-04 Thread Marek Behún
Refactor MCU status word and MCU firmware features reading to make it simpler to use. Signed-off-by: Marek Behún --- board/CZ.NIC/turris_omnia/turris_omnia.c | 81 1 file changed, 53 insertions(+), 28 deletions(-) diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c

[PATCH u-boot-mvebu 2/4] arm: mvebu: turris_omnia: Implement getting board information from MCU

2024-03-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

[PATCH u-boot-mvebu 0/4] Turris Omnia - New board revision support

2024-03-04 Thread Marek Behún
Marek Behún (4): arm: mvebu: turris_omnia: Refactor MCU status and features reading arm: mvebu: turris_omnia: Implement getting board information from MCU arm: mvebu: turris_omnia: Print board ECDSA public key if available arm: mvebu: turris_omnia: Disable Atmel SHA node if not present board

Re: [PATCH v2] net: mv88e6xxx: fix missing SMI address initialization

2024-03-04 Thread Marek Behún
Hi Stefan, On Wed, 14 Feb 2024 08:50:16 +0100 Stefan Roese wrote: > Hi Ramon, > > On 1/9/24 10:37, Stefan Roese wrote: > > On 12/18/23 17:09, Marek Behún wrote: > >> On Wed, 6 Dec 2023 15:35:56 +0100 > >> Marek Mojík wrote: > >> > >>&

Re: [PATCH v4] rng: Add Turris Mox rTWM RNG driver

2024-02-13 Thread Marek Behún
On Tue, 13 Feb 2024 10:49:43 +0100 Heinrich Schuchardt wrote: > On 2/13/24 10:16, Stefan Roese wrote: > > Hi Max, > > > > mostly some nitpicking comments below. > > > > On 2/11/24 14:04, Max Resch wrote: > >> A RNG driver for Armada 3720 boards running the Turris Mox rWTM firmware > >> from

Re: [PATCH v2] rng: Add Turris Mox rWTM RNG driver

2024-02-05 Thread Marek Behún
So you're using A3720 with OpenBSD? Can I ask which A3720 boards do you use? Marek On Mon, 05 Feb 2024 14:46:24 +0100 Mark Kettenis wrote: > > Date: Mon, 5 Feb 2024 12:40:14 +0100 > > From: Marek Behún > > > > Hello Max, > > > > Out of curiousi

  1   2   3   4   5   6   7   8   9   10   >