platform/kernel/u-boot.git
2 years agomips: octeon: ebb7304: Enable ethernet support
Stefan Roese [Thu, 7 Apr 2022 07:11:53 +0000 (09:11 +0200)]
mips: octeon: ebb7304: Enable ethernet support

This patch enables the Kconfig symbols needed for full ethernet support
on the EBB7304. Also the PHY autonegotiation timeout is increased, as
the default 5 seconds are sometime a bit short. With this, ethernet can
be used on this board. Here an example of a tftp load:

=> tftp ffffffff81000000 big
ethernet-mac-nexus@11800e0000000 Waiting for PHY auto negotiation to complete....... done
Using ethernet-mac-nexus@11800e0000000 device
TFTP from server 192.168.1.5; our IP address is 192.168.1.243
Filename 'big'.
Load address: 0xffffffff81000000
Loading: ##################################################  10 MiB
         13.2 MiB/s
done
Bytes transferred = 10485760 (a00000 hex)

Signed-off-by: Stefan Roese <sr@denx.de>
2 years agonet: Add ethernet support for MIPS Octeon
Stefan Roese [Thu, 7 Apr 2022 07:11:52 +0000 (09:11 +0200)]
net: Add ethernet support for MIPS Octeon

This patchs adds the ethernet & MDIO driver for the MIPS Octeon II / III
SoC platform. Please note that these drivers are based on the 2013
U-Boot version from Marvell and make use of the platform supported
helper functions for the ethernet functionality, including stuff like
SFP handling.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2 years agomips: octeon: mrvl, octeon-nic23.dts: Add ethernet DT support
Stefan Roese [Thu, 7 Apr 2022 07:11:51 +0000 (09:11 +0200)]
mips: octeon: mrvl, octeon-nic23.dts: Add ethernet DT support

Add the Octeon ethernet (BGX) and SFP DT nodes to the NIC23 dts file to
enable ethernet support on this board.

Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: mrvl, octeon-ebb7304.dts: Add ethernet DT support
Stefan Roese [Thu, 7 Apr 2022 07:11:50 +0000 (09:11 +0200)]
mips: octeon: mrvl, octeon-ebb7304.dts: Add ethernet DT support

Add the Octeon ethernet (BGX), SMI and PHY DT nodes to the EBB7304 dts
file to enable ethernet support on this board.

Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: mrvl, cn73xx.dtsi: Add ethernet (BGX) and SMI DT nodes
Stefan Roese [Thu, 7 Apr 2022 07:11:49 +0000 (09:11 +0200)]
mips: octeon: mrvl, cn73xx.dtsi: Add ethernet (BGX) and SMI DT nodes

Add the Octeon ethernet (BGX) and SMI DT node to the dtsi file.

Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: octeon_common.h: Move init SP because of increased image size
Stefan Roese [Thu, 7 Apr 2022 07:11:48 +0000 (09:11 +0200)]
mips: octeon: octeon_common.h: Move init SP because of increased image size

This patch moves CONFIG_SYS_INIT_SP_OFFSET to a higher address so that
it does not interfere with larger U-Boot images. This was noticed, while
adding network support to the EBB7304 board.

Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: cpu.c: Implement configure_lmtdma_window()
Stefan Roese [Thu, 7 Apr 2022 07:11:47 +0000 (09:11 +0200)]
mips: octeon: cpu.c: Implement configure_lmtdma_window()

Import configure_lmtdma_window from Marvell 2013 U-Boot as it's needed
for network functionality.

Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: cpu.c: Move bootmem init to arch_early_init_r()
Stefan Roese [Thu, 7 Apr 2022 07:11:46 +0000 (09:11 +0200)]
mips: octeon: cpu.c: Move bootmem init to arch_early_init_r()

Call octeon_bootmem_init() earlier in the boot process, so that this
bootmemory infrastructure is already initialized when e.g. the
networking support gets probed.

Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Makefile: Enable building of the newly added C files
Stefan Roese [Thu, 7 Apr 2022 07:11:45 +0000 (09:11 +0200)]
mips: octeon: Makefile: Enable building of the newly added C files

This patch adds the newly added C files to the Makefile to enable
compilation. This is done in a separate step, to not introduce build
breakage while adding the single files with potentially missing
externals.

Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Misc changes to existing C files for upcoming eth support
Stefan Roese [Thu, 7 Apr 2022 07:11:44 +0000 (09:11 +0200)]
mips: octeon: Misc changes to existing C files for upcoming eth support

