]> Git Repo - J-u-boot.git/log
J-u-boot.git
5 weeks agodrivers: misc: gsc: add support for prescaled
Tim Harvey [Wed, 18 Dec 2024 19:45:42 +0000 (11:45 -0800)]
drivers: misc: gsc: add support for prescaled

Add support for Gateworks System Controller pre-scaled ADC input.

Signed-off-by: Tim Harvey <[email protected]>
5 weeks agodrivers: misc: gsc: add support for fan controller
Tim Harvey [Wed, 18 Dec 2024 19:45:41 +0000 (11:45 -0800)]
drivers: misc: gsc: add support for fan controller

Add support for Gateworks System Controller fan tach input.

Signed-off-by: Tim Harvey <[email protected]>
5 weeks agospi: mxc_spi: use proper clock for SPI bus
Tim Harvey [Wed, 18 Dec 2024 19:42:24 +0000 (11:42 -0800)]
spi: mxc_spi: use proper clock for SPI bus

The mxc_get_clock function is around for compatibility with older
drivers that are not clock aware. In this case asking for the clk for
MXC_CSPI_CLK does not take into account there are multiple SPI busses on
modern IMX SoC's and it will return the clock for the first bus which
may not be used or configured.

In the case you are not using the first bus you will not get the proper
clock. Fix this by obtaining the clock rate from the bus clock.

This resolves an invalid SPI clock frequency configuration for SPI2 on a
board where SPI1 is not used.

Signed-off-by: Tim Harvey <[email protected]>
5 weeks agoMerge branch '2024-12-21-add-arm64-CI-host-support' into next
Tom Rini [Sat, 21 Dec 2024 18:27:55 +0000 (12:27 -0600)]
Merge branch '2024-12-21-add-arm64-CI-host-support' into next

First, thanks to Simon Glass and also Linaro, we now have access to a
few fast arm64 host machines in our Gitlab instance, to use as CI
runners. This series finishes the work that I pushed earlier and Simon
had started that enables arm64 hosts to be used for most things now.

The first notable change, especially if you use this on your own Gitlab
instance is that "DEFAULT_TAG" is now unused and we instead have:
- DEFAULT_ALL_TAG:
- DEFAULT_ARM64_TAG:
- DEFAULT_AMD64_TAG:
- DEFAULT_FAST_AMD64_TAG:

This lets us say that some jobs can be run on all runners, because they
are small enough that anything we'd connect to CI is fast enough and it
also does not depend on the underlying host architecture. Next we have
tags for any arm64 host, or any amd64 host. Finally, we have a tag for
fast amd64 hosts. What these last three are for is that we have a few
jobs that need to run on amd64 hosts and so we have to restrict them
there, but we also have now reworked the world build jobs to build
(almost) everything in a single job and on the fast amd64 machines this
is still as quick as the old way was, in practice.

To reach this point, we say that the Xtensa jobs can only run on amd64
hosts. Our targets only work with the binary-only toolchain and so this
is a reasonable limit and we exclude them from the world build jobs. We
also need to deal with ensuring the right toolchain is used regardless
what the host architecture is and that we don't use the host toolchain
by accident. Finally, because some of these changes needed to be worked
out in the linter, fix some of the general warnings that notes as well.

5 weeks agodocker: Update to latest "Jammy" tag
Tom Rini [Sun, 8 Dec 2024 17:07:32 +0000 (11:07 -0600)]
docker: Update to latest "Jammy" tag

Bring us up to the current Ubuntu "Jammy" tag.

Signed-off-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
5 weeks agodoc: Expand what we say about building the docker container a bit
Tom Rini [Sun, 8 Dec 2024 17:07:31 +0000 (11:07 -0600)]
doc: Expand what we say about building the docker container a bit

First, try and be slightly clearer about what "buildx" is with respect
to the docker build process.

Second, now that we build the container for both amd64 and arm64, we
should document how to make a docker "builder" that has multiple nodes.
With this one node should be amd64 and one node arm64, and with
reasonably fast arm64 hardware this will be much quicker than using
QEMU.

Signed-off-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
5 weeks agodocker: Prefer the kernelorg toolchains over "root"
Tom Rini [Sun, 8 Dec 2024 17:07:30 +0000 (11:07 -0600)]
docker: Prefer the kernelorg toolchains over "root"

We should always look in our downloaded toolchains first and then for
host-provided toolchains.

Signed-off-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
5 weeks agodocker: Ensure we use the cross toolchain for aarch64 on arm64
Tom Rini [Sun, 8 Dec 2024 17:07:29 +0000 (11:07 -0600)]
docker: Ensure we use the cross toolchain for aarch64 on arm64

We do not want to use the host toolchain for building our platforms in
CI (it is both too old, and would be inconsistent with our CI
practices). To do this we need to set the toolchain-prefix so that we
don't end up guessing "/opt/.../aarch64-linux-aarch64-linux-" as the
prefix.

Link: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/32
Signed-off-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
5 weeks agoGitlab: Avoid downloading all artifacts in later stages
Tom Rini [Sun, 8 Dec 2024 17:07:28 +0000 (11:07 -0600)]
Gitlab: Avoid downloading all artifacts in later stages

In the test.py stage of the build we mark the pytest results as
artifacts to save, so that they can be used for reports. This however
leads to all of the artifacts being downloaded (and then not used) in
later stages. Optimize this out by using an empty list of dependencies
here (which is the keyword for which artifacts are needed).

Signed-off-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
5 weeks agoGitLab: Add a default workflow stanza
Tom Rini [Sun, 8 Dec 2024 17:07:27 +0000 (11:07 -0600)]
GitLab: Add a default workflow stanza

When validating our current pipeline, a warning is produced about a lack
of a default workflow. For how we use it, we can add a simple default of
"always".

Signed-off-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
5 weeks agoGitLab CI: Make wider use of tags
Tom Rini [Sun, 8 Dec 2024 17:07:26 +0000 (11:07 -0600)]
GitLab CI: Make wider use of tags

First, introduce DEFAULT_ALL_TAG, DEFAULT_ARM64_TAG, DEFAULT_AMD64_TAG
and DEFAULT_FAST_AMD64_TAG and remove the previous DEFAULT_TAG (as
anyone making use of that will need to adjust their jobs). This allows
us to say that some jobs can run on amd64 or arm64 hosts under the all
tag, while some jobs must run on amd64 (the Xtensa jobs due to
binary-only toolchains and sandbox for now) Then we rework the world
build stage to only run on our very fast amd64 hosts, or our arm64 hosts
(which are also very fast). This should result in a similar overall
build time but also a much more consistent overall build time as we
won't have the two big world jobs possibly run on our slower build
nodes.

Signed-off-by: Tom Rini <[email protected]>
5 weeks agodocker: Use ${TCVER} more widely
Tom Rini [Sun, 8 Dec 2024 17:07:25 +0000 (11:07 -0600)]
docker: Use ${TCVER} more widely

Remove the rest of the places where we hard-code the version of the
toolchain we're using.

Signed-off-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
5 weeks agoDocker/CI: Only test Xtensa on amd64 hosts
Tom Rini [Sun, 8 Dec 2024 17:07:24 +0000 (11:07 -0600)]
Docker/CI: Only test Xtensa on amd64 hosts

The xtensa architecture is interesting in that the platforms we support
are only valid on the binary-only toolchains as the DC233C instruction
set requires those toolchains (and not the FSF instruction set). Only
install the binary toolchain on amd64 hosts and only run the tests on
them as well.

Signed-off-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
6 weeks agoMerge branch '2024-12-19-assorted-tooling-updates' into next
Tom Rini [Thu, 19 Dec 2024 15:10:48 +0000 (09:10 -0600)]
Merge branch '2024-12-19-assorted-tooling-updates' into next

This brings in assortment of updates to our python tooling, from Paul
HENRYS <[email protected]>

6 weeks agotools: binman: etype: fit: Append DTB directory to the list of input directories
Paul HENRYS [Mon, 25 Nov 2024 18:16:54 +0000 (19:16 +0100)]
tools: binman: etype: fit: Append DTB directory to the list of input directories

When specifying a directory containing DTBs with 'fit,fdt-list-dir', it can be
handy not to have to also specify this directory to the input directories of
binman with '-I' option and use the method tools.append_input_dirs() append it.
This avoids to have to specify the DTB directory in both the device tree
provided to binman and through '-I' option to binman.

Signed-off-by: Paul HENRYS <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
6 weeks agotools: u_boot_pylib: Allow to append input directories to indir
Paul HENRYS [Mon, 25 Nov 2024 18:16:53 +0000 (19:16 +0100)]
tools: u_boot_pylib: Allow to append input directories to indir

