Re: [PATCH v5 3/4] sysreset: provide SBI based sysreset driver

2021-09-11 Thread Bin Meng
On Fri, Sep 10, 2021 at 10:15 PM Heinrich Schuchardt wrote: > > Provide sysreset driver using the SBI system reset extension. > > Signed-off-by: Heinrich Schuchardt > --- > v5: > * don't add __efi_runtime > * use '=' not ':' in array initialization with enum indices > v4: >

Re: [PATCH] ARM: omap3: evm: Enable booting 'fitImage' with DEFAULT_FIT_TI_ARGS

2021-09-11 Thread Tom Rini
On Mon, Aug 02, 2021 at 03:46:19AM +, Derald D. Woods wrote: > This commit uses the existing DEFAULT_MMC_TI_ARGS and > DEFAULT_FIT_TI_ARGS defintions to replace the 'mmc*' environment > variables in the configuration. The check for the 'boot_fit' is handled > like the 'am335x_*' boards with

Re: [PATCH 1/3] board: ti: am64x: Add support for fixing dr_mode while booting from USB

2021-09-11 Thread Tom Rini
On Wed, Aug 04, 2021 at 06:42:44PM +0530, Aswath Govindraju wrote: > Fix the dr_mode in the U-Boot device tree blob, by reading the mode field > from the USB Boot Configuration fields. The dr_mode will only be fixed when > booting from USB. > > Signed-off-by: Aswath Govindraju Applied to

Re: [PATCH] arm: am335x: Enable SPL_OF_CONTROL on some configs

2021-09-11 Thread Tom Rini
On Sat, Jul 31, 2021 at 07:21:58PM -0400, Tom Rini wrote: > Both am335x_boneblack_vboot and am335x_evm_spiboot require > SPL_OF_CONTROL to function but are currently missing this option. Add > it. > > Signed-off-by: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc

Re: [PATCH v2 2/3] environment: ti: k3_dfu: Increase the size allocated for bootloader images in dfu_alt_info_ram

2021-09-11 Thread Tom Rini
On Thu, Aug 26, 2021 at 09:28:58PM +0530, Aswath Govindraju wrote: > The size of u-boot.img is above 1MB and that of tispl.bin is close to 1MB, > in case of j721e. Therefore, increase the sizes allocated for tispl.bin and > u-boot.img to 2 MB and 4 MB respectively, in dfu_alt_info_ram environment

Re: [PATCH v2 3/3] configs: j72*_evm: Define the buffer sizes for dfu

2021-09-11 Thread Tom Rini
On Thu, Aug 26, 2021 at 09:28:59PM +0530, Aswath Govindraju wrote: > On J721e R5 SPL, dfu buffer for loading sysfw.itb image gets allocated > before DRAM gets initialized. So, the buffer gets allocated in MCU L3 > RAM. The current buffer size to be allocated is 256KB and the available > total

Re: [PATCH v2 1/3] arm: dts: k3-j721e-r5-*.dts: Fix clock-names property in the usb0 instance

2021-09-11 Thread Tom Rini
On Thu, Aug 26, 2021 at 09:28:57PM +0530, Aswath Govindraju wrote: > In the cdns3 usb driver, the clock name looked for is ref. Therefore, fix > the clock-names property in usb0 instance for proper initialization of > cdns3 usb gadget driver. > > Signed-off-by: Aswath Govindraju Applied to

[PATCH 1/4] efi_loader: treat UEFI variable name as const

2021-09-11 Thread Heinrich Schuchardt
Adjust several internal functions to treat UEFI variable names as const. Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 2 +- include/efi_variable.h| 16 ++-- lib/efi_loader/efi_tcg2.c | 2 +- lib/efi_loader/efi_var_common.c | 5

[PATCH 2/4] efi_loader: function to get GUID for variable name

2021-09-11 Thread Heinrich Schuchardt
In multiple places we need the default GUID used for variables like 'PK', 'KEK', 'db'. Provide a function for it. Signed-off-by: Heinrich Schuchardt --- include/efi_variable.h | 8 lib/efi_loader/efi_var_common.c | 9 + 2 files changed, 17 insertions(+) diff --git

[PATCH 4/4] efi_loader: simplify tcg2_measure_secure_boot_variable()

2021-09-11 Thread Heinrich Schuchardt
Don't duplicate GUIDs. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_tcg2.c | 29 + 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c index beb224f66a..eb2c0a413c 100644 ---

[PATCH 3/4] efi_loader: simplify efi_sigstore_parse_sigdb()

