Re: [PATCH v3 2/3] drivers: timer: add timer driver for ARMv7 based Tegra devices

2023-01-17 Thread Svyatoslav Ryhel
вт, 17 січ. 2023 р. о 22:30 Simon Glass пише: > > Hi Svyatoslav, > > On Tue, 17 Jan 2023 at 09:53, Svyatoslav Ryhel wrote: > > > > Add timer support for T20/T30/T114 and T124 based devices. > > Driver is based on DM, has device tree support and can be > > used on SPL and early boot stage. > > >

Re: [PATCH v3 3/3] ARM: tegra: include timer as default option

2023-01-17 Thread Svyatoslav Ryhel
вт, 17 січ. 2023 р. о 22:08 Tom Warren пише: > > Svyatoslav, > > I was able to apply the first 2 patches OK to TOT u-boot-tegra/master, but > not the this one (file offsets seem wrong). PTAL. > Thank you very much for your review. This patchset was prepared and being re-send for 3-4 month, a

Re: [PATCH 1/2] drivers: watchdog: Enhance watchdog support in SPL for Stratix 10 and Agilex

2023-01-17 Thread Stefan Roese
Hi Lim, Jit Loon, On 12/5/22 14:27, Lim, Jit Loon wrote: -Original Message- From: Stefan Roese Sent: Monday, 5 December, 2022 8:28 PM To: Lim, Jit Loon ; u-boot@lists.denx.de Cc: Jagan Teki ; Vignesh R ; Vasut, Marek ; Simon ; Chee, Tien Fong ; Hea, Kok Kiang ; Lim, Elly Siew Chin ;

Re: [EXTERNAL] Re: [PATCH 3/9] arm: dts: k3-am62-main: Add device tree node for TIDSS

2023-01-17 Thread Vignesh Raghavendra
Hi Nikhil, On 17/01/23 18:49, Tom Rini wrote: > On Tue, Jan 17, 2023 at 10:09:00AM +0530, Nikhl M Jain wrote: >> Hi, Tom >> >> On 13/01/23 20:13, Tom Rini wrote: >>> On Fri, Jan 13, 2023 at 01:59:21PM +0530, Nikhil M Jain wrote: >>> Add device tree node which includes the register

Re: [PATCH v3 0/3] eficonfig: add vertical scroll support and refactoring

2023-01-17 Thread Masahisa Kojima
Hi Heinrich, On Wed, 18 Jan 2023 at 07:03, Heinrich Schuchardt wrote: > > On 1/5/23 03:58, Masahisa Kojima wrote: > > This series aims to add the vertical scroll for the eficonfig menu. > > Before adding scroll support, this series does the refactoring > > of change boot order implementation

Re: [PATCH 3/7] usb: xhci: Implement DMA mapping

2023-01-17 Thread Marek Vasut
On 1/17/23 23:04, Mark Kettenis wrote: An XHCI controller that sits behind an IOMMU needs to map and unmap its memory buffers to do DMA. Implement this by inroducing new xhci_dma_map() and xhci_dma_unmap() helper functions. The xhci_dma_map() function replaces the existing xhci_virt_to_bus()

Re: [PATCH 7/7] usb: xhci: Fix root hub descriptor

2023-01-17 Thread Marek Vasut
On 1/17/23 23:04, Mark Kettenis wrote: When a system has multiple XHCI controllers, some of the properties described in the descriptor of the root hub (such as the number of ports) might differ between controllers. Fix this by switching from a single global hub descriptor to a hub descriptor

Re: [PATCH v8 03/10] arm_ffa: introduce Arm FF-A low-level driver

2023-01-17 Thread Rob Herring
On Tue, Jan 17, 2023 at 8:04 AM Tom Rini wrote: > > On Mon, Jan 16, 2023 at 01:23:53PM +, Abdellatif El Khlifi wrote: > > On Fri, Jan 13, 2023 at 11:00:28AM -0700, Simon Glass wrote: > > > Hi Abdellatif, > > > > > > On Fri, 13 Jan 2023 at 03:44, Abdellatif El Khlifi > > > wrote: > > > > > >

Re: [PATCH v8 03/10] arm_ffa: introduce Arm FF-A low-level driver

2023-01-17 Thread Rob Herring
On Thu, Jan 12, 2023 at 5:43 PM Simon Glass wrote: > > Hi Rob, > > On Wed, 11 Jan 2023 at 19:10, Rob Herring wrote: > > > > On Mon, Dec 19, 2022 at 1:21 PM Simon Glass wrote: > > > > > > Hi Abdellatif, > > > > > > On Mon, 19 Dec 2022 at 04:12, Abdellatif El Khlifi > > > wrote: > > > > > > > >

Re: [PATCH v2] ddr: marvell: a38x: Add support for DDR4 from Marvell mv-ddr-marvell repository

2023-01-17 Thread Tony Dinh
Hi Pali, On Tue, Jan 17, 2023 at 1:25 PM Pali Rohár wrote: > > Hello! > > On Tuesday 17 January 2023 13:02:46 Tony Dinh wrote: > > Hi Pali, > > > > On Tue, Jan 17, 2023 at 12:35 AM Pali Rohár wrote: > > > > > > Hello! Thank you for update. It is much better. > > > > > > On Monday 16 January

