]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
2 years agoMAINTAINERS: Fix ARCH_APPLE file paths
Moritz Fischer [Wed, 22 Nov 2023 16:21:14 +0000 (16:21 +0000)] 
MAINTAINERS: Fix ARCH_APPLE file paths

Fixes a filepath in MAINTAINERS file that wasn't updated when
renaming the files to match the new SoC name.

Fixes: a4bd5e4120d6 ('arm: apple: Change SoC name from "m1" into "apple"')
Signed-off-by: Moritz Fischer <moritzf@google.com>
2 years agodrivers: misc: Kconfig: Fix SPL_FS_LOADER prompt
Alexander Gendin [Mon, 20 Nov 2023 20:21:51 +0000 (20:21 +0000)] 
drivers: misc: Kconfig: Fix SPL_FS_LOADER prompt

Both FS_LOADER and SPL_FS_LOADER have the same menu prompt.
To avoid confusion, make prompt for SPL_FS_LOADER different.

Signed-off-by: Alexander Gendin <agendin@matrox.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agolib/Kconfig: Correct typo about SYSINFO_SMBIOS in help message
Tom Rini [Mon, 20 Nov 2023 20:17:23 +0000 (15:17 -0500)] 
lib/Kconfig: Correct typo about SYSINFO_SMBIOS in help message

The correct symbol to enable to have SMBIOS populate fields based on the
device tree is SYSINFO_SMBIOS and not SMBIOS_SYSINFO.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoclk: imx8mn: add pwm clocks
Nicolas Heemeryck [Mon, 11 Dec 2023 10:06:13 +0000 (11:06 +0100)] 
clk: imx8mn: add pwm clocks

Based on Linux kernel 6.7-rc4, add necessary clocks for the PWM
controllers.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@devialet.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoboard: apalis/colibri imx6/imx6ull/imx7: Add fastboot bootcmd support
Hiago De Franco [Thu, 9 Nov 2023 16:24:01 +0000 (13:24 -0300)] 
board: apalis/colibri imx6/imx6ull/imx7: Add fastboot bootcmd support

This commit adds support for Fastboot boot commands by checking both
CONFIG_CMD_USB_SDP and CONFIG_USB_FUNCTION_FASTBOOT. If either of these
configurations is set, it indicates that the board is in recovery mode
and can use either SDP or Fastboot.

The default option remains the SDP command, but if
CONFIG_CMD_FASTBOOT is set, it changes to 'fastboot usb 0' as
the boot command.

Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoapalis/colibri imx6/imx6ull/imx7: defconfig: Enable fastboot support
Hiago De Franco [Thu, 9 Nov 2023 16:24:00 +0000 (13:24 -0300)] 
apalis/colibri imx6/imx6ull/imx7: defconfig: Enable fastboot support

Add fastboot support for Apalis iMX6, Colibri iMX6, Colibri iMX6ULL and
Colibri iMX7 boards. Remove CONFIG_FASTBOOT_BUF_SIZE from
colibri_imx7_emmc_defconfig to get the default value of 0x7000000 instead
of 0x10000000, to make it consistent with the other boards.

Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoimx7d-pico-pi-u-boot.dtsi: Fix aliases indentation
Fabio Estevam [Fri, 3 Nov 2023 23:00:54 +0000 (20:00 -0300)] 
imx7d-pico-pi-u-boot.dtsi: Fix aliases indentation

The aliases are currently indented using spaces.

Fix it to use the standard tab indentation.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agopico-imx7d: Remove board_phy_config()
Fabio Estevam [Fri, 3 Nov 2023 22:47:33 +0000 (19:47 -0300)] 
pico-imx7d: Remove board_phy_config()

With Ethernet DM in place, there is no longer the need for having
the board_phy_config() anymore.

Remove it.

Tested on imx7d-pico-pi board:

=> setenv autoload no
=> dhcp
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 42
DHCP client bound to address 192.168.0.138 (138 ms)
=> tftp zImage
Using ethernet@30be0000 device
TFTP from server 192.168.0.16; our IP address is 192.168.0.138
Filename 'zImage'.
Load address: 0x80800000
Loading: #################################################################
....
 #################################################################
 ##########
 4.3 MiB/s
done
Bytes transferred = 9034120 (89d988 hex)

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agolibrem5: Add addresses for compressed kernel load
Arnaud Ferraris [Fri, 27 Oct 2023 13:40:45 +0000 (15:40 +0200)] 
librem5: Add addresses for compressed kernel load

The "booti" command to load arm64 Linux kernels supports automatic
decompression of zipped kernel images, but relies on some environment
variables to point to usable buffer RAM.

Add those variables and let them point to some default values, that
should cover most use-cases.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2 years agolibrem5: properly set the `fdtfile` env variable
Arnaud Ferraris [Fri, 27 Oct 2023 13:40:44 +0000 (15:40 +0200)] 
librem5: properly set the `fdtfile` env variable

In order to use the generic "distro boot" using an extlinux.conf file,
the `fdtfile` environment variable is mandatory. This commit ensure this
variable is properly constructed based on the detected board revision.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2 years agoconfigs: imx8mn_beacon: Disable the WDT autostart
Adam Ford [Wed, 25 Oct 2023 23:04:56 +0000 (18:04 -0500)] 
configs: imx8mn_beacon: Disable the WDT autostart

Auto-starting the WDT can cause false reboots when the user
is not intentionally trying to use the WDT, so leave it off until
it is requested.

Signed-off-by: Adam Ford <aford173@gmail.com>
2 years agoconfigs: imx8mn_beacon: Do not set SYS_CONSOLE_IS_IN_ENV
Adam Ford [Wed, 25 Oct 2023 23:04:55 +0000 (18:04 -0500)] 
configs: imx8mn_beacon: Do not set SYS_CONSOLE_IS_IN_ENV

The hardware only supports a specific console port, so  remove the
option to change the console location in the environment.

Signed-off-by: Adam Ford <aford173@gmail.com>
2 years agoconfigs: imx8mm_beacon: Disable the WDT autostart
Adam Ford [Wed, 25 Oct 2023 23:04:54 +0000 (18:04 -0500)] 
configs: imx8mm_beacon: Disable the WDT autostart

Auto-starting the WDT can cause false reboots when the user
is not intentionally trying to use the WDT, so leave it off until
it is requested.

Signed-off-by: Adam Ford <aford173@gmail.com>
2 years agoconfigs: imx8mm_beacon: Enable fastboot downloading
Adam Ford [Wed, 25 Oct 2023 23:04:53 +0000 (18:04 -0500)] 
configs: imx8mm_beacon: Enable fastboot downloading

Fastboot is necessary to use UUU enhanced functions, so enable it.