2021-09-11 Thread Heinrich Schuchardt
Simplify efi_sigstore_parse_sigdb() by using existing functions. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_signature.c | 35 ++ 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/lib/efi_loader/efi_signature.c

[PATCH 0/4] efi_loader: centralize known vendor GUIDs

2021-09-11 Thread Heinrich Schuchardt
The UEFI specification defines which vendor GUIDs should be used for predefined variables like 'PK'. Currently we have multiple places where this relationship is stored. With this patch series a function for retrieving the GUID is provided and existing code is adjusted to used it. Heinrich

Re: [PATCH] efi_loader: boot_service_capability_min should be capitalized

2021-09-11 Thread Heinrich Schuchardt
On 9/6/21 5:04 AM, Masahisa Kojima wrote: boot_service_capability_min is constant, it should be capitalized. Signed-off-by: Masahisa Kojima Reviewed-by: Heinrich Schuchardt

Re: [PATCH v5 4/4] configs: enable SYSRESET_SBI on qemu-riscvXX_smode_defconfig

2021-09-11 Thread Bin Meng
On Fri, Sep 10, 2021 at 10:15 PM Heinrich Schuchardt wrote: > > There should be a platform compiled with the new driver. > > If you want to test the SBI sysreset driver, disable > CONFIG_SYSRESET_SYSCON. In OpenSBI sifive_test_system_reset() will be > called. > > Signed-off-by: Heinrich

Re: [PATCH v3 1/3] doc: Tidy up the bindings for the config/ node

2021-09-11 Thread Heinrich Schuchardt
On 9/9/21 10:10 PM, Simon Glass wrote: Sort these and add a type so it is clear how to set the value. Add a note about usage to the top. Correct the 'no-keyboard' binding which is missing a prefix. Signed-off-by: Simon Glass Reviewed-by: Marcel Ziswiler --- Note that some uses a u-boot prefix

Re: [PATCH v2] ARM: dts: Fix node status to "okay" on TI boards

2021-09-11 Thread Tom Rini
On Tue, Aug 24, 2021 at 02:07:27PM +0300, Roger Quadros wrote: > As per Device Tree Specification [1], the status parameter of nodes can > be "okay", "disabled", etc. "ok" is not a valid parameter. > > U-boot Driver Model does not recognize status="ok" either and treats > the node as disabled. >

Re: [PATCH] tools: k3_fit_atf: Fix DM binary FIT load addresses

2021-09-11 Thread Tom Rini
On Sat, Aug 14, 2021 at 01:49:01AM -0500, Suman Anna wrote: > The DM binary runs on the MCU R5F Core0 after R5 SPL on J721E and J7200 > SoCs. The binary is built alongside the TFA, OPTEE and A72 SPL binaries > and included in the tispl.bin FIT image. The R5 SPL loads the DM binary > at 0xA000

Re: [PATCH] am33xx: Fix USB for am335x boards

2021-09-11 Thread Tom Rini
On Sat, Aug 07, 2021 at 02:17:38PM +0300, Matwey V. Kornilov wrote: > USB nodes were mistakenly disabled in > > commit 942853dd96df ("arm: dts: Resync BeagleBone device trees") > > This commit is to fix the following issue: > > starting USB... > No working controllers found >

Re: [PATCH 3/3] include: configs: am64x_evm: Add env variables for booting to kernel using USB MSC device

2021-09-11 Thread Tom Rini
On Wed, Aug 04, 2021 at 06:42:46PM +0530, Aswath Govindraju wrote: > Add env variables for booting to kernel from USB MSC device. The second > partition in the USB MSC device needs to formatted as ext4 file system with > kernel and dtb images, present in the /boot folder. > > Signed-off-by:

Re: [PATCH 2/3] environment: ti: mmc.h: Make the finduuid generic for usage across different device types

2021-09-11 Thread Tom Rini
On Wed, Aug 04, 2021 at 06:42:45PM +0530, Aswath Govindraju wrote: > Make finduuid generic by making it dependent on the boot variable. For > example, this can now be used for finding the uuid of partitions in usb > device too. > > Signed-off-by: Aswath Govindraju Applied to u-boot/master,

Re: [PATCH] arm: dts: k3-am642-evm-u-boot: Add u-boot, dm-spl tag in the pinmux node of mmc1

