Re: [PATCH] cmd: sysboot: dont overwrite bootfile env

2021-10-13 Thread Art Nikpal
> Please also see this refactor which conflicts with this patch: > > http://patchwork.ozlabs.org/project/uboot/list/?series=264265 > > I think that series should be reviewed/applied first since it was sent in August. yes ! i think need update your series because cant apply it for current uboot

Re: [PATCH] distro_boot: Fix bootfile env after calling boot_extlinux

2021-10-13 Thread Art Nikpal
> could you check out my syslinux refactor > series? It could use some review. > > http://patchwork.ozlabs.org/project/uboot/list/?series=264265 Yes ! But I already can't apply this series for actual uboot code (need to change) maybe u can make v3 patches for actual uboot state. I checked it

RE: how to run u-boot on qemu arm64 virt machine?

2021-10-13 Thread Chan Kim
I think my question has error. Is it possible to run it on SCP? I mean loading from SD card the kernel, file system, dtb etc to the memory and calling kernel. ==> Is it possible to run it on SCP? I mean loading from SD card the kernel, file system, dtb etc to the memory and waking the main

RE: how to run u-boot on qemu arm64 virt machine?

2021-10-13 Thread Chan Kim
Hi Francois, Thanks for the good information. I’ll look into that later. Can I ask you a basic question? When there are SCP, MCP and the main processor, in what processor does u-boot program run? I understand it runs on the main processor. Is it possible to run it on SCP? I mean loading

Re: [PATCH 1/2] arm64: Add missing GD_FLG_SKIP_RELOC handling

2021-10-13 Thread Peng Fan (OSS)
On 2021/10/11 5:52, marek.va...@gmail.com wrote: From: Marek Vasut In case U-Boot enters relocation with GD_FLG_SKIP_RELOC, skip the relocation. The code still has to set up new_gd pointer and new stack pointer. Signed-off-by: Marek Vasut Cc: Simon Glass Cc: Tom Rini ---

Re: [PATCH] board_f: Copy GD to new GD even if relocation disabled

2021-10-13 Thread Peng Fan (OSS)
On 2021/10/11 5:44, Marek Vasut wrote: Even if U-Boot has relocation disabled via GD_FLG_SKIP_RELOC , the relocated stage of U-Boot still picks GD from new_gd location. The U-Boot itself is not relocated, but GD might be, so copy the GD to new GD location even if relocation is disabled.

RE: [PATCH 1/2] board_f: fix use of GD_FLG_SKIP_RELOC

2021-10-13 Thread Peng Fan (OSS)
> Subject: Re: [PATCH 1/2] board_f: fix use of GD_FLG_SKIP_RELOC > > On 10/13/21 11:54 AM, Peng Fan (OSS) wrote: > > From: Peng Fan > > > > When dtb is padded in the end of U-Boot binary, dtb should always be > > relocated whether GD_FLG_SKIP_RELOC set or not, otherwise dtb maybe > > corrupted.

External dts building

2021-10-13 Thread Giulio Benetti
Hello All, is there a way to pass a dts file without touching the arch/arm/boot/dts/Makefile? On Buildroot we support the possibility to pass an external dts by copying it to the uboot sources to be built but since uboot version 2020.01 it doesn’t work anymore. So I’ve proposed a patch to

Re: [PATCH] tools: mksunxiboot: Use sunxi_image header directly

2021-10-13 Thread Andre Przywara
On Tue, 12 Oct 2021 19:35:41 -0500 Samuel Holland wrote: > When adding eGON support to mkimage, the struct boot_file_head > definition was moved to its own header. This is the only thing > mksunxiboot needed out of asm/arch/spl.h. Clean up the relative > include by switching to new header. > >

Re: [PATCH] mkimage: sunxi_egon: Allow overriding the padding size

2021-10-13 Thread Andre Przywara
On Tue, 12 Oct 2021 19:21:27 -0500 Samuel Holland wrote: > Due to a bug in the H3 SoC, where the CPU 0 hotplug flag cannot be > written, resuming CPU 0 requires using the "Super Standby" code path in > the BROM instead of the hotplug path. This path requires jumping to an > eGON image in SRAM. >

Re: [PATCH v2] sunxi: h3: enable clock support for r_pio gpios

2021-10-13 Thread Andre Przywara
On Tue, 5 Oct 2021 17:58:20 +0200 Manuel Dipolt wrote: Hi Manuel, > This patch enables clock for the r_pio gpios for the h3 > r_pio is required to access gpios from port L Better, but it would be good to know what this actually allows (LEDs)? And while some of the whitespace issues are

[PATCH RFC linux] dt-bindings: nvmem: Add binding for U-Boot environment NVMEM provider

2021-10-13 Thread Marek Behún
Add device tree bindings for U-Boot environment NVMEM provider. U-Boot environment can be stored at a specific offset of a MTD device, EEPROM, MMC, NAND or SATA device, on an UBI volume, or in a file on a filesystem. The environment can contain information such as device's MAC address, which

Re: [PATCH] mxs: power: Change sequence of enabling DCDC switches

