[PATCH u-boot-marvell 04/14] tools: kwboot: Remove code for handling CAN byte

2022-01-25 Thread Marek Behún
. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools/kwboot.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index be9a751406..0b97990d09 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -63,7 +63,6 @@ static

[PATCH u-boot-marvell 05/14] tools: kwboot: Do not change received character in kwboot_xm_recv_reply()

2022-01-25 Thread Marek Behún
device. Change argument 'nak_on_non_xm' to 'stop_on_non_xm'. Instead of changing non-xmodem character to NAK, stop processing on invalid character and return it. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools/kwboot.c | 6 ++ 1 file changed, 2 insert

[PATCH u-boot-marvell 06/14] tools: kwboot: Fix handling of repeated xmodem packets

2022-01-25 Thread Marek Behún
From: Pali Rohár Unfortunately during some stages of xmodem transfer, A385 BootROM is not able to handle repeated xmodem packets. So if an error occurs during that stage, stop the transfer and return failure. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools/kwboot.c | 28

[PATCH u-boot-marvell 07/14] tools: kwboot: Show 'E' in progress output when error occurs

2022-01-25 Thread Marek Behún
From: Pali Rohár When kwboot is unable to resend current xmodem packet, show an 'E' in the progress output instead of a '+'. This allows to distinguish between the state when kwboot is retrying sending the packet and when retry is not possible. Signed-off-by: Pali Rohár

[PATCH u-boot-marvell 08/14] tools: kwboot: Allow to use option -b without image path

2022-01-25 Thread Marek Behún
purposes. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools/kwboot.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index 1dcec1969a..c413a8bf51 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -1699,6

[PATCH u-boot-marvell 09/14] tools: kwboot: Force BootROM to flush input queue after boot pattern

2022-01-25 Thread Marek Behún
From: Pali Rohár Force the BootROM to flush its input queue after sending boot pattern. This ensures that after function kwboot_bootmsg() finishes, BootROM is able to start receiving xmodem packets without any specific delay or setup. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún

[PATCH u-boot-marvell 12/14] tools: kwboot: Handle EINTR in kwboot_tty_recv()

2022-01-25 Thread Marek Behún
From: Pali Rohár The select() and read() syscalls may be interrupted. Handle EINTR and retry them. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools/kwboot.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index

[PATCH u-boot-marvell 10/14] tools: kwboot: Remove 2s delay before sending first xmodem packet

2022-01-25 Thread Marek Behún
From: Pali Rohár This delay is not needed anymore since kwboot already handles retrying logic for incomplete xmodem packets and also forces BootROM to flush its input queue. Removing it decreases total transfer time. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools/kwboot.c | 4

[PATCH u-boot-marvell 11/14] tools: kwboot: Handle EINTR in kwboot_write()

2022-01-25 Thread Marek Behún
From: Pali Rohár The write() syscall may be interrupted. Handle EINTR and retry it. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools/kwboot.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index de433c1b04..8b748f0fdd

[PATCH u-boot-marvell 13/14] tools: kwboot: Fix usage of -D without -t

2022-01-25 Thread Marek Behún
From: Pali Rohár When -D is specified then both bootmsg and debugmsg are not set, but imgpath is set. Fix this check for valid and required parameters. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools/kwboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH u-boot-marvell 14/14] tools: kwboot: Set debug flag to 1

2022-01-25 Thread Marek Behún
From: Pali Rohár This should enable BootROM output on UART. (At least on A385 BootROM this is broken, BootROM ignores this debug flag and does not enable its output on UART if some valid image is available in SPI-NOR.) Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools

Re: [PATCH] tools/mrvl_uart.sh: Remove script

2022-02-03 Thread Marek Behún
; remove old mrvl_uart.sh tool. > > Signed-off-by: Pali Rohár Reviewed-by: Marek Behún

Re: [RFC PATCH v2 21/21] test: hush: Fix loop tests for hush 2021

2022-02-06 Thread Marek Behún
On Sun, 6 Feb 2022 19:37:17 +0100 Francis Laniel wrote: > Modifies return code got from while loop as hush 2021 always returns 0 from > while loop. > > Signed-off-by: Francis Laniel > Reviewed-by: Simon Glass > --- > test/hush/loop.c | 20 > 1 file changed, 20 insertions

Re: [RFC PATCH v2 19/21] test: hush: Fix if tests for hush 2021