2021-09-11 Thread Tom Rini
On Mon, Aug 09, 2021 at 10:32:23PM +0530, Aswath Govindraju wrote: > Add u-boot,dm-spl tag in the pinmux device tree node, required for MMCSD1 > subsystem. > > Fixes: b6059ddc45b9 ("arm: dts: k3-am642: Add r5 specific dt support") > Signed-off-by: Aswath Govindraju Applied to u-boot/master,

[PATCH 1/3] doc: ti: Convert am335x_evm README to rST

2021-09-11 Thread Tom Rini
Convert the existing documentation to rST, keeping to just making formatting changes to start with. Signed-off-by: Tom Rini --- .../README => doc/board/ti/am335x_evm.rst | 150 ++ doc/board/ti/index.rst| 1 + 2 files changed, 87 insertions(+), 64

[PATCH 2/3] doc: ti: am335x_evm: Minor general updates

2021-09-11 Thread Tom Rini
- At this point there are a large number of Beaglebone boards, refer to them as a family rather than a growing list. - Reword customization as we're largely Kconfig-oriented now. - Remove the NOR section as the relevant defconfigs have long been removed and the general support was not updated.

[PATCH 3/3] am335x: Enable SPL_OF_CONTROL

2021-09-11 Thread Tom Rini
It has long been known that we need to enable SPL_OF_CONTROL on this platform, as some included drivers do not function correctly without it, but were also stuck due to size constraints. Resolve this problem by: - Updating the generic board.c file to use CONFIG_IS_ENABLED(USB_ETHER) to

Re: [PATCH v2 1/4] tools: docker: Bump up QEMU version to 6.1.0

2021-09-11 Thread Bin Meng
On Fri, Aug 27, 2021 at 10:54 AM Tom Rini wrote: > > On Thu, Aug 26, 2021 at 11:33:32PM +0800, Bin Meng wrote: > > > At present U-Boot CI testing is still using QEMU 4.2.0 which is > > pretty old. Let's bump up to QEMU 6.1.0. > > > > ninja-build is added as the prerequisite required by QEMU

Re: [PATCH 2/4] efi_loader: function to get GUID for variable name

2021-09-11 Thread Ilias Apalodimas
On Sat, Sep 11, 2021 at 09:28:30AM +0200, Heinrich Schuchardt wrote: > In multiple places we need the default GUID used for variables like > 'PK', 'KEK', 'db'. Provide a function for it. > > Signed-off-by: Heinrich Schuchardt > --- > include/efi_variable.h | 8 >

Re: [PATCH 3/4] efi_loader: simplify efi_sigstore_parse_sigdb()

2021-09-11 Thread Ilias Apalodimas
On Sat, Sep 11, 2021 at 09:28:31AM +0200, Heinrich Schuchardt wrote: > Simplify efi_sigstore_parse_sigdb() by using existing functions. > > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_loader/efi_signature.c | 35 ++ > 1 file changed, 6 insertions(+), 29

[PATCH v2] board: sifive: Fix a potential build warning in board_fdt_blob_setup()

2021-09-11 Thread Bin Meng
Commit 47d73ba4f4a4 ("board: sifive: overwrite board_fdt_blob_setup in u-boot proper") added a board-specific implementation of board_fdt_blob_setup() which takes a pointer as the return value, but it does not return anything if CONFIG_OF_SEPARATE is not enabled. This will cause a build warning

Re: [PATCH 1/4] efi_loader: treat UEFI variable name as const

2021-09-11 Thread Ilias Apalodimas
Hi Heinrich, On Sat, Sep 11, 2021 at 09:28:29AM +0200, Heinrich Schuchardt wrote: > Adjust several internal functions to treat UEFI variable names as const. It's obvious what the patch does, but is there a reason ? I think that's a better fit for the commit log. Cheers /Ilias > >

Re: [PATCH 2/4] efi_loader: function to get GUID for variable name

2021-09-11 Thread Ilias Apalodimas
On Sat, 11 Sept 2021 at 17:13, Ilias Apalodimas wrote: > > On Sat, Sep 11, 2021 at 09:28:30AM +0200, Heinrich Schuchardt wrote: > > In multiple places we need the default GUID used for variables like > > 'PK', 'KEK', 'db'. Provide a function for it. > > > > Signed-off-by: Heinrich Schuchardt > >

[PATCH] board: sifive: overwrite board_fdt_blob_setup in u-boot proper

2021-09-11 Thread Bin Meng
Commit 47d73ba4f4a4 ("board: sifive: overwrite board_fdt_blob_setup in u-boot proper") added a board-specific implementation of board_fdt_blob_setup() which takes a pointer as the return value, but it does not return anything if CONFIG_OF_SEPARATE is not enabled. This will cause a build warning