2021-10-13 Thread Jaehoon Chung
On 10/13/21 10:40 PM, Lukasz Majewski wrote: > The imx28 uses following voltage supplies hierarchy: > > VDD_5V (VDD_BAT) -> VDDIO -> VDDA -> VDDMEM >\-> VDDD > > One shall first enable DCDC on the parent source (VDDIO) and then > follow with its children. > >

[PATCH v2] imx: syscounter: allow timer_init for SPL build

2021-10-13 Thread Oleksandr Suvorov
From: Michael Scott If we enable SPL and SKIP_LOWLEVEL_INIT, this results in the weak function timer_init() being used in the SPL build. This is not desirable as on iMX6 SoC, MMC will then fail once u-boot proper is booted due to timing issue. Fixes: be277c3a89 ("imx: mx7: avoid some

Re: [PATCH 00/16] fdt: Make OF_BOARD a boolean option

2021-10-13 Thread Simon Glass
Hi François, On Wed, 13 Oct 2021 at 11:35, François Ozog wrote: > > Hi Simon > > Le mer. 13 oct. 2021 à 16:49, Simon Glass a écrit : >> >> Hi Tom, Bin,François, >> >> On Tue, 12 Oct 2021 at 19:34, Tom Rini wrote: >> > >> > On Wed, Oct 13, 2021 at 09:29:14AM +0800, Bin Meng wrote: >> > > Hi

Re: [PATCH 2/3] binman: Prevent entries in a section from overlapping

2021-10-13 Thread Simon Glass
Hi Samuel, On Tue, 12 Oct 2021 at 20:30, Samuel Holland wrote: > > Currently, if the "offset" property is given for an entry, the section's > running offset is completely ignored. This causes entries to overlap if > the provided offset is less than the size of the entries earlier in the >

Re: [RFC 07/22] dm: blk: add UCLASS_PARTITION

2021-10-13 Thread Simon Glass
Hi Takahiro, On Tue, 12 Oct 2021 at 19:32, AKASHI Takahiro wrote: > > On Tue, Oct 12, 2021 at 11:14:17AM -0400, Tom Rini wrote: > > On Mon, Oct 11, 2021 at 10:14:00AM -0600, Simon Glass wrote: > > > Hi Heinrich, > > > > > > On Mon, 11 Oct 2021 at 09:02, Heinrich Schuchardt > > > wrote: > > > >

Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE

2021-10-13 Thread Simon Glass
Hi Thomas, On Wed, 13 Oct 2021 at 11:36, Thomas Fitzsimmons wrote: > > Simon Glass writes: > > [...] > > > On Wed, 13 Oct 2021 at 10:26, Thomas Fitzsimmons > > wrote: > >> > >> Simon Glass writes: > >> > >> [...] > >> > >> >> > I think one option is better than two. I have a slight

Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE

2021-10-13 Thread Tom Rini
On Wed, Oct 13, 2021 at 01:36:00PM -0400, Thomas Fitzsimmons wrote: > Simon Glass writes: > > [...] > > > On Wed, 13 Oct 2021 at 10:26, Thomas Fitzsimmons > > wrote: > >> > >> Simon Glass writes: > >> > >> [...] > >> > >> >> > I think one option is better than two. I have a slight preference

[PATCH 8/8] board: sl28: enable USB periheral support and gadgets

2021-10-13 Thread Michael Walle
Enable support to update the board via the DFU protocol and make it possible to export the block devices via USB mass storage protocol. This will not work out of the box, yet. You have to change the dr_mode of the usb0 controller to peripheral manually to make it work. True, OTG support will

[PATCH 7/8] board: sl28: switch to dwc3 driver

2021-10-13 Thread Michael Walle
Now that the DWC3 USB driver has support for the layerscape platform, use it. This will have the benefit that peripheral mode will work. Signed-off-by: Michael Walle --- configs/kontron_sl28_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH 6/8] usb: dwc3: add layerscape support

2021-10-13 Thread Michael Walle
Add support for the proper dwc3 device tree binding support as specified in the offical device tree spec. Initially, add support for the LS1028A support. Other SoCs should be easy to add by just adding the corresponding compatible string. Unfortunately, the device trees of all other layerscape

[PATCH 5/8] usb: dwc3: Enable undefined length INCR burst type

2021-10-13 Thread Michael Walle
[backport from linux commit d9612c2f0449e24983a8b689603210486a930c90] Enable the undefined length INCR burst type and set INCRx. Different platform may has the different burst size type. In order to get best performance, we need to tune the burst size to one special value, instead of the default

[PATCH 4/8] usb: dwc3: Add frame length adjustment quirk

2021-10-13 Thread Michael Walle
[backport from linux commit db2be4e9e30c6e43e48c5749d3fc74cee0a6bbb3] Add adjust_frame_length_quirk for writing to fladj register which adjusts (micro)frame length to value provided by "snps,quirk-frame-length-adjustment" property thus avoiding USB 2.0 devices to time-out over a longer run

[PATCH 3/8] usb: common: silence dubious errors