append_input_dirs() can be used to append a list of input directories to indir
global list.

Signed-off-by: Paul HENRYS <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
6 weeks agotools: binman: etype: Allow to replace 'NAME' in node names
Paul HENRYS [Mon, 25 Nov 2024 17:54:21 +0000 (18:54 +0100)]
tools: binman: etype: Allow to replace 'NAME' in node names

This change allows to replace both 'SEQ' and 'NAME' keywords by respectively a
sequence number and the name of the FDT to provide more flexibility in the node
name for the device trees included in the FIT.

Signed-off-by: Paul HENRYS <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
6 weeks agotools: binman: Pass a list of input directory to EnsureCompiled()
Paul HENRYS [Mon, 25 Nov 2024 17:51:11 +0000 (18:51 +0100)]
tools: binman: Pass a list of input directory to EnsureCompiled()

Input directories can be passed to binman using the '-I' option and those
input directories are now also passed to 'dtc' when run by binman.

Signed-off-by: Paul HENRYS <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
6 weeks agotools: dtoc: Allow passing optional input directories
Paul HENRYS [Mon, 25 Nov 2024 17:51:10 +0000 (18:51 +0100)]
tools: dtoc: Allow passing optional input directories

An optional list of input directories can be passed to EnsureCompiled() which
allows to pass a list of directories where input files can be searched.

Signed-off-by: Paul HENRYS <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
6 weeks agotools: binman: Add tests for FIT with data encrypted by mkimage
Paul HENRYS [Mon, 25 Nov 2024 17:47:17 +0000 (18:47 +0100)]
tools: binman: Add tests for FIT with data encrypted by mkimage

Test the property 'fit,encrypt' to encrypt FIT data.

Signed-off-by: Paul HENRYS <[email protected]>
6 weeks agotools: binman: add 'fit, encrypt' property to pass keys directory to mkimage
Paul HENRYS [Mon, 25 Nov 2024 17:47:16 +0000 (18:47 +0100)]
tools: binman: add 'fit, encrypt' property to pass keys directory to mkimage

mkimage can be used for both signing the FIT or encrypt its content and the
option '-k' can be used to pass a directory where both signing and encryption
keys can be retrieved. Adding 'fit,encrypt' property to the 'fit' node, leads to
try to find keys directory among binman include directories.
_get_priv_keys_dir() is renamed as _get_keys_dir() and adapted to support both
signing and encryption nodes in the FIT.

Signed-off-by: Paul HENRYS <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
6 weeks agoaes: Allow to store randomly generated IV in the FIT
Paul HENRYS [Mon, 25 Nov 2024 17:47:15 +0000 (18:47 +0100)]
aes: Allow to store randomly generated IV in the FIT

When the initialisation vector is randomly generated, its value shall be
stored in the FIT together with the encrypted data. The changes allow to
store the IV in the FIT also in the case where the key is not stored in
the DTB but retrieved somewhere else at runtime.

Signed-off-by: Paul HENRYS <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
6 weeks agopowerpc: Support using upstream devicetrees
J. Neuschäfer [Thu, 5 Dec 2024 17:22:00 +0000 (18:22 +0100)]
powerpc: Support using upstream devicetrees

For new PowerPC developments, it will be useful to borrow devicetrees
from Linux. This patch makes it possible.

Signed-off-by: J. Neuschäfer <[email protected]>
Reviewed-by: Sumit Garg <[email protected]>
6 weeks agophy: don't spam console if phys property is absent in device node
Roger Quadros [Tue, 3 Dec 2024 20:57:36 +0000 (22:57 +0200)]
phy: don't spam console if phys property is absent in device node

In generic_phy_get_bulk(), if 'phys' property is absent in
the device node then it is not an error condition.

Change print message verbosity to debug to avoid spamming
console in such cases.

Signed-off-by: Roger Quadros <[email protected]>
Reviewed-by: Siddharth Vadapalli <[email protected]>
6 weeks agoverdin-am62: fix FASTBOOT_BUF_ADDR and FASTBOOT_BUF_SIZE
Hiago De Franco [Tue, 3 Dec 2024 12:33:02 +0000 (09:33 -0300)]
verdin-am62: fix FASTBOOT_BUF_ADDR and FASTBOOT_BUF_SIZE

The current value of CONFIG_FASTBOOT_BUF_ADDR is incorrect for hardware
with 512MB and 1GB of RAM. The RAM address ranges for these devices are:

- 512MB:
  - Start: 0x80000000
  - End:   0xA0000000
- 1GB:
  - Start: 0x80000000
  - End:   0xC0000000

The current buffer address makes fastboot downloads work only on
hardware with 2GB of RAM.

To fix this issue:
1. Lower CONFIG_FASTBOOT_BUF_ADDR to 0x88200000. This makes the buffer
   to be equal ot CONFIG_SYS_LOAD_ADDR, which is a safe address to
   download files using fastboot.

2. Reduce the size of the download buffer to 128MB, avoiding overlaps
   with RAMDISK_ADDR_R. This is a good enough value for individual
   downloads.

These changes make fastboot downloads work with 512MB and 1GB devices.

Fixes: defe30a78b76 ("verdin-am62: add DFU, USB and UUU fastboot support")
Signed-off-by: Hiago De Franco <[email protected]>
Acked-by: Francesco Dolcini <[email protected]>
6 weeks agoarch: x86: lib: Add support of legacy 64-bit entry point at 0x200
Paul HENRYS [Wed, 20 Nov 2024 10:39:43 +0000 (11:39 +0100)]
arch: x86: lib: Add support of legacy 64-bit entry point at 0x200

Support of legacy 64-bit entry point was already present when booting a bzimage
with 'zboot' but not supported with 'bootm' when the x86_64 Linux kernel is
embedded in a FIT image.

Signed-off-by: Paul HENRYS <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
6 weeks agoMerge patch series "sandbox: repair compile and run-time for OF_EMBED case"
Tom Rini [Wed, 18 Dec 2024 18:36:38 +0000 (12:36 -0600)]
Merge patch series "sandbox: repair compile and run-time for OF_EMBED case"

Evgeny Bachinin <[email protected]> says:

This patch-set repairs ability to use sandbox with CONFIG_OF_EMBED=y.

For now, to use OF_EMBED, the following must be done
1) sandbox64_defconfig should have:
  ```
  -CONFIG_OF_LIVE=y
  +CONFIG_OF_EMBED=y
  ```

2) On sandbox when CONFIG_OF_EMBED=y, the u-boot process can't start
due to:
  ```
  Bloblist at b000 not found (err=-2)
  initcall failed at call 000000000011829c (err=-2: No such file or \
      directory)
  ### ERROR ### Please RESET the board ###
  ```
  So, it is natural desire to disable CONFIG_BLOBLIST just to test
sandbox with OF_EMBED=y (disable it one way or another):
  ```
    config SANDBOX
  - select BLOBLIST
  +     select BLOBLIST if SOME_NON_EXISTING_OPTION
  ```

3) As a result, having such changes (CONFIG_OF_EMBED=y &&
CONFIG_BLOBLIST=n) leads to the link & run-time errors, being fixed
by this patch series.

Link: https://lore.kernel.org/r/20241202-sandbox_repair_of_embed-v1-0-05aff4b0ccf7@salutedevices.com
[trini: The final patch is dropped as no longer relevant with Simon's
        rework to that function which is now applied.]

6 weeks agoMerge patch series "fdt: Correct condition for receiving bloblist"
Tom Rini [Wed, 18 Dec 2024 18:34:58 +0000 (12:34 -0600)]
Merge patch series "fdt: Correct condition for receiving bloblist"

This series is from Simon Glass <[email protected]>.

It first corrects the test for checking if a bloblist could have come
from TPL and so we check for a device tree, and then changes the
argument order for board_fdt_blob_setup() to be more inline with our
usual argument ordering.

Link: https://lore.kernel.org/r/[email protected]
6 weeks agotest: sandbox: fix link error with do_ut_bootm if BLOBLIST=n
Evgeny Bachinin [Mon, 2 Dec 2024 13:45:25 +0000 (16:45 +0300)]
test: sandbox: fix link error with do_ut_bootm if BLOBLIST=n

Having CONFIG_OF_EMBED=y && CONFIG_BLOBLIST=n leads to the link
error:
```
ld: /tmp/ccwtRVty.ltrans28.ltrans.o:(.data.rel+0x4e8): undefined \
                                            reference to `do_ut_bootm'