Signed-off-by: Adam Ford <aford173@gmail.com>
2 years agoconfigs: imx8mp_beacon: Do not set SYS_CONSOLE_IS_IN_ENV
Adam Ford [Wed, 25 Oct 2023 23:04:52 +0000 (18:04 -0500)] 
configs: imx8mp_beacon: Do not set SYS_CONSOLE_IS_IN_ENV

The hardware only supports a specific console port, so  remove the
option to change the console location in the environment.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoMAINTAINERS: Remove non-working address from MAINTAINERS
Hugo Villeneuve [Mon, 23 Oct 2023 15:26:28 +0000 (11:26 -0400)] 
MAINTAINERS: Remove non-working address from MAINTAINERS

The address ariel.dalessandro@collabora.com is no longer working:

  A message that you sent could not be delivered to one or more of its
  recipients. This is a permanent error. The following address(es) failed:

  ariel.dalessandro@collabora.com
    host mx.collabora.co.uk [46.235.227.165]
    SMTP error from remote mail server after RCPT TO:<ariel.dalessandro@collabora.com>:
    550 5.1.1 <ariel.dalessandro@collabora.com>: Recipient address rejected:
    undeliverable address: host mail.collabora.co.uk[46.235.227.172] said:
    550 5.1.1 <ariel.dalessandro@collabora.com>: Recipient address rejected:
    User unknown in local recipient table (in reply to RCPT TO command)

Remove this address from MAINTAINERS.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoimx8mn-var-som: Simplify FEC initialization
Hugo Villeneuve [Thu, 19 Oct 2023 19:43:23 +0000 (15:43 -0400)] 
imx8mn-var-som: Simplify FEC initialization

With DM enabled, there is no need for board code to initialize
the FEC interface.

The ethernet PHYs on the symphony carrier board have a dedicated
crystal/oscillator. If the SOM has the EC configuration option
(onboard ethernet PHY), it also has a dedicated crystal/oscillator.
So in all cases, there is no need to enable the RGMII TX clk output.

This follows a similar change introduced by Fabio Estevam:
Link: https://lore.kernel.org/u-boot/20231019170441.1610453-1-festevam@gmail.com/
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoimx8mn_var_som: Add myself to MAINTAINERS
Hugo Villeneuve [Thu, 19 Oct 2023 19:42:41 +0000 (15:42 -0400)] 
imx8mn_var_som: Add myself to MAINTAINERS

I would like to help maintaining the imx8mn_var_som symphony board.

Add myself to MAINTAINERS.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoclock_imx8mm: Add a stub for imx8mp_fec_interface_init()
Fabio Estevam [Fri, 20 Oct 2023 00:47:35 +0000 (21:47 -0300)] 
clock_imx8mm: Add a stub for imx8mp_fec_interface_init()

When CONFIG_DWC_ETH_QOS_IMX=y and CONFIG_FEC_MXC is not selected, the
following warning is seen:

arch/arm/mach-imx/imx8m/clock_imx8mm.c: In function 'board_interface_eth_init':
arch/arm/mach-imx/imx8m/clock_imx8mm.c:914:24: warning: implicit declaration of function 'imx8mp_fec_interface_init; did you mean 'imx8mp_eqos_interface_init'? [-Wimplicit-function-declaration]

Fix it by adding a stub for imx8mp_fec_interface_init() to handle this
case.

This follows the same approach done on imx8mp_eqos_interface_init().

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agoimx8mp_evk: Remove unneeded header files
Fabio Estevam [Thu, 19 Oct 2023 21:51:13 +0000 (18:51 -0300)] 
imx8mp_evk: Remove unneeded header files

Cleanup the file by removing unneeded header files.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
2 years agoimx8mp_evk: Simplify Ethernet initialization
Fabio Estevam [Thu, 19 Oct 2023 21:51:12 +0000 (18:51 -0300)] 
imx8mp_evk: Simplify Ethernet initialization

With DM enabled, there is no need for board code to initialize
the Ethernet interfaces.

The RTL8211FDI Ethernet PHYs have 25MHz oscillator, so there is no
need to enable the RGMII TX clk output.

Also, there is no need for describing the deprecated phy-reset FEC
properties, nor passing reset properties to the EQOS interface in
u-boot.dtsi.

Remove all these unneeded pieces.

Tested both Ethernet interfaces after these changes.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
2 years agophy: phy-imx8mq-usb: Remove .exit operation
Fabio Estevam [Thu, 19 Oct 2023 12:36:09 +0000 (09:36 -0300)] 
phy: phy-imx8mq-usb: Remove .exit operation

Currently, when running "ums 0 mmc 2" and breaking it via
CTRL + C, the following message is seen:

u-boot=> ums 0 mmc 1
UMS: LUN 0, dev mmc 1, hwpart 0, sector 0x0, count 0x1dacc00
CTRL+C - Operation aborted
clk usb_phy_root_clk already disabled

The USB PHY clock is disabled twice: first it gets disabled
inside imx8mq_usb_phy_power_off(), then it is disabled again
inside imx8mq_usb_phy_exit().

Let the USB PHY clock be disabled only once inside
imx8mq_usb_phy_power_off() by removing the .exit operation.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agoarm: dts: imx8mp: Sync with linux-next 20231019
Fabio Estevam [Thu, 19 Oct 2023 12:06:23 +0000 (09:06 -0300)] 
arm: dts: imx8mp: Sync with linux-next 20231019

Sync imx8mp.dtsi and imx8mp-clock.h with linux-next 20231019.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agoarm: dts: imx8mn: Sync with linux-next 20231019
Fabio Estevam [Thu, 19 Oct 2023 12:06:22 +0000 (09:06 -0300)] 
arm: dts: imx8mn: Sync with linux-next 20231019

Sync imx8mn.dtsi with linux-next 20231019.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agoarm: dts: imx8mm: Sync with linux-next 20231019
Fabio Estevam [Thu, 19 Oct 2023 12:06:21 +0000 (09:06 -0300)] 
arm: dts: imx8mm: Sync with linux-next 20231019

Sync imx8mm.dtsi with linux-next 20231019.

The motivation for doing this sync was a bug when doing "ums 0 mmc 1"
on imx8mm-evk. It worked well for the first time, but after doing
a CTRL+C and launching the ums again, the command did not work.

Adam Ford suggested to sync imx8mm.dtsi with the Linux dts, as there was
a recent USB power domain reorganization there.

After syncing the imx8mm.dtsi with Linux, the ums command works without
problem after a CTRL+C.

Suggested-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Tim Harvey <tharvey@gateworks.com>
2 years agoimx8mp_evk: Add myself to MAINTAINERS
Fabio Estevam [Wed, 18 Oct 2023 19:17:42 +0000 (16:17 -0300)] 
imx8mp_evk: Add myself to MAINTAINERS

I would like to help maintaining the imx8mp_evk board.