Re: [PATCH] board: sifive: overwrite board_fdt_blob_setup in u-boot proper

2021-09-11 Thread Bin Meng
On Sat, Sep 11, 2021 at 10:27 PM Bin Meng wrote: > > Commit 47d73ba4f4a4 ("board: sifive: overwrite board_fdt_blob_setup in u-boot > proper") > added a board-specific implementation of board_fdt_blob_setup() which > takes a pointer as the return value, but it does not return anything > if

Re: [PATCH v2 1/4] tools: docker: Bump up QEMU version to 6.1.0

2021-09-11 Thread Tom Rini
On Sat, Sep 11, 2021 at 10:33:07PM +0800, Bin Meng wrote: > On Fri, Aug 27, 2021 at 10:54 AM Tom Rini wrote: > > > > On Thu, Aug 26, 2021 at 11:33:32PM +0800, Bin Meng wrote: > > > > > At present U-Boot CI testing is still using QEMU 4.2.0 which is > > > pretty old. Let's bump up to QEMU 6.1.0. >

[PATCH] Dockerfile: Update to latest "focal" tag

2021-09-11 Thread Tom Rini
Signed-off-by: Tom Rini --- tools/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 0195456dfeca..42d4b0c91ac8 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -2,7 +2,7 @@ # This

Re: [PATCH] Dockerfile: Update to latest "focal" tag

2021-09-11 Thread Bin Meng
On Sat, Sep 11, 2021 at 10:37 PM Tom Rini wrote: > > Signed-off-by: Tom Rini > --- > tools/docker/Dockerfile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Bin Meng

[PATCH] CI: Update to latest container images

2021-09-11 Thread Tom Rini
- Current Ubuntu/Focal tag - QEMU 6.1.0 - genimage tool added Signed-off-by: Tom Rini --- .azure-pipelines.yml | 2 +- .gitlab-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 2e9c1fb4fd98..55a984f5d822 100644

Re: [PATCH] CI: Update to latest container images

2021-09-11 Thread Bin Meng
On Sun, Sep 12, 2021 at 12:07 AM Tom Rini wrote: > > - Current Ubuntu/Focal tag > - QEMU 6.1.0 > - genimage tool added > > Signed-off-by: Tom Rini > --- > .azure-pipelines.yml | 2 +- > .gitlab-ci.yml | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Bin Meng

Watchdog auto-start and TIMER_EARLY broken in RISC-V U-Boot

2021-09-11 Thread Samuel Holland
Hello, I am porting U-Boot to the Allwinner D1 SoC, and I ran into an issue where the board fails to boot if I enable watchdog auto-start. The call to get_timer() -> get_ticks() panics because no timer is available. And since panic_finish() calls udelay(), this causes infinite recursion of

Re: [PATCH v5 3/4] sysreset: provide SBI based sysreset driver

2021-09-11 Thread Sean Anderson
On 9/10/21 10:15 AM, Heinrich Schuchardt wrote: Provide sysreset driver using the SBI system reset extension. Signed-off-by: Heinrich Schuchardt --- v5: * don't add __efi_runtime * use '=' not ':' in array initialization with enum indices v4: * remove the UEFI

[PATCH 2/9] clk: sifive: Fix -Wint-to-pointer-cast warning

2021-09-11 Thread Bin Meng
dev_read_addr() returns a value of type fdt_addr_t which is a 64-bit address and pd->va is a pointer. In a 32-bit build, this causes the following warning seen when building sifive-prci.c: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Change to use

[PATCH 1/9] cache: sifive: Fix -Wint-to-pointer-cast warning

2021-09-11 Thread Bin Meng
The following warning is seen in cache-sifive-ccache.c in a 32-bit build: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Fix by casting it with uintptr_t. Signed-off-by: Bin Meng --- drivers/cache/cache-sifive-ccache.c | 2 +- 1 file changed, 1

Re: Problem with U-boot | Configuration Signature not being checked while booting

2021-09-11 Thread Tom Rini
On Sat, Sep 11, 2021 at 09:18:46PM +0200, Mark Kettenis wrote: > > From: Moiz Imtiaz > > Date: Sat, 11 Sep 2021 23:19:05 +0500 > > > > Hi Simon, > > > > Thanks for the reply. I already followed the steps mentioned in > > "doc/uImage.FIT/beaglebone_vboot.txt". > > > > >I wonder if rpi is not