Re: [PATCH] ns16550: Fix DM serial operation with non-DM SPL

2023-01-17 Thread Andre Przywara
On Tue, 17 Jan 2023 17:23:57 -0500 Tom Rini wrote: > On Tue, Jan 17, 2023 at 10:15:46PM +, Andre Przywara wrote: > > On Tue, 17 Jan 2023 11:14:35 -0500 > > Tom Rini wrote: > > > > > On Tue, Jan 17, 2023 at 04:09:14PM +, Andre Przywara wrote: > > > > On Tue, 17 Jan 2023 08:15:18

Re: [PATCHv2 05/19] dm: ns16550: Restore how we define UART_REG

2023-01-17 Thread Andre Przywara
On Tue, 17 Jan 2023 17:10:50 -0500 Tom Rini wrote: > Prior to commit 9591b63531fa ("Convert CONFIG_SYS_NS16550_MEM32 et al to > Kconfig") we had defined CONFIG_SYS_NS16550_REG_SIZE to -1 with > DM_SERIAL such that we would then have a size 0 character array. This > resulted in functionally no

[PATCH 4/4] rockchip: Add sha256 hash to FIT images

2023-01-17 Thread Jonas Karlman
Add sha256 hash to FIT images when CONFIG_SPL_FIT_SIGNATURE=y. Signed-off-by: Jonas Karlman --- arch/arm/dts/rockchip-u-boot.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi index

[PATCH 3/4] binman: Add subnodes to the nodes generated by split-elf

2023-01-17 Thread Jonas Karlman
Add hash and signature nodes to generated nodes by split-elf operation. Signed-off-by: Jonas Karlman --- tools/binman/etype/fit.py | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/binman/etype/fit.py b/tools/binman/etype/fit.py index deec27bee3..fb27c8877e

[PATCH 1/4] binman: Add support for align argument to mkimage tool

2023-01-17 Thread Jonas Karlman
Add support to indicate what alignment to use for the FIT and its external data. Pass the alignment to mkimage via the -B flag. Signed-off-by: Jonas Karlman --- tools/binman/btool/mkimage.py | 5 - tools/binman/etype/fit.py | 8 2 files changed, 12 insertions(+), 1 deletion(-)

[PATCH 2/4] rockchip: Align FIT image data to SD/MMC block length

2023-01-17 Thread Jonas Karlman
SPL load FIT images by reading the data aligned to block length. Block length aligned image data is read directly to the load address. Unaligned image data is written to an offset of the load address and then the data is memcpy to the load address. This adds a small overhead of having to memcpy

[PATCH 0/4] rockchip: Align FIT images to SD/MMC block length

2023-01-17 Thread Jonas Karlman
When I was trying to run mainline U-Boot on my new Rockchip RK3568 board I discovered that one segment of vendor TF-A could not successfully be loaded into SRAM, validation of the image sha256 hash failed. The issue with loading the data turned out to be because of how SPL load FIT images. It

Re: [PATCH] ns16550: Fix DM serial operation with non-DM SPL

2023-01-17 Thread Tom Rini
On Tue, Jan 17, 2023 at 10:15:46PM +, Andre Przywara wrote: > On Tue, 17 Jan 2023 11:14:35 -0500 > Tom Rini wrote: > > > On Tue, Jan 17, 2023 at 04:09:14PM +, Andre Przywara wrote: > > > On Tue, 17 Jan 2023 08:15:18 -0500 > > > Tom Rini wrote: > > > > > > Hi Tom, > > > > > > > On

Re: [PATCH] ns16550: Fix DM serial operation with non-DM SPL

2023-01-17 Thread Andre Przywara
On Tue, 17 Jan 2023 11:14:35 -0500 Tom Rini wrote: > On Tue, Jan 17, 2023 at 04:09:14PM +, Andre Przywara wrote: > > On Tue, 17 Jan 2023 08:15:18 -0500 > > Tom Rini wrote: > > > > Hi Tom, > > > > > On Tue, Jan 17, 2023 at 12:09:38PM +, Andre Przywara wrote: > > > > > > > Commit

[PATCHv2 05/19] dm: ns16550: Restore how we define UART_REG

2023-01-17 Thread Tom Rini
Prior to commit 9591b63531fa ("Convert CONFIG_SYS_NS16550_MEM32 et al to Kconfig") we had defined CONFIG_SYS_NS16550_REG_SIZE to -1 with DM_SERIAL such that we would then have a size 0 character array. This resulted in functionally no padding. The confusion on my part came from dealing with the

[PATCH 7/7] usb: xhci: Fix root hub descriptor

2023-01-17 Thread Mark Kettenis
When a system has multiple XHCI controllers, some of the properties described in the descriptor of the root hub (such as the number of ports) might differ between controllers. Fix this by switching from a single global hub descriptor to a hub descriptor per controller. Signed-off-by: Mark

[PATCH 5/7] pci: Add Apple PCIe controller driver