Add myself to MAINTAINERS.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx8mp_evk: Convert to DM_PMIC
Fabio Estevam [Wed, 18 Oct 2023 19:17:41 +0000 (16:17 -0300)] 
imx8mp_evk: Convert to DM_PMIC

Currently, the imx8mp_evk uses the non-DM code to initialize the PMIC.

Convert to DM_PMIC, which is the recommended way to access the PMIC.

While at it, fix multi-line comments style.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoarm: dts: imx8mp-venice-gw73xx: add TPM device
Tim Harvey [Wed, 18 Oct 2023 18:33:52 +0000 (11:33 -0700)] 
arm: dts: imx8mp-venice-gw73xx: add TPM device

Add the TPM device found on the GW73xx revision F PCB.

This hangs off of SPI2, uses gpio1_10 as a CS and gpio1_11 as RST#.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoarm: dts: imx8mm-venice-gw73xx: add TPM device
Tim Harvey [Wed, 18 Oct 2023 18:33:38 +0000 (11:33 -0700)] 
arm: dts: imx8mm-venice-gw73xx: add TPM device

Add the TPM device found on the GW73xx revision F PCB.

This hangs off of SPI2, uses gpio1_10 as a CS and gpio1_11 as RST#.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoimx8mn-var-som: add manufacturer to target description
Hugo Villeneuve [Tue, 17 Oct 2023 14:25:00 +0000 (10:25 -0400)] 
imx8mn-var-som: add manufacturer to target description

Add Variscite manufacturer to the IMX8MN_VAR_SOM target menu label as
the majority of targets include the manufacturer as part of their menu
description/label and it helps when looking for a particular
manufacturer/board.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoarm: dts: imx93-evk: remove wrong eqos compatible string
Sébastien Szymanski [Tue, 17 Oct 2023 09:45:01 +0000 (11:45 +0200)] 
arm: dts: imx93-evk: remove wrong eqos compatible string

The correct compatible string for i.MX93 variant of DWC EQoS MAC is now
"nxp,imx93-dwmac-eqos".

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2 years agonet: phy: realtek: Add support for RTL8211F(D)(I)-VD-CG
Sébastien Szymanski [Tue, 17 Oct 2023 09:45:00 +0000 (11:45 +0200)] 
net: phy: realtek: Add support for RTL8211F(D)(I)-VD-CG

Add support for the RTL8211F(D)(I)-VD-CG PHY present on the i.MX93 EVK
board.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2 years agonet: dwc_eth_qos: Add board_interface_eth_init() for i.MX93
Sébastien Szymanski [Tue, 17 Oct 2023 09:44:59 +0000 (11:44 +0200)] 
net: dwc_eth_qos: Add board_interface_eth_init() for i.MX93

Add a common board_interface_eth_init() called by the DWC MAC driver to
setup the MAC <-> PHY interface according to the PHY mode obtained from
DT.
Remove the board-side configuration in the i.MX93 EVK files.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2 years agonet: dwc_eth_qos: add i.MX93 support
Sébastien Szymanski [Tue, 17 Oct 2023 09:44:58 +0000 (11:44 +0200)] 
net: dwc_eth_qos: add i.MX93 support

Add support for DWC EQoS MAC on i.MX93.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoARM: imx8ulp: support env in fat and ext4
Ricardo Salveti [Fri, 25 Aug 2023 14:44:14 +0000 (17:44 +0300)] 
ARM: imx8ulp: support env in fat and ext4

Change boot device logic to also allow environment stored in fat and
in ext4 when booting from SD or eMMC.

As the boot device check for SD and for eMMC was depending on
ENV_IS_IN_MMC being defined, change the ifdef blocks at
env_get_location to use IS_ENABLED instead for all modes, returning
NOWHERE when no valid mode is found.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
2 years agoimx: imx8: ahab: refactor do_ahab_close command
Igor Opaniuk [Mon, 21 Aug 2023 19:33:41 +0000 (22:33 +0300)] 
imx: imx8: ahab: refactor do_ahab_close command

Move an OEM closing logic to ahab_close() function to be able to use
it directly without calling a u-boot command.

Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
2 years agoarm: mxs: Fix ICOLL macro name typo
Marek Vasut [Sat, 29 Jul 2023 13:29:41 +0000 (15:29 +0200)] 
arm: mxs: Fix ICOLL macro name typo

The interrupt collector macro name for i.MX23 is MXS_ICOLL_BASE,
this is correct and matches the documentation of both i.MX23 and
i.MX28. Align the i.MX28 macro accordingly. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
2 years agoarm: dts: imx8mm-phyboard-polis-rdk: Sync dts files with kernel
Cem Tenruh [Fri, 14 Jul 2023 08:23:26 +0000 (10:23 +0200)] 
arm: dts: imx8mm-phyboard-polis-rdk: Sync dts files with kernel

Sync the devicetree files used in the kernel for the imx8mm-phyboard-polis
with the corresponding devicetree files in U-Boot.
Replaced phycore-imx8mm.dts with kernel dts imx8mm-phyboard-polis-rdk.dts

Synced with kernel 6.5.0-rc1 commit
e752a4f9589c (arm64: dts: freescale: imx8mm-phyboard: Add I2C4 pinmuxing)

Signed-off-by: Cem Tenruh <c.tenruh@phytec.de>
2 years agoimx7d-sdb: Sync devicetree with kernel 6.5-rc1
Fabio Estevam [Wed, 13 Dec 2023 12:37:08 +0000 (09:37 -0300)] 
imx7d-sdb: Sync devicetree with kernel 6.5-rc1