2021-10-13 Thread Michael Walle
Both dr_mode and maximum-speed properties are usually optional. Drivers will still try to fetch the properties nonetheless, which leads to error messages, although they are no errors. Change pr_err() to pr_debug(). Signed-off-by: Michael Walle --- drivers/usb/common/common.c | 4 ++-- 1 file

[PATCH 1/8] dm: core: add ofnode_for_each_compatible_node()

2021-10-13 Thread Michael Walle
Add a helper to iterate over all nodes with a given compatible string. Signed-off-by: Michael Walle --- include/dm/ofnode.h | 24 1 file changed, 24 insertions(+) diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index 6a714d0c7b..0f680e5aa6 100644 ---

[PATCH 2/8] armv8: fsl-layerscape: rework the dwc3 snooping enable code

2021-10-13 Thread Michael Walle
Instead of looking at all USB (host) devices, just search all DWC3 device tree nodes. This will (1) fix a panic if of_match is zero and (2) also apply the fixup if the controller is in peripheral mode. Both happen when the DWC3 USB controller driver is used. Signed-off-by: Michael Walle ---

[PATCH 0/8] usb: dwc3: add Layerscape SoC support

2021-10-13 Thread Michael Walle
Primarily, this will add support for peripheral mode on Layerscape SoCs. For this to work, we have to backport two fixes from linux and fix the fixup code for the DWC3 controller (which enables snooping because the SoC has wrong startup defaults). As a first user of the driver, enable it on the

Re: [PATCH 00/16] fdt: Make OF_BOARD a boolean option

2021-10-13 Thread François Ozog
Hi Simon Le mer. 13 oct. 2021 à 16:49, Simon Glass a écrit : > Hi Tom, Bin,François, > > On Tue, 12 Oct 2021 at 19:34, Tom Rini wrote: > > > > On Wed, Oct 13, 2021 at 09:29:14AM +0800, Bin Meng wrote: > > > Hi Simon, > > > > > > On Wed, Oct 13, 2021 at 9:01 AM Simon Glass wrote: > > > > > > >

Re: [PATCH 02/16] arm: qemu: Explain how to extract the generate devicetree

2021-10-13 Thread Tom Rini
On Wed, Oct 13, 2021 at 10:58:31AM -0600, Simon Glass wrote: > Hi François, > > On Tue, 12 Oct 2021 at 19:20, François Ozog wrote: > > > > > > > > Le mer. 13 oct. 2021 à 03:02, Simon Glass a écrit : > >> > >> QEMU currently generates a devicetree for use with U-Boot. Explain how to > >> obtain

Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE

2021-10-13 Thread Thomas Fitzsimmons
Simon Glass writes: [...] > On Wed, 13 Oct 2021 at 10:26, Thomas Fitzsimmons wrote: >> >> Simon Glass writes: >> >> [...] >> >> >> > I think one option is better than two. I have a slight preference for >> >> > OF_PRIOR_STAGE because it is board-agnostic, but I'm not sure it >> >> > matters,

Re: [PATCH 15/16] fdt: Make OF_BOARD a bool option

2021-10-13 Thread Sean Anderson
On 10/13/21 12:58 PM, Simon Glass wrote: Hi Heinrich, On Tue, 12 Oct 2021 at 22:22, Heinrich Schuchardt wrote: On 10/13/21 03:01, Simon Glass wrote: This should not be a separate option from OF_SEPARATE. It is a run-time option to override the devicetree, even if present. Move the option

[PATCHv2] arm64: zynqmp: Print the secure boot status information

2021-10-13 Thread Jorge Ramirez-Ortiz
Output the secure boot configuration to the console. Signed-off-by: Jorge Ramirez-Ortiz --- v2: Michal review 12 Aug 2021 print information on SPL and UBOOT improve the print command add macros to mask the status arch/arm/mach-zynqmp/include/mach/hardware.h | 6 +-

Re: [PATCH] distro_boot: Fix bootfile env after calling boot_extlinux

2021-10-13 Thread Simon Glass
Hi Tom, On Tue, 12 Oct 2021 at 15:07, Tom Rini wrote: > > On Tue, Oct 12, 2021 at 02:31:18PM -0600, Simon Glass wrote: > > Hi Tom, > > > > On Tue, 12 Oct 2021 at 13:44, Tom Rini wrote: > > > > > > On Tue, Oct 12, 2021 at 04:55:44PM +0800, Artem Lapkin wrote: > > > > > > > Problem > > > > > > >

Re: [PATCH v2] stm32mp: add binman support for STM32MP15x

2021-10-13 Thread Simon Glass
On Wed, 13 Oct 2021 at 07:11, Patrick Delaunay wrote: > > Use binman to add the stm32image header on SPL binary for basic boot > or on U-Boot binary when it is required, i.e. for TF-A boot without FIP > support, when CONFIG_STM32MP15x_STM32IMAGE is activated. > > The "binman" tool is the

Re: [PATCH 15/16] fdt: Make OF_BOARD a bool option