2023-01-17 Thread Mark Kettenis
This driver supports the PCIe controller on the Apple M1 and M2 SoCs. The code is adapted from the Linux driver. Signed-off-by: Mark Kettenis --- MAINTAINERS | 1 + arch/arm/Kconfig | 2 + drivers/pci/Kconfig | 9 + drivers/pci/Makefile | 1 +

[PATCH 6/7] arm: apple: Enable PCIe USB controller

2023-01-17 Thread Mark Kettenis
Some Apple Silicon machines have a PCIe XHCI controller in additon to the DWC3 controllers integrated on the SoC. On the Mac mini the Type-A ports are handled by this PCIe controller. Enabling it allows the use of these ports in U-Boot. Signed-off-by: Mark Kettenis ---

[PATCH 4/7] iommu: Implement mapping IOMMUs for PCI devices

2023-01-17 Thread Mark Kettenis
Systems such as Apple's M1 and M2 SoCs may have separate IOMMUs for each PCIe root port. In this case the right IOMMU for a PCI device behind a particular root port is described by an "iommu-map" property in the device tree. Parse this property and use it to find the right IOMMU device for PCI

[PATCH 3/7] usb: xhci: Implement DMA mapping

2023-01-17 Thread Mark Kettenis
An XHCI controller that sits behind an IOMMU needs to map and unmap its memory buffers to do DMA. Implement this by inroducing new xhci_dma_map() and xhci_dma_unmap() helper functions. The xhci_dma_map() function replaces the existing xhci_virt_to_bus() function in the sense that it returns the

[PATCH 2/7] iommu: apple: Implement DMA mapping operations for Apple DART

2023-01-17 Thread Mark Kettenis
Implement translation table support for all the variations of Apple's DART IOMMU that can be found on Apple's M1 and M2 SoCs. Signed-off-by: Mark Kettenis --- drivers/iommu/apple_dart.c | 311 + 1 file changed, 277 insertions(+), 34 deletions(-) diff --git

[PATCH 1/7] iommu: Add DMA mapping operations

2023-01-17 Thread Mark Kettenis
In order to support IOMMUs in non-bypass mode we need device ops to map and unmap DMA memory. The map operation enters a mapping for a region specified by CPU address and size into the translation table of the IOMMU and returns a DMA address suitable for programming the device to do DMA. The

[PATCH 0/7] Apple PCIe/XHCI support