[PATCH] cmd: mmc: Support mmc hwpartition user enh start -

2021-09-11 Thread Marek Vasut
Add option to extend the hardware partition to the maximum size by using the '-' dash sign instead of $cnt parameter. This is useful in case we want to switch the entire eMMC user area into pSLC mode, especially in case the device may be populated with different size eMMCs. With this change, we do

Re: Problem with U-boot | Configuration Signature not being checked while booting

2021-09-11 Thread Mark Kettenis
> Date: Sat, 11 Sep 2021 17:05:45 -0400 > From: Tom Rini > > On Sat, Sep 11, 2021 at 09:18:46PM +0200, Mark Kettenis wrote: > > > From: Moiz Imtiaz > > > Date: Sat, 11 Sep 2021 23:19:05 +0500 > > > > > > Hi Simon, > > > > > > Thanks for the reply. I already followed the steps mentioned in >

Re: Problem with U-boot | Configuration Signature not being checked while booting

2021-09-11 Thread Tom Rini
On Sat, Sep 11, 2021 at 11:30:00PM +0200, Mark Kettenis wrote: > > Date: Sat, 11 Sep 2021 17:05:45 -0400 > > From: Tom Rini > > > > On Sat, Sep 11, 2021 at 09:18:46PM +0200, Mark Kettenis wrote: > > > > From: Moiz Imtiaz > > > > Date: Sat, 11 Sep 2021 23:19:05 +0500 > > > > > > > > Hi Simon, >

[PATCH 2/3] sunxi: gpio: Remove name_to_gpio macro

2021-09-11 Thread Samuel Holland
This clarifies which callers must be updated to complete the DM_GPIO conversion. The only remaining caller of name_to_gpio in generic code is inside the !DM_GPIO block in cmd/gpio.c. DM_GPIO is always selected on sunxi, so that code cannot be reached. And after this commit, there are only two

[PATCH 1/3] sunxi: Clean up inclusions of asm/arch/gpio.h

2021-09-11 Thread Samuel Holland
As part of migrating to DM_GPIO and DM_PINCTRL, eventually we will remove the asm/arch/gpio.h header. In preparation, clean up the various files that include it. Some files did not contain any GPIO code at all, so this header was completely unused. A few files contained only legacy

[PATCH 3/3] sunxi: gpio: Remove bank-specific size macros

2021-09-11 Thread Samuel Holland
Since the beginning, all banks have had space for 32 pins, even when not all pins were implemented. Let's use a single constant for the GPIO bank size here, like the GPIO driver is already doing. Signed-off-by: Samuel Holland --- arch/arm/include/asm/arch-sunxi/gpio.h | 14 ++

[PATCH 0/3] sunxi: Cleanup to prepare for DM_GPIO/DM_PINCTRL

