]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
2 months agoclk: sunxi: a80: Fix reset description
Andre Przywara [Mon, 12 Feb 2024 23:13:01 +0000 (23:13 +0000)]
clk: sunxi: a80: Fix reset description

Clock gates and reset lines share a common structure in the sunxi clock
driver descriptions, but use different flags to tell them apart.

The description of the Allwinner A80 MMC clock reset lines was
erroneously using the "GATE" macro, which made the reset driver ignore
that entry, complaining with:
sunxi_set_reset: (RST-reset:#0) unhandled

Change that to the correct "RESET" macro, to make the reset driver
happy.

Fixes e0c7ce7e52b7 ("sunxi: clk: A80: add MMC clock support")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 months agosunxi: H616: switch to OF_UPSTREAM
Andre Przywara [Wed, 7 Aug 2024 23:08:45 +0000 (00:08 +0100)]
sunxi: H616: switch to OF_UPSTREAM

With the recent "old-style sunxi" sync and the penultimate OF_UPSTREAM DT
update, both directories were based on the same v6.10 kernel tree.
And while there is one subtle difference in many Allwinner SoC's DT
files, the H616 ones turn out to be identical.

Remove the old copies of the H616 related .dts and .dtsi files, and
switch the whole H616 SoC over to use OF_UPSTREAM. This immediately
benefits from the recent upstream DT update, to kernel v6.11.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 months agoMerge patch series "spi-nor: Add parallel and stacked memories support"
Tom Rini [Wed, 9 Oct 2024 15:02:22 +0000 (09:02 -0600)]
Merge patch series "spi-nor: Add parallel and stacked memories support"

Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> says:

This series adds support for Xilinx qspi parallel and
stacked memeories.

In parallel mode, the current implementation assumes that a maximum
of two flashes are connected. The QSPI controller splits the data
evenly between both the flashes so, both the flashes that are connected
in parallel mode should be identical.
During each operation SPI-NOR sets 0th bit for CS0 & 1st bit for CS1 in
nor->flags.

In stacked mode the current implementation assumes that a maximum of two
flashes are connected and both the flashes are of same make but can differ
in sizes. So, except the sizes all other flash parameters of both the flashes
are identical.

Spi-nor will pass on the appropriate flash select flag to low level driver,
and it will select pass all the data to that particular flash.

Write operation in parallel mode are performed in page size * 2 chunks as
each write operation results in writing both the flashes. For doubling the
address space each operation is performed at addr/2 flash offset, where addr
is the address specified by the user.

Similarly for read and erase operations it will read from both flashes, so
size and offset are divided by 2 and send to flash.

2 months agoconfig: xilinx: Enable the SPI_ADVANCE config option
Venkatesh Yadav Abbarapu [Thu, 26 Sep 2024 04:55:08 +0000 (10:25 +0530)]
config: xilinx: Enable the SPI_ADVANCE config option

Enable the SPI_ADVANCE config option for all xilinx platforms, as
this is required for parallel-memories.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
2 months agospi: zynq_qspi: Add parallel memories support in QSPI driver
Venkatesh Yadav Abbarapu [Thu, 26 Sep 2024 04:55:07 +0000 (10:25 +0530)]
spi: zynq_qspi: Add parallel memories support in QSPI driver

Add support for parallel memories in zynq_qspi.c driver. In case of
parallel memories STRIPE bit is set and sent to the qspi ip, which will
send data bits to both the flashes in parallel. However for few commands
we should not use stripe, instead send same data to both the flashes.
Those commands are exclueded by using zynqmp_qspi_update_stripe().

Also update copyright info for this file.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
2 months agospi: zynqmp_gqspi: Add parallel memories support in GQSPI driver
Venkatesh Yadav Abbarapu [Thu, 26 Sep 2024 04:55:06 +0000 (10:25 +0530)]
spi: zynqmp_gqspi: Add parallel memories support in GQSPI driver

Add support for parallel memories in zynqmp_gqspi.c driver. In case of
parallel memories STRIPE bit is set and sent to the qspi ip, which will
send data bits to both the flashes in parallel. However for few commands
we should not use stripe, instead send same data to both the flashes.
Those commands are exclueded by using zynqmp_qspi_update_stripe().

Also update copyright info for this file.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
2 months agospi: spi-uclass: Read chipselect and restrict capabilities
Venkatesh Yadav Abbarapu [Thu, 26 Sep 2024 04:55:05 +0000 (10:25 +0530)]
spi: spi-uclass: Read chipselect and restrict capabilities

Read chipselect properties from DT which are populated using 'reg'
property and save it in plat->cs[] array for later use.

Also read multi chipselect capability which is used for
parallel-memories and return errors if they are passed on using DT but
driver is not capable of handling it.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
2 months agomtd: spi-nor: Add parallel and stacked memories support in read_bar and write_bar
Ashok Reddy Soma [Thu, 26 Sep 2024 04:55:04 +0000 (10:25 +0530)]
mtd: spi-nor: Add parallel and stacked memories support in read_bar and write_bar

Add support for parallel memories and stacked memories configuration
in read_bar and write_bar functions.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
2 months agomtd: spi-nor: Add parallel memories support for read_sr and read_fsr
Ashok Reddy Soma [Thu, 26 Sep 2024 04:55:03 +0000 (10:25 +0530)]
mtd: spi-nor: Add parallel memories support for read_sr and read_fsr

Add support for parallel memories flash configuration in read status
register and read flag status register functions.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
2 months agomtd: spi-nor: Add parallel and stacked memories support
Venkatesh Yadav Abbarapu [Thu, 26 Sep 2024 04:55:02 +0000 (10:25 +0530)]
mtd: spi-nor: Add parallel and stacked memories support

In parallel mode, the current implementation assumes that a maximum of
two flashes are connected. The QSPI controller splits the data evenly
between both the flashes so, both the flashes that are connected in
parallel mode should be identical.
During each operation SPI-NOR sets 0th bit for CS0 & 1st bit for CS1 in
nor->flags.

In stacked mode the current implementation assumes that a maximum of two
flashes are connected and both the flashes are of same make but can
differ in sizes. So, except the sizes all other flash parameters of both
the flashes are identical

Spi-nor will pass on the appropriate flash select flag to low level
driver, and it will select pass all the data to that particular flash.

Write operation in parallel mode are performed in page size * 2 chunks as
each write operation results in writing both the flashes. For doubling
the address space each operation is performed at addr/2 flash offset,
where addr is the address specified by the user.

Similarly for read and erase operations it will read from both flashes,
so size and offset are divided by 2 and send to flash.

Adding the config option SPI_ADVANCE for non SPL code.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
2 months agoconfig: mx6sabresd: Default don't enable the flash lock
Venkatesh Yadav Abbarapu [Thu, 26 Sep 2024 04:55:01 +0000 (10:25 +0530)]
config: mx6sabresd: Default don't enable the flash lock

By default flash lock option is enabled, enable this option only
when it is required. By disabling the lock config will save some
amount of memory.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
2 months agoarch: arm: dts: k3-j7200-r5-evm: Enable AVS feature
Udit Kumar [Wed, 11 Sep 2024 08:37:22 +0000 (14:07 +0530)]
arch: arm: dts: k3-j7200-r5-evm: Enable AVS feature

During DT sync with kernel 6.6, AVS feature was removed by mistake.
So adding back AVS feature.

Fixes: df73e791ce09("arm: dts: j7200: dts sync with Linux 6.6-rc1")
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Aniket Limaye <a-limaye@ti.com>
2 months agoconfigs: Resync with savedefconfig
Tom Rini [Tue, 8 Oct 2024 15:18:32 +0000 (09:18 -0600)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2 months agocmd: Make bootvx independent of bootelf
Daniel Palmer [Sun, 29 Sep 2024 09:27:39 +0000 (18:27 +0900)]
cmd: Make bootvx independent of bootelf

There are lots of usecases for running baremetal ELF
binaries via bootelf but if you enable bootelf you
get bootvx as well and you probably don't want or need
it.

Hide bootvx behind it's own configuration option.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
2 months agomkimage: ecdsa: add nodes to signature/key node
Matthias Pritschet [Thu, 29 Aug 2024 12:44:47 +0000 (14:44 +0200)]
mkimage: ecdsa: add nodes to signature/key node

Add the "required", "algo", and "key-name-hint" nodes to the
signature/key node if ecdsa256 is used.

This change is mainly copy&paste from rsa_add_verify_data which already
adds these nodes.

Signed-off-by: Matthias Pritschet <matthias.pritschet@itk-engineering.de>
2 months agomkimage: ecdsa: add signature/key nodes to dtb if missing
Matthias Pritschet [Tue, 27 Aug 2024 16:00:54 +0000 (18:00 +0200)]
mkimage: ecdsa: add signature/key nodes to dtb if missing

If the signature/key node(s) are not yet present in the U-Boot device
tree, ecdsa_add_verify_data simply fails if it can't find the nodes.
This behaviour differs from rsa_add_verify_data, wich does add the missing
nodes and proceeds in that case.

This change is mainly copy&paste from rsa_add_verify_data to add the
same behaviour to ecdsa_add_verify_data.

Signed-off-by: Matthias Pritschet <matthias.pritschet@itk-engineering.de>
2 months agoconfigs: am64x*_r5_defconfig: Drop BOOTCOMMAND
Wadim Egorov [Fri, 16 Aug 2024 13:23:28 +0000 (15:23 +0200)]
configs: am64x*_r5_defconfig: Drop BOOTCOMMAND

There is no need to define a default for bootcmd in R5 u-boot because
the R5 is directly booting into the next stage A53 bootloader.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
2 months agoserial: ns16550: Try get serial clock rate from DT before CLK
Jonas Karlman [Sun, 4 Aug 2024 15:09:52 +0000 (15:09 +0000)]
serial: ns16550: Try get serial clock rate from DT before CLK

Initializing a clock driver to read a known static clock rate can take
some time at U-Boot proper pre-reloc phase.

Change to first try and read clock rate from DT to speed up boot time,
fall back to getting the clock rate from clock driver.

This help reduce boot time by around:
- ~35ms on a Radxa ROCK Pi 4 (RK3399)
- ~15ms on a Radxa ZERO 3W (RK3566)
Time that is wasted getting a static rate known at compile time.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 months agopinctrl: mediatek: Bind gpio while binding pinctrl
Chris Webb [Wed, 31 Jul 2024 10:01:31 +0000 (11:01 +0100)]
pinctrl: mediatek: Bind gpio while binding pinctrl

Mediatek pinctrl drivers call mtk_gpiochip_register() to bind the child
gpio controller as part of mtk_pinctrl_common_probe(). This breaks
gpiohog support because the gpio controller is bound too late for
DM_FLAG_PROBE_AFTER_BIND (set while binding hogs) to work.

Move the mtk_gpiochip_register() to mtk_pinctrl_common_bind() and call
this as the .bind method of each of the mediatek pinctrl drivers.

Signed-off-by: Chris Webb <chris@arachsys.com>
2 months agoMerge branch 'next'
Tom Rini [Mon, 7 Oct 2024 15:06:49 +0000 (09:06 -0600)]
Merge branch 'next'

2 months agoPrepare v2024.10
Tom Rini [Mon, 7 Oct 2024 14:54:35 +0000 (08:54 -0600)]
Prepare v2024.10

Signed-off-by: Tom Rini <trini@konsulko.com>
2 months agoclk: renesas: rcar-gen3: Fix SSCG caching replacement with MDSEL/PE caching
Marek Vasut [Sat, 5 Oct 2024 17:45:02 +0000 (19:45 +0200)]
clk: renesas: rcar-gen3: Fix SSCG caching replacement with MDSEL/PE caching

The SSCG is active with MDSEL[12] is not set. Previous commit
99c7e031196d ("clk: renesas: rcar-gen3: Replace SSCG caching
with MDSEL/PE caching") inverted the conditional assignment
of priv->sscg = !(cpg_mode & BIT(12)) during conversion from
(priv->sscg ? 16 : 0) to priv->cpg_mode & BIT(core->offset) ? 16 : 0;
Invert the assignment back to the correct state.

This fixes R8A77980, R8A77990, R8A77995 and R8A774C0.

Fixes: 99c7e031196d ("clk: renesas: rcar-gen3: Replace SSCG caching with MDSEL/PE caching")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 months agoMerge branch 'u-boot-nand-20241005' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Sat, 5 Oct 2024 17:18:38 +0000 (11:18 -0600)]
Merge branch 'u-boot-nand-20241005' of https://gitlab.denx.de/u-boot/custodians/u-boot-nand-flash into next

These are a number of assorted upstream Linux fixes to the
BRCMNAND driver.

This patch set lowers the hamming distance between the Linux
and U-Boot drivers a bit as well, while we deviate quite
a bit it is still possible to bring fixes over thanks to
exercises like this.

The patches pass the pipeline CI:
https://source.denx.de/u-boot/custodians/u-boot-nand-flash/-/pipelines/22535

2 months agomtd: rawnand: brcmnand: Add support for getting ecc setting from strap
William Zhang [Mon, 16 Sep 2024 09:58:49 +0000 (11:58 +0200)]
mtd: rawnand: brcmnand: Add support for getting ecc setting from strap

Backport from the upstream Linux kernel
commit c2cf7e25eb2a3c915a420fb8ceed8912add7f36c
"mtd: rawnand: brcmnand: Add support for getting ecc setting from strap"

Note: the upstream kernel introduces a new
bool brcmnand_get_sector_size_1k() function because the int
version in U-Boot has been removed in Linux. I kept the old
int-returning version that is already in U-Boot as we depend
on that in other code.

BCMBCA broadband SoC based board design does not specify ecc setting in
dts but rather use the SoC NAND strap info to obtain the ecc strength
and spare area size setting. Add brcm,nand-ecc-use-strap dts propety for
this purpose and update driver to support this option. However these two
options can not be used at the same time.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: David Regan <dregan@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240301173308.226004-1-william.zhang@broadcom.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Tested-by: William Zhang <william.zhang@broadcom.com>
2 months agomtd: rawnand: brcmnand: Support write protection setting from dts
William Zhang [Mon, 16 Sep 2024 09:58:48 +0000 (11:58 +0200)]
mtd: rawnand: brcmnand: Support write protection setting from dts

Backport of upstream Linux
commit 8e7daa85641c9559c113f6b217bdc923397de77c
"mtd: rawnand: brcmnand: Support write protection setting from dts"

Augmented to also support the "write-protect" boolean property.

The write protection feature is controlled by the module parameter wp_on
with default set to enabled. But not all the board use this feature
especially in BCMBCA broadband board. And module parameter is not
sufficient as different board can have different option.  Add a device
tree property and allow this feature to be configured through the board
dts on per board basis.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Kamal Dasu <kamal.dasu@broadcom.com>
Reviewed-by: David Regan <dregan@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240223034758.13753-14-william.zhang@broadcom.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
2 months agomtd: rawnand: brcmnand: Add read data bus interface
Linus Walleij [Mon, 16 Sep 2024 09:58:47 +0000 (11:58 +0200)]
mtd: rawnand: brcmnand: Add read data bus interface

This is a port of the read data bus interface from the Linux
brcmnand driver, commit 546e425991205f59281e160a0d0daed47b7ca9b3
"mtd: rawnand: brcmnand: Add BCMBCA read data bus interface"

This is needed for the BCMBCA RAW NAND driver.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
2 months agomtd: rawnand: brcmnand: Fix mtd oobsize
William Zhang [Mon, 16 Sep 2024 09:58:46 +0000 (11:58 +0200)]
mtd: rawnand: brcmnand: Fix mtd oobsize

Backport from upstream Linux
commit 60177390fa061c62d156f4a546e3efd90df3c183
"mtd: rawnand: brcmnand: Fix mtd oobsize"

brcmnand controller can only access the flash spare area up to certain
bytes based on the ECC level. It can be less than the actual flash spare
area size. For example, for many NAND chip supporting ECC BCH-8, it has
226 bytes spare area. But controller can only uses 218 bytes. So brcmand
driver overrides the mtd oobsize with the controller's accessible spare
area size. When the nand base driver utilizes the nand_device object, it
resets the oobsize back to the actual flash spare aprea size from
nand_memory_organization structure and controller may not able to access
all the oob area as mtd advises.

This change fixes the issue by overriding the oobsize in the
nand_memory_organization structure to the controller's accessible spare
area size.

Fixes: a7ab085d7c16 ("mtd: rawnand: Initialize the nand_device object")
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230706182909.79151-6-william.zhang@broadcom.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
2 months agomtd: rawnand: brcmnand: Fix potential out-of-bounds access in oob write
William Zhang [Mon, 16 Sep 2024 09:58:45 +0000 (11:58 +0200)]
mtd: rawnand: brcmnand: Fix potential out-of-bounds access in oob write

Backport of upstream Linux
commit 5d53244186c9ac58cb88d76a0958ca55b83a15cd
"mtd: rawnand: brcmnand: Fix potential out-of-bounds access in oob write"

When the oob buffer length is not in multiple of words, the oob write
function does out-of-bounds read on the oob source buffer at the last
iteration. Fix that by always checking length limit on the oob buffer
read and fill with 0xff when reaching the end of the buffer to the oob
registers.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230706182909.79151-5-william.zhang@broadcom.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
2 months agomtd: rawnand: brcmnand: Fix potential false time out warning
William Zhang [Mon, 16 Sep 2024 09:58:44 +0000 (11:58 +0200)]
mtd: rawnand: brcmnand: Fix potential false time out warning

Backport from the Linux kernel:
commit 9cc0a598b944816f2968baf2631757f22721b996
"mtd: rawnand: brcmnand: Fix potential false time out warning"

If system is busy during the command status polling function, the driver
may not get the chance to poll the status register till the end of time
out and return the premature status.  Do a final check after time out
happens to ensure reading the correct status.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230706182909.79151-3-william.zhang@broadcom.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
2 months agomtd: rawnand: brcmnand: Fix ECC level field setting for v7.2 controller
William Zhang [Mon, 16 Sep 2024 09:58:43 +0000 (11:58 +0200)]
mtd: rawnand: brcmnand: Fix ECC level field setting for v7.2 controller

Backport from the Linux kernel
commit 2ec2839a9062db8a592525a3fdabd42dcd9a3a9b
"mtd: rawnand: brcmnand: Fix ECC level field setting for v7.2 controller"

v7.2 controller has different ECC level field size and shift in the acc
control register than its predecessor and successor controller. It needs
to be set specifically.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230706182909.79151-2-william.zhang@broadcom.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
2 months agoMerge tag 'u-boot-imx-next-20241005' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Sat, 5 Oct 2024 17:18:16 +0000 (11:18 -0600)]
Merge tag 'u-boot-imx-next-20241005' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/22526

- Add DA9063 watchdog support for the imx6q-lxr2 board.
- Add support for DH electronics i.MX8M Plus DHCOM PicoITX
- Add DH i.MX8MP DHCOM SoM on DRC02 carrier board
- Several fsl_esdhc_imx improvements.
- Pas no-mmc-hs400 to mmc2 on imx8mm-cl-iot-gate.

2 months agoMerge branch 'qcom-next' of https://source.denx.de/u-boot/custodians/u-boot-snapdrago...
Tom Rini [Fri, 4 Oct 2024 15:01:44 +0000 (09:01 -0600)]
Merge branch 'qcom-next' of https://source.denx.de/u-boot/custodians/u-boot-snapdragon into next

* Initial UFS PHY driver
* Support for SM8150 (clock and pinctrl)
* Allow writing configuration to PMIC GPIOs again
* Support for configuring "special" pins (e.g. UFS reset or sdhc pins)
* Support for "clk dump" command to decode various clocks.

2 months agoUpdate directories for new name of TF-A directories
Peter Robinson [Fri, 4 Oct 2024 10:40:44 +0000 (11:40 +0100)]
Update directories for new name of TF-A directories

The TF-A URL was updated, as a result the name of the
directory changed as part of the new git URL and not
all the referenced directories were updated.

Fixes: 0ec0207fe07 ("Update the ARM trusted firmware git URL")
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2 months agorockchip: Provid SPL control over otp presence
Jonas Karlman [Fri, 4 Oct 2024 06:21:34 +0000 (06:21 +0000)]
rockchip: Provid SPL control over otp presence

The series "rockchip: Add efuse and otp support to more SoCs" [1],
merged in v2023.04, refactored and extended the Rockchip efuse and otp
driver to support reading eFUSE/OTP for all supported Rockchip SoCs.

Due to use of different licenses the drivers were never combined into a
single driver, however anything non SoC specific should be applied to
both drivers.

The commit fe38b88453d2 ("rockchip: Provided SPL control over efuse
presence") changed Makefile options for only one of the two drivers,
apply same change to keep these two drivers in sync.

[1] https://lore.kernel.org/r/20230222224436.1570224-1-jonas@kwiboo.se/

Fixes: fe38b88453d2 ("rockchip: Provided SPL control over efuse presence")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2 months agoclk/qcom: sm8250: add debug data
Caleb Connolly [Mon, 19 Aug 2024 19:34:20 +0000 (21:34 +0200)]
clk/qcom: sm8250: add debug data

Drop in the RCG and GPLL data for debugging these clocks.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2 months agoclk/qcom: sm6115: add debug data
Caleb Connolly [Mon, 19 Aug 2024 19:34:19 +0000 (21:34 +0200)]
clk/qcom: sm6115: add debug data

Add "clk dump" support for SM6115.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2 months agoclk/qcom: sdm845: add dump data
Caleb Connolly [Mon, 19 Aug 2024 19:34:18 +0000 (21:34 +0200)]
clk/qcom: sdm845: add dump data

Add debug data to dump PLL and RCG clocks.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2 months agoclk/qcom: implement clk dump
Caleb Connolly [Mon, 19 Aug 2024 19:34:17 +0000 (21:34 +0200)]
clk/qcom: implement clk dump

Add support for dumping a few of the clocks used on Qualcomm platforms.
Naming the Global PLL's, Root Clock Generators, and gate clocks.

This helps a lot with platform bringup and feature enablement by making
it easy to sanity check that the clocks are programmed correctly.

== Usage ==

Enable CONFIG_CMD_CLK and "#define LOG_DEBUG" at the top of
qcom-<soc>.c.

The "clk dump" command should print the states of all the gates, GPLLs
and RCGs for your SoC.

== Glossary ==

RCG: Root Clock Generator
* Takes in some fairly arbitrary high freq clock (configurable clock
source and options for taking just even pulses and other things)
* Output frequency = input_freq * (m/n) * (1/d) where m/n are arbitrary
8 or 16-bit values (depending on the RCG), and d is a number (with
support for .5 offsets).

GPLL: Global Phase Locked Loop
* Crystal as input
* integer multiplier + exponent part (2^-40)

Gate: Simple on/off clock
* Put between RCGs and the peripherals they power
* Required to allow for correct power sequencing

If you do the maths manually using the equations from "clk dump", the
numbers should roughly line up by they're likely to be out by a handful
of MHz. They output is formatted so that it can be pasted directly into
the python interpreter.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2 months agoRevert "gpio: qcom_pmic: add a quirk to skip GPIO configuration"
Caleb Connolly [Mon, 9 Sep 2024 12:06:10 +0000 (14:06 +0200)]
Revert "gpio: qcom_pmic: add a quirk to skip GPIO configuration"

This reverts commit 19f000b72b2fa7e4540f7cdb91287aff594239bd.

The bug in writing was caused by a long-standing error in the SPMI
driver which has since been fixed - c2de620d64d4 ("spmi: msm: fix
version 5 support"). We can safely enable writing GPIO configuration
now.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2 months agopinctr: qcom: sm8250: add special pins pins configuration data
Neil Armstrong [Wed, 11 Sep 2024 18:07:15 +0000 (20:07 +0200)]
pinctr: qcom: sm8250: add special pins pins configuration data

Add the special pins configuration data to allow setup the bias
of the UFS and SDCard pins on the SM8250 SoC.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
2 months agogpio: msm: add support for special pins
Neil Armstrong [Wed, 11 Sep 2024 18:07:14 +0000 (20:07 +0200)]
gpio: msm: add support for special pins

Leverage the data introduced in the struct msm_special_pin_data to allow
setting the gpio direction and value if supported by the pin data.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
2 months agophy: qcom: Add QMP UFS PHY driver
Bhupesh Sharma [Tue, 10 Sep 2024 09:11:58 +0000 (11:11 +0200)]
phy: qcom: Add QMP UFS PHY driver

Add Qualcomm QMP UFS PHY driver which is available on the following
Snapdragon SoCs - SDM845, SM8250, SM8550 and SM8650 SoCs.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2 months agophy: qcom: Import QMP phy related header files from Linux
Bhupesh Sharma [Tue, 10 Sep 2024 09:11:57 +0000 (11:11 +0200)]
phy: qcom: Import QMP phy related header files from Linux

Import Qualcomm QMP phy related header files from Linux v6.11-rc7,
limit to headers needed to setup QMP v2 to v6 UFS PHYs.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2 months agoconfig: qcom: add sm8150 to qcom_defconfig
Julius Lehmann [Wed, 11 Sep 2024 17:13:11 +0000 (19:13 +0200)]
config: qcom: add sm8150 to qcom_defconfig

Enable clk and pinctrl for sm8150

Signed-off-by: Julius Lehmann <lehmanju@devpi.de>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
2 months agopinctrl: qcom: add driver for SM8150 SoC
Julius Lehmann [Wed, 11 Sep 2024 17:13:10 +0000 (19:13 +0200)]
pinctrl: qcom: add driver for SM8150 SoC

Add pinctrl and GPIO driver for SM8150. Driver code is based on the
similar U-Boot drivers. All constants are taken from the corresponding
Linux driver. This drivers differs from the similar U-Boot drivers,
because SM8150 SoC have different function IDs for the same functions
on different pins.

Co-authored-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Julius Lehmann <lehmanju@devpi.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
2 months agoclk: qcom: add driver for SM8150 SoC
Julius Lehmann [Wed, 11 Sep 2024 17:13:09 +0000 (19:13 +0200)]
clk: qcom: add driver for SM8150 SoC

Add clock, reset and power domain driver for SM8150. Driver code is
based on the similar U-Boot drivers. All constants are taken from the
corresponding Linux driver.

This driver supports clock rate setting only debug UART,
RGMII/Ethernet modules and USB controller.

Co-authored-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Julius Lehmann <lehmanju@devpi.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
2 months agolxr2: Add DA9063 watchdog support
Fabio Estevam [Mon, 16 Sep 2024 15:37:55 +0000 (12:37 -0300)]
lxr2: Add DA9063 watchdog support

The LXR2 board has a DA9063 that can provide watchdog functionality.

The DA9063 watchdog can cause a full POR reset, which is preferred
over the built-in i.MX6 watchdog.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 months agoda9063: Add watchdog support
Fabio Estevam [Tue, 17 Sep 2024 13:55:50 +0000 (10:55 -0300)]
da9063: Add watchdog support

The DA9063 PMIC is a multi-function device that provides
regulator, watchdog, RTC, and ON key functionalities.

Add support for the DA9063 PMIC watchdog functionality.

Based on the 6.11 kernel drivers/watchdog/da9063_wdt.c driver.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2 months agoARM: imx: Drop bogus newline
Marek Vasut [Wed, 2 Oct 2024 19:52:43 +0000 (21:52 +0200)]
ARM: imx: Drop bogus newline

This shows up in 'help' output and introduces bogus gap:
"
mfgprot   - Manufacturing Protection

mii       - MII utility commands
"
Drop the newline to fix this.

Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Peng Fan <peng.fan@nxp.com>
2 months agoarch: arm: dts: imx8mm-cl-iot-gate.dts: add no-mmc-hs400 to mmc2
Ying-Chun Liu (PaulLiu) [Tue, 1 Oct 2024 16:03:24 +0000 (00:03 +0800)]
arch: arm: dts: imx8mm-cl-iot-gate.dts: add no-mmc-hs400 to mmc2

The eMMC device on imx8mm-cl-iot-gate seems not support hs400.
When booting 6.1.0 kernel we got the following error.

    mmc2: mmc_select_hs400es failed, error -110
    mmc2: error -110 whilst initialising MMC card

Add no-mmc-hs400 to mmc2 node solves the problem.

Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
2 months agoarm: imx: imx8m: soc: Fix VPU fdt disable fixup
Vitor Soares [Tue, 1 Oct 2024 16:01:52 +0000 (17:01 +0100)]
arm: imx: imx8m: soc: Fix VPU fdt disable fixup

With the introduction of downstream Linux 6.6, the iMX8MP VPU block
control node in DTS was renamed "blk-ctl@38330000" and will not match
the ones found in `node_path_imx8mp` resulting in the node not being
disabled on the VPU-less variants.

Add an extra node_path entry for imx8mp VPU block control that match
with downstream Linux.

Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 months agommc: fsl_esdhc_imx: Reset tuning logic
Peng Fan [Tue, 1 Oct 2024 13:07:57 +0000 (21:07 +0800)]
mmc: fsl_esdhc_imx: Reset tuning logic

When supporting partition reset for SoC such as i.MX95 , the Linux
Kernel may have configured the tuning, while after force reset by
wdog or else, uboot CMD0 will never pass unless config RSTT to reset
tuning logic.

Since RSTA and RSTT are independent, so need both to be reseted in the
controller.

Acked-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 months agommc: fsl_esdhc_imx: Avoid resource leak
Ye Li [Tue, 1 Oct 2024 13:07:56 +0000 (21:07 +0800)]
mmc: fsl_esdhc_imx: Avoid resource leak

The memory of priv and plat are leaked if max_bus_width is wrong.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 months agommc: fsl_esdhc_imx: Fix host_caps issue for non-DM driver
Ye Li [Tue, 1 Oct 2024 13:07:55 +0000 (21:07 +0800)]
mmc: fsl_esdhc_imx: Fix host_caps issue for non-DM driver

The plat->cfg is wrongly memset to 0, so the host_caps value configured
in fsl_esdhc_initialize is reset. Remove the unnecessary memset since
plat is allocated via calloc.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 months agommc: fsl_esdhc_imx: Send 80 clocks before IDLE command
Ye Li [Tue, 1 Oct 2024 13:07:54 +0000 (21:07 +0800)]
mmc: fsl_esdhc_imx: Send 80 clocks before IDLE command

According to SD and MMC spec, 74 clocks must be sent to device after
power stable. This is need in reinit ops for DM MMC or init ops for
non-DM MMC after power cycle.

So set the INTIA to send 80 clocks in esdhc_init_common and move
its calling from probe to reinit.

However, on 8MQ EVK and 8QXP MEK with some brands of SD cards, sending
80 clocks may not work well.

The root cause is related with power up time.  According to spec, after
power stable, host shall supply at least 74 SD clocks to the SD card with
the maximum of 1ms. However, the power ram up time is related with the
characteristic of SD card. At the moment of sending 74 SD clocks, the
power probably not ram up to the operating level on the problematic
cards. Then cause the cards not ready.

This patch changes to send SD clock with 1ms duration to replace 80
SD clocks (0.2ms at 400Khz clock).
This way meets the spec requirement as well, and adds the margin for
power ram up time to be compatible with the problematic SD cards.
This is also aligned with implementation which has FORCE clock
always on.

Reviewed-and-tested-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 months agommc: fsl_esdhc_imx: Enable AHB/IPG clk with clk bulk API
Peng Fan [Tue, 1 Oct 2024 13:07:53 +0000 (21:07 +0800)]
mmc: fsl_esdhc_imx: Enable AHB/IPG clk with clk bulk API

With partition reset supported for i.MX8QM/QXP/95 and etc, when linux
mmc runtime suspended, the mmc clks are gated off. While at same time
system controller reset Cortex-A cores because of various reasons(
WDOG timeout and etc), with SPL run again, only enable PER clk is not
enough, also need to enable AHB/IPG clk, here use clk bulk API to enable
all the clocks.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 months agogpio: adp5585: Add SPL config for ADP5585 driver
Ye Li [Sun, 29 Sep 2024 01:32:26 +0000 (09:32 +0800)]
gpio: adp5585: Add SPL config for ADP5585 driver

So we can disable to build ADP5585 in SPL to save size

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 months agoarm64: dts: imx8mp: Add DH i.MX8MP DHCOM SoM on DRC02 carrier board
Marek Vasut [Wed, 25 Sep 2024 16:07:17 +0000 (18:07 +0200)]
arm64: dts: imx8mp: Add DH i.MX8MP DHCOM SoM on DRC02 carrier board

Add support for DH electronics i.MX8MP DHCOM SoM on DRC02 carrier board.
This system is populated with two ethernet ports, two CANs, RS485 and RS232,
USB, capacitive buttons and an OLED display.

Matching Linux kernel patch has been posted:
https://lore.kernel.org/imx/20240925160343.84388-2-marex@denx.de/

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 months agoarm64: dts: imx8mp: Add support for DH electronics i.MX8M Plus DHCOM PicoITX
Marek Vasut [Sat, 28 Sep 2024 23:52:35 +0000 (01:52 +0200)]
arm64: dts: imx8mp: Add support for DH electronics i.MX8M Plus DHCOM PicoITX

Add support for DH electronics i.MX8M Plus DHCOM SoM on PicoITX carrier board.
This system is populated with serial console, EQoS ethernet, eMMC, SD, SPI NOR,
LEDs and USB 3.0 host used in USB 2.0 mode on PicoITX.

Matching Linux kernel patch has been posted:
https://lore.kernel.org/imx/20240928234949.357893-2-marex@denx.de/

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 months agoMerge tag 'u-boot-dfu-next-20241003' of https://source.denx.de/u-boot/custodians...
Tom Rini [Thu, 3 Oct 2024 22:09:30 +0000 (16:09 -0600)]
Merge tag 'u-boot-dfu-next-20241003' of https://source.denx.de/u-boot/custodians/u-boot-dfu into next

u-boot-dfu-next-20241003

CI: https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/22516

DFU:
- Reinitialize only if dfu_alt_info changed

USB Gadget:
- New usb gadget driver for Renesas USBHS
- Simplify kconfig deps for CMD_USB_MASS_STORAGE

Android:
- Provide bootloader version to android via kernel commandline

2 months agoMerge patch series "vbe: Series part D"
Tom Rini [Thu, 3 Oct 2024 17:52:42 +0000 (11:52 -0600)]
Merge patch series "vbe: Series part D"

Simon Glass <sjg@chromium.org> says:

This includes various patches towards implementing the VBE abrec
bootmeth in U-Boot.

2 months agorockchip: Provided SPL control over efuse presence
Simon Glass [Fri, 20 Sep 2024 07:24:42 +0000 (09:24 +0200)]
rockchip: Provided SPL control over efuse presence

This driver should not generally be present in SPL, even if misc devices
are enabled. Update the Makefile rule accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agorockchip: mmc: Fix a missing colon and newline
Simon Glass [Fri, 20 Sep 2024 07:24:41 +0000 (09:24 +0200)]
rockchip: mmc: Fix a missing colon and newline

Add a missing colon and newline in rk3399_emmc_get_phy().

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agommc: rockchip: Allow clocks to be missing
Simon Glass [Fri, 20 Sep 2024 07:24:40 +0000 (09:24 +0200)]
mmc: rockchip: Allow clocks to be missing

Allow MMC init when clock support is not enabled in a particular phase.

Refactor the setting of priv->emmc_clk so it is a bit clearer.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agommc: rockchip: Log some error returns
Simon Glass [Fri, 20 Sep 2024 07:24:39 +0000 (09:24 +0200)]
mmc: rockchip: Log some error returns

Add a little logging to some places in this driver, to aid debugging
when something goes wrong.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agommc: Log the error when init fails
Simon Glass [Fri, 20 Sep 2024 07:24:38 +0000 (09:24 +0200)]
mmc: Log the error when init fails

Add an error-return log to the call in mmc_init_device()

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agommc: Add more debugging for SPL
Simon Glass [Fri, 20 Sep 2024 07:24:37 +0000 (09:24 +0200)]
mmc: Add more debugging for SPL

When MMC booting fails it is sometimes hard to figure out what went
wrong as there is no error code. It isn't even clear which MMC device
was chosen, since SPL can have its own numbering.

Add some debugging to help with this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agommc: Support driver model in TPL
Simon Glass [Fri, 20 Sep 2024 07:24:36 +0000 (09:24 +0200)]
mmc: Support driver model in TPL

Some boards want to use DM_MMC in TPL so add an option for that.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agoarm: Fix up a stale comment in sections.c
Simon Glass [Fri, 20 Sep 2024 07:24:35 +0000 (09:24 +0200)]
arm: Fix up a stale comment in sections.c

There are currently four symbols here, so drop the word 'two'.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 months agoarm: cache: Drop a stale comment
Simon Glass [Fri, 20 Sep 2024 07:24:34 +0000 (09:24 +0200)]
arm: cache: Drop a stale comment

This header includes more than just dummy functions, so drop this
comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agoarmv8: Support not having separate BSS
Simon Glass [Fri, 20 Sep 2024 07:24:33 +0000 (09:24 +0200)]
armv8: Support not having separate BSS

Separate BSS is current mandatory on armv8 but this is not useful for
early boot phases. Add support for the combined BSS.

Use an #ifdef to avoid using CONFIG_SPL_BSS_START_ADDR which is not
valid in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 months agoserial: Support debug UART in TPL
Simon Glass [Fri, 20 Sep 2024 07:24:32 +0000 (09:24 +0200)]
serial: Support debug UART in TPL

Some boards want to use the debug UART in TPL so add an option for that.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agoram: Support driver model in VPL
Simon Glass [Fri, 20 Sep 2024 07:24:31 +0000 (09:24 +0200)]
ram: Support driver model in VPL

Some boards want to use RAM in VPL so add an option for that.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agotpl: Support numbered aliases in device tree
Simon Glass [Fri, 20 Sep 2024 07:24:30 +0000 (09:24 +0200)]
tpl: Support numbered aliases in device tree

Add an option so that this feature can be enabled in TPL for boards
which need it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agotiny-printf: Correct return values
Simon Glass [Fri, 20 Sep 2024 07:24:29 +0000 (09:24 +0200)]
tiny-printf: Correct return values

The sprintf() etc. functions are supposed to return the length of the
string written, but do not. Fix this by checking the amount of buffer
space used.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agofdtdec: Support separate BSS for all XPL builds
Simon Glass [Fri, 20 Sep 2024 07:24:28 +0000 (09:24 +0200)]
fdtdec: Support separate BSS for all XPL builds

Adjust the condition so that separate BSS can be deselected for TPL and
VPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agogzip: Correct function comment for gunzip()
Simon Glass [Fri, 20 Sep 2024 07:24:27 +0000 (09:24 +0200)]
gzip: Correct function comment for gunzip()

This doesn't describe the length parameter correctly. Fix it and
zunzip() too.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agobootstd: Add stub for bootdev_setup_for_sibling_blk()
Simon Glass [Fri, 20 Sep 2024 07:24:26 +0000 (09:24 +0200)]
bootstd: Add stub for bootdev_setup_for_sibling_blk()

When bootstd is not enabled, bootdevs should not be set up. Add a
static inline function to see to this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agosandbox: Add missing header file
Simon Glass [Fri, 20 Sep 2024 07:24:25 +0000 (09:24 +0200)]
sandbox: Add missing header file

This file uses __aligned so should include the header which defines
that.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 months agoboot: android: Fix ramdisk loading for v2 header
Mattijs Korpershoek [Thu, 3 Oct 2024 12:42:39 +0000 (14:42 +0200)]
boot: android: Fix ramdisk loading for v2 header

Before
commit da3447d09fa0 ("android: Fix ramdisk loading for bootimage v3+"),
the ramdisk was loaded from img_data.ramdisk_ptr, ignoring offset
provided via mkbootimg.

commit da3447d09fa0 ("android: Fix ramdisk loading for bootimage v3+")
rightfully fixes this by switching to use img_data.ramdisk_addr instead.

However, it does not copy the ramdisk content to img_data.ramdisk_addr
in case we use boot image v2.

Because of this, we can no longer boot Android on Khadas vim3 board:

[    3.940361] RAMDISK: Couldn't find valid RAM disk image starting at 0.

Add the missing memcpy() to fix the issue.

Fixes: da3447d09fa0 ("android: Fix ramdisk loading for bootimage v3+")
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2 months agoMerge patch series "arm: Initial support for Analog Devices SC5xx boards"
Tom Rini [Thu, 3 Oct 2024 15:30:37 +0000 (09:30 -0600)]
Merge patch series "arm: Initial support for Analog Devices SC5xx boards"

Oliver Gaskell <Oliver.Gaskell@analog.com> says:

ADSP-SC5xx is a series of ARM-based DSPs.
This comprises the armv7 based SC57x, SC58x and SC594 series, and the
armv8 based SC598.

This patch series includes configurations, init code, and minimal DTs
to enable Analog Devices' evaluation boards for these SoCs to boot
through SPL and into U-Boot Proper, as well as devicetree schemas for
the added DTs.

This patch series depends on ("arm: Add Analog Devices SC5xx Machine
Type") (https://lists.denx.de/pipermail/u-boot/2024-April/552043.html)

2 months agoarm: SC573-EZKIT initial support
Oliver Gaskell [Thu, 12 Sep 2024 15:51:01 +0000 (16:51 +0100)]
arm: SC573-EZKIT initial support

Adds support for Analog Devices' SC573-EZKIT board. Includes:
- SoC specific configs in mach-sc5xx/Kconfig
- Memory Map for SPL
- Necessary board-specific init functions
- Board-specific Kconfig and environment in board/adi/
- Memory configuration

Co-developed-by: Greg Malysa <greg.malysa@timesys.com>
Signed-off-by: Greg Malysa <greg.malysa@timesys.com>
Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: SC589-MINI initial support
Oliver Gaskell [Thu, 12 Sep 2024 15:51:00 +0000 (16:51 +0100)]
arm: SC589-MINI initial support

Adds support for Analog Devices' SC589-MINI board. Includes:
- Board specific configs in mach-sc5xx/Kconfig
- Board-specific Kconfig and environment in board/adi/

Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: SC589-EZKIT initial support
Oliver Gaskell [Thu, 12 Sep 2024 15:50:59 +0000 (16:50 +0100)]
arm: SC589-EZKIT initial support

Adds support for Analog Devices' SC589-EZKIT board. Includes:
- Board specific configs in mach-sc5xx/Kconfig
- Board-specific Kconfig and environment in board/adi/
- Memory configuration

Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: SC584-EZKIT initial support
Oliver Gaskell [Thu, 12 Sep 2024 15:50:58 +0000 (16:50 +0100)]
arm: SC584-EZKIT initial support

Adds support for Analog Devices' SC584-EZKIT board. Includes:
- SoC specific configs in mach-sc5xx/Kconfig
- Memory Map for SPL
- SPL config options in common/spl/Kconfig
- Necessary board-specific init functions
- Board-specific Kconfig and environment in board/adi/
- Memory configuration

Co-developed-by: Greg Malysa <greg.malysa@timesys.com>
Signed-off-by: Greg Malysa <greg.malysa@timesys.com>
Co-developed-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: SC594-SOM-EZLITE initial support
Oliver Gaskell [Thu, 12 Sep 2024 15:50:57 +0000 (16:50 +0100)]
arm: SC594-SOM-EZLITE initial support

Adds support for Analog Devices' SC594-SOM-EZLITE board. Includes:
- Board specific configs in mach-sc5xx/Kconfig
- Board-specific Kconfig and environment in board/adi/

Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: SC594-SOM-EZKIT initial support
Oliver Gaskell [Thu, 12 Sep 2024 15:50:56 +0000 (16:50 +0100)]
arm: SC594-SOM-EZKIT initial support

Adds support for Analog Devices' SC594-SOM-EZKIT board. Includes:
- SoC specific configs in mach-sc5xx/Kconfig
- Memory Map for SPL
- SPL config options in common/spl/Kconfig
- Necessary board-specific init functions
- Board-specific Kconfig and environment in board/adi/
- Memory configuration

Co-developed-by: Greg Malysa <greg.malysa@timesys.com>
Signed-off-by: Greg Malysa <greg.malysa@timesys.com>
Co-developed-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Co-developed-by: Ian Roberts <ian.roberts@timesys.com>
Signed-off-by: Ian Roberts <ian.roberts@timesys.com>
Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: SC598-SOM-EZLITE initial support
Oliver Gaskell [Thu, 12 Sep 2024 15:50:55 +0000 (16:50 +0100)]
arm: SC598-SOM-EZLITE initial support

Adds support for Analog Devices' SC598-SOM-EZLITE board. Includes:
- Board specific configs in mach-sc5xx/Kconfig
- Board-specific Kconfig and environment in board/adi/

Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: SC598-SOM-EZKIT initial support
Oliver Gaskell [Thu, 12 Sep 2024 15:50:54 +0000 (16:50 +0100)]
arm: SC598-SOM-EZKIT initial support

Adds support for Analog Devices' SC598-SOM-EZKIT board. Includes:
- CONFIG options common to all SC5xx SoCs
- SoC specific configs in mach-sc5xx/Kconfig
- SPL config options in common/spl/Kconfig
- Memory Map for SPL
- Necessary board-specific init functions
- Board-specific Kconfig and environment in board/adi/
- Memory configuration

Co-developed-by: Greg Malysa <greg.malysa@timesys.com>
Signed-off-by: Greg Malysa <greg.malysa@timesys.com>
Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Co-developed-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: mach-sc5xx: clean up Kconfig
Oliver Gaskell [Thu, 12 Sep 2024 15:50:53 +0000 (16:50 +0100)]
arm: mach-sc5xx: clean up Kconfig

Moves common options between all SC5xx series boards to the ARCH_SC5XX
option instead of duplicating them.

Also, it was possible to select multiple of the SoC support options.
Given a U-Boot binary can only support a single platform, this moves
the SoC selection to a `choice`, making them mutually exclusive.

Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agodt-bindings: timer: Add SC5xx Timer bindings
Oliver Gaskell [Thu, 12 Sep 2024 15:50:52 +0000 (16:50 +0100)]
dt-bindings: timer: Add SC5xx Timer bindings

Add devicetree schema for the timer peripheral on Analog Devices SC5xx
series SoCs.

Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agodt-bindings: clock: Add SC5xx clock tree bindings
Oliver Gaskell [Thu, 12 Sep 2024 15:50:51 +0000 (16:50 +0100)]
dt-bindings: clock: Add SC5xx clock tree bindings

Add devicetree schema for the clock tree on Analog Devices SC5xx series
SoCs.

Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agodt-bindings: arm: Add SC5xx Series binding
Oliver Gaskell [Thu, 12 Sep 2024 15:50:50 +0000 (16:50 +0100)]
dt-bindings: arm: Add SC5xx Series binding

Add devicetree schema for Analog Devices SC5xx series SoCs.

Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: dts: Support SC598-SOM-EZLITE
Oliver Gaskell [Thu, 12 Sep 2024 15:50:49 +0000 (16:50 +0100)]
arm: dts: Support SC598-SOM-EZLITE

Add minimal device tree for Analog Devices' SC598-SOM-EZLITE board.

This patch depends on Patches 01 and 07, for sc5xx.dtsi and
sc598-som.dtsi respectively.

Co-developed-by: Greg Malysa <greg.malysa@timesys.com>
Signed-off-by: Greg Malysa <greg.malysa@timesys.com>
Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: dts: Support SC598-SOM-EZKIT
Oliver Gaskell [Thu, 12 Sep 2024 15:50:48 +0000 (16:50 +0100)]
arm: dts: Support SC598-SOM-EZKIT

Add minimal device tree for Analog Devices' SC598-SOM-EZKIT board, and
the SC598 SoM.

This patch depends on patch 01, for sc5xx.dtsi.

Co-developed-by: Greg Malysa <greg.malysa@timesys.com>
Signed-off-by: Greg Malysa <greg.malysa@timesys.com>
Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: dts: Support SC594-SOM-EZLITE
Oliver Gaskell [Thu, 12 Sep 2024 15:50:47 +0000 (16:50 +0100)]
arm: dts: Support SC594-SOM-EZLITE

Add minimal device tree for Analog Devices' SC594-SOM-EZLITE board.

This patch depends on Patches 01 and 05, for sc5xx.dtsi and
sc594-som.dtsi respectively.

Co-developed-by: Greg Malysa <greg.malysa@timesys.com>
Signed-off-by: Greg Malysa <greg.malysa@timesys.com>
Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: dts: Support SC594-SOM-EZKIT
Oliver Gaskell [Thu, 12 Sep 2024 15:50:46 +0000 (16:50 +0100)]
arm: dts: Support SC594-SOM-EZKIT

Add minimal device tree for Analog Devices' SC594-SOM-EZKIT board, and
the SC594 SoM.

This patch depends on patch 01, for sc5xx.dtsi.

Co-developed-by: Greg Malysa <greg.malysa@timesys.com>
Signed-off-by: Greg Malysa <greg.malysa@timesys.com>
Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: dts: Support SC589-EZKIT
Oliver Gaskell [Thu, 12 Sep 2024 15:50:45 +0000 (16:50 +0100)]
arm: dts: Support SC589-EZKIT

Add minimal device tree for Analog Devices' SC589-EZKIT board.

This patch depends on Patches 01 and 02, for sc5xx.dtsi and sc58x.dtsi.

Co-developed-by: Greg Malysa <greg.malysa@timesys.com>
Signed-off-by: Greg Malysa <greg.malysa@timesys.com>
Co-developed-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: dts: Support SC589-MINI
Oliver Gaskell [Thu, 12 Sep 2024 15:50:44 +0000 (16:50 +0100)]
arm: dts: Support SC589-MINI

Add minimal device tree for Analog Devices' SC589-MINI board.

This patch depends on Patches 01 and 02, for sc5xx.dtsi and sc58x.dtsi.

Co-developed-by: Greg Malysa <greg.malysa@timesys.com>
Signed-off-by: Greg Malysa <greg.malysa@timesys.com>
Co-developed-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>
2 months agoarm: dts: Support SC584-EZKIT
Oliver Gaskell [Thu, 12 Sep 2024 15:50:43 +0000 (16:50 +0100)]
arm: dts: Support SC584-EZKIT

Add minimal device tree for Analog Devices' SC584-EZKIT board, and
common files for the SC58x family.

This patch depends on Patch 01, for sc5xx.dtsi.

Co-developed-by: Greg Malysa <greg.malysa@timesys.com>
Signed-off-by: Greg Malysa <greg.malysa@timesys.com>
Co-developed-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Oliver Gaskell <Oliver.Gaskell@analog.com>