2023-01-17 Thread Mark Kettenis
This series adds support for the PCIe controller found on Apple M1 and M2 machines and enables support for PCIe XHCI controllers. This makes the type-A USB ports on the M1 Mac mini work. Since the use of Apples DART IOMMU is mandatory (these PCIe DARTs don't support bypass mode), this adds DMA

Re: [PATCH v3 0/3] eficonfig: add vertical scroll support and refactoring

2023-01-17 Thread Heinrich Schuchardt
On 1/5/23 03:58, Masahisa Kojima wrote: This series aims to add the vertical scroll for the eficonfig menu. Before adding scroll support, this series does the refactoring of change boot order implementation since it has own menu handling and it should be removed to improve maintenanceability.

Re: [PATCH 1/1] doc: man-page for bdinfo

2023-01-17 Thread Heinrich Schuchardt
On 1/17/23 21:30, Simon Glass wrote: On Sun, 15 Jan 2023 at 05:00, Heinrich Schuchardt wrote: Provide a man-page for the bdinfo command Signed-off-by: Heinrich Schuchardt --- doc/usage/cmd/bdinfo.rst | 119 +++ doc/usage/index.rst | 1 + 2

Re: [PATCH v2] ddr: marvell: a38x: Add support for DDR4 from Marvell mv-ddr-marvell repository

2023-01-17 Thread Pali Rohár
Hello! On Tuesday 17 January 2023 13:02:46 Tony Dinh wrote: > Hi Pali, > > On Tue, Jan 17, 2023 at 12:35 AM Pali Rohár wrote: > > > > Hello! Thank you for update. It is much better. > > > > On Monday 16 January 2023 21:34:39 Tony Dinh wrote: > > > This syncs drivers/ddr/marvell/a38x/ with

Re: [PATCH 1/1] doc: man-page for blkcache

2023-01-17 Thread Heinrich Schuchardt
On 1/17/23 21:30, Simon Glass wrote: On Sun, 15 Jan 2023 at 03:38, Heinrich Schuchardt wrote: Provide a man-page for the blkcache command. Signed-off-by: Heinrich Schuchardt --- doc/usage/cmd/blkcache.rst | 74 ++ doc/usage/index.rst| 1 +

Re: [PATCH v2] ddr: marvell: a38x: Add support for DDR4 from Marvell mv-ddr-marvell repository

2023-01-17 Thread Tony Dinh
Hi Pali, On Tue, Jan 17, 2023 at 12:35 AM Pali Rohár wrote: > > Hello! Thank you for update. It is much better. > > On Monday 16 January 2023 21:34:39 Tony Dinh wrote: > > This syncs drivers/ddr/marvell/a38x/ with the master branch of > > repository > >

Re: U-Boot: extlinux.conf boot menu support appears to be broken by commit 739e8361f3fe78038251216df6096a32bc2d5839

2023-01-17 Thread Karsten Merker
On Tue, Jan 17, 2023 at 09:39:09AM +0100 Manuel Traut wrote: > Can you test with the attached patch? [...] > From: Manuel Traut > Date: Tue, 17 Jan 2023 09:30:27 +0100 > Subject: [PATCH] menu: Ignore prompt variable if timeout is != 0 > > Since 739e8361f3fe78038251216df6096a32bc2d5839, a system

Re: [PATCH 1/1] doc: man-page for bdinfo

2023-01-17 Thread Simon Glass
On Sun, 15 Jan 2023 at 05:00, Heinrich Schuchardt wrote: > > Provide a man-page for the bdinfo command > > Signed-off-by: Heinrich Schuchardt > --- > doc/usage/cmd/bdinfo.rst | 119 +++ > doc/usage/index.rst | 1 + > 2 files changed, 120 insertions(+)

Re: [PATCH 1/1] doc: man-page for blkcache

2023-01-17 Thread Simon Glass
On Sun, 15 Jan 2023 at 03:38, Heinrich Schuchardt wrote: > > Provide a man-page for the blkcache command. > > Signed-off-by: Heinrich Schuchardt > --- > doc/usage/cmd/blkcache.rst | 74 ++ > doc/usage/index.rst| 1 + > 2 files changed, 75

Re: [PATCH] cmd: event: Remove additional event description

2023-01-17 Thread Simon Glass
On Tue, 17 Jan 2023 at 03:44, Michal Simek wrote: > > The first name is taken from command name that's why shouldn't be listed in > help. The similar change was also done by commit a84d3b6c5634 ("cmd: pwm: > Remove additional pwm description"). > Also remove additional spaces in help message. > >

Re: [PATCH v3 2/3] drivers: timer: add timer driver for ARMv7 based Tegra devices

2023-01-17 Thread Simon Glass
Hi Svyatoslav, On Tue, 17 Jan 2023 at 09:53, Svyatoslav Ryhel wrote: > > Add timer support for T20/T30/T114 and T124 based devices. > Driver is based on DM, has device tree support and can be > used on SPL and early boot stage. > > Tested-by: Andreas Westman Dorcsak # ASUS TF600T T30 >

Re: [PATCH v3 1/3] ARM: tegra: remap clock_osc_freq for all Tegra family

2023-01-17 Thread Simon Glass
On Tue, 17 Jan 2023 at 09:53, Svyatoslav Ryhel wrote: > > Enum clock_osc_freq was designed to use only with T20. > This patch remaps it to use additional frequencies, added in > T30+ SoC while maintaining backwards compatibility with T20. > > Tested-by: Andreas Westman Dorcsak # ASUS TF600T T30

Re: [PATCH v1 1/2] rockchip: configs: mk808: change CONFIG_TPL_TEXT_BASE

2023-01-17 Thread Simon Glass
On Mon, 16 Jan 2023 at 11:34, Johan Jonker wrote: > > Currently the Rockchip rk3066a u-boot-tpl.bin file needs > to add the characters "RK30", while the other SoCs replace > the first 4 bytes. Bring this in line with the rest by > lowering CONFIG_TPL_TEXT_BASE and update rockchip.rst >

Re: [PATCH v3 3/3] ARM: tegra: include timer as default option

2023-01-17 Thread Simon Glass
On Tue, 17 Jan 2023 at 09:53, Svyatoslav Ryhel wrote: > > Enable TIMER as default option for add Tegra devices and > enable TEGRA_TIMER for TEGRA_ARMV7_COMMON. Additionally > enable SPL_TIMER if build as SPL part and drop deprecated > configs from common header. > > Signed-off-by: Svyatoslav

RE: [PATCH v3 3/3] ARM: tegra: include timer as default option

2023-01-17 Thread Tom Warren
Svyatoslav, I was able to apply the first 2 patches OK to TOT u-boot-tegra/master, but not the this one (file offsets seem wrong). PTAL. I also would like someone who's using or has used T20/T30 lately to take a look, as I haven't had any interaction with those boards or builds for years, and

Re: [PATCH v1] arm: dts: rockchip: sync rk3066/rk3188 DT files from linux-next v6.2-rc4

2023-01-17 Thread Johan Jonker
On 1/17/23 18:27, John Keeping wrote: > Hi Quentin, > > On Tue, Jan 17, 2023 at 04:58:54PM +0100, Quentin Schulz wrote: >> On 1/17/23 16:20, John Keeping wrote: >>> Hi Johan, >>> >>> On Tue, Jan 17, 2023 at 03:44:07PM +0100, Johan Jonker wrote: On 1/17/23 10:46, Quentin Schulz wrote:

Re: [PATCH] rockchip: derive GPIO bank from alias if available

2023-01-17 Thread Johan Jonker
On 1/17/23 19:15, John Keeping wrote: > Upstream device trees now use standard node names like "gpio@ff..." but > the rk_gpio driver expects a name like "gpio0@ff..." (note the index > before the @). > > This is not a change that can be made in a -u-boot.dtsi file, so > updating to the latest

Re: [PATCH v4 1/2] dts: imx8mp: assign binman_configuration label to config-SEQ

2023-01-17 Thread Fabio Estevam
On Tue, Jan 17, 2023 at 4:15 PM Ying-Chun Liu (PaulLiu) wrote: > > assign a label for config-SEQ so that the board dts can modify > the configuration more easily. > > Signed-off-by: Ying-Chun Liu (PaulLiu) > Cc: Stefano Babic > Cc: Fabio Estevam > Cc: NXP i.MX U-Boot Team Reviewed-by: Fabio

Re: [PATCH v4 2/2] dts: imx8mp-rsb3720: modify configrations to load fip into memory

2023-01-17 Thread Fabio Estevam
On Tue, Jan 17, 2023 at 4:15 PM Ying-Chun Liu (PaulLiu) wrote: > > The changes of commit 6a21c695213b ("arm: dts: imx8mp: add of-list > support to common imx8mp-u-boot.dtsi") breaks the loading of the fip. > This commit fixes the break by modify the configuration properly. > > Signed-off-by:

[PATCH v4 2/2] dts: imx8mp-rsb3720: modify configrations to load fip into memory

2023-01-17 Thread Ying-Chun Liu (PaulLiu)
The changes of commit 6a21c695213b ("arm: dts: imx8mp: add of-list support to common imx8mp-u-boot.dtsi") breaks the loading of the fip. This commit fixes the break by modify the configuration properly. Signed-off-by: Ying-Chun Liu (PaulLiu) Cc: Stefano Babic Cc: Fabio Estevam Cc: NXP i.MX

[PATCH v4 1/2] dts: imx8mp: assign binman_configuration label to config-SEQ

2023-01-17 Thread Ying-Chun Liu (PaulLiu)
assign a label for config-SEQ so that the board dts can modify the configuration more easily. Signed-off-by: Ying-Chun Liu (PaulLiu) Cc: Stefano Babic Cc: Fabio Estevam Cc: NXP i.MX U-Boot Team --- v2: just rebase to the latest master branch. v3: rebase to the latest master branch. v4: fix

[PATCH v4 0/2] dts: imx8mp-rsb3720: modify configrations to load fip into memory

2023-01-17 Thread Ying-Chun Liu (PaulLiu)
The changes of commit 6a21c695213b ("arm: dts: imx8mp: add of-list support to common imx8mp-u-boot.dtsi") breaks the loading of the fip. This commit fixes the break by modify the configuration properly. v2: just rebase to the latest master branch. v3: rebase to the latest master branch. v4: fix

Re: [PATCH v3] console: usb: kbd: Limit poll frequency to improve performance

2023-01-17 Thread Michal Suchánek
Hello, On Sat, Dec 17, 2022 at 01:49:47PM +0100, Filip Žaludek wrote: > > > Hello, > change seems to be unfriendly to RPi3B+, it allows to enter 'U-Boot>' shell > but usb keyboard > does not respond. Keyboard is detected by 'usb info' in v2023.01-rc3, not in > v2022.10. > When reverted, usb

Re: [PATCH v3 1/2] dts: imx8mp: assign binman_configuration node name to config-SEQ

2023-01-17 Thread Fabio Estevam
Hi Paul, On Tue, Jan 17, 2023 at 3:26 PM Ying-Chun Liu (PaulLiu) wrote: > > assign a node name for config-SEQ so that the board dts can modify > the configuration more easily. Actually, what you are adding is a label, not a node name. Please change the Subject and commit log accordingly.

[PATCH v3 2/2] dts: imx8mp-rsb3720: modify configrations to load fip into memory

2023-01-17 Thread Ying-Chun Liu (PaulLiu)
The changes of commit 6a21c695213b ("arm: dts: imx8mp: add of-list support to common imx8mp-u-boot.dtsi") breaks the loading of the fip. This commit fixes the break by modify the configuration properly. Signed-off-by: Ying-Chun Liu (PaulLiu) Cc: Stefano Babic Cc: Fabio Estevam Cc: NXP i.MX

[PATCH v3 1/2] dts: imx8mp: assign binman_configuration node name to config-SEQ

2023-01-17 Thread Ying-Chun Liu (PaulLiu)
assign a node name for config-SEQ so that the board dts can modify the configuration more easily. Signed-off-by: Ying-Chun Liu (PaulLiu) Cc: Stefano Babic Cc: Fabio Estevam Cc: NXP i.MX U-Boot Team --- v2: just rebase to the latest master branch. v3: rebase to the latest master branch. ---

[PATCH v3 0/2] dts: imx8mp-rsb3720: modify configrations to load fip into memory

2023-01-17 Thread Ying-Chun Liu (PaulLiu)
The changes of commit 6a21c695213b ("arm: dts: imx8mp: add of-list support to common imx8mp-u-boot.dtsi") breaks the loading of the fip. This commit fixes the break by modify the configuration properly. v2: just rebase to the latest master branch. v3: rebase to the latest master branch.

[PATCH] rockchip: derive GPIO bank from alias if available

2023-01-17 Thread John Keeping
Upstream device trees now use standard node names like "gpio@ff..." but the rk_gpio driver expects a name like "gpio0@ff..." (note the index before the @). This is not a change that can be made in a -u-boot.dtsi file, so updating to the latest upstream device trees requires updating the driver.

[PATCH v3 39/70] virtio: Fix returning -ENODEV

2023-01-17 Thread Simon Glass
This has a special meaning in driver model. There is clearly a device, so it does not make sense to return this error code. Fix it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/virtio/virtio-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 45/70] bootstd: Allow reading an EFI file from the network