This patch includes misc changes to already present Octeon MIPS C files
files, which are necessary for the upcoming ethernet support.

The changes are mostly:
- DM GPIO & I2C infrastructure
- Coding style cleanup while reworking of the code

Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-range.c
Aaron Williams [Thu, 6 May 2021 07:40:43 +0000 (09:40 +0200)]
mips: octeon: Add cvmx-range.c

Import cvmx-range.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-qlm-tables.c
Aaron Williams [Thu, 7 Apr 2022 07:11:42 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-qlm-tables.c

Import cvmx-qlm-tables.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-pko-internal-ports-range.c
Aaron Williams [Thu, 7 Apr 2022 07:11:41 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-pko-internal-ports-range.c

Import cvmx-pko-internal-ports-range.c from 2013 U-Boot. It will be used
by the later added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-pko3-resources.c
Aaron Williams [Thu, 7 Apr 2022 07:11:40 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-pko3-resources.c

Import cvmx-pko3-resources.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-pko3-compat.c
Aaron Williams [Thu, 7 Apr 2022 07:11:39 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-pko3-compat.c

Import cvmx-pko3-compat.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-pko3-queue.c
Aaron Williams [Thu, 6 May 2021 10:26:07 +0000 (12:26 +0200)]
mips: octeon: Add cvmx-pko3-queue.c

Import cvmx-pko3-queue.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-pko3.c
Aaron Williams [Thu, 7 Apr 2022 07:11:37 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-pko3.c

Import cvmx-pko3.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-pko.c
Aaron Williams [Thu, 7 Apr 2022 07:11:36 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-pko.c

Import cvmx-pko.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-pki-resources.c
Aaron Williams [Thu, 7 Apr 2022 07:11:35 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-pki-resources.c

Import cvmx-pki-resources.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-pki.c
Aaron Williams [Thu, 6 May 2021 06:03:04 +0000 (08:03 +0200)]
mips: octeon: Add cvmx-pki.c

Import cvmx-pki.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-ipd.c
Aaron Williams [Mon, 10 May 2021 13:15:39 +0000 (15:15 +0200)]
mips: octeon: Add cvmx-ipd.c

Import cvmx-ipd.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-ilk.c
Aaron Williams [Thu, 7 Apr 2022 07:11:32 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-ilk.c

Import cvmx-ilk.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-global-resource.c
Aaron Williams [Thu, 6 May 2021 07:17:53 +0000 (09:17 +0200)]
mips: octeon: Add cvmx-global-resource.c

Import cvmx-global-resource.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-fpa-resource.c
Aaron Williams [Mon, 10 May 2021 13:19:12 +0000 (15:19 +0200)]
mips: octeon: Add cvmx-fpa-resource.c

Import cvmx-fpa-resource.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-fpa.c
Aaron Williams [Thu, 7 Apr 2022 07:11:29 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-fpa.c

Import cvmx-fpa.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-fau-compat.c
Aaron Williams [Thu, 7 Apr 2022 07:11:28 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-fau-compat.c

Import cvmx-fau-compat.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-cmd-queue.c
Aaron Williams [Mon, 10 May 2021 11:45:15 +0000 (13:45 +0200)]
mips: octeon: Add cvmx-cmd-queue.c

Import cvmx-cmd-queue.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-agl.c
Aaron Williams [Thu, 7 Apr 2022 07:11:26 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-agl.c

Import cvmx-agl.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-xaui.c
Aaron Williams [Thu, 7 Apr 2022 07:11:25 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-helper-xaui.c

Import cvmx-helper-xaui.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-sfp.c
Aaron Williams [Thu, 6 May 2021 09:32:54 +0000 (11:32 +0200)]
mips: octeon: Add cvmx-helper-sfp.c

Import cvmx-helper-sfp.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-sgmii.c
Aaron Williams [Thu, 7 Apr 2022 07:11:23 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-helper-sgmii.c

Import cvmx-helper-sgmii.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-rgmii.c
Aaron Williams [Thu, 7 Apr 2022 07:11:22 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-helper-rgmii.c

Import cvmx-helper-rgmii.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-pko3.c
Aaron Williams [Thu, 7 Apr 2022 07:11:21 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-helper-pko3.c

Import cvmx-helper-pko3.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-pko.c
Aaron Williams [Thu, 7 Apr 2022 07:11:20 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-helper-pko.c

Import cvmx-helper-pko.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-pki.c
Aaron Williams [Thu, 7 Apr 2022 07:11:19 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-helper-pki.c

Import cvmx-helper-pki.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-npi.c
Aaron Williams [Thu, 7 Apr 2022 07:11:18 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-helper-npi.c

Import cvmx-helper-npi.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-loop.c
Aaron Williams [Thu, 7 Apr 2022 07:11:17 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-helper-loop.c

Import cvmx-helper-loop.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-ipd.c
Aaron Williams [Thu, 7 Apr 2022 07:11:16 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-helper-ipd.c

Import cvmx-helper-ipd.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-ilk.c
Aaron Williams [Thu, 7 Apr 2022 07:11:15 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-helper-ilk.c

Import cvmx-helper-ilk.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-fpa.c
Aaron Williams [Thu, 7 Apr 2022 07:11:14 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-helper-fpa.c

Import cvmx-helper-fpa.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-board.c
Aaron Williams [Thu, 7 Apr 2022 07:11:13 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-helper-board.c

Import cvmx-helper-board.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-bgx.c
Aaron Williams [Thu, 7 Apr 2022 07:11:12 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-helper-bgx.c

Import cvmx-helper-bgx.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-helper-agl.c
Aaron Williams [Thu, 7 Apr 2022 07:11:11 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-helper-agl.c

Import cvmx-helper-agl.c from 2013 U-Boot. It will be used by the later
added drivers to support networking on the MIPS Octeon II / III
platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Misc changes to existing headers for upcoming eth support
Stefan Roese [Thu, 7 Apr 2022 07:11:10 +0000 (09:11 +0200)]
mips: octeon: Misc changes to existing headers for upcoming eth support

This patch includes misc changes to already present Octeon MIPS header
files, which are necessary for the upcoming ethernet support.

The changes are mostly:
- DM GPIO & I2C infrastructure
- Coding style cleanup while reworking the headers

Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-xcv-defs.h header file
Aaron Williams [Thu, 7 Apr 2022 07:11:09 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-xcv-defs.h header file

Import cvmx-xcv-defs.h header file from 2013 U-Boot. It will be used
by the later added drivers to support networking on the MIPS Octeon II /
III platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-pcsxx-defs.h header file
Aaron Williams [Thu, 7 Apr 2022 07:11:08 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-pcsxx-defs.h header file

Import cvmx-pcsxxx-defs.h header file from 2013 U-Boot. It will be used
by the later added drivers to support networking on the MIPS Octeon II /
III platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-npei-defs.h header file
Aaron Williams [Thu, 7 Apr 2022 07:11:07 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-npei-defs.h header file

Import cvmx-npei-defs.h header file from 2013 U-Boot. It will be used
by the later added drivers to support networking on the MIPS Octeon II /
III platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-lbk-defs.h header file
Aaron Williams [Thu, 7 Apr 2022 07:11:06 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-lbk-defs.h header file

Import cvmx-lbk-defs.h header file from 2013 U-Boot. It will be used
by the later added drivers to support networking on the MIPS Octeon II /
III platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-iob-defs.h header file
Aaron Williams [Thu, 7 Apr 2022 07:11:05 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-iob-defs.h header file

Import cvmx-iob-defs.h header file from 2013 U-Boot. It will be used
by the later added drivers to support networking on the MIPS Octeon II /
III platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add cvmx-ilk-defs.h header file
Aaron Williams [Thu, 7 Apr 2022 07:11:04 +0000 (09:11 +0200)]
mips: octeon: Add cvmx-ilk-defs.h header file

Import cvmx-igl-defs.h header file from 2013 U-Boot. It will be used
by the later added drivers to support networking on the MIPS Octeon II /
III platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agomips: octeon: Add misc cvmx-* header files
Aaron Williams [Thu, 7 Apr 2022 07:11:03 +0000 (09:11 +0200)]
mips: octeon: Add misc cvmx-* header files

Import misc cvmx-helper header files from 2013 U-Boot. They will be used
by the later added drivers to support networking on the MIPS Octeon II /
III platforms.

Signed-off-by: Aaron Williams <awilliams@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2 years agoMerge branch '2022-05-03-virtio-pci-add-and-fix-consistency-checks'
Tom Rini [Tue, 3 May 2022 22:33:46 +0000 (18:33 -0400)]
Merge branch '2022-05-03-virtio-pci-add-and-fix-consistency-checks'

To quote the author:
The virtio PCI drivers forgo a number of consistency checks,
particularly around pointer validation and bounds checking. This series
focuses on the modern driver to add those checks.

The start of the series adds and fixes some basic bounds checks. Later
patches ensure PCI addresses fall within the expected regions rather
than any arbitrary address. This is acheived by introducing range
parameters to a few of the dm_pci_* functions that allow the ranges to
be checked.

The series also adds a few new configs to allow parts of virtio and PCI
to be disabled where the features may be unused and the current
implementations don't have the needed consistencty checks.

2 years agopci: Add config for Enhanced Allocation
Andrew Scull [Thu, 21 Apr 2022 16:11:16 +0000 (16:11 +0000)]
pci: Add config for Enhanced Allocation

Add a config to control whether Enhanced Allocation is supported by the
driver.

Signed-off-by: Andrew Scull <ascull@google.com>
2 years agovirtio: pci: Make use of dm_pci_map_bar()
Andrew Scull [Thu, 21 Apr 2022 16:11:15 +0000 (16:11 +0000)]
virtio: pci: Make use of dm_pci_map_bar()

The virtio PCI capabilities describe regions of memory that should be
mapped. Map those with dm_pci_map_bar() which will ensure they are valid
PCI regions.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agovirtio: pci: Check virtio configs are mapped
Andrew Scull [Thu, 21 Apr 2022 16:11:14 +0000 (16:11 +0000)]
virtio: pci: Check virtio configs are mapped

Prepare for calls to `virtio_pci_map_capability()` failing by returning
NULL on error. If this happens, later accesses to the pointers would be
unsafe so cause the probe to fail if such an error occurs.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agopci: Add mask parameter to dm_pci_map_bar()
Andrew Scull [Thu, 21 Apr 2022 16:11:13 +0000 (16:11 +0000)]
pci: Add mask parameter to dm_pci_map_bar()

Add a mask parameter to control the lookup of the PCI region from which
the mapping can be made.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agopci: Update dm_pci_bus_to_virt() parameters
Andrew Scull [Thu, 21 Apr 2022 16:11:12 +0000 (16:11 +0000)]
pci: Update dm_pci_bus_to_virt() parameters

Add mask parameter and reorder length parameter to match the other PCI
address conversion functions. Using PCI_REGION_TYPE as the mask gives
the old behaviour.

It's converted from a macro to an inline function as the length
parameter is now used twice, but should only be calculated once.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agopci: Match region flags using a mask
Andrew Scull [Thu, 21 Apr 2022 16:11:11 +0000 (16:11 +0000)]
pci: Match region flags using a mask

When converting addresses, apply a mask to the region flags during
lookup. This allows the caller to specify which flags are important and
which are not, for example to exclude system memory regions.

The behaviour of the function is changed such that they don't
preferentially search for a non-system memory region. However, system
memory regions are added after other regions in decode_regions() leading
to a similar outcome.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agopci: Map bars with offset and length
Andrew Scull [Thu, 21 Apr 2022 16:11:10 +0000 (16:11 +0000)]
pci: Map bars with offset and length

Evolve dm_pci_map_bar() to include an offset and length parameter. These
allow a portion of the memory to be mapped and range checks to be
applied.

Passing both the offset and length as zero results in the previous
behaviour and this is used to migrate the previous callers.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agotest: pci: Test PCI address conversion functions
Andrew Scull [Thu, 21 Apr 2022 16:11:09 +0000 (16:11 +0000)]
test: pci: Test PCI address conversion functions

Add tests for the functions dm_pci_bus_to_phys() and
dm_pci_phys_to_bus() which convert between PCI bus addresses and
physical addresses based on the ranges declared for the PCI controller.

The ranges of bus#1 are used for the tests, adding a translation to one
of the ranges to cover more cases.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agopci: Range check address conversions
Andrew Scull [Thu, 21 Apr 2022 16:11:08 +0000 (16:11 +0000)]
pci: Range check address conversions

When converting between PCI bus and physical addresses, include a length
parameter that can be used to check that the entire range fits within
one of the PCI regions. This prevents an address being returned that
might be only partially valid for the range it is going to be used for.

Where the range check is not wanted, passing a length of 0 will have the
same behaviour as before this change.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agopci: Check region ranges are addressable
Andrew Scull [Thu, 21 Apr 2022 16:11:07 +0000 (16:11 +0000)]
pci: Check region ranges are addressable

When parsing the `ranges` DT node, check that both extremes of the
regions are addressable without overflow. This assumption can then be
safely made when processing the regions.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agopci: Fix use of flags in dm_pci_map_bar()
Andrew Scull [Thu, 21 Apr 2022 16:11:06 +0000 (16:11 +0000)]
pci: Fix use of flags in dm_pci_map_bar()

The flags parameter of dm_pci_map_bar() is used for PCI region flags
rather than memory mapping flags. Fix the type to match that of the
region flags and stop using the regions flags as memory mapping flags.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agovirtio: pci: Read entire capability into memory
Andrew Scull [Thu, 21 Apr 2022 16:11:05 +0000 (16:11 +0000)]
virtio: pci: Read entire capability into memory

Read the virtio PCI capability out of the device configuration space to
a struct rather than accessing fields directly from the configuration
space as they are needed. This both makes access to the fields easier
and avoids re-reading fields.

Re-reading fields could result in time-of-check to time-of-use problems,
should the value in the configuration space change. The range check of
the `bar` field and the later call to `dm_pci_read_bar32()` is an
example of where this could happen.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agovirtio: pci: Check virtio capability is in bounds
Andrew Scull [Thu, 21 Apr 2022 16:11:04 +0000 (16:11 +0000)]
virtio: pci: Check virtio capability is in bounds

Ensure the virtio PCI capabilities are contained within the bounds of
the device's configuration space. The expected size of the capability is
passed when searching for the capability to enforce this check.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agovirtio: pci: Check virtio common config size
Andrew Scull [Thu, 21 Apr 2022 16:11:03 +0000 (16:11 +0000)]
virtio: pci: Check virtio common config size

Check that the common config is at least as large as the struct it is
expected to contain. Only then is it safe to cast the pointer and be
safe from out-of-bounds accesses.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agovirtio: pci: Bounds check notification writes
Andrew Scull [Thu, 21 Apr 2022 16:11:02 +0000 (16:11 +0000)]
virtio: pci: Bounds check notification writes

Make sure virtio notifications are written within their allocated
buffer.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agovirtio: pci: Bounds check device config access
Andrew Scull [Thu, 21 Apr 2022 16:11:01 +0000 (16:11 +0000)]
virtio: pci: Bounds check device config access

The device config is optional, so check it was present and mapped before
trying to use the pointer. Bounds violations are an error, not just a
warning, so bail if the checks fail.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agovirtio: pci: Fix discovery of device config length
Andrew Scull [Thu, 21 Apr 2022 16:11:00 +0000 (16:11 +0000)]
virtio: pci: Fix discovery of device config length

The length of the device config was erroneously being taken from the
notify capability. Correct this by finding the length in the device
capability.

Fixes: 550435edf810 ("virtio: pci: Support non-legacy PCI transport device")
Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agovirtio: pci: Allow exclusion of legacy driver
Andrew Scull [Thu, 21 Apr 2022 16:10:59 +0000 (16:10 +0000)]
virtio: pci: Allow exclusion of legacy driver

Add a new config to control whether the driver for legacy virtio PCI
devices is included in the build. VIRTIO_PCI_LEGACY is included by
default when VIRTIO_PCI is selected, but it can also be independently
toggled.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agobootmenu: add Kconfig option not to enter U-Boot console
Masahisa Kojima [Thu, 28 Apr 2022 08:09:44 +0000 (17:09 +0900)]
bootmenu: add Kconfig option not to enter U-Boot console

This commit adds the Kconfig option to disable to enter
the U-Boot console from bootmenu.

If CMD_BOOTMENU_ENTER_UBOOT_CONSOLE is enabled, "U-Boot console"
entry is appeared as the last entry in the bootmenu, then user can
enter U-Boot console.

If CMD_BOOTMENU_ENTER_UBOOT_CONSOLE is disabled, "Quit" entry
is appeared as the last entry instead of "U-Boot console".
When user chooses "Quit" from bootmenu, the following default
commands are invoked.

 - "bootefi bootmgr" (if efi bootmgr is enabled)
 - "run bootcmd"

If the both commands are executed and returns to the bootmenu,
the bootmenu will appears again.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
2 years agobootmenu: add UEFI boot entry into bootmenu
Masahisa Kojima [Thu, 28 Apr 2022 08:09:42 +0000 (17:09 +0900)]
bootmenu: add UEFI boot entry into bootmenu

This commit adds the UEFI related menu entries
into the bootmenu.

User can select which UEFI "Boot####" option to execute
from bootmenu, then bootmenu sets the "BootNext" UEFI
variable and invoke efi bootmgr. The efi bootmgr
will handle the "BootNext" UEFI variable.

If the "BootNext" UEFI variable is preset and efi bootmgr is enabled,
bootmenu invokes efi bootmgr to handle "BootNext" as first priority.

The UEFI boot entry has the "UEFI BOOTXXXX" prefix as below.

  *** U-Boot Boot Menu ***

     UEFI BOOT0000 : debian
     UEFI BOOT0001 : ubuntu

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
2 years agobootmenu: update bootmenu_entry structure
Masahisa Kojima [Thu, 28 Apr 2022 08:09:41 +0000 (17:09 +0900)]
bootmenu: update bootmenu_entry structure

This is a preparation for succeeding addition of uefi boot
and distro boot menu entries into bootmenu.
The bootmenu_entry title is updated to u16 string because
uefi use u16 string. This commit also factors out the function
to prepare the entries generated by "bootmenu_x" U-Boot environment
variable.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi_loader: bootmgr: add booting from removable media
AKASHI Takahiro [Thu, 28 Apr 2022 08:09:39 +0000 (17:09 +0900)]
efi_loader: bootmgr: add booting from removable media

Under the current implementation, booting from removable media using
a architecture-specific default image name, say BOOTAA64.EFI, is
supported only in distro_bootcmd script. See the commit 74522c898b35
("efi_loader: Add distro boot script for removable media").

This is, however, half-baked implementation because
1) UEFI specification requires this feature to be implemented as part
   of Boot Manager's responsibility:

  3 - Boot Manager
  3.5.1 Boot via the Simple File Protocol
  When booting via the EFI_SIMPLE_FILE_SYSTEM_PROTOCOL, the FilePath will
  start with a device path that points to the device that implements the
  EFI_SIMPLE_FILE_SYSTEM_PROTOCOL or the EFI_BLOCK_IO_PROTOCOL. The next
  part of the FilePath may point to the file name, including
  subdirectories, which contain the bootable image. If the file name is
  a null device path, the file name must be generated from the rules
  defined below.
  ...
  3.5.1.1 Removable Media Boot Behavior
  To generate a file name when none is present in the FilePath, the
  firmware must append a default file name in the form
  \EFI\BOOT\BOOT{machine type short-name}.EFI ...

2) So (1) entails the hehavior that the user's preference of boot media
   order should be determined by Boot#### and BootOrder variables.

With this patch, the semantics mentioned above is fully implemented.
For example, if you want to boot the system from USB and SCSI in this
order,
* define Boot0001 which contains only a device path to the USB device
  (without any file path/name)
* define Boot0002 which contains only a device path to the SCSI device,
and
* set BootOrder to Boot0001:Boot0002

To avoid build error for sandbox, default file name "BOOTSANDBOX.efi"
is defined even if it is out of scope of UEFI specification.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
On sandbox use binary name corresponding to host architecture.
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi_loader: export efi_locate_device_handle()
AKASHI Takahiro [Thu, 28 Apr 2022 08:09:38 +0000 (17:09 +0900)]
efi_loader: export efi_locate_device_handle()

This function will be used in the next commit where some behavior
of EFI boot manager will be expanded.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agomenu: menu_get_choice() return -ENOENT if menu item is empty
Masahisa Kojima [Thu, 28 Apr 2022 08:09:37 +0000 (17:09 +0900)]
menu: menu_get_choice() return -ENOENT if menu item is empty

menu_get_choice() needs to handle the case that menu item
is empty. In this case, menu_get_choice() returns -ENOENT.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agomenu: always show the menu regardless of the number of entry
Masahisa Kojima [Thu, 28 Apr 2022 08:09:36 +0000 (17:09 +0900)]
menu: always show the menu regardless of the number of entry

To make user aware of the menu entry selection, menu always
appears regardless of the number of entry.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Adjust test/py/tests/test_bootmenu.py
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agotest: unit test for u16_strlcat()
Masahisa Kojima [Thu, 28 Apr 2022 08:09:35 +0000 (17:09 +0900)]
test: unit test for u16_strlcat()

Provide a unit test for function u16_strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agolib/charset: add u16_strlcat() function
Masahisa Kojima [Thu, 28 Apr 2022 08:09:34 +0000 (17:09 +0900)]
lib/charset: add u16_strlcat() function

Provide u16 string version of strlcat().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agolib: fix selection of CONFIG_CHARSET
Heinrich Schuchardt [Mon, 2 May 2022 04:27:00 +0000 (06:27 +0200)]
lib: fix selection of CONFIG_CHARSET

lib/charset.c is not optional for
EFI_APP || EFI_LOADER || UFS || UT_UNICODE.
These must select CONFIG_CHARSET.

Fixes: 726cd9836db0 ("efi: Make unicode printf available to the app")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi_selftest: error handling in efi_selftest_tcg2
Heinrich Schuchardt [Sun, 1 May 2022 09:34:15 +0000 (11:34 +0200)]
efi_selftest: error handling in efi_selftest_tcg2

If memory allocation fails, write an error message.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi_selftest: clean up unaligned unit test
Heinrich Schuchardt [Sun, 1 May 2022 09:24:22 +0000 (11:24 +0200)]
efi_selftest: clean up unaligned unit test

* fix typo %s/give/given/
* don't use void * in pointer arithmetic

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi_selftest: buildefi_selftest_unaligned.c
Heinrich Schuchardt [Sun, 1 May 2022 09:18:03 +0000 (11:18 +0200)]
efi_selftest: buildefi_selftest_unaligned.c

The unit test has not been built since CPU_V7 was rename CPU_V7A.

Fixes: acf1500138bb ("arm: v7: Kconfig: Rename CPU_V7 as CPU_V7A")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agotest: fix some pylint problems in test_capsule_firmware_raw.py
Heinrich Schuchardt [Sat, 30 Apr 2022 13:24:31 +0000 (15:24 +0200)]
test: fix some pylint problems in test_capsule_firmware_raw.py

* improve doc-string formatting
* remove unused imports

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi_loader: reset colors before clearing screen
Heinrich Schuchardt [Sat, 30 Apr 2022 07:05:04 +0000 (09:05 +0200)]
efi_loader: reset colors before clearing screen

When resetting the text console the colors have to be set before clearing
the screen. Otherwise the background color may be wrong.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agodoc: fix typos in bootmenu.rst
Heinrich Schuchardt [Fri, 29 Apr 2022 20:01:54 +0000 (22:01 +0200)]
doc: fix typos in bootmenu.rst

%s/cammand/command/
%s/sequencies/sequences/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agocmd: simplify bootmenu
Heinrich Schuchardt [Sun, 1 May 2022 21:17:18 +0000 (23:17 +0200)]
cmd: simplify bootmenu

* correct output for timeout > 99 s
* don't use spaces to advance to the output column

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agotest: unit test for bootmenu
Heinrich Schuchardt [Sat, 30 Apr 2022 09:13:55 +0000 (11:13 +0200)]
test: unit test for bootmenu

Provide a unit test for the bootmenu command

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agosandbox: enable bootmenu command
Heinrich Schuchardt [Sat, 30 Apr 2022 05:42:38 +0000 (07:42 +0200)]
sandbox: enable bootmenu command

Provide the bootmenu command on the sandbox for testing.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoCI: Azure: Rework how we update MSYS2
Tom Rini [Tue, 3 May 2022 12:30:14 +0000 (08:30 -0400)]
CI: Azure: Rework how we update MSYS2

Based on reading https://www.msys2.org/docs/ci/ and "Other Systems"
rework how we update MSYS2 to the current version.  We run it once, to
perform nothing other than being the first run, then we run pacman
twice.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agosf: dataflash: add support for AT45DB641E
Luca Ellero [Tue, 26 Apr 2022 08:24:10 +0000 (10:24 +0200)]
sf: dataflash: add support for AT45DB641E

NOTE: this chip uses "extened device information"

Signed-off-by: Luca Ellero <l.ellero@asem.it>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agosf: dataflash: add support for "extended ID"
Luca Ellero [Tue, 26 Apr 2022 08:24:09 +0000 (10:24 +0200)]
sf: dataflash: add support for "extended ID"

Take as reference Linux kernel code:
drivers/mtd/devices/mtd_dataflash.c
commit 1da8869a428317a6d3cd8d47184cf87feb34a98b
Author: Andrey Smirnov <andrew.smirnov@gmail.com>

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agospi: npcm-fiu: add NPCM7xx FIU controller driver
Jim Liu [Tue, 26 Apr 2022 08:52:45 +0000 (16:52 +0800)]
spi: npcm-fiu: add NPCM7xx FIU controller driver

Add Nuvoton NPCM BMC Flash Interface Unit(FIU) SPI master
controller driver using SPI-MEM interface.

The FIU supports single, dual or quad communication interface.
The FIU controller driver provides flash access in UMA(User
Mode Access) mode by using an indirect address/data mechanism.

the dts node is followed upstream kernel dts name.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
[Jagan: fixed the Kconfig, Makefile order]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agomtd: spi-nor-ids: add Macronix mx25u51245g flash entry
Tien Fong Chee [Wed, 27 Apr 2022 03:56:28 +0000 (11:56 +0800)]
mtd: spi-nor-ids: add Macronix mx25u51245g flash entry

Add Macronix mx25u51245g flash entry, so this can be used on
SoCFPGA devices.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
[Jagan: updated commit head]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agomtd: spi-nor-ids: Add Winbond W25Q128JW ID
Marek Vasut [Sun, 24 Apr 2022 21:39:17 +0000 (23:39 +0200)]
mtd: spi-nor-ids: Add Winbond W25Q128JW ID

Add ID for Winbond W25Q128JW device. This is a 128 Mbit QSPI NOR.
Tested on W25Q128JWPIM part.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Vignesh R <vigneshr@ti.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agoMerge branch '2022-05-02-add-verifying-program-loader'
Tom Rini [Mon, 2 May 2022 23:02:44 +0000 (19:02 -0400)]
Merge branch '2022-05-02-add-verifying-program-loader'

To quote the author:

U-Boot provides a verified-boot feature based around FIT, but there is
no standard way of implementing it for a board. At present the various
required pieces must be built up separately, to produce a working
implementation. In particular, there is no built-in support for selecting
A/B boot or recovery mode.

This series introduces VPL, a verified program loader phase for U-Boot.
Its purpose is to run the verified-boot process and decide which SPL
binary should be run. It is critical that this decision happens before
SPL runs, since SPL sets up SDRAM and we need to be able to update the
SDRAM-init code in the field.

Adding VPL into the boot flow provides a standard place to implement
verified boot. This series includes the phase itself, some useful Kconfig
options and a sandbox_vpl build for sandbox. No verfied-boot support is
provided in this series.

Most of the patches in this series are fixes and improvements to docs and
various Kconfig conditions for SPL.

2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Mon, 2 May 2022 23:00:42 +0000 (19:00 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- Misc turris_omnia/mox related Fixes and impovements (Pali)
- Turris Omnia: Add support for configuring mSATA and WWAN slots
  via env variables (Pali)
- net: mvgbe: Set PHY page 0 before phy_connect (Tony)
- kirkwood: nsa310s: Use Marvell uclass mvgbe and PHY driver (Tony)
- mvebu: turris_omnia: Fix SYS_RSTOUT_* macro names (Pali)
- mvebu: clearfog_defconfig: enable setexpr command (Josef)
- mvebu: x530: set MPP55 to gpio (Chris)

2 years agoCI: Run VPL tests
Simon Glass [Sat, 30 Apr 2022 06:56:57 +0000 (00:56 -0600)]
CI: Run VPL tests

Add tests for VPL into the mix. For now this just runs the help test and
a few SPL ones.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agovpl: Test that VPL runs correctly through to U-Boot proper
Simon Glass [Sat, 30 Apr 2022 06:56:56 +0000 (00:56 -0600)]
vpl: Test that VPL runs correctly through to U-Boot proper

Check the TPL -> VPL -> SPL -> U-Boot path by running the 'help' command
in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agovpl: Support running vpl tests
Simon Glass [Sat, 30 Apr 2022 06:56:55 +0000 (00:56 -0600)]
vpl: Support running vpl tests

Add support for these to the pytest system.

Signed-off-by: Simon Glass <sjg@chromium.org>