2021-10-13 Thread Simon Glass
Hi Heinrich, On Tue, 12 Oct 2021 at 22:22, Heinrich Schuchardt wrote: > > > > On 10/13/21 03:01, Simon Glass wrote: > > This should not be a separate option from OF_SEPARATE. It is a run-time > > option to override the devicetree, even if present. > > > > Move the option out of the choice. > > >

Re: [PATCH 02/16] arm: qemu: Explain how to extract the generate devicetree

2021-10-13 Thread Simon Glass
Hi François, On Tue, 12 Oct 2021 at 19:20, François Ozog wrote: > > > > Le mer. 13 oct. 2021 à 03:02, Simon Glass a écrit : >> >> QEMU currently generates a devicetree for use with U-Boot. Explain how to >> obtain it. >> >> Signed-off-by: Simon Glass >> --- >> >>

Re: [PATCH 2/2] arm: crt0_64: support skip u-boot relocation

2021-10-13 Thread Simon Glass
Hi Peng, On Wed, 13 Oct 2021 at 03:18, Peng Fan (OSS) wrote: > > From: Peng Fan > > U-Boot binary is quite large with more options enabled, it not hurt > on real silicon with high performance. But on simulation platform, > it is quite slow to relocate the U-Boot binary to new address, > so

Re: [PATCH] cmd: sysboot: dont overwrite bootfile env

2021-10-13 Thread Simon Glass
Hi, On Tue, 12 Oct 2021 at 21:39, Artem Lapkin wrote: > > Problem > > PXE cannot boot normally after Sysboot changed the bootfile env (called > from boot_extlinux) from the default "boot.scr.uimg" to > "/boot/extlinux/extlinux.conf". > > In addition, an unbootable extlinux configuration will

Re: [PATCH 11/16] arm: xilinx_versal_virt: Add a devicetree file

2021-10-13 Thread Simon Glass
Hi Michal, On Wed, 13 Oct 2021 at 00:13, Michal Simek wrote: > > > > On 10/13/21 03:01, Simon Glass wrote: > > Add a devicetree file obtained from qemu for this board. This was obtained > > with: > > > > qemu-system-aarch64 -M xlnx-versal-virt -machine dumpdtb=dtb.dtb > > > > Signed-off-by:

Re: [PATCH] distro_boot: Fix bootfile env after calling boot_extlinux

2021-10-13 Thread Simon Glass
Hi Art, On Tue, 12 Oct 2021 at 21:45, Art Nikpal wrote: > > Yes changes inside include/config_distro_bootcmd.h not the best solution for > this issue. > I think it is better to change sysboot cmd and i have prepared another > solution already! >

Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE

2021-10-13 Thread Simon Glass
Hi Thomas, On Wed, 13 Oct 2021 at 10:26, Thomas Fitzsimmons wrote: > > Simon Glass writes: > > [...] > > >> > I think one option is better than two. I have a slight preference for > >> > OF_PRIOR_STAGE because it is board-agnostic, but I'm not sure it > >> > matters, since some of these boards

Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE

2021-10-13 Thread Simon Glass
Hi Thomas, On Wed, 13 Oct 2021 at 10:22, Thomas Fitzsimmons wrote: > > Hi Simon, > > Simon Glass writes: > > > Hi Mark, > > > > On Sat, 25 Sept 2021 at 11:27, Mark Kettenis > > wrote: > >> > >> > From: Simon Glass > >> > Date: Fri, 24 Sep 2021 07:57:00 -0600 > >> > > >> > Hi Ilias, > >> > >

Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE

2021-10-13 Thread Ilias Apalodimas
Hi Thomas, On Wed, 13 Oct 2021 at 19:26, Thomas Fitzsimmons wrote: > > Simon Glass writes: > > [...] > > >> > I think one option is better than two. I have a slight preference for > >> > OF_PRIOR_STAGE because it is board-agnostic, but I'm not sure it > >> > matters, since some of these boards

Re: [PATCH 2/2] dt-bindings: u-boot: Add an initial binding for config

2021-10-13 Thread Simon Glass
" Hi Rob, On Tue, 12 Oct 2021 at 09:05, Rob Herring wrote: > > On Tue, Oct 12, 2021 at 8:41 AM Simon Glass wrote: > > > > Hi Rob, > > > > On Mon, 4 Oct 2021 at 13:30, Rob Herring wrote: > > > > > > On Sun, Oct 03, 2021 at 12:51:53PM -0600, Simon Glass wrote: > > > > U-Boot makes use of the

Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE

2021-10-13 Thread Thomas Fitzsimmons
Simon Glass writes: [...] >> > I think one option is better than two. I have a slight preference for >> > OF_PRIOR_STAGE because it is board-agnostic, but I'm not sure it >> > matters, since some of these boards are doing strange things anyway >> > and cannot use OF_PRIOR_STAGE. So let's go

Re: [PATCH] arm: dts: sun50i-h6-orangepi-3: disable aldo2 regulator