2023-01-17 Thread Simon Glass
At present this bootmeth only supports reading from a filesystem. Add support for reading from a network also, using DHCP with autoload. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootmeth_efi.c | 117 +--- 1 file changed, 109

[PATCH v3 44/70] bootstd: Rename bootdev checkers

2023-01-17 Thread Simon Glass
These functions return 0 if the check passes, so the names are somewhat confusing. Rename them. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootflow.c | 6 +++--- boot/bootmeth_distro.c | 2 +- boot/bootmeth_efi.c | 2 +- boot/bootmeth_efi_mgr.c | 2 +-

[PATCH v3 29/70] net: Add a function to run dhcp

2023-01-17 Thread Simon Glass
At present this must be done by executing the command. Also it involves fiddling with the environment to determine the correct autoload behaviour. Ideally it should be possible to run network operations without even having the command line present (CONFIG_CMDLINE). For now, add a function to

[PATCH v3 35/70] bootstd: Add a SCSI bootdev

2023-01-17 Thread Simon Glass
Add a bootdev for SCSI so that these devices can be used with standard boot. Signed-off-by: Simon Glass --- (no changes since v1) drivers/scsi/Makefile | 7 + drivers/scsi/scsi.c | 7 - drivers/scsi/scsi_bootdev.c | 62 +