Commit 0aea5dda2928 ("ARM: dts: imx7d-sdb-u-boot: Fix usdhc1 UHS
operation") did a temporary workaround by addng the usdhc1 fix
inside the -u-boot.dtsi file.

The imx7d-sdb.dts from kernel 6.5-rc1 contains the proper UHS
fix, so sync the devicetree tree and remove the previous fix
from -u-boot.dtsi.

Also, adjust the PMIC node name inside pmic_get() to match
the devicetree update.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: imx8mp: Add support for Polyhex Debix Model A SBC
Gilles Talis [Wed, 13 Dec 2023 12:29:40 +0000 (09:29 -0300)] 
imx: imx8mp: Add support for Polyhex Debix Model A SBC

Add support for the Polyhex Debix Model A SBC board.
It is an industrial grade single board computer based on
NXP's i.MX 8M Plus.
Currently supported interfaces are:
- Serial console
- Micro SD
- eQOS and FEC Ethernet

imx8mp-debix-model-a.dts is taken from Linux 6.3.

Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx8qm_dmsse20a1: Improve SPL memory configuration
Fabio Estevam [Wed, 13 Dec 2023 12:16:12 +0000 (09:16 -0300)] 
imx8qm_dmsse20a1: Improve SPL memory configuration

Currently, building imx8qm_dmsse20a1_defconfig leads to the following
warning:

aarch64-linux-ld.bfd: invalid origin for memory region .sdram

Fix it by using the same SPL memory layout as done in the imx8mq_evk.

Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Tested-by: Oliver Graute <oliver.graute@kococonnector.com>
2 years agoddr: imx: Save the FW loading if it hasn't changed
Shawn Guo [Mon, 2 Jan 2023 12:20:34 +0000 (20:20 +0800)] 
ddr: imx: Save the FW loading if it hasn't changed

Function ddr_load_train_firmware() is called 4 times in a loop by
ddr_cfg_phy(). The first 3 calls are all '1D' type and just loading the
same FWs.  Let's add a type check and save 2 of them.  This helps to
reduce DDRPHY training time from 269 ms down to 212 ms, and thus speed
up boot time ~ 50 ms.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agodts: zynqmp: add missing destination mailbox compatible
Tanmay Shah [Mon, 4 Dec 2023 21:56:20 +0000 (13:56 -0800)] 
dts: zynqmp: add missing destination mailbox compatible

The commit in linux kernel 81186dc16101 ("dt-bindings: zynqmp: add
destination mailbox compatible") make compatible string for child nodes
mandatory that's why add it.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Link: https://lore.kernel.org/r/20231204215620.63334-5-tanmay.shah@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agomailbox: zynqmp: support mulitple mboxes via device-tree
Tanmay Shah [Mon, 4 Dec 2023 21:56:19 +0000 (13:56 -0800)] 
mailbox: zynqmp: support mulitple mboxes via device-tree

As of now only one mailbox agent is supported by mailbox driver.
On zynqmp platform there are about 7 mailbox agents which can communicate
over same IPI channel to U-Boot. This patch series introduces new
"zynqmp_ipi_dest" driver which adds one to multi-channel mailbox
support.

Following format in device-tree is expected as per latest bindings:
zynqmp-ipi {
compatible = "xlnx,zynqmp-ipi-mailbox";

mbox_1: mailbox@1 {
/* New compatible for child node */
compatible = "xlnx,zynqmp-ipi-dest-mailbox";
...
};

...

mbox_n: mailbox@n {
compatible = "xlnx,zynqmp-ipi-dest-mailbox";
...
}
};

Then mailbox client uses child mailbox node as following:

ipi-dest-1 {
...
mboxes = <mbox_1 0>, <mbox_1 1>;
mbox-names = "tx", "rx";
...
};

New "zynqmp_ipi_dest" driver is for devices with
"xlnx,zynqmp-ipi-dest-mailbox" compatible string. This driver will take care
of mailbox send recv ops and it replaces previous "zynqmp_ipi" driver.
Now "zynqmp_ipi" driver simply binds each child device with "zynqmp_ipi_dest"
driver.

However, its important to maintain backward comaptibility with previous
bindings where child node does not have compatible string. In such case, new
driver isn't probed by U-Boot during boot and system fails to boot. To
resolve this issue firmware-zynqmp.c driver probes all the IPI parent node
driver which binds each child node device with "zynqmp_ipi_dest" driver.

This makes sure corresponding child driver will be
probed when requested using mbox_get_by_name or mbox_get_by_idx
framework calls.

This way multiple mailbox agents are supported in device-tree without breaking
previous binding support.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Link: https://lore.kernel.org/r/20231204215620.63334-4-tanmay.shah@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agomailbox: add el3 support only for zynqmp platform
Tanmay Shah [Mon, 4 Dec 2023 21:56:18 +0000 (13:56 -0800)] 
mailbox: add el3 support only for zynqmp platform

If U-Boot is running in Exception Level 3 then use hardcode
register values for mailbox message passing with PMU.
This is only supported for zynqmp platform.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Link: https://lore.kernel.org/r/20231204215620.63334-3-tanmay.shah@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agomailbox: zynqmp: support smc calls to TF-A
Tanmay Shah [Mon, 4 Dec 2023 21:56:17 +0000 (13:56 -0800)] 
mailbox: zynqmp: support smc calls to TF-A

Use SMC calls to TF-A to operate IPI for execution level below 3. For
EL3 use hardcode IPI registers as TF-A isn't available in EL3.
Hence, in EL3 remote and local IPI ids retrieved using xlnx,ipi-id
property are unused.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Link: https://lore.kernel.org/r/20231204215620.63334-2-tanmay.shah@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agoARM: zynq: Remove deprecated device_type property
Michal Simek [Fri, 24 Nov 2023 13:16:49 +0000 (14:16 +0100)] 
ARM: zynq: Remove deprecated device_type property

Based on DT specification device_type property is deprecated and should be
used only for cpu and memory nodes. That's why remove other usage. In this
case ethernet-phy.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/70201ca4ad49ace6f7c27015af9df58a335d2a1f.1700831800.git.michal.simek@amd.com
2 years agoarm64: zynqmp: Add multiboot support for SPL/SPI offset calculation
Michal Simek [Fri, 10 Nov 2023 12:34:35 +0000 (13:34 +0100)] 
arm64: zynqmp: Add multiboot support for SPL/SPI offset calculation

In case of A/B update systems there should be an option to load the same
binary/binaries to different location and they should work.
Before this patch boot.bin with U-Boot SPL can be added to whatever 32k
offset in SPI and SPL finds u-boot.itb at CONFIG_SYS_SPI_U_BOOT_OFFS
offset. In case of A/B update systems that means that SPL is at different
locations but it still points to the same u-boot.itb which is not correct.
That's why include multiboot value to offset calculation to be able to
point to image from the same base.
It doesn't affect any current system which starts from 0 offset.

This patch also change Kria defconfig which uses A/B setup. Partition
A starts at multiboot 64, partition B at multiboot 496.

And also print message about used SPI offset which is useful for all cases.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/93903a53ad9358ae69991558b787f574797effbe.1699619666.git.michal.simek@amd.com
2 years agodrivers: xilinx_spi: Probe fifo_depth at runtime
Mayuresh Chitale [Thu, 16 Nov 2023 16:43:36 +0000 (22:13 +0530)] 
drivers: xilinx_spi: Probe fifo_depth at runtime

If the fifo-size DT parameter is not provided then probe the
controller's fifo depth at runtime. This is ported from a patch
in the Linux Xilinx SPI driver.

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/1422029330-10971-5-git-send-email-ricardo.ribalda@gmail.com
Tested-by: Love Kumar <love.kumar@amd.com>
Link: https://lore.kernel.org/r/20231116164336.140171-4-mchitale@ventanamicro.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agodrivers: xilinx_spi: Add xfer callback
Mayuresh Chitale [Thu, 16 Nov 2023 16:43:35 +0000 (22:13 +0530)] 
drivers: xilinx_spi: Add xfer callback

Add the xfer callback which is used by the MMC_SPI driver and generally by
the dm_spi_xfer callback.

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Tested-by: Love Kumar <love.kumar@amd.com>
Link: https://lore.kernel.org/r/20231116164336.140171-3-mchitale@ventanamicro.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agodrivers: xilinx_spi: Use udevice in start_tranfer
Mayuresh Chitale [Thu, 16 Nov 2023 16:43:34 +0000 (22:13 +0530)] 
drivers: xilinx_spi: Use udevice in start_tranfer

Modify start_transfer and related functions to take a udevice parameter
as input instead of spi_slave. This is needed so that start_transfer can
be used directly via the xfer callback. Also fix a compiler warning.

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Tested-by: Love Kumar <love.kumar@amd.com>
Link: https://lore.kernel.org/r/20231116164336.140171-2-mchitale@ventanamicro.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agoxilinx: zynq: Enable capsule update for Antminer S9
Michal Simek [Mon, 13 Nov 2023 09:05:28 +0000 (10:05 +0100)] 
xilinx: zynq: Enable capsule update for Antminer S9

Capsule update helps with easier firmware development that's why enable it
by default to be able to update system without replugging SD card again and
again.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/8f8deb5f46c0f2d4b687b626f4de221873133856.1699866313.git.michal.simek@amd.com
2 years agoxilinx: zynq: Generate dfu for SPI only when enabled
Michal Simek [Mon, 13 Nov 2023 09:05:27 +0000 (10:05 +0100)] 
xilinx: zynq: Generate dfu for SPI only when enabled

Bitmain S9 board is not enabling SPI that's why CONFIG_SYS_SPI_U_BOOT_OFFS
symbol is not present which ends in build failure when EFI/DFU
infrastructure is enabled.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/3ea0572dbda8f21270c00a77528eb6ec954c7c40.1699866313.git.michal.simek@amd.com
2 years agopci: xilinx: Enable MMIO region
Mayuresh Chitale [Thu, 16 Nov 2023 16:51:03 +0000 (22:21 +0530)] 
pci: xilinx: Enable MMIO region

The host bridge MMIO region is disabled by default due to which MMIO
accesses cause an exception. Fix it by setting the bridge enable bit.
This change is ported from the linux pcie-xilinx driver.

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20231116165103.140968-3-mchitale@ventanamicro.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agopci: xilinx: Fix "reg" not found error
Mayuresh Chitale [Thu, 16 Nov 2023 16:51:02 +0000 (22:21 +0530)] 
pci: xilinx: Fix "reg" not found error

Fix the driver to use the dev_read_addr_size API to fetch the reg
property from the DT.

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Link: https://lore.kernel.org/r/20231116165103.140968-2-mchitale@ventanamicro.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agonet: axi_emac: Use reg property for DMA registers
Mayuresh Chitale [Thu, 16 Nov 2023 16:40:24 +0000 (22:10 +0530)] 
net: axi_emac: Use reg property for DMA registers

As per the xlnx,axi-ethernet-1.00.a DT documentation in linux, the AXI
DMA registers can be obtained via the reg property or via a separate
node for the axistream DMA controller. Currently only the latter is
supported, so add support to fetch the DMA controller registers from the
"reg" property.

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20231116164024.139934-1-mchitale@ventanamicro.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agoarm64: zynqmp: Remove description for 8T49N240
Michal Simek [Wed, 8 Nov 2023 07:36:40 +0000 (08:36 +0100)] 
arm64: zynqmp: Remove description for 8T49N240

8T49N240 driver was never upstreamed by IDT and there is no user of this
driver that's why remove description for this chip with also remove this
driver.

Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/52aec21f121713160d5953b0a41a10cb196482b3.1699428990.git.michal.simek@amd.com
2 years agoarm64: zynqmp: Do not expose usbhub nodes
Michal Simek [Mon, 6 Nov 2023 15:55:48 +0000 (16:55 +0100)] 
arm64: zynqmp: Do not expose usbhub nodes

Upstream dwc3 U-Boot driver is not able to handle child nodes properly
that's why comment them in DT for now. This patch should be reverted when
dwc3 driver handles it properly.
DT node itself is aligned with dt schema.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/537c91a7ac0843358c4e33aa10d9e035d8e92faf.1699286139.git.michal.simek@amd.com
2 years agoarm64: zynqmp: Introduce kria SOM defconfig
Venkatesh Yadav Abbarapu [Thu, 9 Nov 2023 04:24:07 +0000 (09:54 +0530)] 
arm64: zynqmp: Introduce kria SOM defconfig

Enable the initial kria SOM specific configurations like pinctrl,
pinconf etc. Also add the environment file.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20231109042407.6123-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agoMerge tag 'u-boot-imx-20231212' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Tue, 12 Dec 2023 21:32:30 +0000 (16:32 -0500)] 
Merge tag 'u-boot-imx-20231212' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

- Fix emmc detection on colibri_imx7
- Fix DDR configuration on tqma6 to improve Ethernet performance
- Fix aliases and chosen nodes indentation on imx7s-warp
- Convert pico-imx6ul to DM_SERIAL
- Convert pico-pi-imx7d to watchdog driver model to fix 'reset' command
- Select CONFIG_NET_RANDOM_ETHADDR on imx8mp_evk to fix networking on
  older boards
- Add USBH_EN gpio hog to fix USB host interface not working on some
  Apalis Toradex carrier boards with Apalis iMX8 SoM
- Add PCI fixup for GW73xx-F+
- Fix broken EEPROM read on imx8mn-var-som

2 years agoboard: colibri_imx7: fix emmc detection
Marcel Ziswiler [Tue, 12 Dec 2023 11:28:15 +0000 (08:28 -0300)] 
board: colibri_imx7: fix emmc detection

Later versions of Colibri iMX7D V1.1B modules use a "new" SoC fusing. The
difference lies in whether we enable the boot ROM to use the eMMC reset
signal. Depending on the SoC fuse, the boot ROM configures this pin as a
GPIO output to drive the reset signal. Our eMMC vs NAND detection
currently only sets that signal to a GPIO without explicitly setting any
direction. Previously, by default, it was set as an input. As the boot ROM
now configures it as an output, we receive a value of zero instead of one,
indicating the absence of the pull-up on eMMC modules.

To fix this, set the SION bit, allowing the reading back of the value
even if it is configured as an output by the boot ROM. It's important to
note that with the new SoC fusing, we now read back what the boot ROM
drives rather than the real value caused by the pull-up resistor. However,
if it were ever driven low, the eMMC would permanently be reset.

In addition, remove hard-coded variant in the eMMC build case as since the
commit 0c39564d0281 ("toradex: colibri_imx7: Enable nand/emmc detection
and set boot variant") will anyways always get overridden by the detection
routing in board code.

Fixes: 0c39564d ("toradex: colibri_imx7: Enable nand/emmc detection and set boot variant")
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
2 years agotqma6: Fix DDR configuration
Miquel Raynal [Fri, 17 Nov 2023 15:00:44 +0000 (16:00 +0100)] 
tqma6: Fix DDR configuration

Initially investigating a Linux network issue causing a lot of drop and
poor network performances on a custom system based on a TQMA6A module
(based on an iMX6Q), [1st link below].

I eventually correlated my observations with a contention at the NIC
level when in concurrency with the graphics pipeline. Troubleshooting
this in the kernel lead to disabling DMA bursts accesses made by the IPU
in order to avoid triggering the QoS at the interconnect level, reducing
from 50 to 10% the drop rate on eth0, [2nd link below]. The solution
worked on my setup but not on others, which still suffered from
abnormally high drop rates even with this "fix".

After looking a while into TQ Systems BSP I figured out a number of
differences in recent U-Boot out-of-tree patches they had in their
repository [3rd link]. Parsing the differences one after the other lead
me to this final solution.

The reset pad of the DDR controller was apparently misconfigured, Bit
18-19 picturing the "DDR select field". The current value b11 is
reserved. The only defined value as of version 6 of the iMX6Q manual was
b00 "DDR3 and LPDDR2 mode". In practice no register difference has been
spotted after changing this configuration but all issues tracked thus
far just vanished. All previous fixes have been proven irrelevant. Just
clearing this field solved all our network issues and the drop rate as
measured by iperf3 felt back to 0%.

Link: https://lore.kernel.org/netdev/20231012193410.3d1812cf@xps-13/
Link: https://lists.freedesktop.org/archives/dri-devel/2023-October/428251.html
Link: https://github.com/tq-systems/u-boot-tqmaxx/commit/15eb6abbefbf6916c28467b85485911dad3da6bc
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoimx7s-warp-u-boot: Fix aliases and chosen nodes indentation
Fabio Estevam [Mon, 6 Nov 2023 16:33:22 +0000 (13:33 -0300)] 
imx7s-warp-u-boot: Fix aliases and chosen nodes indentation

The aliases and chosen nodes are currently indented using spaces.

Fix them to use the standard tab indentation.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agopico-pi-imx6ul: Connvert to DM_SERIAL
Fabio Estevam [Sat, 4 Nov 2023 21:52:41 +0000 (18:52 -0300)] 
pico-pi-imx6ul: Connvert to DM_SERIAL

The conversion to DM_SERIAL is mandatory, so select this option.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agopico-pi-imx7d: Convert to watchdog driver model
Fabio Estevam [Thu, 26 Oct 2023 21:01:53 +0000 (18:01 -0300)] 
pico-pi-imx7d: Convert to watchdog driver model

Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused
the 'reset' command in U-Boot to not cause a board reset.

Fix it by switching to the watchdog driver model via sysreset, which
is the preferred method for implementing the watchdog reset

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agoimx8mp_evk: Select CONFIG_NET_RANDOM_ETHADDR
Fabio Estevam [Thu, 26 Oct 2023 12:16:36 +0000 (09:16 -0300)] 
imx8mp_evk: Select CONFIG_NET_RANDOM_ETHADDR

On an early revision of the imx8mp-evk that I have access to,
the MAC addresses fuses are not programmed, causing failure to bring
the Ethernet interfaces.

Fix this problema by selecting CONFIG_NET_RANDOM_ETHADDR so that
random MAC addresses are assigned and the Ethernet ports become
functional out of the box.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agoapalis-imx8: add USBH_EN gpio hog
Andrejs Cainikovs [Tue, 12 Dec 2023 12:27:25 +0000 (09:27 -0300)] 
apalis-imx8: add USBH_EN gpio hog

USB host interface is not working on some Apalis Toradex carrier
boards with Apalis iMX8 SoM. This is due to USBH_EN pin, which
powers USB peripherals, having a strong pull-down on some boards,
and a weak pull-down on the others. This USBH_EN pin is left
unconfigured, which means it is in its default state at cold boot:
input with a strong pull-up. As a result, carrier boards with a
weak pull-down have this signal high enough to trigger power
delivery to USB peripherals, and opposite - boards with strong
pull-down on USBH_EN have this signal below the threshold needed
to trigger USB power delivery.
This change configures the USBH_EN pin as gpio hog, fixing this
issue for all Apalis carrier boards regardless of pull-down
resistor value.

Also, update apalis-imx8_defconfig via savedefconfig.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoboard: gateworks: venice: add fixup for GW73xx-F+
Tim Harvey [Wed, 18 Oct 2023 18:33:06 +0000 (11:33 -0700)] 
board: gateworks: venice: add fixup for GW73xx-F+

GW73xx-F board revision switched back to the original PCIe switch due to
part availability.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoarm: dts: imx8mn-var-som: Fix broken EEPROM read
Hugo Villeneuve [Tue, 17 Oct 2023 20:58:15 +0000 (16:58 -0400)] 
arm: dts: imx8mn-var-som: Fix broken EEPROM read

On branch WIP/17Oct2023, the EEPROM can no longer be read:

    U-Boot 2023.10-latest (Oct 17 2023 - 15:53:43 -0400)
    CPU:   Freescale i.MX8MNano Quad rev1.0 at 1200 MHz
    Reset cause: POR
    Model: Variscite VAR-SOM-MX8MN Symphony evaluation board
    var_read_som_eeprom: uclass_get_device_by_of_offset() failed: -19
    initcall failed at call 000000004022207c (err=-19)

Convert EEPROM-related properties to bootph-all so that the EEPROM can
also be read outside of SPL.

Fixes: 9e644284ab81 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agotest: bdinfo: Handle systems without getopt
Marek Vasut [Sun, 10 Dec 2023 15:01:56 +0000 (16:01 +0100)] 
test: bdinfo: Handle systems without getopt

Systems without getopt support fall back to plain full bdinfo print,
handle such a case, which occurs e.g. with sandbox_flattree_defconfig .

Fixes: 8827a3871452 ("test: bdinfo: Test bdinfo -h")
Fixes: 2696f3ab8101 ("test: bdinfo: Test bdinfo -m")
Fixes: 3ff2d796a6f2 ("test: bdinfo: Test bdinfo -e")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agotest/py: Disable error E0611 in two cases for pylint
Tom Rini [Sat, 9 Dec 2023 19:52:46 +0000 (14:52 -0500)] 
test/py: Disable error E0611 in two cases for pylint

Recently pylint has started to complain about:
No name 'fs_helper' in module 'tests' (no-name-in-module)

Due to:
from tests import fs_helper

However, we have:
test/py/tests/fs_helper.py

And since we do not want to add a dummy test/py/tests/__init__.py to
silence this warning we instead just disable it as needed.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agotest/py: Disable error E0611 in two cases for pylint
Tom Rini [Sat, 9 Dec 2023 19:52:46 +0000 (14:52 -0500)] 
test/py: Disable error E0611 in two cases for pylint

Recently pylint has started to complain about:
No name 'fs_helper' in module 'tests' (no-name-in-module)

Due to:
from tests import fs_helper

However, we have:
test/py/tests/fs_helper.py

And since we do not want to add a dummy test/py/tests/__init__.py to
silence this warning we instead just disable it as needed.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Sat, 9 Dec 2023 19:35:44 +0000 (14:35 -0500)] 
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

- StarFive: Add StarFive watchdog driver
- VisionFive2: Support device tree overlay for VisionFive2 board
- Andes: Fix PLIC-SW setting
- RISC-V: Fix NVMe support by implying NVME_PCI for QEMU
- RISC-V: Fix binman for 64 bit format load address

2 years agoMerge patch series "bootflow: bootmeth_efi: Fix network efi boot."
Tom Rini [Sat, 9 Dec 2023 18:16:14 +0000 (13:16 -0500)] 
Merge patch series "bootflow: bootmeth_efi: Fix network efi boot."

To quote the author:

Currently bootmeth_efi crashes while doing a network (dhcp) boot.
This patch series fixes issues and both network and disk boot works.

# Do not modify or remove the line above.
# Everything below it will be ignored.
#
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# An empty message aborts the commit.

2 years agobootflow: bootmeth_efi: don't free buffer
Shantur Rathore [Sun, 19 Nov 2023 16:55:01 +0000 (16:55 +0000)] 
bootflow: bootmeth_efi: don't free buffer

bootmeth_efi doesn't allocate any buffer to load efi in any case.
enable static buffer flag for all cases.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Shantur Rathore <i@shantur.com>
2 years agobootflow: bootmeth_efi: Handle fdt not available.
Shantur Rathore [Sun, 19 Nov 2023 16:55:00 +0000 (16:55 +0000)] 
bootflow: bootmeth_efi: Handle fdt not available.

While booting with efi, if fdt isn't available externally,
just use the built-in one.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Shantur Rathore <i@shantur.com>
2 years agobootflow: bootmeth_efi: set bflow->fname from bootfile name
Shantur Rathore [Sun, 19 Nov 2023 16:54:59 +0000 (16:54 +0000)] 
bootflow: bootmeth_efi: set bflow->fname from bootfile name

We need to set boot->fname before calling efi_set_bootdev
otherwise this crashes as bflow->fname is null.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Shantur Rathore <i@shantur.com>
2 years agobootflow: bootmeth_efi: Set bootp_arch as hex
Shantur Rathore [Sun, 19 Nov 2023 16:54:58 +0000 (16:54 +0000)] 
bootflow: bootmeth_efi: Set bootp_arch as hex

bootmeth_efi sets up bootp_arch which is read later in bootp.c
Currently bootp_arch is being set as integer string and being
read in bootp.c as hex, this sends incorrect arch value to dhcp server
which in return sends wrong file for network boot.

For ARM64 UEFI Arch value is 0xb (11), here we set environment as 11
and later is read as 0x11 and 17 is sent to dhcp server.

Setting it as hex string fixes the problem.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Shantur Rathore <i@shantur.com>
2 years agoarm: apple: t602x: Add missing MMIO regions to memmap
Janne Grunau [Fri, 1 Dec 2023 07:12:33 +0000 (08:12 +0100)] 
arm: apple: t602x: Add missing MMIO regions to memmap

The memory maps for Apple's M2 Pro/Max/Ultra left MMIO space out which
was not used by any driver at the time. The display out exposed as
simple-framebuffer use a power-domain controlled by a device in an
unmapped region.
Add a map covering this region as well as another MMIO region in the
range 0x4'0000'0000 - 0x5'0000'0000. The added regions cover all MMIO
annotated in Apple's device tree in this range.

Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Eric Curtin <ecurtin@redhat.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2 years agoMerge patch series "cmd: bdinfo: Optionally use getopt and implement bdinfo -a"
Tom Rini [Sat, 9 Dec 2023 13:42:49 +0000 (08:42 -0500)] 
Merge patch series "cmd: bdinfo: Optionally use getopt and implement bdinfo -a"

Clean up our bdinfo command a bit and introduce "bdinfo -a"

2 years agotest: bdinfo: Test bdinfo -e
Marek Vasut [Sat, 7 Oct 2023 21:41:06 +0000 (23:41 +0200)] 
test: bdinfo: Test bdinfo -e

The bdinfo -e should print only the board ethernet settings.
Test the expected output.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agotest: bdinfo: Test bdinfo -m
Marek Vasut [Sat, 7 Oct 2023 21:41:05 +0000 (23:41 +0200)] 
test: bdinfo: Test bdinfo -m

The bdinfo -m should print only the board memory layout.
Test the expected output.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agotest: bdinfo: Test bdinfo -h
Marek Vasut [Sat, 7 Oct 2023 21:41:04 +0000 (23:41 +0200)] 
test: bdinfo: Test bdinfo -h

The bdinfo -h should print error message that -h is an unknown
parameter and then command help text. Test the expected output.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agotest: bdinfo: Test both bdinfo and bdinfo -a
Marek Vasut [Sat, 7 Oct 2023 21:41:03 +0000 (23:41 +0200)] 
test: bdinfo: Test both bdinfo and bdinfo -a

Factor out the core of test for all bdinfo output into bdinfo_test_all()
and then reuse it to verify that both 'bdinfo' and 'bdinfo -a' print all
the bdinfo output.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agotest: bdinfo: Rename bdinfo_test_move() to bdinfo_test_full()
Marek Vasut [Sat, 7 Oct 2023 21:41:02 +0000 (23:41 +0200)] 
test: bdinfo: Rename bdinfo_test_move() to bdinfo_test_full()

Rename bdinfo_test_move() to bdinfo_test_full(). The former is a
remnant of deriving this test from another test. No functional
change.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agoconfigs: sandbox: Enable GETOPT for sandbox and sandbox64 target
Marek Vasut [Sat, 7 Oct 2023 21:41:01 +0000 (23:41 +0200)] 
configs: sandbox: Enable GETOPT for sandbox and sandbox64 target

Enable GETOPT so that 'bdinfo' command with getopt() support can be
tested in CI.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agocmd: bdinfo: Implement support for printing ethernet settings via bdinfo -e
Marek Vasut [Sat, 7 Oct 2023 21:41:00 +0000 (23:41 +0200)] 
cmd: bdinfo: Implement support for printing ethernet settings via bdinfo -e

Add support for printing ethernet settings only via 'bdinfo -e' .

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agocmd: bdinfo: Implement support for printing memory layout via bdinfo -m
Marek Vasut [Sat, 7 Oct 2023 21:40:59 +0000 (23:40 +0200)] 
cmd: bdinfo: Implement support for printing memory layout via bdinfo -m

Add support for printing memory layout only via 'bdinfo -m' .

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agocmd: bdinfo: Optionally use getopt and implement bdinfo -a
Marek Vasut [Sat, 7 Oct 2023 21:40:58 +0000 (23:40 +0200)] 
cmd: bdinfo: Optionally use getopt and implement bdinfo -a

Add optional support for getopt() and in case this is enabled via
GETOPT configuration option, implement support for 'bdinfo -a'.
The 'bdinfo -a' behaves exactly like bdinfo and prints 'all' the
bdinfo information. This is implemented in preparation for other
more fine-grained options.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agomtd: spi-nor: add flash model w25q01/02 support
Jim Liu [Tue, 26 Sep 2023 09:10:24 +0000 (17:10 +0800)] 
mtd: spi-nor: add flash model w25q01/02 support

add flash w25q01jv, w25q01jvfim and w25q02jv support

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agospi: cadence_qspi: Select flash subnode at runtime
Udit Kumar [Tue, 12 Sep 2023 09:50:35 +0000 (15:20 +0530)] 
spi: cadence_qspi: Select flash subnode at runtime

Currently spi driver gets flash parameter from first subnode.

Few boards have more than one flash with different parameters
and selection of flash is done by on board switch settings.
In such case, uboot needs to be recompiled with updated
device tree to align with board switch settings.

This patch allows to select flash node at runtime.

Boards those are supporting multiple flashes
needs to implement cadence_qspi_get_subnode function and return correct
flash node.

Cc: Apurva Nandan <a-nandan@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agomtd: spi-nor: Add MT25QU128AB params
Godfrey Mwangi [Fri, 4 Aug 2023 20:35:01 +0000 (13:35 -0700)] 
mtd: spi-nor: Add MT25QU128AB params

Add Micron MT25QU128AB flash.

Signed-off-by: Godfrey Mwangi <godmwan@microsoft.com>
[jagan: fix the commit head]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agomtd: spi-nor: Add MT25U01G part number for SPI NOR Flash
Jit Loon Lim [Fri, 4 Aug 2023 02:27:12 +0000 (10:27 +0800)] 
mtd: spi-nor: Add MT25U01G part number for SPI NOR Flash

MT25QU01 OPN with 4B OPCODE support is currently not supported in
source code and the driver reuses the definition for "n25q00a"
which has the same silicon ID but is a slower part.

Adding mt25u01g definition to the source code to support a faster
read response for MT25QU01 QSPI NOR Flash device.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
[jagan: fix the id position and commit head]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agodrivers: mtd: spi: Add support for GD55LB02GEBIR SPI NOR flash
Teik Heng Chong [Fri, 4 Aug 2023 02:25:48 +0000 (10:25 +0800)] 
drivers: mtd: spi: Add support for GD55LB02GEBIR SPI NOR flash

Add Support for GigaDevice GD55LB02GEBIR SPI NOR flash as QSPI
configuration flash

Signed-off-by: Teik Heng Chong <teik.heng.chong@intel.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agoMerge tag 'u-boot-amlogic-20231207' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Sat, 9 Dec 2023 03:00:24 +0000 (22:00 -0500)] 
Merge tag 'u-boot-amlogic-20231207' of https://source.denx.de/u-boot/custodians/u-boot-amlogic