2022-02-06 Thread Marek Behún
On Sun, 6 Feb 2022 19:37:15 +0100 Francis Laniel wrote: > Modifies the command run for hush 2021 when using string comparison operator. > Indeed, '<' and '>' must be escaped to be used as these operators. > > Signed-off-by: Francis Laniel > Reviewed-by: Simon Glass > --- > test/hush/if.c | 4

[PATCH u-boot-marvell RFC] PLEASE TEST: ddr: marvell: a38x: fix BYTE_HOMOGENEOUS_SPLIT_OUT decision

2022-02-10 Thread Marek Behún
From: Marek Behún In commit 3fc92a215b69 ("ddr: marvell: a38x: fix SPLIT_OUT_MIX state decision") I ported a cleaned up and changed version of patch mv_ddr: a380: fix SPLIT_OUT_MIX state decision In the port we removed checking for BYTE_HOMOGENEOUS_SPLIT_OUT bit, because: - the fix

Re: kwboot: Marvell Dove UART booting

2022-02-13 Thread Marek Behún
On Sun, 13 Feb 2022 20:41:08 +0100 Pali Rohár wrote: > On Sunday 13 February 2022 17:16:42 Pali Rohár wrote: > > On Wednesday 22 December 2021 20:08:56 Tony Dinh wrote: > > > *** Run kwboot > > > > > > # kwboot -t -p -B 115200 /dev/ttyUSB0 -D /localdisk/mtd0.t5335z > > > Patching image boot si

Re: kwboot: Marvell Dove UART booting

2022-02-13 Thread Marek Behún
On Sun, 13 Feb 2022 22:23:10 +0100 Pali Rohár wrote: > > In that case the whole ternary operator can be dropped, i.e. instead of > > ((hdr->ext > 1) ? (hdr->ext * 0x20) : 0) > > you can have > > ((hdr->ext - 1) * 0x20) > > if I interpret this correctly. > > No, it cannot be dropped, with c

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

2023-07-10 Thread Marek Behún
On Mon, 10 Jul 2023 16:19:32 +0200 Pali Rohár wrote: > On Monday 12 June 2023 14:07:24 Tom Rini wrote: > > On Wed, Aug 17, 2022 at 10:56:22PM +0200, Pali Rohár wrote: > > > > > CZ.NIC Turris 1.0 and 1.1 are open source routers, they have dual-core > > > PowerPC Freescale P2020 CPU and are base

Re: [PATCH 1/3] net: mvpp2: Replace PHY_INTERFACE_MODE_SGMII_2500 with SGMII and speed

2023-03-19 Thread Marek Behún
On Sun, 19 Mar 2023 18:06:45 +0100 Marek Vasut wrote: > Replace PHY_INTERFACE_MODE_SGMII_2500 with PHY_INTERFACE_MODE_SGMII and > phydev->speed check where applicable. The PHY_INTERFACE_MODE_SGMII_2500 > does not exist in Linux, so remove it from U-Boot too. > > Signed-off-by: Marek Vasut SGMI

Re: [PATCH 1/2] net: phy: Make phy_interface_is_sgmii a switch statement

2023-04-13 Thread Marek Behún
On Thu, Apr 13, 2023 at 01:07:12PM -0500, Nishanth Menon wrote: > Recent commit 75d28899e3e9 ("net: phy: Synchronize PHY interface modes > with Linux") reordered the enum definitions. This caused the range of > enums that this api was checking to go bad. > > While it is possible for the phy driver

Re: [PATCH 1/2] net: phy: Make phy_interface_is_sgmii a switch statement

2023-04-13 Thread Marek Behún
On Thu, Apr 13, 2023 at 02:02:34PM -0500, Nishanth Menon wrote: > On 20:56-20230413, Marek Behún wrote: > > On Thu, Apr 13, 2023 at 01:07:12PM -0500, Nishanth Menon wrote: > > > Recent commit 75d28899e3e9 ("net: phy: Synchronize PHY interface modes > > > with Linux&

Re: [PATCH V2 1/2] net: phy: Make phy_interface_is_sgmii a switch statement

2023-04-14 Thread Marek Behún
GMII: > + return 1; > + default: > + return 0; > + } > } > > bool phy_interface_is_ncsi(void); Reviewed-by: Marek Behún Please also consider dropping this function, since it is used only in one driver drivers/net/phy/dp83867.c and tha