[PATCH v3 26/70] test: Add a generic function to skip delays

2023-01-17 Thread Simon Glass
At present this feature is sandbox-specific. For running tests on boards, we need a nop version. Add one. Signed-off-by: Simon Glass --- (no changes since v1) include/test/test.h | 16 1 file changed, 16 insertions(+) diff --git a/include/test/test.h b/include/test/test.h

[PATCH v3 27/70] bootstd: Add a USB hunter

2023-01-17 Thread Simon Glass
Add a hunter for USB which enumerates the bus to find new bootdevs. Update the tests and speed up bootdev_test_prio() while we are here, by dropping the USB delays. Signed-off-by: Simon Glass --- (no changes since v1) drivers/usb/host/usb_bootdev.c | 12 test/boot/bootdev.c

[PATCH v3 63/70] bootstd: Add a hunter for the extension feature

2023-01-17 Thread Simon Glass
This needs to run before any bootdev is used, so add a hunter for it. Signed-off-by: Simon Glass --- (no changes since v1) cmd/extension_board.c | 25 + test/boot/bootdev.c| 37 +++-- test/boot/bootflow.c | 20

[PATCH v3 69/70] bootstd: Update documentation for new features

2023-01-17 Thread Simon Glass
Document the hunters and the new way that iteration works. Signed-off-by: Simon Glass --- (no changes since v1) doc/develop/bootstd.rst | 219 +- doc/develop/driver-model/nvme.rst | 2 +- doc/usage/cmd/bootdev.rst | 48 ++-

[PATCH v3 68/70] bootstd: Add a little more logging of bootflows

2023-01-17 Thread Simon Glass
Add some logging to aid debugging of problems with bootflows. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootdev-uclass.c | 1 + boot/bootflow.c | 4 2 files changed, 5 insertions(+) diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index

[PATCH v3 70/70] rockchip: Convert rockpro64-rk3399 to use standard boot

2023-01-17 Thread Simon Glass
Drop the use of scripts and rely on standard boot for all operation. Signed-off-by: Simon Glass Reviewed-by: Kever Yang --- Changes in v3: - Rebase to -master Changes in v2: - Rebase to -next include/configs/rk3399_common.h | 5 + include/configs/rockchip-common.h | 2 ++ 2 files

[PATCH v3 67/70] bootstd: Record the bootdevs used during scanning

2023-01-17 Thread Simon Glass
Add a way to record the bootdevs used when scanning for bootflows. This is useful for testing. Enable this only with BOOTSTD_FULL and do the same for the progress reporting. Re-enable and update the affected tests now that we have this feature. For bootdev_test_order_default() there is

[PATCH v3 66/70] bootstd: Drop the old bootflow_scan_first()

2023-01-17 Thread Simon Glass
This function is not used outside tests. Drop it and rename bootflow_scan_dev() since it is how we start a scan now. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootflow.c | 18 +++--- cmd/bootflow.c | 2 +- include/bootflow.h | 23

[PATCH v3 64/70] bootstd: Switch bootdev scanning to use labels

2023-01-17 Thread Simon Glass
At present we set up the bootdev order at the start, then scan the bootdevs one by one. However this approach cannot be used with hunters, since the bootdevs may not exist until the hunter is used. Nor can we just run all the hunters at the start, since that violate's U-Boot's 'lazy init'

[PATCH v3 65/70] bootstd: Allow scanning a single bootdev label

2023-01-17 Thread Simon Glass
We want to support scanning a single label, like 'mmc' or 'usb0'. Add this feature by plumbing the label through to the iterator, setting a flag to indicate that only siblings of the initial device should be used. This means that scanning a bootdev by its name is not supported anymore. That