2021-09-11 Thread Samuel Holland
I have a patch series in progresss to migrate sunxi to a DM_PINCTRL driver and convert the remaining legacy GPIO users (outside of SPL). This is one of several small independent sets of preparatory patches I will be sending in order to minimize the size of the main series (which has >100 patches

Re: Problem with U-boot | Configuration Signature not being checked while booting

2021-09-11 Thread Moiz Imtiaz
Completely agreed, that a fully secure boot on pi won't be achievable because the Root of Trust (ROT) cant be established from the BOTROM/EEPROM. Plus Pi doesn't have any High Assurance Boot (HAB). But given the scenerio, whatever we can achieve i.e if we can verify the kernel, the device tree,

[PATCH 3/3] gpio: Factor out DT flag translation

2021-09-11 Thread Samuel Holland
The generic GPIO flags binding is shared across many drivers, some of which need their own xlate function. Factor out the flag translation code from gpio_xlate_offs_flags so it does not need to be duplicated. Signed-off-by: Samuel Holland --- drivers/gpio/gpio-uclass.c | 50

[PATCH 2/3] gpio: Verify validity of pin offsets from device trees

2021-09-11 Thread Samuel Holland
Translation of an OF GPIO specifier should fail if the pin offset is larger than the number of pins in the GPIO bank. Signed-off-by: Samuel Holland --- drivers/gpio/gpio-uclass.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c

[PATCH 1/3] gpio: Verify validity of pin offsets when looking up names

2021-09-11 Thread Samuel Holland
Translation of a pin name to a device+offset should fail if the offset is larger than the number of pins in the GPIO bank. Signed-off-by: Samuel Holland --- drivers/gpio/gpio-uclass.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-uclass.c

[PATCH 0/3] gpio: uclass enhancements for DM_GPIO drivers

2021-09-11 Thread Samuel Holland
This series makes a couple of enhancements to the generic GPIO code that simplified updating some DM_GPIO drivers. Patches 1-2 add bounds checking when looking up GPIOs by name and from the device tree. After this, all functions that fill out a gpio_desc ensure the offset field is in bounds, so

[PATCH 1/3] ARM: imx: mx5: Enable BMODE command on MX53 Menlo board

2021-09-11 Thread Marek Vasut
The board can do primary/secondary boot switching, enable the bmode command. Signed-off-by: Marek Vasut Cc: Stefano Babic --- board/menlo/m53menlo/m53menlo.c | 5 + configs/m53menlo_defconfig | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git

[PATCH 2/3] ARM: imx: mx5: Enable Thumb2 build on MX53 Menlo board

2021-09-11 Thread Marek Vasut
Build U-Boot in Thumb2 mode for M53Menlo board, this makes better use of the CPU since the instruction density is higher. Signed-off-by: Marek Vasut Cc: Stefano Babic --- configs/m53menlo_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/m53menlo_defconfig

[PATCH 3/3] ARM: imx: mx5: Add altbootcmd and resets to M53Menlo

2021-09-11 Thread Marek Vasut
Bulletproof the default boot command with reset statements in case any command in the chain would fail. In case a failure were to happen, the board will reset, increment boot counter and retry the procedure. In case the failures persist and the boot counter reaches the bootlimit, U-Boot starts

[PATCH] ARM: dts: imx8mm-verdin: Set PHY mode to RGMII-ID

2021-09-11 Thread Marek Vasut
Since c6df0e2ffdc ("net: phy: micrel: add support for DLL setup on ksz9131") the Micrel PHY driver correctly configures the delay register. The Verdin PHY is RGMII-ID, so reflect that in DT, otherwise the ethernet no longer works. Signed-off-by: Marek Vasut Cc: Marcel Ziswiler Cc: Max

Re: [PATCH] ARM: dts: imx8mm-verdin: Set PHY mode to RGMII-ID

2021-09-11 Thread Marcel Ziswiler
Hi Marek On Sun, 2021-09-12 at 00:43 +0200, Marek Vasut wrote: > Since c6df0e2ffdc ("net: phy: micrel: add support for DLL setup on ksz9131") > the Micrel PHY driver correctly configures the delay register. The Verdin PHY > is RGMII-ID, so reflect that in DT, otherwise the ethernet no longer

Re: [PATCH] ARM: dts: imx8mm-verdin: Set PHY mode to RGMII-ID

2021-09-11 Thread Marek Vasut
On 9/12/21 12:53 AM, Marcel Ziswiler wrote: Hi Marek On Sun, 2021-09-12 at 00:43 +0200, Marek Vasut wrote: Since c6df0e2ffdc ("net: phy: micrel: add support for DLL setup on ksz9131") the Micrel PHY driver correctly configures the delay register. The Verdin PHY is RGMII-ID, so reflect that in

[PATCH v2 4/4] clk: k210: Try harder to get the best config

2021-09-11 Thread Sean Anderson
In some cases, the best config cannot be used because the VCO would be out-of-spec. In these cases, we may need to try a worse combination of r/od in order to find the best representable config. This also adds a few test cases to catch this and other (possible) unlikely errors. Signed-off-by:

[PATCH v2 2/4] k210: clk: Refactor out_of_spec tests

2021-09-11 Thread Sean Anderson
Everything here sits in a while (true) loop. However, this introduces a couple of layers of indentation. We can simplify the code by introducing a single goto instead of using continue/break. This will also make adding loops in the next patch easier. Signed-off-by: Sean Anderson --- (no changes

[PATCH v2 1/4] clk: k210: Fix checking if ulongs are less than 0

2021-09-11 Thread Sean Anderson
The PLL functions take ulong arguments for rate, but still check if that rate is negative (which is never true). The correct way to handle this is to use IS_ERR_VALUE (like is already done in k210_clk_set_rate). While we're at it, we can move the error checking up into the caller of the pll

[PATCH v2 3/4] test: dm: k210: Reduce duplication in test cases

2021-09-11 Thread Sean Anderson
Having to copy-paste the same 3 lines makes adding new test cases error-prone. Use a macro. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- (no changes since v1) test/dm/k210_pll.c | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git

Re: [PATCH] CI: Update to latest container images

2021-09-11 Thread Tom Rini
On Sat, Sep 11, 2021 at 12:07:08PM -0400, Tom Rini wrote: > - Current Ubuntu/Focal tag > - QEMU 6.1.0 > - genimage tool added > > Signed-off-by: Tom Rini > Reviewed-by: Bin Meng Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature

Re: [PATCH v2 2/4] tools: docker: Build and install genimage

2021-09-11 Thread Tom Rini
On Thu, Aug 26, 2021 at 11:33:33PM +0800, Bin Meng wrote: > genimage [1] is a tool to create flash/disk images. This is required > by some targets, e.g.: sifive_unleashed, to generate sdcard or spi-nor > images for real hardware, as well as U-Boot CI testing. > > [1]

Re: [PATCH v2 1/4] tools: docker: Bump up QEMU version to 6.1.0

2021-09-11 Thread Tom Rini
On Thu, Aug 26, 2021 at 11:33:32PM +0800, Bin Meng wrote: > At present U-Boot CI testing is still using QEMU 4.2.0 which is > pretty old. Let's bump up to QEMU 6.1.0. > > ninja-build is added as the prerequisite required by QEMU 6.1.0. > > Note there is a bug in QEMU 6.1.0 Xilinx Zynq UART

Re: [PATCH v2 4/4] azure/gitlab: Add tests for SiFive Unleashed board

2021-09-11 Thread Tom Rini
On Thu, Aug 26, 2021 at 11:33:35PM +0800, Bin Meng wrote: > This adds CI tests for SiFive Unleashed board. > > QEMU supports booting exact the same images as used on the real > hardware out of the box, that U-Boot SPL loads U-Boot proper > from either an SD card or the SPI NOR flash, hence we

Re: [PATCH v2 3/4] riscv: sifive: unleashed: Add genimage config files

2021-09-11 Thread Tom Rini
On Thu, Aug 26, 2021 at 11:33:34PM +0800, Bin Meng wrote: > This adds genimage [1] config files for generating SD card and spi-nor > images, which can be programmed to an SD card or SPI flash and boot > from there. > > The same images will be used for U-Boot CI testing for this board. > > [1]

Re: Problem with U-boot | Configuration Signature not being checked while booting

2021-09-11 Thread Moiz Imtiaz
Hi Simon, Thanks for the reply. I already followed the steps mentioned in "doc/uImage.FIT/beaglebone_vboot.txt". >I wonder if rpi is not using the devicetree compiled with U-Boot, but instead one provided by the earlier-stage firmware? Not sure, but seems like this is the case. I checked and

Re: Watchdog auto-start and TIMER_EARLY broken in RISC-V U-Boot

2021-09-11 Thread Sean Anderson
On 9/11/21 2:37 PM, Samuel Holland wrote: On 9/11/21 1:31 PM, Sean Anderson wrote: +CC Heinrich Did you ever try booting with WDT on k210? On 9/11/21 12:43 PM, Samuel Holland wrote: Hello, I am porting U-Boot to the Allwinner D1 SoC, and I ran into an issue where the board fails to boot if

Re: Problem with U-boot | Configuration Signature not being checked while booting

2021-09-11 Thread Mark Kettenis
> From: Moiz Imtiaz > Date: Sat, 11 Sep 2021 23:19:05 +0500 > > Hi Simon, > > Thanks for the reply. I already followed the steps mentioned in > "doc/uImage.FIT/beaglebone_vboot.txt". > > >I wonder if rpi is not using the devicetree compiled with U-Boot, but > instead one provided by the

[PATCH] clk: sunxi: Extend DM_RESET selection to SPL

2021-09-11 Thread Samuel Holland
The sunxi clock driver exposes a reset controller, so it selects the reset controller framework. Ensure that dependency is also satisfied when building the driver for the SPL. Signed-off-by: Samuel Holland --- drivers/clk/sunxi/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH] sunxi: call fdt_fixup_ethernet again to set macaddr for more aliases

2021-09-11 Thread Jernej Skrabec
From: Icenowy Zheng Sometimes some ethernet aliases do not exist in U-Boot DT but they exist in the DT used to boot the system (for example, modified via DT overlays). In this situation setup_environment is called again in ft_board_setup() to generate macaddr environment variable for them.

Re: [PATCH] Dockerfile: Update to latest "focal" tag

2021-09-11 Thread Tom Rini
On Sat, Sep 11, 2021 at 10:37:06AM -0400, Tom Rini wrote: > Signed-off-by: Tom Rini > Reviewed-by: Bin Meng Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature

[PATCH v3 1/1] x86: tangier: acpi: Add GPIO card detection to SDHCI #2

2021-09-11 Thread Andy Shevchenko
On Intel Tangier the SDHCI #2 provides SD card connection. Add GPIO card detection for it. Fixes: 39665beed6f7 ("x86: tangier: Enable ACPI support for Intel Tangier") BugLink: https://github.com/edison-fw/meta-intel-edison/issues/135 Signed-off-by: Andy Shevchenko Acked-by: Bin Meng --- v3:

Re: Watchdog auto-start and TIMER_EARLY broken in RISC-V U-Boot

2021-09-11 Thread Sean Anderson
+CC Heinrich Did you ever try booting with WDT on k210? On 9/11/21 12:43 PM, Samuel Holland wrote: Hello, I am porting U-Boot to the Allwinner D1 SoC, and I ran into an issue where the board fails to boot if I enable watchdog auto-start. The call to get_timer() -> get_ticks() panics because

Re: Watchdog auto-start and TIMER_EARLY broken in RISC-V U-Boot

2021-09-11 Thread Samuel Holland
On 9/11/21 1:31 PM, Sean Anderson wrote: > +CC Heinrich > > Did you ever try booting with WDT on k210? > > On 9/11/21 12:43 PM, Samuel Holland wrote: >> Hello, >> >> I am porting U-Boot to the Allwinner D1 SoC, and I ran into an issue >> where the board fails to boot if I enable watchdog

[PATCH] wdt: dw: Fix passing NULL pointer to reset functions

2021-09-11 Thread Sean Anderson
reset_*_bulk expects a real pointer. Fixes: 4f7abafe1c ("driver: watchdog: reset watchdog in designware_wdt_stop() function") Signed-off-by: Sean Anderson --- drivers/watchdog/designware_wdt.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH 3/9] gpio: sifive: Fix -Wint-to-pointer-cast warning