Re: [PATCH V2 2/2] net: phy: Make phy_interface_is_rgmii a switch statement

2023-04-14 Thread Marek Behún
TXID; > + switch (phydev->interface) { > + case PHY_INTERFACE_MODE_RGMII: > + case PHY_INTERFACE_MODE_RGMII_ID: > + case PHY_INTERFACE_MODE_RGMII_RXID: > + case PHY_INTERFACE_MODE_RGMII_TXID: > + return 1; > + default: > + return 0; > + } > } > > /** Reviewed-by: Marek Behún

Re: [PATCH 1/1] net: phy: possible NULL dereference in fixed_phy_create()

2022-07-12 Thread Marek Behún
y: don't require PHY interface mode during PHY > creation") > Signed-off-by: Heinrich Schuchardt Reviewed-by: Marek Behún

Re: [PATCH] arm: mvebu: turris_omnia: Set ETHPRIME to DT alias

2022-07-15 Thread Marek Behún
uration file. > > Signed-off-by: Pali Rohár Oh yeah. Do we want to send this dt change also to Linux? Reviewed-by: Marek Behún

Re: [PATCH] arm: mvebu: Avoid reading MVEBU_REG_PCIE_DEVID register too many times

2022-07-15 Thread Marek Behún
still reads device id from MVEBU_REG_PCIE_DEVID register, but only once. > > Signed-off-by: Pali Rohár Acked-by: Marek Behún

Re: [PATCH] mmc: Do not send status of send_status is false

2022-07-15 Thread Marek Behún
x this by adding the missing conditional. > > Fixes: 44645f87de5 ("mmc: Fix mmc_switch excessive timeout") > Signed-off-by: Marek Vasut > Cc: Jaehoon Chung > Cc: Kirill Kapranov > Cc: Marek Behún > Cc: Pantelis Antoniou > Cc: Ye Li Does the lenghty timeo

Re: [PATCH u-boot-mvebu 2/3] arm: mvebu: a37xx: Map CCI-400 and AP BootROM address space

2022-02-15 Thread Marek Behún
On Tue, 15 Feb 2022 00:28:34 +0100 Pali Rohár wrote: > In function build_mem_map() prepares also mapping for CCI-400 and * prepare > AP BootROM address space. > > A53 AP BootROM by default starts at address 0xfff0 and is 16 kB long. RVBAR_EL3 register has value 0

Re: [PATCH u-boot-mvebu 2/3] arm: mvebu: a37xx: Map CCI-400 and AP BootROM address space

2022-02-15 Thread Marek Behún
On Tue, 15 Feb 2022 14:04:47 +0100 Pali Rohár wrote: > On Tuesday 15 February 2022 13:11:25 Marek Behún wrote: > > On Tue, 15 Feb 2022 00:28:34 +0100 > > Pali Rohár wrote: > > > > > In function build_mem_map() prepares also mapping for CCI-400 and > >

Re: [PATCH u-boot-mvebu 3/3] arm: mvebu: a37xx: Fix comment with name of the function

2022-02-15 Thread Marek Behún
On Tue, 15 Feb 2022 00:28:35 +0100 Pali Rohár wrote: > Function is named build_mem_map, not a3700_build_mem_map. > > Signed-off-by: Pali Rohár Reviewed-by: Marek Behún

Re: [PATCH u-boot-mvebu 1/3] arm: mvebu: a37xx: Fix calling build_mem_map()

2022-02-15 Thread Marek Behún
() is called earlier than enable_caches() which calls > build_mem_map(). So arm_reserve_mmu() does not calculate reserved memory > correctly. > > Fix this issue by calling build_mem_map() from a3700_dram_init() which is > called before arm_reserve_mmu(). > > Signed-off-by: Pali Rohár Reviewed-by: Marek Behún

Re: [PATCH u-boot-mvebu 2/3] arm: mvebu: a37xx: Map CCI-400 and AP BootROM address space

2022-02-15 Thread Marek Behún
On Tue, 15 Feb 2022 14:15:17 +0100 Marek Behún wrote: > > In _production version_ where is no debug capability and no access to > > any memory (just ability to boot) is is probably not needed, but none of > > A3720 board is building this kind of version (by default). And in c

Re: [PATCH u-boot-marvell RFC] PLEASE TEST: ddr: marvell: a38x: fix BYTE_HOMOGENEOUS_SPLIT_OUT decision

2022-02-16 Thread Marek Behún
On Wed, 16 Feb 2022 09:41:44 +0100 Stefan Roese wrote: > On 2/15/22 23:21, Chris Packham wrote: > > On Fri, Feb 11, 2022 at 5:25 AM Marek Behún wrote: > >> > >> From: Marek Behún > >> > >> In commit 3fc92a215b69 ("ddr: marvell: a38x: fix SPLI

[PATCH u-boot-marvell] ddr: marvell: a38x: fix BYTE_HOMOGENEOUS_SPLIT_OUT decision

2022-02-16 Thread Marek Behún
From: Marek Behún In commit 3fc92a215b69 ("ddr: marvell: a38x: fix SPLIT_OUT_MIX state decision") I ported a cleaned up and changed version of patch mv_ddr: a380: fix SPLIT_OUT_MIX state decision In the port we removed checking for BYTE_HOMOGENEOUS_SPLIT_OUT bit, because: - the fix

[PATCH u-boot-marvell 1/2] arm: mvebu: spl: Add option to reset the board on DDR training failure

2022-02-16 Thread Marek Behún
From: Marek Behún Some boards may occacionally fail DDR training. Currently we hang() in this case. Add an option that makes the board do an immediate reset in such a case, so that a new training is tried as soon as possible, instead of hanging and possibly waiting for watchdog to reset the

[PATCH u-boot-marvell 2/2] arm: mvebu: turris_omnia: Reset the board immediately on DDR training failure

2022-02-16 Thread Marek Behún
From: Marek Behún The state of the current DDR training code for Armada 38x is such that we cannot be sure it will always train successfully - although after the last change we were yet unable to find a board that failed DDR training, from experience in the last 2 years we know that it is

Re: [PATCH u-boot-marvell 1/2] arm: mvebu: spl: Add option to reset the board on DDR training failure

2022-02-17 Thread Marek Behún
On Thu, 17 Feb 2022 12:37:54 +0100 Pali Rohár wrote: > On Thursday 17 February 2022 01:08:48 Marek Behún wrote: > > From: Marek Behún > > > > Some boards may occacionally fail DDR training. Currently we hang() in > > this case. Add an option that makes the boa

[PATCH u-boot-marvell v2 1/2] arm: mvebu: spl: Add option to reset the board on DDR training failure

2022-02-17 Thread Marek Behún
From: Marek Behún Some boards may occacionally fail DDR training. Currently we hang() in this case. Add an option that makes the board do an immediate reset in such a case, so that a new training is tried as soon as possible, instead of hanging and possibly waiting for watchdog to reset the

[PATCH u-boot-marvell v2 2/2] arm: mvebu: turris_omnia: Reset the board immediately on DDR training failure

2022-02-17 Thread Marek Behún
From: Marek Behún The state of the current DDR training code for Armada 38x is such that we cannot be sure it will always train successfully - although after the last change we were yet unable to find a board that failed DDR training, from experience in the last 2 years we know that it is

Re: [PATCH u-boot-mvebu 1/5] arm: mvebu: a37xx: Add support for reading NB and SB fuse OTP value

2022-02-17 Thread Marek Behún
meaning of > bits in South Bridge is unknown. Otherwise Reviewed-by: Marek Behún

Re: [PATCH u-boot-mvebu 2/5] arm: mvebu: a37xx: Enable fuse command on all Armada 3720 boards

2022-02-17 Thread Marek Behún
On Thu, 17 Feb 2022 10:26:16 +0100 Pali Rohár wrote: > Allows to read OTP bits via U-Boot fuse command on all Armada 3720 boards. ^Allow (we use present simple in commit messages) otherwise Reviewed-by: Marek Behún

Re: [PATCH u-boot-mvebu 3/5] arm: mvebu: a37xx: Move generic mbox code to arch/arm/mach-mvebu

2022-02-17 Thread Marek Behún
On Thu, 17 Feb 2022 10:26:17 +0100 Pali Rohár wrote: > Generic A3720 mbox code is currently in Turris Mox specific board file > board/CZ.NIC/turris_mox/mox_sp.c. Move it to board independent arch file > arch/arm/mach-mvebu/armada3700/mbox.c. Reviewed-by: Marek Behún

Re: [PATCH u-boot-mvebu 4/5] arm: mvebu: a37xx: Extend mbox_do_cmd() code

2022-02-17 Thread Marek Behún
On Thu, 17 Feb 2022 10:26:18 +0100 Pali Rohár wrote: > Allow to specify input parameters, define all available mbox commands > supported by CZ.NIC secure firmware + Marvell fuse.bin firmware and fix CZ.NIC's and also Marvell's > parsing response from Marvell OTP comma

Re: [PATCH u-boot-mvebu 5/5] arm: mvebu: a37xx: Add support for reading Security OTP values

2022-02-17 Thread Marek Behún
On Thu, 17 Feb 2022 10:26:19 +0100 Pali Rohár wrote: > Only secure CM3 core can access Security OTP. It is not possible via A53 It is not possible for the A53 core (on which U-Boot is running) to read it directly. > core on which is running U-Boot. Marvell for this purpose defined mbox API For

Re: [PATCH u-boot-mvebu 5/5] arm: mvebu: a37xx: Add support for reading Security OTP values

2022-02-17 Thread Marek Behún
On Thu, 17 Feb 2022 17:50:31 +0100 Pali Rohár wrote: > On Thursday 17 February 2022 15:31:10 Marek Behún wrote: > > On Thu, 17 Feb 2022 10:26:19 +0100 > > Pali Rohár wrote: > > > > > Only secure CM3 core can access Security OTP. It is not possible via A53 &

Re: [PATCH u-boot-mvebu 4/5] arm: mvebu: a37xx: Extend mbox_do_cmd() code

2022-02-17 Thread Marek Behún
On Thu, 17 Feb 2022 18:13:17 +0100 Pali Rohár wrote: > On Thursday 17 February 2022 15:16:33 Marek Behún wrote: > > On Thu, 17 Feb 2022 10:26:18 +0100 > > Pali Rohár wrote: > > > > > Allow to specify input parameters, define all available mbox commands &g

Re: [PATCH u-boot-mvebu v2 5/5] arm: mvebu: a37xx: Add support for reading Security OTP values

2022-02-17 Thread Marek Behún
cess to the lock bit. > + */ > + in[0] = row; > + in[1] = word * 32; > + res = mbox_do_cmd(MBOX_CMD_OTP_READ_32B, in, 2, out, 2); > + if (!res) > + *data = out[0]; > + } else if (word == 2) { > + /* > + * MBOX_CMD_OTP_READ command is supported only by CZ.NIC wtmi > + * firmware and provide nitpick: *provides Reviewed-by: Marek Behún

Re: [PATCH 1/2] pci: pci_mvebu: Remove unused SELECT and lane_mask

2022-02-18 Thread Marek Behún
On Fri, 18 Feb 2022 12:25:22 +0100 Pali Rohár wrote: > Macro SELECT() is unused and struct mvebu_pcie field lane_mask is unused > too. Remove them. > > Signed-off-by: Pali Rohár Reviewed-by: Marek Behún

Re: [PATCH 2/2] pci: pci_mvebu: Cleanup macro names

2022-02-18 Thread Marek Behún
ers. > > Signed-off-by: Pali Rohár Reviewed-by: Marek Behún

[PATCH u-boot-marvell] arm: mvebu: turris_omnia: Enable ext4 write support in defconfig

2022-02-18 Thread Marek Behún
From: Marek Behún Enable ext4 write support in Turris Omnia's defconfig. Some users find it useful. 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] arm: a37xx: pci: Fix a3700_fdt_fix_pcie_regions() function again

2022-02-23 Thread Marek Behún
quot;arm: a37xx: pci: Fix a3700_fdt_fix_pcie_regions() function") Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- arch/arm/mach-mvebu/armada3700/cpu.c | 81 +++- 1 file changed, 55 insertions(+), 26 deletions(-) diff --git a/arch/arm/mach-mvebu/armada3700/cpu

Re: [PATCH u-boot-mvebu] watchdog: armada_37xx: Probe driver also when watchdog is already running

2022-02-23 Thread Marek Behún
_ACTIVE bit and always initialize watchdog. Same > behavior is implemented in Linux kernel driver. > > This change allows to activate watchdog in firmware which loads U-Boot. > > Signed-off-by: Pali Rohár Reviewed-by: Marek Behún

Re: [PATCH u-boot-mvebu 5/5] arm: mvebu: a37xx: Add support for reading Security OTP values

2022-02-23 Thread Marek Behún
On Tue, 22 Feb 2022 21:47:57 +0100 Pali Rohár wrote: > On Thursday 17 February 2022 15:31:10 Marek Behún wrote: > > > + * But this command does not provide access to lock bit. > > > + */ > > > + if (word < 2) { > > > + in[0] = row; > > &g

[PATCH u-boot-marvell] arm64: a37xx: pinctrl: Fix PWM pins indexes

2022-02-28 Thread Marek Behún
From: Marek Behún Commit 5534fb4f4833 ("arm64: a37xx: pinctrl: Correct PWM pins definitions") introduced bogus definitions os PWM pins: all 4 pins have index 11, instead of having indexes 11, 12, 13, 14. Fix this. Signed-off-by: Marek Behún --- drivers/pinctrl/mvebu/pinctrl-armada-

Re: [PATCH u-boot-marvell 5/8] arm: mvebu: turris_omnia: Allow to configure mSATA slot via env variable

2022-03-02 Thread Marek Behún
> { > - if (omnia_detect_sata()) { > +#ifdef CONFIG_SPL_ENV_SUPPORT > + /* Do not use env_load() as malloc() pool is too small at this stage */ > + bool has_env = (env_init() == 0); > +#endif > + const char *env_value = NULL; > + > +#ifdef CONFIG_SPL_ENV_SUPPORT > + /* beware t

Re: [PATCH u-boot-marvell 2/8] arm: mvebu: turris_omnia: Provide env_sf_get_env_addr() function

2022-03-02 Thread Marek Behún
On Wed, 2 Mar 2022 12:47:52 +0100 Pali Rohár wrote: > BootROM maps SPI Flash to fixed address 0xD400 and this mapping is > active also when BootROM is executing binary kwbimage headers, which > includes also U-Boot SPL. > > Therefore no initialization code is required to access SPI Flags fr

Re: [PATCH u-boot-marvell 6/8] arm: mvebu: turris_omnia: Extract code for disabling sata/pcie

2022-03-02 Thread Marek Behún
On Wed, 2 Mar 2022 12:47:56 +0100 Pali Rohár wrote: > Move code for disabling sata and pcie DT nodes to own functions, so this > code can be called from other places in follow up patches. > > Signed-off-by: Pali Rohár > --- > board/CZ.NIC/turris_omnia/turris_omnia.c | 96 +

Re: [PATCH u-boot-marvell 8/8] arm: mvebu: turris_omnia: Add support for USB3.0 mode in WWAN MiniPCIe slot

2022-03-02 Thread Marek Behún
On Wed, 2 Mar 2022 12:47:58 +0100 Pali Rohár wrote: > PCIe Mini CEM 2.1 spec added support for USB3.0 mode on MiniPCIe cards. > USB3.0 and PCIe share same pins and only one function can be active at the > same time. PCIe Mini CEM 2.1 spec says that determining function is > platform specific and

Re: [PATCH] tools: kwboot: Allow to specify custom baudrate only in supported operations

2022-03-06 Thread Marek Behún
On Sun, 6 Mar 2022 13:38:30 +0100 Pali Rohár wrote: > Custom baudrate different than 115200 may be specified only when kwboot is > not going to send boot/debug message pattern or when it is going to send > boot message pattern with image file (in which case baudrate change happens > after sendin

Re: [PATCH] tools: kwboot: Check if baudrate value is supported before sending image

2022-03-06 Thread Marek Behún
On Sun, 6 Mar 2022 13:39:07 +0100 Pali Rohár wrote: > Call kwboot_open_tty() which baudrate value which was specified at the with > command line by option -B. This function returns error if baudrate is not > supported by selected tty device. > > Initial baudrate for ima

Re: kwboot - positional tty argument

2022-03-07 Thread Marek Behún
On Mon, 7 Mar 2022 15:39:33 +0100 Stefan Roese wrote: > On 3/7/22 12:40, Pali Rohár wrote: > > Hello! > > > > On Sunday 06 March 2022 14:38:57 Tony Dinh wrote: > >> Hi Pali, > >> > >> I have an observation, which is not related to this patch. But about > >> the kwboot options changes in genera

Re: [PATCH] mmc: xenon_sdhci: remove wait_dat0 SDHCI OP

2022-03-12 Thread Marek Behún
po. For now I am pro this solution, so Reviewed-by: Marek Behún Marek

[PATCH u-boot-marvell] arm: mvebu: dts: turris_mox: fix non-working network / MDIO

2022-03-15 Thread Marek Behún
From: Marek Behún Commit 0934dddc6436 ("arm: a37xx: Update DTS files to version from upstream Linux kernel") ported Linux's device-tree files for Armada 3720 SOCs. This broke network on Turris MOX, because the SOC's MDIO bus in U-Boot currently isn't probed via DM a

[PATCH u-boot-net 00/14] u-boot-net refactors, fixes, cleanups

2022-03-17 Thread Marek Behún
From: Marek Behún So I wanted to solve a problem regarding MDIO bus within mvneta driver, to make it use the mvmdio DM driver instead of the non-DM MDIO bus registered during mvneta probe, and improve some other things there, and it seems like I opened a small bag from hell, which resulted in

[PATCH u-boot-net 02/14] net: mdio-uclass: use ARRAY_SIZE()

2022-03-17 Thread Marek Behún
From: Marek Behún Use the ARRAY_SIZE() macro instead of hardcoding sizes of arrays in macors. Signed-off-by: Marek Behún --- net/mdio-uclass.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c index 5735afe49e..649dc60f73

[PATCH u-boot-net 01/14] net: mdio-uclass: fix type for phy_mode_str and phy_handle_str

2022-03-17 Thread Marek Behún
From: Marek Behún These global variables should both have type static const char * const Signed-off-by: Marek Behún --- net/mdio-uclass.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c index e74e34f78f..5735afe49e 100644

[PATCH u-boot-net 04/14] net: mdio-uclass: add wrappers for read/write/reset operations

2022-03-17 Thread Marek Behún
From: Marek Behún Add wrappers dm_mdio_read(), dm_mdio_write() and dm_mdio_reset() for DM MDIO's .read(), .write() and .reset() operations. Signed-off-by: Marek Behún --- include/miiphy.h | 31 +++ net/mdio-uclass.c | 31 +++ 2

[PATCH u-boot-net 05/14] treewide: use dm_mdio_read/write/reset() wrappers

2022-03-17 Thread Marek Behún
From: Marek Behún Use the new dm_mdio_read/write/reset() wrappers treewide, instead of always getting and dereferencing MDIO operations structure pointer. Signed-off-by: Marek Behún --- drivers/net/mdio_mux_sandbox.c | 6 ++ net/mdio-mux-uclass.c | 16 net/mdio

[PATCH u-boot-net 06/14] net: phy: fix parsing wrong property

2022-03-17 Thread Marek Behún
From: Marek Behún The "phy-interface-type" property should be "phy-connection-type". Signed-off-by: Marek Behún --- drivers/net/phy/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index c9fc20855b..fe6

[PATCH u-boot-net 08/14] treewide: Rename PHY_INTERFACE_MODE_COUNT to PHY_INTERFACE_MODE_MAX

2022-03-17 Thread Marek Behún
From: Marek Behún Rename constant PHY_INTERFACE_MODE_COUNT to PHY_INTERFACE_MODE_MAX to make it compatible with Linux' naming. Signed-off-by: Marek Behún --- drivers/core/ofnode.c | 2 +- drivers/net/phy/aquantia.c | 2 +- include/phy_interface.h| 2 +- 3 files changed, 3 inser

[PATCH u-boot-net 07/14] net: introduce helpers to get PHY interface mode from a device/ofnode

2022-03-17 Thread Marek Behún
From: Marek Behún Add helpers ofnode_read_phy_mode() and dev_read_phy_mode() to parse the "phy-mode" / "phy-connection-type" property. Use them treewide. This allows us to inline the phy_get_interface_by_name() into ofnode_read_phy_mode(), since the former is not used any

[PATCH u-boot-net 10/14] phy: Move PHY_INTERFACE_MODE_NA to the beginning of the enum definition

2022-03-17 Thread Marek Behún
From: Marek Behún Move PHY_INTERFACE_MODE_NA to the beginning of the enum definition to make it have zero value. This makes it possible (although not encouraged) to test for invalid/nonexistent interface mode with !val instead of val == PHY_INTERFACE_MODE_NA. The comment near the definition

[PATCH u-boot-net 13/14] bcmgenet, sun8i_emac: Don't connect PHY two times

2022-03-17 Thread Marek Behún
From: Marek Behún The bcmgenet and sun8i_emac drivers call phy_connect(), which finds / creates the PHY and also connects it to the eth device via phy_connect_dev(), then set some phydev members (bcmgenet only), and then call phy_connect_dev() explicitly again. Drop the second phy_connect_dev

[PATCH u-boot-net 03/14] net: introduce helpers to get PHY ofnode from MAC

2022-03-17 Thread Marek Behún
From: Marek Behún Add helpers ofnode_get_phy_node() and dev_get_phy_node() and use it in net/mdio-uclass.c function dm_eth_connect_phy_handle(). This is useful because other part's of U-Boot may want to get PHY ofnode without connecting a PHY. Signed-off-by: Marek Behún --- drivers

[PATCH u-boot-net 11/14] net: phy: xilinx: Check interface type in ->config(), not ->probe()

2022-03-17 Thread Marek Behún
From: Marek Behún We want to be able to have phydev->interface uninitialized during ->probe(). We should assume that phydev->interface is initialized only before ->config(). Signed-off-by: Marek Behún --- drivers/net/phy/xilinx_gmii2rgmii.c | 10 +- 1 file changed, 5 inse

[PATCH u-boot-net 09/14] treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA

2022-03-17 Thread Marek Behún
From: Marek Behún Rename constant PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA to make it compatible with Linux' naming. Signed-off-by: Marek Behún --- board/freescale/corenet_ds/eth_hydra.c | 2 +- board/freescale/corenet_ds/eth_superhydra.c | 4 ++-- board/freescale/t10

[PATCH u-boot-net 12/14] net: phy: use ->is_c45 instead of is_10g_interface()

2022-03-17 Thread Marek Behún
From: Marek Behún Use phydev->is_c45 instead of is_10g_interface(phydev->interface) to determine whether clause 45 protocol should be used. Signed-off-by: Marek Behún --- drivers/net/phy/phy.c | 8 include/phy.h | 12 2 files changed, 4 insertions(

[PATCH u-boot-net 14/14] net: phy: don't require PHY interface mode during PHY creation

2022-03-17 Thread Marek Behún
From: Marek Behún Currently we require PHY interface mode to be known when finding/creating the PHY - the functions * phy_device_create() * create_phy_by_mask() * search_for_existing_phy() * get_phy_device_by_mask() * phy_find_by_mask() (this is the only one global) all require the

Re: [PATCH 27/31] Makefile: Disable LTO when building with MSYS2

2023-04-28 Thread Marek Behún
On Thu, 27 Apr 2023 13:34:53 -0400 Tom Rini wrote: > On Thu, Apr 27, 2023 at 10:25:13AM -0600, Simon Glass wrote: > > Hi Pali, > > > > On Wed, 26 Apr 2023 at 01:07, Pali Rohár wrote: > > > > > > On Tuesday 25 April 2023 19:04:10 Simon Glass wrote: > > > > Hi Pali, > > > > > > > > On Tue, 25

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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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] arm: mvebu: turris_mox: Extend to support RIPE Atlas Probe

2023-10-20 Thread Marek Behún
Extend Turris Mox board code to support CZ.NIC's RIPE Atlas Probe. Signed-off-by: Marek Behún --- arch/arm/dts/Makefile | 1 + arch/arm/dts/armada-3720-ripe-atlas.dts | 91 + arch/arm/mach-mvebu/Kconfig | 6 +- board/CZ.NIC/turri

Re: [PATCH v6 00/25] spl: Use common function for loading/parsing images

2023-11-06 Thread Marek Behún
On Mon, 6 Nov 2023 08:49:05 +0100 Pali Rohár wrote: > What you are doing is the worst thing in the world. You have been > ignoring all my changes which I have been sending for one year, then you > wrote me that I'm not competent to do any kind of programming, later you > wrote that you would igno

Re: [PATCH 1/1] add turris-rwtm-rng from CZ.NIC rWTM Firmware

2024-01-20 Thread Marek Behún
On Sat, 20 Jan 2024 14:27:23 +0100 Max Resch wrote: Hello Max, please follow the conventions for commit titles and messages. Look for example at git log drivers/rng The commit title should be something like rng: Add Turris Mox rWTM RNG driver > usable on all armada3700 devices with CZ.NIC f

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

2023-12-18 Thread Marek Behún
ADDR_T_NONE) { > + dev_err(dev, "Missing SMI address\n"); > + return -EINVAL; > + } > + priv->smi_addr = smi_addr; > + > /* probe internal mdio bus */ > ret = mv88e6xxx_probe_mdio(dev); > if (ret) Reviewed-by: Marek Behún

<    9   10   11   12   13   14   15   16   17   >