- Add missing DM_USB_GADGET to amlogic boards

2 years agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
Tom Rini [Sat, 9 Dec 2023 03:00:01 +0000 (22:00 -0500)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi

The first four patches are actual fixes. The last three patches add
support for the apparently popular OrangePi Zero 3 board: multiple
people seem to be champing at the bit, so I'd rather give them
something real instead of people using random trees they found on the
Internet. It's actually mostly the new defconfig file anyway, so the
chances for regressions are very slim.

2 years agoMerge tag 'efi-2024-01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 9 Dec 2023 00:03:03 +0000 (19:03 -0500)] 
Merge tag 'efi-2024-01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2024-01-rc5

Documentation:

* Update and correct support notes on clang
* sandbox: Fix VPL instructions

UEFI:

* Fix a bug in DisconnectController
* Provide better error messages for missing CONFIG_EFI_CAPSULE_ESL_FILE
* Create EFI memory reservations when booting via ACPI
* Make ACPI tables accessible in EFI app

2 years agoconfigs: meson: enable missing DM_USB_GADGET
Neil Armstrong [Wed, 6 Dec 2023 09:04:21 +0000 (10:04 +0100)] 
configs: meson: enable missing DM_USB_GADGET

Since commit b96640cbfb ("ARM: meson: g12a: switch dwc2 otg to DM")
and commit e327e2affd ("ARM: meson: switch AXG & GX dwc2 otg to DM")
Amlogic boards now requires DM_USB_GADGET to have USB Gadget to work.

Add it to the boards configs as returned by:
$ grep -L DM_USB_GADGET $(grep -l CONFIG_USB_GADGET $(grep -l MESON configs/*))

Fixes: b96640cbfb ("ARM: meson: g12a: switch dwc2 otg to DM")
Fixes: e327e2affd ("ARM: meson: switch AXG & GX dwc2 otg to DM")
Link: https://lore.kernel.org/r/20231206-u-boot-m2s-fix-usb-gadget-v1-1-1c4c66cd10f3@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2 years agosunxi: H616: Add OrangePi Zero 3 board support
Andre Przywara [Wed, 18 Oct 2023 00:06:52 +0000 (01:06 +0100)] 
sunxi: H616: Add OrangePi Zero 3 board support

The OrangePi Zero 3 is a small development board featuring the Allwinner
H618 SoC, shipping with up to 4GB of DRAM, Gigabit Ethernet, a micro-HDMI
connector and two USB sockets.
The board uses LPDDR4 DRAM and an X-Powers AXP313a PMIC, support for
which was recently added to U-Boot.

Add a defconfig file selecting the right drivers and DRAM options.
Since the .dts file was synced from the Linux kernel repo already, we
just need to add one line to the Makefile to actually build the .dtb.

The DRAM parameters were derived from the values found in the BSP DRAM
drivers on the SPI NOR flash.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Mikhail Kalashnikov <iuncuim@gmail.com>
Tested-by: Bob McChesney <bob@electricworry.net>
Tested-by: Stephen Graf <stephen.graf@gmail.com>
2 years agosunxi: H616: remove default AXP305 selection
Andre Przywara [Tue, 17 Oct 2023 16:08:52 +0000 (17:08 +0100)] 
sunxi: H616: remove default AXP305 selection

The original H616 devices released about three years ago were typically
paired with an X-Powers AXP305 PMIC. Newer devices uses the smaller
AXP313, and there seem to be far more systems with this PMIC around now.

Remove the default AXP305 selection for the H616 SoC from the Kconfig,
and move the PMIC selection into the board defconfig files instead.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>