[PATCH v3 62/70] extension: Refactor to allow non-command usage

2023-01-17 Thread Simon Glass
The current extension code is designed to be used from commands. We want to add a boot driver which uses it. To help with this, split the code into the command processing and a function which actually does the scan. Really the extension code should be in common/ or use driver model, but this is a

[PATCH v3 61/70] bootstd: Allow iterating to the next bootdev priortiy

2023-01-17 Thread Simon Glass
Add a function which moves to the next priority to be processed. This works by storing the current priority in the bootflow iterator. The logic to set this up is included in a subsequent commit. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootdev-uclass.c | 64

[PATCH v3 34/70] scsi: Remove all children of SCSI devices before rescanning

2023-01-17 Thread Simon Glass
At present this only unbinds block devices of a certain type. But SCSI device can have different types of children, including bootdevs. Unbind all children so tht everything is clean and ready for a new scan. Signed-off-by: Simon Glass --- (no changes since v1) drivers/scsi/scsi.c | 15

[PATCH v3 60/70] bootstd: Allow iterating to the next label in a list

2023-01-17 Thread Simon Glass
Add a function which moves to the next label in a list of labels. This allows processing the boot_targets environment variable. This works using a new label list in the bootflow iterator. The logic to set this up is included in a subsequent commit. Signed-off-by: Simon Glass --- (no changes

[PATCH v3 59/70] bootstd: Allow hunting for a bootdev by label

2023-01-17 Thread Simon Glass
Add a function to hunt for a bootdev label and find the bootdev produced by the hunter (or already present). Add a few extra flags so that we can distinguish between "mmc1", "mmc" and "1" which all need to be handled differently. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v3 58/70] bootstd: Add a new pre-scan priority for bootdevs

2023-01-17 Thread Simon Glass
We need extensions to be set up before we start trying to boot any of the bootdevs. Add a new priority before all the others for tht sort of thing. Also add a 'none' option, so that the first one is not 0. While we are here, comment enum bootdev_prio_t fully and expand the test for the 'bootdev

[PATCH v3 33/70] scsi: Correct allocation of block-device name

2023-01-17 Thread Simon Glass
This should be allocated so that it does not go out of scope. Fix this and set the log category while we are here. Signed-off-by: Simon Glass --- (no changes since v1) drivers/scsi/scsi.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi.c

[PATCH v3 53/70] bootstd: Add a SPI flash bootdev

2023-01-17 Thread Simon Glass
Add a bootdev for SPI flash so that these devices can be used with standard boot. It only supports loading a script. Add a special case for the label, since we want to use "spi", not "spi_flash". Enable the new bootdev on sandbox. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v3 52/70] sandbox: Allow SPI flash bootdevs to be disabled for tests

2023-01-17 Thread Simon Glass
Most tests don't want these and they can create a lot of noise. Add a way to disable them. Use that in tests, with a flag provided to enable them for tests that need this feature. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/cpu/state.c | 14 ++

[PATCH v3 55/70] bootstd: Treat DHCP and PXE as bootdev labels

2023-01-17 Thread Simon Glass
These are associated with the ethernet boot device but do not match its uclass name, so handle them as special cases. Provide a way to pass flags through with the bootdev so that we know how to process it. The flags are checked by the bootmeths, to ensure that only the selected bootmeth is used.

[PATCH v3 54/70] bootstd: Support reading a script from network or SPI flash

2023-01-17 Thread Simon Glass
At present this bootmeth only supports a block device and the sandbox host filesystem. Add support for obtaining the script from a network device. Also implement the set_bootflow() method so that it is easy for other bootdevs (such as enabling SPI flash to support scripts). Signed-off-by: Simon

[PATCH v3 56/70] bootstd: Use hunters when scanning for bootflows

2023-01-17 Thread Simon Glass
Add a flag to control whether hunters are used when scanning for bootflows. Enable it by default and tidy up the flag comments a little. Fow now this has no effect, until a future patch enables this feature. Signed-off-by: Simon Glass --- (no changes since v1) cmd/bootflow.c | 5 -

[PATCH v3 57/70] bootstd: Allow hunting for bootdevs of a given priority

2023-01-17 Thread Simon Glass
Add a way to run the hunter function for a particular priority, so that new bootdevs can be found. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootdev-uclass.c | 25 + include/bootdev.h | 11 +++ test/boot/bootdev.c | 25

[PATCH v3 43/70] ata: Don't try to use non-existent ports

2023-01-17 Thread Simon Glass
The controller indicates the number of ports but also has a port map which specifies which ports are actually valid. Make use of this to avoid trying to send commands to an invalid port. This avoids a crash on some controllers. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v3 38/70] virtio: Avoid repeating a long expression

2023-01-17 Thread Simon Glass
Use a local variable to hold this name, to reduce the amount of code that needs to be read. Signed-off-by: Simon Glass --- (no changes since v1) drivers/virtio/virtio-uclass.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/virtio/virtio-uclass.c

[PATCH v3 50/70] bootstd: Move label parsing into its own function