2021-10-13 Thread Andre Przywara
On Tue, 7 Sep 2021 19:23:26 +0300 Maxim Karasev wrote: Hi Maxim, please add the respective maintainers in To: or CC:, as reported by scripts/get_maintainer.pl. Also please add at least "sunxi" or "allwinner" somewhere in the subject line, that helps the reduce the response time ;-) > Mainline

Re: [PATCH 1/1 RFC] treewide: Deprecate OF_PRIOR_STAGE

2021-10-13 Thread Thomas Fitzsimmons
Hi Simon, Simon Glass writes: > Hi Mark, > > On Sat, 25 Sept 2021 at 11:27, Mark Kettenis wrote: >> >> > From: Simon Glass >> > Date: Fri, 24 Sep 2021 07:57:00 -0600 >> > >> > Hi Ilias, >> > >> > On Fri, 24 Sept 2021 at 07:10, Ilias Apalodimas >> > wrote: >> > > >> > > At some point back in

[PATCHv2] firmware: zynqmp: add handling of the NULL return payload pointer in xilinx_pm_request.

2021-10-13 Thread Adrian Fiergolski
When a caller is not interested in the returned message, the ret_payload pointer is set to NULL in the u-boot-sources. In this case, under EL3, the memory from address 0x0 would be overwritten by xilinx_pm_request with the returned IPI message, damaging the original data under this address. The

[PATCH v5 27/28] arm: dts: ls1028a: sync the fsl-ls1028a.dtsi with linux

2021-10-13 Thread Michael Walle
Now that everything is prepared, copy the fsl-ls1028a.dtsi from the linux kernel v5.14.12. Notable changes: - second watchdog added - the number of chip selects of the SPI controller is now correct and reflects what the hardware offers - the LPUARTs have the correct clock parent - USB

[PATCH v5 26/28] arm: dts: ls1028a: disable the PCIe controller by default

2021-10-13 Thread Michael Walle
Disable the PCIe controllers by default, just like in the linux device tree. But there is one catch, for linux they are enabled in-place by the bootloader. Obviously, this doesn't work for the bootloader. Thus we explicitly enable the controllers in the -u-boot.dtsi files. Signed-off-by: Michael

[PATCH v5 18/28] spi: fsl_dspi: add new compatible fsl, ls1021a-v1.0-dspi

2021-10-13 Thread Michael Walle
The official ls1028a binding of the driver uses the following as compatibles: compatible = "fsl,ls1028a-dspi", "fsl,ls1021a-v1.0-dspi"; Add the missing compatible to the driver and update the device tree. We can use the fallback "fsl,ls1021a-v1.0-dspi", because the endianness is determined by

[PATCH v5 15/28] arm: dts: ls1028a: move the iRC node and its devices into /soc

2021-10-13 Thread Michael Walle
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. While at it fix the indentation. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- arch/arm/dts/fsl-ls1028a.dtsi | 202

[PATCH v5 28/28] arm: dts: sl28: sync dtbs

2021-10-13 Thread Michael Walle
Copy the board device tree files from linux v5.14. On top of the v5.14 dtbs the changes of these two patches are included here which are needed for u-boot: https://lore.kernel.org/linux-devicetree/20210831134013.1625527-7-mich...@walle.cc/

[PATCH v5 23/28] pci: layerscape: add official ls1028a binding support

2021-10-13 Thread Michael Walle
The official bindind of the PCIe controller of the ls1028a has the following compatible string: compatible = "fsl,ls1028a-pcie"; Additionally, the resource names and count are different. Update the driver to support this binding and change the entry in the ls1028a device tree. Cc: Hou Zhiqiang

[PATCH v5 14/28] arm: dts: ls1028a: move the watchdog node into /soc

2021-10-13 Thread Michael Walle
While inserting it into the new location, keep it sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- arch/arm/dts/fsl-ls1028a.dtsi | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

[PATCH v5 24/28] arm: dts: ls1028a: remove num-lanes in the PCIe controller nodes

2021-10-13 Thread Michael Walle
This property is unused in the layerscape PCIe controller driver and not present in the linux device tree. Remove it to be similarly. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- arch/arm/dts/fsl-ls1028a.dtsi | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH v5 25/28] arm: dts: ls1028a: move the PCI I/O window to match

2021-10-13 Thread Michael Walle
To make the synchronization of the u-boot device tree with the one from linux easier, move the I/O window to the one which is specified in the linux device tree. The actual value shouldn't matter as long as it mapped to the corresponding memory window of the PCIe controller which is a 32GiB window

[PATCH v5 21/28] scsi: ceva: rename the resource name to match the linux kernel one

2021-10-13 Thread Michael Walle
The driver will look for a named resource "ecc-addr", but this isn't the official binding. In fact, the official device tree binding documentation doesn't mention any resource names at all. But it is safe to assume that it's the linux ones we have to use if we want to be compatible with the linux

[PATCH v5 22/28] usb: xhci: fsl: add new compatible fsl,ls1028a-dwc3