2021-09-11 Thread Bin Meng
dev_read_addr() returns a value of type fdt_addr_t which is a 64-bit address and plat->base is a pointer. In a 32-bit build, this causes the following warning seen when building sifive-gpio.c: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Change to use

[PATCH 7/9] net: macb: Fix -Wint-to-pointer-cast warnings

2021-09-11 Thread Bin Meng
The following warning is seen in macb.c in a 32-bit build: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Change to use dev_read_addr_index_ptr(), or cast with uintptr_t. Signed-off-by: Bin Meng --- drivers/net/macb.c | 11 +++ 1 file changed, 3

[PATCH 5/9] dm: core: Add a new API devfdt_get_addr_index_ptr()

2021-09-11 Thread Bin Meng
At present there is only devfdt_get_addr_ptr() which only returns the first pair in the 'reg' property. Add a new API devfdt_get_addr_index_ptr() to return the indexed pointer. Signed-off-by: Bin Meng --- drivers/core/fdtaddr.c | 11 --- include/dm/fdtaddr.h | 12 2

[PATCH 8/9] ram: sifive: Fix -Wint-to-pointer-cast warnings

2021-09-11 Thread Bin Meng
The following warning is seen in sifive_ddr.c in a 32-bit build: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Change to use dev_read_addr_index_ptr(). Signed-off-by: Bin Meng --- drivers/ram/sifive/sifive_ddr.c | 8 1 file changed, 4

[PATCH 6/9] dm: Provide dev_read_addr_index_ptr() wrapper

2021-09-11 Thread Bin Meng
Like dev_read_addr_ptr(), provide a wrapper for the indexed version. Signed-off-by: Bin Meng --- include/dm/read.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/include/dm/read.h b/include/dm/read.h index 5bf3405614..890bf3d847 100644 --- a/include/dm/read.h +++

[PATCH 4/9] i2c: ocores: Fix -Wint-to-pointer-cast warning

2021-09-11 Thread Bin Meng
The following warning is seen in ocores_i2c.c in a 32-bit build: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Change to use dev_read_addr_ptr(). Signed-off-by: Bin Meng --- drivers/i2c/ocores_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 9/9] board: sifive: Fix -Wint-to-pointer-cast warning

2021-09-11 Thread Bin Meng
The following warning is seen in unleashed.c in a 32-bit build: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Cast with uintptr_t. Signed-off-by: Bin Meng --- board/sifive/unleashed/unleashed.c | 2 +- board/sifive/unmatched/unmatched.c | 2 +- 2 files