]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
11 months agoconfigs: Resync with savedefconfig
Tom Rini [Wed, 3 Jan 2024 14:09:56 +0000 (09:09 -0500)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
11 months agoarm: dts: k3-am62a*: Sync with kernel v6.7-rc1
Nishanth Menon [Mon, 13 Nov 2023 14:51:43 +0000 (08:51 -0600)]
arm: dts: k3-am62a*: Sync with kernel v6.7-rc1

Sync with kernel v6.7-rc1 and sync up the u-boot dts files accordingly.

Signed-off-by: Nishanth Menon <nm@ti.com>
11 months agoarm: mach-k3: am62a: Add main_timer0 id to the dev list
Nishanth Menon [Mon, 13 Nov 2023 14:51:42 +0000 (08:51 -0600)]
arm: mach-k3: am62a: Add main_timer0 id to the dev list

main_timer0 is used by u-boot as the tick-timer. Add it to the soc
devices list so it an be enabled via the k3 power controller.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
11 months agoMerge patch series "sync am65x device tree with Linux v6.7-rc1"
Tom Rini [Wed, 3 Jan 2024 13:38:40 +0000 (08:38 -0500)]
Merge patch series "sync am65x device tree with Linux v6.7-rc1"

Bryan Brattlof <bb@ti.com> says:

Hello Again Everyone!

This series gets the am65x booting again along with syncing the device
tree files with v6.7-rc1 Linux.

The bulk of these patches unify the WKUP SPL board file with the arm64
files to make future syncs from Linux much easier. In the end the DTBs
should look a lot like what the DTBs look like for the am64x which
is fairly similar to the am65x.

For those interested in what UART boot looks like:
   https://paste.sr.ht/~bryanb/7df8a645dc548912cd806abd5ecab967ef3287bc

11 months agoarm: dts: k3-am654: convert bootph-pre-ram to bootph-all
Bryan Brattlof [Fri, 29 Dec 2023 17:47:23 +0000 (11:47 -0600)]
arm: dts: k3-am654: convert bootph-pre-ram to bootph-all

Many nodes are reused between WKUP SPL, MAIN SPL, and U-Boot. Using
bootph-pre-ram is causing these nodes to be present in SPL builds but
pruned away during the U-Boot build. Convert these nodes to bootph-all
so they will remain no matter which dtb build is happening.

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate mcu secure proxy node
Bryan Brattlof [Fri, 29 Dec 2023 17:47:22 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate mcu secure proxy node

With the Linux and U-Boot board dtb files unified, we now have a
duplicate mcu secure proxy node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: move dummy_clock to root node
Bryan Brattlof [Fri, 29 Dec 2023 17:47:21 +0000 (11:47 -0600)]
arm: dts: k3-am654: move dummy_clock to root node

The dummy_clock node is used to help the drivers probe the IO needed to
setup consoles and boot media to load firmware into the SoC.

This dummy_clock isn't a device that exists nor does it exist in the
mcu domain. So move it from cbass_mcu to the root node to avoid any
confusion.

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove un-needed aliases
Bryan Brattlof [Fri, 29 Dec 2023 17:47:20 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove un-needed aliases

These aliases are not needed in U-Boot. Remove them

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate root properties
Bryan Brattlof [Fri, 29 Dec 2023 17:47:19 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate root properties

With the Linux and U-Boot board dtb files unified, we have duplicate
properties in the root node. Remove them

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate vtt pinmux
Bryan Brattlof [Fri, 29 Dec 2023 17:47:18 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate vtt pinmux

With the Linux and U-Boot board dtb files unified, we now have a
duplicate vtt_pinmux node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate mdio
Bryan Brattlof [Fri, 29 Dec 2023 17:47:17 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate mdio

With the Linux and U-Boot board dtb files unified, we now have a
duplicate mdio node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove usb0
Bryan Brattlof [Fri, 29 Dec 2023 17:47:16 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove usb0

The pinmux for usb0 is missing from the Linux board dtb file. Remove it
until we can introduce it in Linux

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate ospi0 node
Bryan Brattlof [Fri, 29 Dec 2023 17:47:15 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate ospi0 node

With the Linux and U-Boot board dtb files unified, we now have a
duplicate ospi0 node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate wkup_i2c0
Bryan Brattlof [Fri, 29 Dec 2023 17:47:14 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate wkup_i2c0

With the Linux and U-Boot board dtb files unified, we now have a
duplicate wkup_i2c0 node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate sdhci1 pinmux node
Bryan Brattlof [Fri, 29 Dec 2023 17:47:13 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate sdhci1 pinmux node

With the Linux and U-Boot board dtb files unified, we now have a
duplicate sdhci1 pinmux node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate sdhci0 pinmux node
Bryan Brattlof [Fri, 29 Dec 2023 17:47:12 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate sdhci0 pinmux node

With the Linux and U-Boot board dtb files unified, we now have
a duplicate sdhci0 pinmux node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate main_uart0
Bryan Brattlof [Fri, 29 Dec 2023 17:47:11 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate main_uart0

With the Linux and U-Boot board dtb files unified, we now have a
duplicate main_uart0 node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate mcu_uart0 node
Bryan Brattlof [Fri, 29 Dec 2023 17:47:10 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate mcu_uart0 node

With the Linux and U-Boot board dtb files unified we now have a
duplicate mcu_uart0 node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: add needed regs to udmap nodes
Bryan Brattlof [Fri, 29 Dec 2023 17:47:09 +0000 (11:47 -0600)]
arm: dts: k3-am654: add needed regs to udmap nodes

Ethernet is one of a few IPs in U-Boot that depend on DMA to operate.
However there are a few missing registers ranges in the udmap nodes
need to properly setup DMA for the am65x.

A fix has been added to the Linux kernel[0] to add these ranges however
they have not made it to a Linux tag. To keep DMA operational until the
next DT sync from Linux, add these ranges to the *-u-boot.dtsi with a
note for our future selves.

[0] https://lore.kernel.org/r/20231213135138.929517-2-vigneshr@ti.com

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate mcu_udmap
Bryan Brattlof [Fri, 29 Dec 2023 17:47:08 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate mcu_udmap

With the Linux and U-Boot board dtb files unified, we now have a
duplicate mcu_udmap node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate mcu_ringacc
Bryan Brattlof [Fri, 29 Dec 2023 17:47:07 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate mcu_ringacc

With the Linux and U-Boot board dtb files unified, we now have a
duplicate mcu_ringacc node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate timer
Bryan Brattlof [Fri, 29 Dec 2023 17:47:06 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate timer

timer1 is really just the mcu_timer0 node redefined for the WKUP SPL.
Remove the timer1 and replace it with the mcu_timer0 from the Linux
device tree we imported into U-Boot.

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate wkup_uart0
Bryan Brattlof [Fri, 29 Dec 2023 17:47:05 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate wkup_uart0

With the Linux and U-Boot board files unified, we now have a duplicate
wkup_uart0 node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: remove duplicate vtt_supply
Bryan Brattlof [Fri, 29 Dec 2023 17:47:04 +0000 (11:47 -0600)]
arm: dts: k3-am654: remove duplicate vtt_supply

With the Linux and U-Boot board dtb files unified we now have a
duplicate vtt_supply node. Remove it

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: include a53 board dtb for r5 build
Bryan Brattlof [Fri, 29 Dec 2023 17:47:03 +0000 (11:47 -0600)]
arm: dts: k3-am654: include a53 board dtb for r5 build

To make things as organized as possible, start from the Linux board dtbs
and apply all properties needed for U-Boot in our *-u-boot.dtsi file for
the MAIN SPL and U-Boot builds.

We can then include these files for the WKUP SPL build making further
edits to the needed properties and nodes for the WKUP SPL bootloader's
view of the am65x.

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: copy bootph properties to a53 dts
Bryan Brattlof [Fri, 29 Dec 2023 17:47:02 +0000 (11:47 -0600)]
arm: dts: k3-am654: copy bootph properties to a53 dts

In order to unify the R5 board dtb file with the Linux board dtb file,
we will need to copy all bootph-pre-ram properties to the *-u-boot.dtsi
overlay.

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654: pull in dtb update from Linux
Bryan Brattlof [Fri, 29 Dec 2023 17:47:01 +0000 (11:47 -0600)]
arm: dts: k3-am654: pull in dtb update from Linux

Pull in dtb updates for the am654 base board from v6.7-rc1 of Linux

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: dts: k3-am654-r5: Merge board file and U-Boot overlay
Bryan Brattlof [Fri, 29 Dec 2023 17:47:00 +0000 (11:47 -0600)]
arm: dts: k3-am654-r5: Merge board file and U-Boot overlay

The R5 board file for U-Boot should be the same as the board file copied
from Linux with a few alterations to work with the R5's view of the SoC.

First we need to unify the R5 board file and it's U-Boot overlay before
we can unify the Linux board file with this one.

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoconfigs: am65x_evm_a53: disable CONSOLE_MUX
Bryan Brattlof [Fri, 29 Dec 2023 17:46:59 +0000 (11:46 -0600)]
configs: am65x_evm_a53: disable CONSOLE_MUX

We do not have a need to share a single console with the evaluation
board and disabling this option reduces the complexity of configuring
the consoles. Disable CONSOLE_MUX

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoconfigs: am65x_evm_r5: enable driver for fixed regulators
Bryan Brattlof [Fri, 29 Dec 2023 17:46:58 +0000 (11:46 -0600)]
configs: am65x_evm_r5: enable driver for fixed regulators

Some of the regulators we need to successfully boot are fixed
regulators. Enable the driver to properly probe them.

Tested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
11 months agoarm: apple: Disable SMBIOS again
Mark Kettenis [Sun, 24 Dec 2023 18:12:55 +0000 (19:12 +0100)]
arm: apple: Disable SMBIOS again

Apple machines do not have memory below 4G.  Since U-Boot does
not support the SMBIOS 3 header structures this means we can't
support SMBIOS on these machines.  Unfortunately the refactoring
of the SMBIOS code this cycle accidentally enabled it again.

Fixes: 53fab13a7b1 ("efi: Use the installed SMBIOS tables")
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
11 months agospi: npcm_pspi: Fix the wrong clock divider calculation
Jim Liu [Tue, 26 Dec 2023 02:00:06 +0000 (10:00 +0800)]
spi: npcm_pspi: Fix the wrong clock divider calculation

Fix the wrong clock divider calculation.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
12 months agoMerge tag 'u-boot-imx-master-20231220' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Wed, 20 Dec 2023 19:14:12 +0000 (14:14 -0500)]
Merge tag 'u-boot-imx-master-20231220' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

- Make DRAM stable on i.MX8MP DHCOM SoM by using FPWM mode and updating
  the DRAM timing
- Fix display artifacts when booting Linux on i.MX8M Mini/Plus eDM SBC

12 months agoget_maintainer.pl: Add --git to look up CCed in git history
Marek Vasut [Sat, 16 Dec 2023 18:07:52 +0000 (19:07 +0100)]
get_maintainer.pl: Add --git to look up CCed in git history

Add the --git parameter, else recent contributors are left out of the CC list.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agonet: fix NetConsole documentation reference
Baruch Siach [Mon, 18 Dec 2023 07:37:53 +0000 (09:37 +0200)]
net: fix NetConsole documentation reference

Fixes: d0253f7e5ca1 ("doc: move README.NetConsole to HTML documentation")
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
12 months agonet: wget: Support non-default HTTP port
Marek Vasut [Wed, 13 Dec 2023 21:11:13 +0000 (22:11 +0100)]
net: wget: Support non-default HTTP port

Currently the wget command is hard wired to HTTP port 80. This is
inconvenient, as it is extremely easy to start trivial HTTP server
as an unprivileged user using e.g. python http module to serve the
files, but such a server has to run on one of the higher ports:
"
$ python3 -m http.server -d $(pwd) 8080
"

Make it possible to configure HTTP server port the same way it is
possible to configure TFTP server port, using environment variable
'httpdstp' (similar to 'tftpdstp'). Retain port 80 as the default
fallback port. This way, users can start their own trivial server
and conveniently download whatever files they need into U-Boot.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
12 months agoarm: dts: k3-am625-verdin: fix DDRSS configuration
Emanuele Ghidoli [Tue, 19 Dec 2023 08:25:33 +0000 (09:25 +0100)]
arm: dts: k3-am625-verdin: fix DDRSS configuration

The current DDR subsystem configuration occasionally results in write failures,
impacting memory stability, on Verdin AM62 Solo 512MB WB IT 0072 SKU.
This commit addresses the issue by adjusting Drive Pull-Up/Down and
Write Latency to improve the eye diagram and ensure reliable write operations.
This configuration is shared with all Verdin AM62 SoM and
it does not introduce regressions.

Configurations changes from previous / default values:
- Drive Pull-Up/Down from 40 to 34.3 Ohm
- Write Latency from 8 to 10
- ODTLon / ODTLoff latency from 0 / 0 to 4 / 20 nCK
- VREF control range 1 at 27 %
- tFAW from 30 to 40 ns

Configuration is output from SysConfig [1] web tool, currently at version
1.18.1+3343 (DDR SubSystem v9.10).

[1] https://dev.ti.com/sysconfig

Fixes: 7d1a10659f5b ("board: toradex: add verdin am62 support")
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
12 months agodoc: Remove README.sha1 file
Peter Robinson [Wed, 22 Nov 2023 22:57:07 +0000 (22:57 +0000)]
doc: Remove README.sha1 file

The contents of README.sha1 only refer to process around verification
of the pcs440ep board firmware in flash. The device was removed in
commit 242836a893ae ("powerpc: ppc4xx: remove pcs440ep support") in
2015 so this readme isn't really relevant anymore so can be removed.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agoARM: dts: imx: Power off display output on Data Modul i.MX8M Mini/Plus eDM SBC
Marek Vasut [Mon, 18 Dec 2023 18:02:14 +0000 (19:02 +0100)]
ARM: dts: imx: Power off display output on Data Modul i.MX8M Mini/Plus eDM SBC

Turn display connector power off on boot and reboot to prevent any
bogus start up sequence of any panel potentially attached to the
display connector.

Signed-off-by: Marek Vasut <marex@denx.de>
12 months agoPrepare v2024.01-rc5
Tom Rini [Mon, 18 Dec 2023 12:49:45 +0000 (07:49 -0500)]
Prepare v2024.01-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
12 months agoARM: imx: Update DRAM timings with inline ECC on DH i.MX8MP DHCOM SoM
Marek Vasut [Sat, 16 Dec 2023 05:42:29 +0000 (06:42 +0100)]
ARM: imx: Update DRAM timings with inline ECC on DH i.MX8MP DHCOM SoM

Import DRAM timings generated by the DDR tool 3.31 which introduce assorted
tweaks to the DRAM controller settings. Furthermore, enable DBI to improve
noise resilience of the DRAM bus by reducing the number of bit changes on
the bus.

Reduce the DRAM rate to 3600 MTps to remove all remaining correctable errors
reported by EDAC . It is not entirely clear why the slightly faster setting
does produce sporadic correctable errors, while this one does not, but this
could be related to simpler PLL setting at 3600 MTps.

Enable inline ECC which is necessary to detect ECC errors and collect
statistics by the EDAC driver in Linux. This reduces the DRAM size by
64 MiB for each 512 MiB of DRAM, so for a 4 GiB device the available
DRAM size becomes 3.5 GiB and for 2 GiB device the available DRAM size
becomes 1.8 GiB.

Signed-off-by: Marek Vasut <marex@denx.de>
12 months agoARM: imx: Force DRAM regulators into FPWM mode on DH i.MX8MP DHCOM SoM
Marek Vasut [Sat, 16 Dec 2023 05:42:28 +0000 (06:42 +0100)]
ARM: imx: Force DRAM regulators into FPWM mode on DH i.MX8MP DHCOM SoM

In case the Buck5 and Buck6 regulators which supply DRAM Vdd1 and Vdd2/Vddq
respectively operate in automatic PWM/PFM mode, the DRAM EDAC detects more
correctable errors than if the regulators operate in forced PWM only mode.
Force DRAM regulators to forced PWM mode only to stop tempting the DRAM.

Signed-off-by: Marek Vasut <marex@denx.de>
12 months agoMerge tag 'clk-2024.01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-clk
Tom Rini [Fri, 15 Dec 2023 22:48:52 +0000 (17:48 -0500)]
Merge tag 'clk-2024.01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-clk

clock changes for u-boot/master

This has some clock fixes which should go in before the release. It's a bit
late in the cycle, but most of these have tests to go along with them.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
12 months agotest: dm: clk_ccf: fix building error
Yang Xiwen [Fri, 15 Dec 2023 20:21:11 +0000 (04:21 +0800)]
test: dm: clk_ccf: fix building error

Fix unused variable error produced by building tests

Fixes: d3061824 (test: dm: clk_ccf: test ccf_clk_ops)
Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20231216-b4-fix_build-v1-1-b8e79c94744f@outlook.com
12 months agotest: dm: clk_ccf: test ccf_clk_ops
Yang Xiwen [Fri, 15 Dec 2023 18:28:52 +0000 (02:28 +0800)]
test: dm: clk_ccf: test ccf_clk_ops

Assign ccf_clk_ops to .ops of clk_ccf driver so that it can act as an
clk provider. Also add "#clock-cells=<1>" to its device tree node.

Add "i2c_root" to clk_test in the device tree and driver for testing.

Get "i2c_root" clock in CCF unit tests and add tests for it.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20231111-enable_count-v3-2-08a821892fa9@outlook.com
12 months agodm: test: clk: Add test for ccf clk_set_rate()
Igor Prusov [Tue, 5 Dec 2023 23:23:34 +0000 (02:23 +0300)]
dm: test: clk: Add test for ccf clk_set_rate()

Add a simple test case which sets clock rate to its current value.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20231205232334.2931-3-ivprusov@salutedevices.com
12 months agoclk: Check that composite clock's div has set_rate()
Igor Prusov [Tue, 5 Dec 2023 23:23:33 +0000 (02:23 +0300)]
clk: Check that composite clock's div has set_rate()

It's possible for composite clocks to have a divider that does not
implement set_rate() operation. For example, sandbox_clk_composite()
registers composite clock with a divider that only has get_rate().
Currently clk_composite_set_rate() only checks thate rate_ops are
present, so for sandbox it will cause NULL dereference during
clk_set_rate().

This patch adds rate_ops->set_rate check tp clk_composite_set_rate().

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20231205232334.2931-2-ivprusov@salutedevices.com
12 months agoclk: get correct ops for clk_enable() and clk_disable()
Yang Xiwen [Sat, 18 Nov 2023 22:10:06 +0000 (06:10 +0800)]
clk: get correct ops for clk_enable() and clk_disable()

assign clk_dev_ops(clkp->dev) to ops to ensure correct clk operations
are called on clocks.

This fixes the incorrect enable_count issue as described in [1].

[1]: https://lore.kernel.org/all/SEZPR06MB695927A6DEEEF8489A06897396A7A@SEZPR06MB6959.apcprd06.prod.outlook.com/

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20231111-enable_count-v2-2-20e3728600b5@outlook.com
12 months agoclk: check parent_name in clk_register to avoid confusing log_error() output
Yang Xiwen [Fri, 10 Nov 2023 19:19:52 +0000 (03:19 +0800)]
clk: check parent_name in clk_register to avoid confusing log_error() output

For some gate clocks and fixed clocks without a parent, calling
clk_register will print an useless error message indicating that parent
is missing. Fix that by gaurding log_xxx() with an if-statement.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
Suggested-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20230807-clk-fix-v2-1-0b688e21fb4e@outlook.com
12 months agoMerge tag 'u-boot-imx-20231214' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Fri, 15 Dec 2023 13:22:20 +0000 (08:22 -0500)]
Merge tag 'u-boot-imx-20231214' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

- Fix for i.MX8M Plus eDM SBC DDR timings with inline ECC
- Switch to FPWM mode on Data Modul i.MX8M Plus eDM SBC so that DRAM
  EDAC detects more correctable errors
- Fix for imx8mp-venice board DDR initialization

12 months agoimx8mp-venice: update DRAM config for 2000MHz
Tim Harvey [Thu, 14 Dec 2023 16:22:27 +0000 (08:22 -0800)]
imx8mp-venice: update DRAM config for 2000MHz

The imx8mp venice boards can support 2000Mhz DRAM.
Update the DRAM config to support this.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
12 months agoimx8mp-venice: fix DRAM bus configuration
Tim Harvey [Thu, 14 Dec 2023 16:22:26 +0000 (08:22 -0800)]
imx8mp-venice: fix DRAM bus configuration

The DRAM configuration for the 1GB and 4GB imx8mp venice boards had a
bus mapping issue (channel A and B swapped) which creates an invalid
deskewing configuration during training causing the DRAM to not be able
to run at its full bus speed.

Update the various config structures to resolve this.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
12 months agoboard: gateworks: venice: remove extra file
Tim Harvey [Thu, 14 Dec 2023 16:22:25 +0000 (08:22 -0800)]
board: gateworks: venice: remove extra file

Remove lpddr4_timing_imx8mm_512mb.c mistakenly committed

Fixes: a1c711046b0d "(board: gateworks: venice: add imx8mm-gw7903 support)"
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
12 months agoARM: imx: Update DRAM timings with inline ECC on Data Modul i.MX8M Plus eDM SBC
Marek Vasut [Thu, 7 Dec 2023 17:50:32 +0000 (18:50 +0100)]
ARM: imx: Update DRAM timings with inline ECC on Data Modul i.MX8M Plus eDM SBC

Import DRAM timings generated by the DDR tool 3.31 which introduce assorted
tweaks to the DRAM controller settings. Furthermore, enable DBI to improve
noise resilience of the DRAM bus by reducing the number of bit changes on
the bus.

Reduce the DRAM rate to 3600 MTps to remove all remaining correctable errors
reported by EDAC . It is not entirely clear why the slightly faster setting
does produce sporadic correctable errors, while this one does not, but this
could be related to simpler PLL setting at 3600 MTps.

Enable inline ECC which is necessary to detect ECC errors and collect
statistics by the EDAC driver in Linux. This reduces the DRAM size by
64 MiB for each 512 MiB of DRAM, so for a 4 GiB device the available
DRAM size becomes 3.5 GiB .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
12 months agoARM: imx: Force DRAM regulators into FPWM mode on Data Modul i.MX8M Plus eDM SBC
Marek Vasut [Thu, 7 Dec 2023 17:50:31 +0000 (18:50 +0100)]
ARM: imx: Force DRAM regulators into FPWM mode on Data Modul i.MX8M Plus eDM SBC

In case the Buck5 and Buck6 regulators which supply DRAM Vdd1 and Vdd2/Vddq
respectively operate in automatic PWM/PFM mode, the DRAM EDAC detects more
correctable errors than if the regulators operate in forced PWM only mode.
Force DRAM regulators to forced PWM mode only to stop tempting the DRAM.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
12 months agoARM: imx: Enable CAAM on DH i.MX8M Plus DHCOM
Marek Vasut [Sat, 2 Dec 2023 01:58:28 +0000 (02:58 +0100)]
ARM: imx: Enable CAAM on DH i.MX8M Plus DHCOM

Enable CAAM in U-Boot to make crypto available early in the boot process.

This has a side-effect that in case an older kernel version contains a
broken CAAM initialization timeout code, initialization in bootloader
will help that old kernel version function correctly.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
12 months agoARM: imx: Enable CAAM on Data Modul i.MX8M Mini/Plus eDM SBC
Marek Vasut [Sat, 2 Dec 2023 01:55:06 +0000 (02:55 +0100)]
ARM: imx: Enable CAAM on Data Modul i.MX8M Mini/Plus eDM SBC

Enable CAAM in U-Boot to make crypto available early in the boot process.

This has a side-effect that in case an older kernel version contains a
broken CAAM initialization timeout code, initialization in bootloader
will help that old kernel version function correctly.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
12 months agoddr: imx: Add 3600 MTps rate support
Marek Vasut [Sat, 2 Dec 2023 01:48:40 +0000 (02:48 +0100)]
ddr: imx: Add 3600 MTps rate support

Add PLL settings for DDR 3600 MTps . This is very similar to 3200 MTps
PLL setting, except the divider is not 9 but 8 .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
12 months agoddr: imx: Handle 3734 in addition to 3733 and 3732 MTps rates
Marek Vasut [Sat, 2 Dec 2023 01:48:00 +0000 (02:48 +0100)]
ddr: imx: Handle 3734 in addition to 3733 and 3732 MTps rates

The new MX8M DDR tool 3.31 now generates a programming file which uses
data rate 3734 instead of 3733 or 3732 . Handle another rounding option .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
12 months agoarm64: imx8mp: Inhibit DTC warning on DH i.MX8MP DHCOM rev.100 DTO
Marek Vasut [Sun, 5 Nov 2023 00:04:32 +0000 (01:04 +0100)]
arm64: imx8mp: Inhibit DTC warning on DH i.MX8MP DHCOM rev.100 DTO

Inhibit DTC warning in imx8mp-dhcom-pdk3-overlay-rev100.dts:
"
arch/arm/dts/imx8mp-dhcom-pdk3-overlay-rev100.dtbo: Warning (reg_format): /fragment@0/__overlay__:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
arch/arm/dts/imx8mp-dhcom-pdk3-overlay-rev100.dtbo: Warning (avoid_default_addr_size): /fragment@0/__overlay__: Relying on default #address-cells value
arch/arm/dts/imx8mp-dhcom-pdk3-overlay-rev100.dtbo: Warning (avoid_default_addr_size): /fragment@0/__overlay__: Relying on default #size-cells value
"

The DTO overwrites the 'reg' property of an ethernet PHY and is only
used on specific combination of old prototype SoM and old prototype
PDK3 carrier board, which had incorrectly placed pull resistor, which
made the PHY change its MDIO address in that specific combination and
which is already fixed on production hardware.

The DTO is implemented in this simple manner because if it contained a
full MDIO bus node reference to define #address-cells and #size-cells,
it would also require a full new copy of the PHY node, i.e.
ethernet-phy@5 { ... reg = <5>; ... }, to avoid DTC warnings about
mismatch between node unit and reg value. The node unit in SoM DT is
ethernet-phy@7 { ... }; .

This simpler approach avoids unnecessary duplication without adverse
side effects.

Reported-by: Fabio Estevam <festevam@denx.de>
Reported-by: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Tested-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
12 months agoMerge branch '2023-12-13-assorted-minor-fixes'
Tom Rini [Wed, 13 Dec 2023 14:57:28 +0000 (09:57 -0500)]
Merge branch '2023-12-13-assorted-minor-fixes'

- A few MAINTAINERS updates and Kconfig wording fixes

12 months agomaintainers: rk3399: remove maintainer
Shantur Rathore [Fri, 24 Nov 2023 12:04:31 +0000 (12:04 +0000)]
maintainers: rk3399: remove maintainer

Remove Akash Gajjar <akash@openedev.com> from
MAINTAINERS as email is bouncing.

Signed-off-by: Shantur Rathore <i@shantur.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
12 months agomaintainers: bcmns3: remove maintainer
Peter Robinson [Tue, 5 Dec 2023 09:12:22 +0000 (09:12 +0000)]
maintainers: bcmns3: remove maintainer

Remove Bharat Gooty as a maintainer as his mail is
bouncing.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Cc: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
12 months 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>
12 months 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>
12 months 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>
12 months 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

12 months 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>
12 months 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>
12 months 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>
12 months 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>
12 months 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>
12 months 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>
12 months 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>
12 months 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>
12 months 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>
12 months 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>
12 months 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

12 months 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.

12 months 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>
12 months 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>
12 months 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>
12 months 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>
12 months 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>
12 months 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

12 months 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.

12 months 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

12 months 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>
12 months 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>
12 months 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>
12 months agomtd: spi-nor: Add support for zBIT ZB25VQ128
Andre Przywara [Mon, 13 Nov 2023 01:16:48 +0000 (01:16 +0000)]
mtd: spi-nor: Add support for zBIT ZB25VQ128

Add support for the zBIT ZB25VQ128 (128M-bit) SPI NOR flash memory chip,
as used on the Xunlong Orange Pi Zero 3 board.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
12 months agosunxi: dts: arm64: update emac for Orange Pi Zero 3
Chukun Pan [Sun, 29 Oct 2023 07:40:09 +0000 (15:40 +0800)]
sunxi: dts: arm64: update emac for Orange Pi Zero 3

The current emac setting is not suitable for Orange Pi Zero 3,
move it back to Orange Pi Zero 2 DT. Also update phy mode and
delay values for emac on Orange Pi Zero 3.
With these changes, Ethernet now looks stable.

Fixes: 95c3b0635ea4 ("sunxi: dts: arm64: update devicetree files from Linux-v6.6-rc6")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
12 months agosunxi: correct documentation for SPI flashing
Stephen Graf [Fri, 1 Dec 2023 18:50:39 +0000 (10:50 -0800)]
sunxi: correct documentation for SPI flashing

The mtd_debug write does not work in this context. The flashcp command does
work, provides both the erase and write functions and with the verbose
option gives good feedback.

Signed-off-by: Stephen Graf <stephen.graf@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
12 months agosunxi: h616: (really) lower SPL stack address to avoid BROM data
Andre Przywara [Wed, 13 Jul 2022 15:27:57 +0000 (16:27 +0100)]
sunxi: h616: (really) lower SPL stack address to avoid BROM data

When using the USB OTG FEL mode on the Allwinner H616, the BootROM
stores some data at the end of SRAM C. This is also the location where
we place the initial SPL stack, so it will overwrite this data.
We still need the BROM code after running the SPL, so should leave that
area alone.
Interestingly this does not seem to have an adverse effect, I guess on
the "way out" (when we return to FEL after the SPL has run), this data
is not needed by the BROM, for just the trailing end of the USB operation.
However this is still wrong, and we should not clobber BROM data.

Lower the SPL stack address to be situated right below the swap buffers
we use in sunxi-fel: that should be out of the way of everyone else.

This obsoletes a previous commit (eb53e7743c8f) with the same name:
that one was changing the address in an *unused* macro in sunxi_common.h,
so the previous patch didn't have any effect at all.

Fixes: eb53e7743c8f ("sunxi: h616: lower SPL stack address to avoid BROM data")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
12 months agosunxi: H616: OrangePi Zero 2: enable USB power supply
Andre Przywara [Sat, 25 Nov 2023 17:43:16 +0000 (17:43 +0000)]
sunxi: H616: OrangePi Zero 2: enable USB power supply

The OrangePi Zero 2 has a USB VBUS regulator, controlled by pin PC16.
This is correctly described in the DT, but the patches for supporting
this are still pending.

Meanwhile add our good old CONFIG_USB1_VBUS_PIN to the defconfig file,
to enable power on the USB port and allow using a USB flash drive, for
instance.

Fixes: 6acc5fa581b4 ("sunxi: H616: enable USB support for H616 boards")
Reported-by: Mikhail Kalashnikov <iuncuim@gmail.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
12 months agostarfive: visionfive2: add device tree overlay support
John Clark [Mon, 20 Nov 2023 02:35:31 +0000 (02:35 +0000)]
starfive: visionfive2: add device tree overlay support

device tree overlay support requires fdtoverlay_addr_r to be set

before
~~~~~~
Invalid fdtoverlay_addr_r for loading overlays

after
~~~~~
Retrieving file: /boot/overlay/rtc-ds3231.dtbo

Signed-off-by: John Clark <inindev@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
12 months agoriscv: binman: fix the load field format
Randolph [Fri, 17 Nov 2023 10:39:50 +0000 (18:39 +0800)]
riscv: binman: fix the load field format

Using /bits/ 64 prefix for 64 bits address

Signed-off-by: Randolph <randolph@andestech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
12 months agoriscv: andes: Fix enable register settings of PLICSW
Yu Chien Peter Lin [Thu, 16 Nov 2023 12:46:12 +0000 (20:46 +0800)]
riscv: andes: Fix enable register settings of PLICSW

On 32-core platform, hart31 gets stuck at secondary_hart_loop
as the corresponding enable bit is not set in enable_ipi().
We should program the next word (0x2f84) which is assigned
as the enable register of hart31. It should be done in the same
way when we invoke riscv_send_ipi() to trigger software interrupt
on hart31.

The following diagram shows the enable bits of the fixed PLICSW
scheme.

   Pending regs: 0x1000  x---0---0---0---0------0---0
Pending hart ID:             0   1   2   3 ... 30  31
   Interrupt ID:         0   1   2   3   4 ... 31  32
                         |   |   |   |   |      |   |
    Enable regs: 0x2000  x---1---0---0---0-...--0---0---> hart0
                         |   |   |   |   |      |   |
                 0x2080  x---0---1---0---0-...--0---0---> hart1
                         |   |   |   |   |      |   |
                 0x2100  x---0---0---1---0-...--0---0---> hart2
                         |   |   |   |   |      |   |
                 0x2180  x---0---0---0---1-...--0---0---> hart3
                         .   .   .   .   .      .   .
                         .   .   .   .   .      .   .
                         .   .   .   .   .      .   .
                 0x2f00  x---0---0---0---0-...--1---0---> hart30
                         |   |   |   |   |      |   |
                 0x2f80  x---0---0---0---0-...--0---1---> hart31
                         <-------- word 0 -------><--- word 1 --->

This patch includes some cleanups to macros/functions.

Fixes: ebf11273220a ("riscv: andes: Rearrange Andes PLICSW to single-bit-per-hart strategy")
Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Randolph <randolph@andestech.com>
12 months agorisc-v: qemu: imply NVME_PCI
Heinrich Schuchardt [Thu, 16 Nov 2023 10:22:51 +0000 (11:22 +0100)]
risc-v: qemu: imply NVME_PCI

CONFIG_NVME=y without CONFIG_NVME_PCI=y does not provide working NVMe
support. Instead of implying CONFIG_NVME we must imply CONFIG_NVME_PCI
which will select CONFIG_NVME.

Fixes: e64db0d92e32 ("riscv: qemu: Enable e1000 and nvme support")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
12 months agoconfigs: visionfive2: Enable watchdog driver
Chanho Park [Sun, 5 Nov 2023 23:13:18 +0000 (08:13 +0900)]
configs: visionfive2: Enable watchdog driver

Enables StarFive Watchdog driver and WDT command.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>