2021-10-13 Thread Michael Walle
The official ls1028a binding of the driver uses the following as compatibles: compatible = "fsl,ls1028a-dwc3", "snps,dwc3"; Change the ls1028a device tree and add this new compatible to the fsl specific xhci driver, otherwise the generic dwc3 driver will be used with the compatibles above. Cc:

[PATCH v5 20/28] serial: lpuart: add new compatible fsl, ls1028a-lpuart

2021-10-13 Thread Michael Walle
The official ls1028a binding of the driver uses the following as compatibles: compatible = "fsl,ls1028a-lpuart"; Add the missing compatible to the driver and update the device tree. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- arch/arm/dts/fsl-ls1028a.dtsi | 18

[PATCH v5 17/28] watchdog: sp805_wdt: use correct compatible string

2021-10-13 Thread Michael Walle
According to the linux device tree specification the compatible string is: compatible = "arm,sp805", "arm,primecell"; Fix all users in u-boot. Signed-off-by: Michael Walle --- arch/arm/dts/fsl-ls1028a.dtsi | 2 +- arch/arm/dts/hi3660.dtsi | 4 ++-- drivers/watchdog/sp805_wdt.c | 2 +-

[PATCH v5 19/28] spi: fsl_dspi: rename num-cs to spi-num-chipselects

2021-10-13 Thread Michael Walle
The official devicetree bindings specifies spi-num-chipselects as the name. Use it. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- arch/arm/dts/fsl-ls1012a.dtsi | 2 +- arch/arm/dts/fsl-ls1028a.dtsi | 6 +++--- arch/arm/dts/fsl-ls1043a.dtsi | 4 ++--

[PATCH v5 16/28] arm: dts: ls1028a: update the labels

2021-10-13 Thread Michael Walle
Update the labels of the nodes to match the kernel ones. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean --- .../dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi | 10 +++ .../fsl-ls1028a-kontron-sl28-var1-u-boot.dtsi | 2 +-

[PATCH v5 13/28] arm: dts: ls1028a: move the PCIe controller nodes into /soc

2021-10-13 Thread Michael Walle
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. While at it fix the indentation. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- arch/arm/dts/fsl-ls1028a.dtsi | 64

[PATCH v5 12/28] arm: dts: ls1028a: move SATA and USB controller nodes into /soc

2021-10-13 Thread Michael Walle
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- arch/arm/dts/fsl-ls1028a.dtsi | 50 +-- 1 file changed, 25

[PATCH v5 10/28] arm: dts: ls1028a: move the low-power UART nodes into /soc

2021-10-13 Thread Michael Walle
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- arch/arm/dts/fsl-ls1028a.dtsi | 120 +- 1 file changed, 60

[PATCH v5 11/28] arm: dts: ls1028a: move the GPIO controller nodes into /soc

2021-10-13 Thread Michael Walle
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- arch/arm/dts/fsl-ls1028a.dtsi | 66 +-- 1 file changed, 33

[PATCH v5 08/28] arm: dts: ls1028a: move the SPI and eSDHC controller nodes into /soc

2021-10-13 Thread Michael Walle
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- arch/arm/dts/fsl-ls1028a.dtsi | 116 +- 1 file changed, 58

[PATCH v5 07/28] arm: dts: ls1028a: move the FlexSPI controller node

2021-10-13 Thread Michael Walle
While inserting it into the new location, keep it sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- arch/arm/dts/fsl-ls1028a.dtsi | 26 +- 1 file changed, 13 insertions(+), 13

[PATCH v5 09/28] arm: dts: ls1028a: move the UART controller nodes into /soc

2021-10-13 Thread Michael Walle
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- arch/arm/dts/fsl-ls1028a.dtsi | 32 1 file changed, 16

[PATCH v5 06/28] arm: dts: ls1028a: move I2C controller nodes into /soc

2021-10-13 Thread Michael Walle
While inserting them into the new location, keep them sorted by the register base offset just like in the linux kernel device tree. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- .../dts/fsl-ls1028a-qds-1xxx-sch-30842.dtsi | 2 +- .../dts/fsl-ls1028a-qds-6xxx-sch-30842.dtsi

[PATCH v5 05/28] arm: dts: ls1028a: move the clockgen node into /soc

2021-10-13 Thread Michael Walle
Populate the /soc node with the first device node. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- arch/arm/dts/fsl-ls1028a.dtsi | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/dts/fsl-ls1028a.dtsi b/arch/arm/dts/fsl-ls1028a.dtsi index

[PATCH v5 03/28] arm: dts: ls1028a-{rdb, qds}: remove dm-pre-reloc property

2021-10-13 Thread Michael Walle
Nowadays, both boards boot using the TF-A BL1/BL2 and SPL isn't used at all. The property is not needed, remove it. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean --- arch/arm/dts/fsl-ls1028a-qds.dtsi | 1 - arch/arm/dts/fsl-ls1028a-rdb.dts | 1 - 2 files changed, 2 deletions(-)

[PATCH v5 04/28] arm: dts: ls1028a: add an empty /soc

2021-10-13 Thread Michael Walle
To keep the device tree similar to the linux kernel one, we need to move all CCSR related devices into the /soc node. To keep the patches easy to review, we initially add an empty /soc node and populate it piece by piece. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean ---