```

Fixes: fe158657a5b ("test: inconsistent bootm tests")
Signed-off-by: Evgeny Bachinin <[email protected]>
6 weeks agotest: sandbox: fix link error with do_ut_bloblist if BLOBLIST=n
Evgeny Bachinin [Mon, 2 Dec 2024 13:45:24 +0000 (16:45 +0300)]
test: sandbox: fix link error with do_ut_bloblist if BLOBLIST=n

Having CONFIG_OF_EMBED=y && CONFIG_BLOBLIST=n leads to the link
error:
```
ld: /tmp/ccwtRVty.ltrans28.ltrans.o:(.data.rel+0x4b0): undefined \
                                         reference to `do_ut_bloblist'
```

Fixes: 6ea5df39e8d ("test: Only enable bloblist test when supported")
Signed-off-by: Evgeny Bachinin <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
6 weeks agotest: sandbox: fix invalid_use_of_IF_ENABLED_INT if BLOBLIST=n
Evgeny Bachinin [Mon, 2 Dec 2024 13:45:23 +0000 (16:45 +0300)]
test: sandbox: fix invalid_use_of_IF_ENABLED_INT if BLOBLIST=n

Having CONFIG_OF_EMBED=y && CONFIG_BLOBLIST=n leads to the link
error:
```
ld: /tmp/ccRVty.ltrans40.ltrans.o: in function `lib_test_is_enabled':
test/lib/kconfig.c:24: undefined reference to \
                                       `invalid_use_of_IF_ENABLED_INT'
ld: test/lib/kconfig.c:26: undefined reference to \
                                `invalid_use_of_CONFIG_IF_ENABLED_INT'