2023-01-17 Thread Simon Glass
This is complicated enough to merit its own function, particularly as we are about to add to it. Create a new label_to_uclass() function to decode a label. Also update the code to ignore an empty label or one consisting of just a number. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v3 46/70] bootstd: Include the device tree in the bootflow

2023-01-17 Thread Simon Glass
Some bootmeths provide a way to load a device tree as well as the base OS image. Add a way to store this in the bootflow. Update the 'bootflow info' command to show this information. Note that the device tree is not allocated, but instead is stored at an address provided by an environment

[PATCH v3 47/70] bootstd: Support reading the device tree with EFI

2023-01-17 Thread Simon Glass
With EFI booting the device tree is required but is not actually specified in any way. The normal method is to use a fdtfile environment variable to get the filename, then look for that file on the media. Implement this in the bootmeth. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v3 37/70] bootstd: Add an NVMe bootdev

2023-01-17 Thread Simon Glass
Add a bootdev for NVMe so that these devices can be used with standard boot. Signed-off-by: Simon Glass --- (no changes since v1) drivers/nvme/nvme-uclass.c | 54 ++ drivers/nvme/nvme.c| 5 test/boot/bootdev.c| 15 ++- 3 files

[PATCH v3 40/70] virtio: Avoid strange behaviour on removal

2023-01-17 Thread Simon Glass
This device does a check on removal which is better handled in the actual test. Move it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/virtio/virtio_sandbox.c | 13 - test/dm/virtio_device.c | 3 +++ 2 files changed, 3 insertions(+), 13 deletions(-) diff

[PATCH v3 42/70] bootstd: Add a virtio bootdev

2023-01-17 Thread Simon Glass
Add a bootdev for virtio so that these devices can be used with standard boot. Signed-off-by: Simon Glass --- (no changes since v1) drivers/virtio/virtio-uclass.c | 50 ++ test/boot/bootdev.c| 12 2 files changed, 57 insertions(+), 5

[PATCH v3 49/70] bootstd: Update docs on bootmeth_try_file() for sandbox

2023-01-17 Thread Simon Glass
Mention that this function is also used with a NULL block devices to access files on the host, when using sandbox. Update the comment on struct bootflow also. Signed-off-by: Simon Glass --- (no changes since v1) include/bootflow.h | 2 +- include/bootmeth.h | 2 +- 2 files changed, 2

[PATCH v3 51/70] bootstd: Add a new bootmeth method to set the bootflow

2023-01-17 Thread Simon Glass
Normally the bootmeth driver reads the bootflow from the bootdev, since it knows the correct way to do it. However it is easier for some bootdevs to handle this themselves. For example, reading from SPI flash is quite different from other devices. Add a way for the bootdev to pass a bootflow to

[PATCH v3 48/70] bootstd: Set the distro_bootpart env var with scripts

2023-01-17 Thread Simon Glass
This environment variable is supposed to be set so that the script knows which partition holds the script. Set it before invoking the script. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootmeth_script.c | 3 +++ include/bootflow.h | 3 +++ 2 files changed, 6 insertions(+)

[PATCH v3 41/70] virtio: Add a block device

2023-01-17 Thread Simon Glass
The test code for virtio is fairly simplistic and does not actually create a block device. Add a way to specify the device type in the device tree. Add a block device so that we can do more testing. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/dts/test.dts | 6

[PATCH v3 36/70] bootstd: Add an IDE bootdev

2023-01-17 Thread Simon Glass
Add a bootdev for IDE so that these devices can be used with standard boot. Signed-off-by: Simon Glass --- (no changes since v1) configs/sandbox_flattree_defconfig | 8 ++ drivers/block/ide.c| 44 ++ test/boot/bootdev.c| 16

[PATCH v3 32/70] bootstd: Only scan bootable partitions

2023-01-17 Thread Simon Glass
At present all partitions are scanned, whether marked bootable or not. Use only bootable partitions, defaulting to partition 1 if none is found. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootdev-uclass.c | 10 +- include/bootflow.h| 2 ++ test/boot/bootdev.c |

[PATCH v3 30/70] bootstd: Add a hunter for ethernet

2023-01-17 Thread Simon Glass
Sometimes ethernet devices are attached to PCI. Since it is quick to scan, add this into the ethernet hunter. Run dhcp to establish the network connection. Drop this from the bootdev since that is not needed now. Update a log message for clarity. Signed-off-by: Simon Glass --- (no changes

[PATCH v3 31/70] part: Add a function to find the first bootable partition

2023-01-17 Thread Simon Glass
If a disk has a bootable partition we are expected to use it to locate the boot files. Add a function to find it. To test this, update mmc1 to have two paritions, fixing up other tests accordingly. Signed-off-by: Simon Glass --- (no changes since v1) disk/part.c | 16

[PATCH v3 23/70] bootstd: Add the concept of a bootdev hunter

2023-01-17 Thread Simon Glass
Some bootdevs must be enumerated before they appear. For example, USB bootdevs are not visible until USB is enumerated. With standard boot this needs to happen automatically, since we only want to enumerate a bus if it is needed. Add a way to define bootdev 'hunters' which can be used to hunt

  1   2   >