[PATCH v5 02/28] arm: dts: ls1028a: remove /memory node

2021-10-13 Thread Michael Walle
This node is some hodgepodge between the ddr controller node at SoC offset 0x108 and some static memory size of 2GiB. Remove this bogus node because it doesn't seem to be used at all. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean ---

[PATCH v5 01/28] armv8: ls1028a: use the official compatible string for the GPU

2021-10-13 Thread Michael Walle
There is no "fsl,ls1028a-gpu" compatible string. It is solely for the proprietary driver which will never be open source. Lately, linux gained support for the open source etnaviv driver for the GPU (although there is still support for the DisplayPort PHY missing to get actual graphics output).

[PATCH v5 00/28] arm: dts: ls1028a: sync device tree with linux

2021-10-13 Thread Michael Walle
This series sync the device tree of the LS1028A SoC with the linux one. To ease future debugging and reviewing, we first clean up the existing one, removing bogus nodes, moving all CCSR related nodes in /soc and update the drivers to accept the offical compatible strings. This was tested on a

[PATCH v2 13/13] env: Move non-cmd specific env functions to env/common.c

2021-10-13 Thread Marek Behún
From: Marek Behún Move the following functions from cmd/nvedit.c to env/common.c: env_set_ulong() env_set_hex() env_get_hex() eth_env_get_enetaddr() eth_env_set_enetaddr() env_get() from_env() env_get_f() env_get_ulong() since these functions are not specific for U-Boot's CLI.

[PATCH v2 07/13] env: Inline env_get_char() into it's only user

2021-10-13 Thread Marek Behún
From: Marek Behún This function is a relic from the past when environment was read from underlying device one character at a time. It is used only in the case when getting an environemnt variable prior relocation, and the function is simple enough to be inlined there. Since env_get_char() is

[PATCH v2 11/13] env: Make return value of env_get_f() behave like sprintf() on success

2021-10-13 Thread Marek Behún
From: Marek Behún Currently the env_get_f() function's return value behaves weirdly: it returns the number of bytes written into `buf`, but whether this is excluding the terminating NULL-byte or including it depends on whether there was enough space in `buf`. Change the function to always

[PATCH v2 12/13] env: Use memcpy() instead of ad-hoc code to copy variable value

2021-10-13 Thread Marek Behún
From: Marek Behún Copy the value of the found variable into given buffer with memcpy() instead of ad-hoc code. Signed-off-by: Marek Behún --- cmd/nvedit.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index

[PATCH v2 10/13] env: Use better name for variable in env_get_f()

2021-10-13 Thread Marek Behún
From: Marek Behún The `nxt` variable actually points to the terminating null-byte of the current env var, and the next env var is at `nxt + 1`, not `nxt`. So a better name for this variable is `end`. Signed-off-by: Marek Behún --- cmd/nvedit.c | 8 1 file changed, 4 insertions(+), 4

[PATCH v2 08/13] env: Early return from env_get_f() on NULL name

2021-10-13 Thread Marek Behún
From: Marek Behún Test non-NULL name immediately, not in env_match(). Signed-off-by: Marek Behún --- cmd/nvedit.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 9f0caceadf..7c99a693ea 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@

[PATCH v2 09/13] env: Use string pointer instead of indexes in env_get_f()

2021-10-13 Thread Marek Behún
From: Marek Behún Since we no longer use env_get_char() to access n-th character of linearized environment data, but rather access the arrays themselves, we can convert the iteration to use string pointers instead of position indexes. Signed-off-by: Marek Behún --- cmd/nvedit.c | 34

[PATCH v2 06/13] env: Check for terminating null-byte in env_match()

2021-10-13 Thread Marek Behún
From: Marek Behún There is a possible overflow in env_match(): if environment contains a terminating null-byte before '=' character (i.e. environment is broken), the env_match() function can access data after the terminating null-byte from parameter pointer. Example: if env_get_char() returns

[PATCH v2 03/13] examples: api: glue: Remove comment that does not apply anymore

2021-10-13 Thread Marek Behún
From: Marek Behún This comment is not true since commit 6215bd4c1fd6 ("api: Use hashtable function for API_env_enum"). Signed-off-by: Marek Behún --- examples/api/glue.c | 5 - 1 file changed, 5 deletions(-) diff --git a/examples/api/glue.c b/examples/api/glue.c index

[PATCH v2 04/13] env: Change env_match() to static and remove from header

2021-10-13 Thread Marek Behún
From: Marek Behún This function was used by other parts of U-Boot in the past when environment was read from underlying device one character at a time. This is not the case anymore. Signed-off-by: Marek Behún --- cmd/nvedit.c | 30 +++--- include/env.h | 11

[PATCH v2 05/13] env: Don't match empty variable name in env_match()

2021-10-13 Thread Marek Behún
From: Marek Behún Do we really allow zero-length variable name? I guess not. Signed-off-by: Marek Behún --- cmd/nvedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 742e0924af..e2e8a38b5d 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@