```

Fixes: 29784d62ede ("test: Add some tests for kconfig.h")
Signed-off-by: Evgeny Bachinin <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
6 weeks agosandbox: fix bloblist_finish() linker error if BLOBLIST=n
Evgeny Bachinin [Mon, 2 Dec 2024 13:45:22 +0000 (16:45 +0300)]
sandbox: fix bloblist_finish() linker error if BLOBLIST=n

Having CONFIG_OF_EMBED=y && CONFIG_BLOBLIST=n leads to the link
error:
```
ld: /tmp/ccwtRVty.ltrans0.ltrans.o: in function `state_uninit':
arch/sandbox/cpu/state.c:508: undefined reference to `bloblist_finish'
```

Fixes: 1c52fcca72b ("sandbox: Write out bloblist when exiting")
Signed-off-by: Evgeny Bachinin <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
6 weeks agofdt: Swap the signature for board_fdt_blob_setup()
Simon Glass [Sat, 2 Nov 2024 17:49:42 +0000 (11:49 -0600)]
fdt: Swap the signature for board_fdt_blob_setup()

This returns a devicetree and updates a parameter with an error code.
Swap it, since this fits better with the way U-Boot normally works. It
also (more easily) allows leaving the existing pointer unchanged.

No yaks were harmed in this change, but there is a very small code-size
reduction.

For sifive, the OF_BOARD option must be set for the function to be
called, so there is no point in checking it again. Also OF_SEPARATE is
defined always.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Matthias Brugger <[email protected]>
Reviewed-by: Patrice Chotard <[email protected]>
[trini: Update total_compute]
Signed-off-by: Tom Rini <[email protected]>
6 weeks agofdt: Correct condition for receiving bloblist
Simon Glass [Sat, 2 Nov 2024 17:49:41 +0000 (11:49 -0600)]
fdt: Correct condition for receiving bloblist

The condition for receiving a bloblist from TPL is reversed. This was
only noticed are the other fixes landed. Fix it.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Matthias Brugger <[email protected]>
6 weeks agoMerge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv into...
Tom Rini [Wed, 18 Dec 2024 14:01:48 +0000 (08:01 -0600)]
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv into next

CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/23926

- Board: Support LicheeRV Nano
- Board: Support bananapi-f3
- Board: Switch to OF_UPSTREAM for StarFive JH7110
- Board: Add sdhci driver for TH1520 SoC

6 weeks agoriscv: spl: add FIT name for RISC-V Falcon mode
Randolph [Fri, 13 Dec 2024 06:51:16 +0000 (14:51 +0800)]
riscv: spl: add FIT name for RISC-V Falcon mode

The FIT name in RISC-V Falcon mode should be different from that in
normal boot mode; it is called linux.itb. If the setting is missing
in common/spl, the normal boot file name will be used.

Signed-off-by: Randolph <[email protected]>
6 weeks agodoc: spacemit: bananapi_f3: document Banana Pi F3 board
Kongyang Liu [Sun, 15 Dec 2024 05:02:42 +0000 (13:02 +0800)]
doc: spacemit: bananapi_f3: document Banana Pi F3 board

Add document for Banana Pi F3 board which based on SpacemiT's K1 SoC.

Signed-off-by: Kongyang Liu <[email protected]>
Signed-off-by: Huan Zhou <[email protected]>
Tested-by: Marcel Ziswiler <[email protected]>
Reviewed-by: Yixun Lan <[email protected]>
6 weeks agoriscv: spacemit: bananapi_f3: initial support added
Kongyang Liu [Sun, 15 Dec 2024 05:02:41 +0000 (13:02 +0800)]
riscv: spacemit: bananapi_f3: initial support added

Add basic support for SpacemiT's Banana Pi F3 board.
Update the k1.dtsi align with mainline.
Note that the device tree files follow the mainline Linux source[1].

Links: https://patches.linaro.org/project/linux-serial/patch/20240730-k1-01-basic-dt-v5-8-98263aae83be@gentoo.org/ [1]

Signed-off-by: Kongyang Liu <[email protected]>
Signed-off-by: Huan Zhou <[email protected]>
Reviewed-by: Leo Yu-Chi Liang <[email protected]>
Reviewed-by: Yixun Lan <[email protected]>
Tested-by: Marcel Ziswiler <[email protected]>
6 weeks agoconfigs: th1520_lpi4a: enable mmc controller support
Maksim Kiselev [Wed, 11 Dec 2024 20:11:01 +0000 (23:11 +0300)]
configs: th1520_lpi4a: enable mmc controller support

Enable driver for DesignWare MSHC. TH1520 supports all
speed modes up to HS400ES and UHS SDR105.

Also enable ADMA and mmc command.

Reviewed-by: Jaehoon Chung <[email protected]>
Signed-off-by: Maksim Kiselev <[email protected]>
6 weeks agoriscv: dts: t-head: Add sdhci and emmc nodes
Maksim Kiselev [Wed, 11 Dec 2024 20:11:00 +0000 (23:11 +0300)]
riscv: dts: t-head: Add sdhci and emmc nodes

Add SDHCI and EMMC controlles nodes on TH-1520 SoC. And enable them for
Lichee module 4A.

Reviewed-by: Jaehoon Chung <[email protected]>
Signed-off-by: Maksim Kiselev <[email protected]>
6 weeks agommc: snps_sdhci: Add sdhci driver support for TH1520 SoC
Maksim Kiselev [Wed, 11 Dec 2024 20:10:59 +0000 (23:10 +0300)]
mmc: snps_sdhci: Add sdhci driver support for TH1520 SoC

Add support for DesignWare SDHCI host controller on Alibaba TH1520 SoC

Signed-off-by: Maksim Kiselev <[email protected]>
Tested-by: Heinrich Schuchardt <[email protected]>
6 weeks agoriscv: cpu: jh7110: Sort the list of imply statements
Hal Feng [Sun, 8 Dec 2024 09:19:42 +0000 (17:19 +0800)]
riscv: cpu: jh7110: Sort the list of imply statements

The imply statements should be sorted in the sequence
of appearance in .config.

Tested-by: Anand Moon <[email protected]>
Tested-by: E Shattow <[email protected]>
Suggested-by: Heinrich Schuchardt <[email protected]>
Signed-off-by: Hal Feng <[email protected]>
6 weeks agoboard: starfive: spl: Support multiple DTBs for JH7110 based boards
Hal Feng [Sun, 8 Dec 2024 09:19:41 +0000 (17:19 +0800)]
board: starfive: spl: Support multiple DTBs for JH7110 based boards

Get product ID and the other information from EEPROM, use them to select
the correct DTB.

Tested-by: Anand Moon <[email protected]>
Tested-by: E Shattow <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
Signed-off-by: Hal Feng <[email protected]>
6 weeks agoboard: starfive: spl: Fix the wrong use of CONFIG_IS_ENABLED()
Hal Feng [Sun, 8 Dec 2024 09:19:40 +0000 (17:19 +0800)]
board: starfive: spl: Fix the wrong use of CONFIG_IS_ENABLED()

The prefix "SPL_" is not needed when using CONFIG_IS_ENABLED().

Tested-by: Anand Moon <[email protected]>
Tested-by: E Shattow <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
Fixes: 5ecf9b0b8a75 ("board: starfive: add StarFive VisionFive v2 board support")
Signed-off-by: Hal Feng <[email protected]>
6 weeks agoriscv: dts: jh7110: Support multiple DTBs in a Fit image
Hal Feng [Sun, 8 Dec 2024 09:19:39 +0000 (17:19 +0800)]
riscv: dts: jh7110: Support multiple DTBs in a Fit image

Support multiple DTBs for JH7110 based boards, so they can
select the correct DT at runtime.

Tested-by: Anand Moon <[email protected]>
Tested-by: E Shattow <[email protected]>
Reviewed-by: E Shattow <[email protected]>
Signed-off-by: Hal Feng <[email protected]>
6 weeks agoconfigs: visionfive2: Enable MULTI_DTB_FIT for JH7110 based board DT
Hal Feng [Sun, 8 Dec 2024 09:19:38 +0000 (17:19 +0800)]
configs: visionfive2: Enable MULTI_DTB_FIT for JH7110 based board DT

So JH7110 based boards can select their own DT at runtime.

Tested-by: Anand Moon <[email protected]>
Tested-by: E Shattow <[email protected]>
Reviewed-by: E Shattow <[email protected]>
Signed-off-by: Hal Feng <[email protected]>
6 weeks agoboard: starfive: spl: Drop the unneeded DT modification code
Hal Feng [Sun, 8 Dec 2024 09:19:37 +0000 (17:19 +0800)]
board: starfive: spl: Drop the unneeded DT modification code

As OF_UPSTREAM is implemented, these code are redundant.

Tested-by: Anand Moon <[email protected]>
Tested-by: E Shattow <[email protected]>
Signed-off-by: Hal Feng <[email protected]>
6 weeks agoriscv: dts: jh7110: Add u-boot device tree for JH7110 based boards
Hal Feng [Sun, 8 Dec 2024 09:19:36 +0000 (17:19 +0800)]
riscv: dts: jh7110: Add u-boot device tree for JH7110 based boards

To support the other JH7110 based boards, add u-boot
device tree for them.

Tested-by: Anand Moon <[email protected]>
Tested-by: E Shattow <[email protected]>
Reviewed-by: E Shattow <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: H Bell <[email protected]>
Signed-off-by: Hal Feng <[email protected]>
6 weeks agoriscv: dts: jh7110: Move common code to the new jh7110-common-u-boot.dtsi
Hal Feng [Sun, 8 Dec 2024 09:19:35 +0000 (17:19 +0800)]
riscv: dts: jh7110: Move common code to the new jh7110-common-u-boot.dtsi

To support JH7110 based boards besides v1.3B,
add a common dtsi and add common code to it.

Tested-by: Anand Moon <[email protected]>
Tested-by: E Shattow <[email protected]>
Reviewed-by: E Shattow <[email protected]>
Signed-off-by: Hal Feng <[email protected]>
6 weeks agopcie: starfive: Make the driver compatible with upstream DT
Hal Feng [Sun, 8 Dec 2024 09:19:34 +0000 (17:19 +0800)]
pcie: starfive: Make the driver compatible with upstream DT

There are difference between upstream DT and the old DT
in terms of reg base, reset gpio and syscon. Make the driver
compatible with upstream DT.

Tested-by: Anand Moon <[email protected]>
Tested-by: E Shattow <[email protected]>
Signed-off-by: Hal Feng <[email protected]>
6 weeks agommc: dw_mmc: Add "starfive, jh7110-mmc" compatible to match upstream DT
Hal Feng [Sun, 8 Dec 2024 09:19:33 +0000 (17:19 +0800)]
mmc: dw_mmc: Add "starfive, jh7110-mmc" compatible to match upstream DT

Make the U-Boot JH7110 MMC driver compatible with upstream DT.

Reviewed-by: Jaehoon Chung <[email protected]>
Signed-off-by: Hal Feng <[email protected]>
6 weeks agoriscv: dts: jh7110: Make u-boot device trees adapting to upstream DT
Hal Feng [Sun, 8 Dec 2024 09:19:32 +0000 (17:19 +0800)]
riscv: dts: jh7110: Make u-boot device trees adapting to upstream DT

Add u-boot features to the U-Boot device tree.

Tested-by: Anand Moon <[email protected]>
Tested-by: E Shattow <[email protected]>
Reviewed-by: E Shattow <[email protected]>
Acked-by: Sumit Garg <[email protected]>
Signed-off-by: Hal Feng <[email protected]>
6 weeks agodts: starfive: Switch to using upstream DT
Hal Feng [Sun, 8 Dec 2024 09:19:31 +0000 (17:19 +0800)]
dts: starfive: Switch to using upstream DT

Enable OF_UPSTREAM to use upstream DT and add starfive/ prefix to
the DEFAULT_DEVICE_TREE. Rename jh7110-starfive-visionfive-2-u-boot.dtsi
to jh7110-starfive-visionfive-2-v1.3b-u-boot.dtsi and set the v1.3b
device tree as the default device tree.

Drop redundant DT files from arch/riscv/dts/ and redundant clock and
reset definitions from include/dt-bindings/.

Since the old clock definitions is a little different from those in
upstream Linux, update the clock definitions in clock drivers
accordingly.

Tested-by: Anand Moon <[email protected]>
Tested-by: E Shattow <[email protected]>
Acked-by: Sumit Garg <[email protected]>
Signed-off-by: Hal Feng <[email protected]>
6 weeks agoboard: add support for LicheeRV Nano
Thomas Bonnefille [Tue, 12 Nov 2024 14:57:38 +0000 (15:57 +0100)]
board: add support for LicheeRV Nano

The LicheeRV Nano is a small SBC using the Sophgo SG2002 RISCV SoC.

Signed-off-by: Thomas Bonnefille <[email protected]>
6 weeks agoriscv: dts: sophgo: add device tree for LicheeRV Nano
Thomas Bonnefille [Tue, 12 Nov 2024 14:57:37 +0000 (15:57 +0100)]
riscv: dts: sophgo: add device tree for LicheeRV Nano

Import a slightly modified version of the LicheeRV Nano and SG2002
device trees from the Linux Kernel. The current supported IPs are UART,
MMC, Timer, PLIC and CLINT.

Signed-off-by: Thomas Bonnefille <[email protected]>
6 weeks agodoc: add LicheeRV Nano and SG2002 SoC
Thomas Bonnefille [Tue, 12 Nov 2024 14:57:36 +0000 (15:57 +0100)]
doc: add LicheeRV Nano and SG2002 SoC

Provide a page describing the usage of U-Boot on the LicheeRV Nano and a
description of the board.

Signed-off-by: Thomas Bonnefille <[email protected]>
Reviewed-by: Leo Yu-Chi Liang <[email protected]>
6 weeks agoMerge branch 'u-boot-nand-20241212' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Tue, 17 Dec 2024 19:16:37 +0000 (13:16 -0600)]
Merge branch 'u-boot-nand-20241212' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash into next

CI: https://source.denx.de/u-boot/custodians/u-boot-nand-flash/-/pipelines/23837

Small addition to uboot-nand. Nothing relevant for now. Anyway
a nice new command coming from Miquel Raynal and small changes.

6 weeks agonand: Add a watch command
Michael Trimarchi [Thu, 12 Dec 2024 18:28:07 +0000 (19:28 +0100)]
nand: Add a watch command

This is a debug command to monitor the retention state of the data on
the array. The command needs a duplication of the mtd_read_oob()
function to actually return the maximum number of bitflips encountered
while reading the page. We could write a specific implementation for the
Sunxi driver but this is probably enough.

    nand watch <off> <size> - check an area for bitflips
    nand watch.part <part> - check a partition for bitflips
    nand watch.chip - check the whole device for bitflips

The output may be a bit verbose and could look like:

    => nand watch.chip
    device 0 whole chip
    size adjusted to 0xff60000 (5 bad blocks)

    NAND watch for bitflips in area 0x0-0xff60000:
    Page       0 (0x00000000) -> error -74
    Page       1 (0x00000800) -> error -74
    Page       2 (0x00001000) -> error -74
    Page       3 (0x00001800) -> error -74
    Page       4 (0x00002000) -> error -74
    Page       5 (0x00002800) -> error -74
    Page       6 (0x00003000) -> error -74
    Page       7 (0x00003800) -> error -74
    Page       8 (0x00004000) -> error -74
    Page       9 (0x00004800) -> error -74
    Page      10 (0x00005000) -> error -74
    Page      11 (0x00005800) -> error -74
    Page      12 (0x00006000) -> error -74
    Page      13 (0x00006800) -> error -74
    Page      14 (0x00007000) -> error -74
    Page      15 (0x00007800) -> error -74
    Page      16 (0x00008000) -> error -74
    Page      17 (0x00008800) -> error -74
    Page      18 (0x00009000) -> error -74
    Page      19 (0x00009800) -> error -74
    Page      20 (0x0000a000) -> error -74
    Page      21 (0x0000a800) -> error -74
    Page      22 (0x0000b000) -> error -74
    Page      23 (0x0000b800) -> error -74
    Page    1110 (0x0022b000) -> up to  1 bf/chunk
    Page    1122 (0x00231000) -> up to  1 bf/chunk
    Page    1132 (0x00236000) -> up to  1 bf/chunk
    Page    1362 (0x002a9000) -> up to  1 bf/chunk
    Page    4990 (0x009bf000) -> up to  1 bf/chunk
    Page    5728 (0x00b30000) -> up to  1 bf/chunk
    Page    7116 (0x00de6000) -> up to  1 bf/chunk
    Page    7160 (0x00dfc000) -> up to  1 bf/chunk
    Page    7494 (0x00ea3000) -> up to  1 bf/chunk
    Page   10842 (0x0152d000) -> up to  1 bf/chunk
    Page   11614 (0x016af000) -> up to  1 bf/chunk
    Page   11970 (0x01761000) -> up to  1 bf/chunk
    Page   12536 (0x0187c000) -> up to  1 bf/chunk
    Page   12687 (0x018c7800) -> up to  1 bf/chunk
    Page   14298 (0x01bed000) -> up to  1 bf/chunk
    Page   18268 (0x023ae000) -> up to  1 bf/chunk
    Page   18760 (0x024a4000) -> up to  1 bf/chunk
    Page   21440 (0x029e0000) -> up to  1 bf/chunk
    Page   22336 (0x02ba0000) -> up to  1 bf/chunk
    Page   22592 (0x02c20000) -> up to  1 bf/chunk
    Page   23872 (0x02ea0000) -> up to  1 bf/chunk
    Page   27584 (0x035e0000) -> up to  1 bf/chunk
    Page   35008 (0x04460000) -> up to  1 bf/chunk
    Page   37184 (0x048a0000) -> up to  1 bf/chunk
    Page   41728 (0x05180000) -> up to  1 bf/chunk
    Page   42176 (0x05260000) -> up to  1 bf/chunk
    Page   43200 (0x05460000) -> up to  1 bf/chunk
    Page   43328 (0x054a0000) -> up to  1 bf/chunk
    Page   45376 (0x058a0000) -> up to  1 bf/chunk
    Page   47040 (0x05be0000) -> up to  1 bf/chunk
    Page   47552 (0x05ce0000) -> up to  1 bf/chunk
    Page   49344 (0x06060000) -> up to  1 bf/chunk
    Page   49856 (0x06160000) -> up to  1 bf/chunk
    Page   62784 (0x07aa0000) -> up to  1 bf/chunk
    Page   65153 (0x07f40800) -> up to  1 bf/chunk
    Page   65228 (0x07f66000) -> up to  1 bf/chunk
    Page   65382 (0x07fb3000) -> up to  1 bf/chunk
    Page   98624 (0x0c0a0000) -> up to  1 bf/chunk
    Page  101952 (0x0c720000) -> up to  1 bf/chunk
    Page  107584 (0x0d220000) -> up to  1 bf/chunk
    Page  118208 (0x0e6e0000) -> up to  1 bf/chunk
    Page  126656 (0x0f760000) -> up to  1 bf/chunk
    Page  127680 (0x0f960000) -> up to  1 bf/chunk
    Page  129920 (0x0fdc0000) -> up to  1 bf/chunk
    Maximum number of bitflips: 1
    Pages with bitflips: 44/130752

It is also possible to reduce the output with the .quiet suffix in order
to just show the summary.

    => nand watch.chip
    device 0 whole chip
    size adjusted to 0xff60000 (5 bad blocks)

    NAND watch for bitflips in area 0x0-0xff60000:
    Maximum number of bitflips: 1
    Pages with bitflips: 44/130752

Signed-off-by: Miquel Raynal <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
6 weeks agomtd: nand: raw: atmel: remove unnecessary return value
Marcus Folkesson [Fri, 9 Aug 2024 12:15:43 +0000 (14:15 +0200)]
mtd: nand: raw: atmel: remove unnecessary return value

The condition 'ret' is always true as it is never set to other than
-EIO.

Remove 'ret' and the condition for copy.

Signed-off-by: Marcus Folkesson <[email protected]>
Reviewed-by: Michael Trimarchi <[email protected]>
6 weeks agocmd: mtd: simplify mtd_show_device()
Heinrich Schuchardt [Mon, 9 Sep 2024 23:23:34 +0000 (01:23 +0200)]
cmd: mtd: simplify mtd_show_device()

CONFIG_DM=y is always true.

Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Miquel Raynal <[email protected]>
Acked-by: Michael Trimarchi <[email protected]>
6 weeks agoMerge tag 'u-boot-imx-next-20241217' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Tue, 17 Dec 2024 19:15:58 +0000 (13:15 -0600)]
Merge tag 'u-boot-imx-next-20241217' 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/23877

- Add support for Apalis iMX8 1300MHz version.
- Don't advertise Gbit on (R)MII on the FEC controller.
- Fix srktool -c usage by removing spaces.

6 weeks agoimx: hab: fix srktool -c usage by removing spaces
Christoph Fritz [Mon, 16 Dec 2024 14:59:00 +0000 (15:59 +0100)]
imx: hab: fix srktool -c usage by removing spaces

The srktool option -c does not allow spaces between certificate
filenames. Only commas (',') should separate the filenames. If spaces
are incorrectly included, srktool will not display an error or warning
message but will only process the first certificate in the list.

So adapt documentation accordingly.

Signed-off-by: Christoph Fritz <[email protected]>
6 weeks agosmbios: address build warning
Peng Fan [Tue, 3 Dec 2024 13:42:57 +0000 (21:42 +0800)]
smbios: address build warning

include display_options.h to address build warning:
lib/smbios.c: In function ‘smbios_update_version’:
lib/smbios.c:305:9: warning: implicit declaration of function ‘print_buffer’
[-Wimplicit-function-declaration]
         print_buffer((ulong)ptr, ptr, 1, old_len + 1, 0);
         ^~~~~~~~~~~~

Signed-off-by: Peng Fan <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
6 weeks agoarm: mach-k3: fix typo in devstat macro name
Prasanth Babu Mantena [Wed, 27 Nov 2024 06:13:34 +0000 (11:43 +0530)]
arm: mach-k3: fix typo in devstat macro name

Fix spelling mistake in the board init files of j721e and j721s2.

s/WKUP_DEVSTAT_MCU_OMLY_MASK/WKUP_DEVSTAT_MCU_ONLY_MASK

Signed-off-by: Prasanth Babu Mantena <[email protected]>
6 weeks agobios_emulator: fix incorrect printing of address in "jump near immediate"
Yuri Zaporozhets [Sun, 1 Dec 2024 22:28:49 +0000 (23:28 +0100)]
bios_emulator: fix incorrect printing of address in "jump near immediate"

In the x86emuOp_jump_call_near_IMM() function the target address is
printed incorrectly when jumping backwards. For example instead of
"jmp 0xe8bc" the string "jmp ffffe8bc" is printed. That's because
of the following macro:

    DECODE_PRINTF2("%04x\n", ip);

while it should be

    DECODE_PRINTF2("%04x\n", (u16)ip);

Signed-off-by: Yuri Zaporozhets <[email protected]>
6 weeks agobios_emulator: fix incorrect printing of address in "call near immediate"
Yuri Zaporozhets [Sat, 30 Nov 2024 20:56:25 +0000 (21:56 +0100)]
bios_emulator: fix incorrect printing of address in "call near immediate"

In the x86emuOp_call_near_IMM() function the address of CALL is
printed incorrectly when jumping backwards. For example, the correct
disassemble of the bytes below would be:

0000E8DE  E8DBFF            call 0xe8bc

(verified by ndisasm). But instead the address is printed as "ffffe8bc".
That's because of the following macro:

    DECODE_PRINTF2("%04x\n", ip);

while it should be

    DECODE_PRINTF2("%04x\n", (u16)ip);

Signed-off-by: Yuri Zaporozhets <[email protected]>
6 weeks agobios_emulator: fix garbled printing of disassembled SET* instructions
Yuri Zaporozhets [Tue, 26 Nov 2024 23:29:53 +0000 (00:29 +0100)]
bios_emulator: fix garbled printing of disassembled SET* instructions

When DEBUG_DECODE_F is enabled in bios_emulator, the printing of
SET{O,NO,B,NB,Z,NZ,BE,NBE,S,NS,P,TP,L,NL,LE,NLE} instructions
is not followed by newline and is, therefore, immediately followed
by the printed address of a new instruction. This garbles the output
and makes it very difficult to read.

This patch adds missing DECODE_PRINTF("\n") calls to print newlines.

Signed-off-by: Yuri Zaporozhets <[email protected]>
6 weeks agobios_emulator: fix garbled printing of disassembled BSF instruction
Yuri Zaporozhets [Tue, 26 Nov 2024 21:59:37 +0000 (22:59 +0100)]
bios_emulator: fix garbled printing of disassembled BSF instruction

When DEBUG_DECODE_F is enabled in bios_emulator, the printing of BSF
instructions is garbled because the '\n' symbol is used instead of
the correct '\t'. Fix that.

Signed-off-by: Yuri Zaporozhets <[email protected]>
6 weeks agonet: fec: phy: Don't advertise Gbit on (R)MII
Alexander Sverdlin [Thu, 12 Dec 2024 17:25:24 +0000 (18:25 +0100)]
net: fec: phy: Don't advertise Gbit on (R)MII

Currently if a gigabit-capable PHY is connected to FEC via RMII or MII, it
will advertise 1000FULL and 1000HALF to a link partner.

Different problems may arise here:
- usually with (R)MII between MAC and PHY the PHY's connection to magnetics
would have only 2 pairs routed as well, otherwise a PHY can negotiate 1000
speed and there will be no traffic possible;
- but even if there is no way to negotiate 1000 speed in HW (only 2 signal
pairs routed), it may take a lot of time for PHY to figure this out; in
case of AD1300 it takes 17-20 seconds, which is waay longer than default
4s PHY_ANEG_TIMEOUT.

Use phy_set_supported() in such cases to disable gigabit advertised
options.

Signed-off-by: Alexander Sverdlin <[email protected]>
6 weeks agoimx: mach: imx8: fdt: set correct frequencies for the industrial SoC
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:55 +0000 (13:18 +0100)]
imx: mach: imx8: fdt: set correct frequencies for the industrial SoC

Set correct CPU and GPU frequencies for the industrial i.MX8 SoC
variant.

Ensure that the CPU and GPU frequencies are properly configured for the
industrial variant of the SoC. According to the "i.MX 8QuadMax
Industrial Applications Processors" datasheet, the frequency limits for
this variant are as follows:
- Cortex-A72: 1.296 GHz
- Cortex-A53: 1.104 GHz
- GPU core: 625 MHz
- GPU shader: 625 MHz

The CPU clock is enforced by the System Controller Firmware (SCFW), but
the cpufreq driver is unaware of this enforcement. By removing
unsupported frequencies from the operating points, we ensure that the
cpufreq driver aligns correctly with the SCFW's settings.

The GPU frequency, on the other hand, is not enforced by the SCFW. As a
result, the GPU could potentially be overclocked. To prevent this, we
set the correct clock frequency and update the operating points
accordingly, ensuring compliance with the datasheet specifications.

Signed-off-by: Stefan Eichenberger <[email protected]>
6 weeks agotoradex: apalis-imx8: simplify module version handling
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:54 +0000 (13:18 +0100)]
toradex: apalis-imx8: simplify module version handling

Simplify module version handling by removing the special case for the
Apalis iMX8QM.

The Apalis iMX8QM has been treated as a special case in module version
handling, but was always the default. By removing this special handling,
the code is simplified and easier to maintain.

We will not print the message "Unknown Apalis iMX8 module" anymore.
However, we still handle this because if the config block is missing we
show "MISSING TORADEX CONFIG BLOCK" and if the serial number is unknown
we show "Model: Toradex 0000 UNKNOWN MODULE V1.1A". Therefore, it is
still possible to detect such issues.

Signed-off-by: Stefan Eichenberger <[email protected]>
6 weeks agotoradex: tdx-cfg-block: add new apalis imx8 pids
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:53 +0000 (13:18 +0100)]
toradex: tdx-cfg-block: add new apalis imx8 pids

Add new PIDs for the Apalis iMX8 modules featuring the industrial
variant of the SoC, which supports a maximum CPU frequency of 1300 MHz.

Signed-off-by: Stefan Eichenberger <[email protected]>
6 weeks agotoradex: tdx-cfg-block: increase indentation for longer defines
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:52 +0000 (13:18 +0100)]
toradex: tdx-cfg-block: increase indentation for longer defines

This preparation step ensures that the first column has sufficient space
to handle longer defines. This is necessary for the new Apalis iMX8
defines.

Signed-off-by: Stefan Eichenberger <[email protected]>
6 weeks agotoradex: tdx-cfg-block: set apalis imx8dxp to always disabled
Stefan Eichenberger [Wed, 11 Dec 2024 12:18:51 +0000 (13:18 +0100)]
toradex: tdx-cfg-block: set apalis imx8dxp to always disabled

Apalis iMX8DXP 1GB is currently set to enable when compiling for Apalis
iMX8. This is a mistake the Apalis iMX8DXP 1GB was never released and is
not compatible to the Apalis iMX8 series.

Signed-off-by: Stefan Eichenberger <[email protected]>
6 weeks agoMerge patch series "Hyperflash Boot fixes for J7200/J721E"
Tom Rini [Sat, 14 Dec 2024 15:34:27 +0000 (09:34 -0600)]
Merge patch series "Hyperflash Boot fixes for J7200/J721E"

Anurag Dutta <[email protected]> says:

Hi All,
In u-boot, hbmc is broken and has been removed from j7200
configs. This series re-enables the hbmc driver and introduces a series
of hyperflash boot fixes. At present, in u-boot, the parent device (fss)
gets registered as a syscon device. This is done because the MMIO
mux driver in u-boot did not support the mux functionality when the
parent device is not a syscon. In this series, we make relevant changes
in the hbmc driver as well as dts' so that we can use the reg-mux driver for
selecting the appropriate state of the mux.

Test logs:

1) j721e-idk-gw hyperflash boot test: https://gist.github.com/anuragdutta731/50aae6fec707a3ffad6d985de6757fe4
2) j7200-evm hyperflash boot test: https://gist.github.com/anuragdutta731/c3a4d60f8bfd9c425d6c44b36eb7322b

Link: https://lore.kernel.org/r/[email protected]
6 weeks agomtd: Kconfig: Change HBMC driver's dependency to MULTIPLEXER and MUX_MMIO
Anurag Dutta [Fri, 29 Nov 2024 11:31:36 +0000 (17:01 +0530)]
mtd: Kconfig: Change HBMC driver's dependency to MULTIPLEXER and MUX_MMIO

The HBMC_AM654 driver was dependent on SYSCON because syscon APIs were
being used to select the multiplexer state. Change the dependency to
MULTIPLEXER and MUX_MMIO because mux APIs are now being used to
select mux state.

Signed-off-by: Anurag Dutta <[email protected]>
6 weeks agoconfigs: j7200_evm_*_defconfig: Add configs for Hyperflash boot
Vaishnav Achath [Fri, 29 Nov 2024 11:31:35 +0000 (17:01 +0530)]
configs: j7200_evm_*_defconfig: Add configs for Hyperflash boot

Kernel commit dbb124cf6888 ("configs: j7200: Remove HBMC_AM654
config") removed the HBMC_AM654 config because hbmc was broken
in u-boot. Hence, add the missing configs necessary to re-enable
Hyperflash boot.

Signed-off-by: Vaishnav Achath <[email protected]>
Signed-off-by: Anurag Dutta <[email protected]>
6 weeks agoinclude: configs: j721e_evm: Increase memory offset for tiboot3.bin in HyperFlash
Aswath Govindraju [Fri, 29 Nov 2024 11:31:34 +0000 (17:01 +0530)]
include: configs: j721e_evm: Increase memory offset for tiboot3.bin in HyperFlash

The size of J7200 tiboot3.bin is 516KB but the memory reserved for it in
HyperFlash was 512KB. This led to overlap of tiboot3.bin over tispl.bin
region and break in HyperFlash boot mode.

Therefore, fix this by increasing the memory allocated for tiboot3.bin
to 1MB for J7200.

Fixes: cf1d6867f774 ("board: ti: j7200: Introduce support for j7200 build targets")
Signed-off-by: Aswath Govindraju <[email protected]>
Signed-off-by: Vaishnav Achath <[email protected]>
Signed-off-by: Anurag Dutta <[email protected]>
6 weeks agoconfigs: j721e_evm_*_defconfig: Add configs for Hyperflash boot
Vaishnav Achath [Fri, 29 Nov 2024 11:31:33 +0000 (17:01 +0530)]
configs: j721e_evm_*_defconfig: Add configs for Hyperflash boot

Kernel commit 5b2671594b80 ("configs: j721e: Remove HBMC_AM654
config") removed the HBMC_AM654 config because hbmc was broken
in u-boot. Hence, add the missing configs necessary to re-enable
Hyperflash boot.

Signed-off-by: Vaishnav Achath <[email protected]>
Signed-off-by: Anurag Dutta <[email protected]>
6 weeks agoarm: dts: k3-j721e-r5-common: Add HBMC overrides for R5 SPL
Vaishnav Achath [Fri, 29 Nov 2024 11:31:32 +0000 (17:01 +0530)]
arm: dts: k3-j721e-r5-common: Add HBMC overrides for R5 SPL

Add 32-bit address overrides for Hyper Bus Memory Controller
for Hyperflash to be functional in R5 SPL.

Signed-off-by: Vaishnav Achath <[email protected]>
Signed-off-by: Anurag Dutta <[email protected]>
6 weeks agoarm: dts: k3-j7200-r5-common: Add HBMC overrides for R5 SPL
Vaishnav Achath [Fri, 29 Nov 2024 11:31:31 +0000 (17:01 +0530)]
arm: dts: k3-j7200-r5-common: Add HBMC overrides for R5 SPL

Add 32-bit address overrides for Hyper Bus Memory Controller
for Hyperflash to be functional in R5 SPL.

Signed-off-by: Vaishnav Achath <[email protected]>
Signed-off-by: Anurag Dutta <[email protected]>
6 weeks agomtd: HBMC-AM654: Changed syscon API to mux APIs
Anurag Dutta [Fri, 29 Nov 2024 11:31:30 +0000 (17:01 +0530)]
mtd: HBMC-AM654: Changed syscon API to mux APIs

The syscon APIs were used for selecting the state of the mux
device because the mmio-mux driver in u-boot did not support
the mux functionality when the parent device is not a syscon.
Change to mux APIs which utilizes the reg-mux driver to select the
state of the multiplexer.

Signed-off-by: Anurag Dutta <[email protected]>
6 weeks agomux: Makefile: Add config for mux drivers
Anurag Dutta [Fri, 29 Nov 2024 11:31:29 +0000 (17:01 +0530)]
mux: Makefile: Add config for mux drivers

Add config required to build mmio-mux driver and dependencies.

Signed-off-by: Anurag Dutta <[email protected]>
6 weeks agoMerge patch series "configs: Enable CMD_NFS by default"
Tom Rini [Sat, 14 Dec 2024 15:33:18 +0000 (09:33 -0600)]
Merge patch series "configs: Enable CMD_NFS by default"

Neha Malcom Francis <[email protected]> says:

Enable the NFS command across all platforms to allow network booting via
the NFS. Clean up the J7 configs to use TI_COMMON_CMD_OPTIONS.

Link: https://lore.kernel.org/r/[email protected]
6 weeks agoconfigs: j7*: Enable TI_COMMON_CMD_OPTIONS
Neha Malcom Francis [Fri, 29 Nov 2024 11:03:33 +0000 (16:33 +0530)]
configs: j7*: Enable TI_COMMON_CMD_OPTIONS

Instead of bloating the defconfig with CONFIG_CMD_*, move J7 devices to
start using TI_COMMON_CMD_OPTIONS.

Signed-off-by: Neha Malcom Francis <[email protected]>
6 weeks agoboard: ti: common: Kconfig: Add CMD_NFS
Neha Malcom Francis [Fri, 29 Nov 2024 11:03:32 +0000 (16:33 +0530)]
board: ti: common: Kconfig: Add CMD_NFS

Add CMD_NFS to list of configs implied by CONFIG_TI_COMMON_CMD_OPTIONS.
This allows network booting via the NFS protocol from the U-Boot prompt.

Fixes: 10de12570799 ("disable NFS support by default")
Signed-off-by: Neha Malcom Francis <[email protected]>
6 weeks agoMerge patch series "UART support for higher baudrate"
Tom Rini [Sat, 14 Dec 2024 15:33:03 +0000 (09:33 -0600)]
Merge patch series "UART support for higher baudrate"

Gokul Praveen <[email protected]> says:

The OMAP specific UART driver is changed from a generic implementation of
certain ops functions to an OMAP specific implementation of it to add
support for higher baudrates for OMAP devices.

Hence to support the above change, static functionality of ops functions
in generic ns16550 UART U-Boot driver is removed and also migrated certain
macros to its header file for usage in device-specific drivers.

Boot logs link :

https://gist.github.com/GOKU-THUG/8b90117c963e5da5c1b6caeee427c82c

Link: https://lore.kernel.org/r/[email protected]
6 weeks agodrivers: serial: serial_omap: Fix TI OMAP UART U-Boot driver to support higher baudrates
Gokul Praveen [Tue, 26 Nov 2024 10:51:31 +0000 (16:21 +0530)]
drivers: serial: serial_omap: Fix TI OMAP UART U-Boot driver to support higher baudrates

Move to OMAP specific implementation of certain ops functions as the UART
prints on the serial console fail for baudrates greater than 460800.

The MDR1 register is responsible for determining the speed mode at which
the UART should operate for OMAP specific devices. The baud divisor is used
to set the UART_DLL register which is used for generation of the baud
clock in the baud rate generator. The implementation logic is similar to
how it is implemented in omap_8250_get_divisor function of 8250_omap UART
linux driver.

Signed-off-by: Gokul Praveen <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
6 weeks agoserial: ns16550: Increase scope of ops functions
Gokul Praveen [Tue, 26 Nov 2024 10:51:30 +0000 (16:21 +0530)]
serial: ns16550: Increase scope of ops functions

Increase scope of ops functions and do some clean up for usage in device
-specific UART drivers.

Remove the static functionality of ops functions and migrate certain macros
to header file for usage in device-specific drivers.

Signed-off-by: Gokul Praveen <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
6 weeks agoMerge patch series "Add phyCORE AM62Ax"
Tom Rini [Fri, 13 Dec 2024 23:30:27 +0000 (17:30 -0600)]
Merge patch series "Add phyCORE AM62Ax"

Garrett Giordano <[email protected]> says:

This patch set adds the phyCORE AM62Ax board support and documenation to
u-boot.

The phyCORE-AM62Ax is a SoM (System on Module) featuring TI's AM62Ax SoC. It can
be used in combination with different carrier boards. This module can come
with different sizes and models for DDR, eMMC, SPI NOR Flash and various SoCs
from the AM62x family.

A development Kit, called phyBOARD-Lyra is used as a carrier board reference
design around the AM62x SoM.

This series depends on the following two patches:
- [PATCH v2] arm: mach-k3: am62a7: Provide a way to obtain boot device for non SPL
  https://lists.denx.de/pipermail/u-boot/2024-October/570156.html
- [PATCH] board: phytec: common: Introduce CONFIG_PHYTEC_K3_DDR_PATCH
  https://lists.denx.de/pipermail/u-boot/2024-November/571543.html

Link: https://lore.kernel.org/r/[email protected]
[trini: Fix warning in board/phytec/common/k3/board.c when
        CONFIG_EFI_HAVE_CAPSULE_SUPPORT is not enabled]
Signed-off-by: Tom Rini <[email protected]>
6 weeks agoarm: mach-k3: am62a7: Provide a way to obtain boot device for non SPLs
Garrett Giordano [Thu, 31 Oct 2024 16:21:03 +0000 (09:21 -0700)]
arm: mach-k3: am62a7: Provide a way to obtain boot device for non SPLs

Introduce get_boot_device() to obtain the booting device. Make it also
available for non SPL builds so u-boot can also know the device it
is booting from.

Signed-off-by: Garrett Giordano <[email protected]>
Reviewed-by: Bryan Brattlof <[email protected]>
Reviewed-by: Andrew Davis <[email protected]>
6 weeks agotoradex: tdx-cfg-block: rework modules pid4 handling
Vitor Soares [Mon, 25 Nov 2024 17:49:10 +0000 (17:49 +0000)]
toradex: tdx-cfg-block: rework modules pid4 handling

The module pid4 currently corresponds to the index of the toradex_module
array. If a new pid4 is introduced that does not follow the sequence of
the previous entries, it will create a gap in the array.

To address this, embed pid4 within the toradex_som structure and
implement a function to retrieve the index corresponding to pid4.

Signed-off-by: Vitor Soares <[email protected]>
Acked-by: Francesco Dolcini <[email protected]>
6 weeks agodoc: board: phytec: Add phyCORE-AM62ax
Garrett Giordano [Mon, 18 Nov 2024 23:16:06 +0000 (15:16 -0800)]
doc: board: phytec: Add phyCORE-AM62ax

Add documentation for PHYTEC phyCORE-AM62ax SoM.

Signed-off-by: Garrett Giordano <[email protected]>
Reviewed-by: Wadim Egorov <[email protected]>
Reviewed-by: Dhruva Gole <[email protected]>
6 weeks agoboard: phytec: am62a7: Add PHYTEC phyCORE-AM62A7 SoM
Garrett Giordano [Mon, 18 Nov 2024 23:16:05 +0000 (15:16 -0800)]
board: phytec: am62a7: Add PHYTEC phyCORE-AM62A7 SoM

Add support for PHYTEC phyCORE-AM62A7 SoM.

Supported features:
  - 2GB LPDDR4 RAM
  - eMMC
  - External SD
  - Ethernet
  - debug UART

Signed-off-by: Garrett Giordano <[email protected]>
Reviewed-by: Wadim Egorov <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Bryan Brattlof <[email protected]>
6 weeks agoMerge patch series "Enable EFI capsule updates for PHYTEC K3 SoMs"
Tom Rini [Fri, 13 Dec 2024 20:15:43 +0000 (14:15 -0600)]
Merge patch series "Enable EFI capsule updates for PHYTEC K3 SoMs"

Wadim Egorov <[email protected]> says:

This implements capsule updates for all our K3 SoMs for
eMMC, OSPI NOR and uSD cards.

We can use capsule updates to update the bootloader on all our
supported flash devices.

Link: https://lore.kernel.org/r/[email protected]
6 weeks agoconfigs: phycore_am6*_a53_defconfig: Enable capsule update
Wadim Egorov [Wed, 27 Nov 2024 12:17:36 +0000 (13:17 +0100)]
configs: phycore_am6*_a53_defconfig: Enable capsule update

Enable raw & on disk capsule updates and provide configs required
for updating MTD devices. Also resync after savedefconfig.

Signed-off-by: Wadim Egorov <[email protected]>
6 weeks agoboard: phytec: k3: Add EFI capsule update support
Wadim Egorov [Wed, 27 Nov 2024 12:17:35 +0000 (13:17 +0100)]
board: phytec: k3: Add EFI capsule update support

Implement EFI capsule update functionality for PHYTEC K3-based SoMs.
These SoMs feature various flash device options, including eMMC,
OSPI NOR, and uSD card at the board level.

This update provides the necessary logic to enable EFI capsule updates
across all three flash devices, ensuring flexible and robust firmware
upgrade capabilities.

The GUID is dynamically generated for the board, to get it:

  efidebug capsule esrt
  ========================================
  ESRT: fw_resource_count=3
  ESRT: fw_resource_count_max=3
  ESRT: fw_resource_version=1
  [entry 0]==============================
  ESRT: fw_class=C7D64D6D-10B2-54BC-A3BF-06A9DC3653D9
  ESRT: fw_type=unknown
  ESRT: fw_version=0
  ESRT: lowest_supported_fw_version=0
  ESRT: capsule_flags=0
  ESRT: last_attempt_version=0
  ESRT: last_attempt_status=success
  [entry 1]==============================
  ESRT: fw_class=09841C3F-F177-5D57-B1F6-754D92879205
  ESRT: fw_type=unknown
  ESRT: fw_version=0
  ESRT: lowest_supported_fw_version=0
  ESRT: capsule_flags=0
  ESRT: last_attempt_version=0
  ESRT: last_attempt_status=success
  [entry 2]==============================
  ESRT: fw_class=D11A9016-515E-503A-8872-3FF65384D0C4
  ESRT: fw_type=unknown
  ESRT: fw_version=0
  ESRT: lowest_supported_fw_version=0
  ESRT: capsule_flags=0
  ESRT: last_attempt_version=0
  ESRT: last_attempt_status=success
  ========================================

On the board (from uSD card containing capsule binaries at boot):

  load mmc 1:1 $loadaddr tiboot3-capsule.bin
  efidebug capsule update $loadaddr

  load mmc 1:1 $loadaddr tispl-capsule.bin
  efidebug capsule update $loadaddr

  load mmc 1:1 $loadaddr uboot-capsule.bin
  efidebug capsule update $loadaddr

The binaries will be flashed to the flash device you are booted from.

Signed-off-by: Wadim Egorov <[email protected]>
6 weeks agoarm: dts: k3-am642-phycore-som-binman: Provide capsule nodes
Wadim Egorov [Wed, 27 Nov 2024 12:17:34 +0000 (13:17 +0100)]
arm: dts: k3-am642-phycore-som-binman: Provide capsule nodes

Fill in phycore-am64x capsule GUID properties of the base
binman capsule nodes.

Signed-off-by: Wadim Egorov <[email protected]>
6 weeks agoarm: dts: k3-am625-phycore-som-binman: Provide capsule nodes
Wadim Egorov [Wed, 27 Nov 2024 12:17:33 +0000 (13:17 +0100)]
arm: dts: k3-am625-phycore-som-binman: Provide capsule nodes

Fill in phycore-am62x capsule GUID properties of the base
binman capsule nodes.

Signed-off-by: Wadim Egorov <[email protected]>
6 weeks agoMerge patch series "AM62A DWC3: Add support for USB DFU boot in OTG mode"
Tom Rini [Fri, 13 Dec 2024 20:14:50 +0000 (14:14 -0600)]
Merge patch series "AM62A DWC3: Add support for USB DFU boot in OTG mode"

Siddharth Vadapalli <[email protected]> says:

Hello,

This series adds support for USB DFU boot on TI's AM62A SoC which has
two instances of DWC3 USB Controllers namely USB0 and USB1. The USB0
instance of the USB Controller supports USB DFU boot:
ROM => tiboot3.bin => tispl.bin => u-boot.img

USB DFU Boot requires the USB Controller to be configured for Gadget
mode of operation. Since the USB0 instance of the DWC3 USB Controller
supports both Host and Gadget modes of operation via the Type-C interface
on the AM62A7-SK board, the device-tree specifies the "dr_mode" as "OTG".
However, there is currently no support for dynamically switching the "mode"
from Host to Gadget and vice-versa with the help of a state-machine.
The OTG mode is treated as a separate mode in itself rather than being
treated as an intermediate stage before assuming the Host/Gadget mode.
Due to this, USB DFU boot via the Type-C interface doesn't work as the
USB Controller hasn't been appropriately configured for Device/Gadget
mode of operation. One option is to change the device-tree to specify
"dr_mode" as "peripheral" and force the controller to assume the Device
role. This will imply that the U-Boot device-tree for AM62A diverges
from its Linux counterpart. Therefore, with the intent of keeping the
device-tree uniform across Linux and U-Boot, and at the same time, in
order to enable USB DFU boot in "OTG" mode with the DWC3 Controller,
the first patch in this series sets the "mode" on the basis of the
caller function, rather than using the "dr_mode" property in the
device-tree. There are only two callers of "dwc3_generic_probe()",
each of which clearly specify the expected mode of configuration.
This will enable both Host and Device mode of operation based on the
command executed by the user, thereby truly supporting "OTG"
functionality when the USB Controller supports it.

The second patch in this series adds USB DFU environment for AM62A,
enabling USB DFU Boot and USB DFU flash on AM62A.

In addition to the patches in this series, the following device-tree
changes will be required to test USB DFU on AM62A (bootph-all property
to be added to ensure that USB Controller is present at all stages
for DFU Boot):
https://gist.github.com/Siddharth-Vadapalli-at-TI/53ba02cb0ff4a09c47e920d08247065f
The above device-tree changes will be made to the Linux device-tree,
which shall ensure that the same shall be a part of U-Boot device-tree
eventually.

The USB DFU config fragments for AM62x have been used for enabling
USB DFU boot on AM62a as follows:
R5  => am62ax_evm_r5_defconfig + am62x_r5_usbdfu.config
A53 => am62ax_evm_a53_defconfig + am62x_a53_usbdfu.config

Logs validating USB DFU boot with this series:
https://gist.github.com/Siddharth-Vadapalli-at-TI/daa71da1b0e478a51afea42605fb2d2c

Link: https://lore.kernel.org/r/[email protected]
This page took 0.095002 seconds and 4 git commands to generate.