[PATCH v2 02/13] env: Drop env_get_char_spec() and old, unused .get_char() implementations

2021-10-13 Thread Marek Behún
From: Marek Behún Commit b2cdef4861be ("env: restore old env_get_char() behaviour") dropped the .get_char() method from struct env_driver, but left the two existing implementations (eeprom and nvram) in case someone would use them by overwriting weak function env_get_char_spec(). Since this was

[PATCH v2 01/13] env: Fix documentation for env_get_f()

2021-10-13 Thread Marek Behún
From: Marek Behún This function actually returns: - the number of bytes written into @buf excluding the terminating NULL-byte, if there was enough space in @buf - the number of bytes written into @buf including the terminating NULL-byte, if there wasn't enough space in @buf - -1 if the

[PATCH v2 00/13] env_get_char() removal and env_get_f() refactor

2021-10-13 Thread Marek Behún
From: Marek Behún Hi Simon, Tom, env_get_char() is a relic from the past when env was read char-by-char from underlying device. Currently it only accesses in-memory arrays. We can remove it and access the arrays directly. This simplifies the old code of env_get_f(). Changes since v1: - use

Re: [PATCH v3 3/3] RFC: doc: Add documentation about devicetree usage

2021-10-13 Thread Tom Rini
[ Splitting my replies up ] On Wed, Oct 13, 2021 at 04:45:50PM +0200, François Ozog wrote: > Le mer. 13 oct. 2021 à 15:30, Tom Rini a écrit : > > > On Wed, Oct 13, 2021 at 03:12:02PM +0200, François Ozog wrote: > > > Le mer. 13 oct. 2021 à 14:55, Tom Rini a écrit : > > > > > > > On Wed, Oct 13,

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-13 Thread Luka Kovacic
> > Is anyone already working on a nvmem framework to support nvmem > > providers in U-Boot? > > AFAIK no, but I am planning to look into this. Ok. I'd be happy to assist in any way you see fit with this in my free time. > In the meantime implement the hw_info mac command. Okay. > I will send

Re: [PATCH] Bugfix in xilinx_pm_request: add handling of the NULL return payload pointer.

2021-10-13 Thread Michal Simek
Please fix subject just to be aligned with other patches. Take a look at git log drivers/firmware/firmware-zynqmp.c for inspiration. And I am missing description which says why you are doing this change. Thanks, Michal On 10/13/21 16:31, Adrian Fiergolski wrote: Signed-off-by: Adrian

Re: [PATCH 05/10] env: Check for terminating null-byte in env_match()

2021-10-13 Thread Marek Behún
On Tue, 12 Oct 2021 13:04:56 +0200 Marek Behún wrote: > - while (*s1 == env_get_char(i2++)) > + while (*s1 != '\0' && *s1 == env_get_char(i2++)) This check has to be done in the other order: while (*s1 == env_get_char(i2++) && *s1 != '\0') so that i2 gets incremented even if *s1 ==

[PATCH] dfu: handle short frame result of UPLOAD in state_dfu_idle

2021-10-13 Thread Patrick Delaunay
In DFU v1.1 specification [1] the DFU_UPLOAD (Short Frame) is handled only in dfuUPLOADIDLE state: - Figure A.1 Interface state transition diagram - the state description in chapter A.2 A.2.3 State 2 dfuIDLE on Receipt of the DFU_UPLOAD request,and bitCanUpload = 1 the Next State is

Re: [PATCH 00/16] fdt: Make OF_BOARD a boolean option

2021-10-13 Thread Simon Glass
Hi Tom, Bin,François, On Tue, 12 Oct 2021 at 19:34, Tom Rini wrote: > > On Wed, Oct 13, 2021 at 09:29:14AM +0800, Bin Meng wrote: > > Hi Simon, > > > > On Wed, Oct 13, 2021 at 9:01 AM Simon Glass wrote: > > > > > > With Ilias' efforts we have dropped OF_PRIOR_STAGE and OF_HOSTFILE so > > >

Re: [PATCH v3 3/3] RFC: doc: Add documentation about devicetree usage

2021-10-13 Thread François Ozog
Le mer. 13 oct. 2021 à 15:30, Tom Rini a écrit : > On Wed, Oct 13, 2021 at 03:12:02PM +0200, François Ozog wrote: > > Le mer. 13 oct. 2021 à 14:55, Tom Rini a écrit : > > > > > On Wed, Oct 13, 2021 at 10:15:02AM +0200, François Ozog wrote: > > > > Le sam. 18 sept. 2021 à 15:18, Tom Rini a >

Re: [PATCH 1/2] arm: mvebu: Implement the mac command (Marvell hw_info)

2021-10-13 Thread Marek Behún
On Mon, 11 Oct 2021 18:16:02 +0200 Luka Kovacic wrote: >> eth1_mac_addr: eth1addr { >> compatible = "mac-address-string"; >> name = "eth1addr"; >> }; > > I don't see any better approach than just matching strings to retrieve > values for specific keys (for

  1   2   >