]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
14 months agoarm64: xilinx: Remove address/size-cells from flash node
Michal Simek [Fri, 22 Sep 2023 10:35:32 +0000 (12:35 +0200)]
arm64: xilinx: Remove address/size-cells from flash node

Partitions are described via fixed-partitions that's why there is no need
to have address/size-cells in flash node.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/c704be9d9f3d09c1cc55b092efeb9c73fcda6451.1695378830.git.michal.simek@amd.com
14 months agoarm64: dts: xilinx: zynqmp: Add RPU subsystem device node
Tanmay Shah [Fri, 22 Sep 2023 10:35:31 +0000 (12:35 +0200)]
arm64: dts: xilinx: zynqmp: Add RPU subsystem device node

RPU subsystem can be configured in cluster-mode or split mode.
Also each r5 core has separate power domains.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/dde364939b4fbe3f7be7b6f5dff42e7d8b2f5c46.1695378830.git.michal.simek@amd.com
14 months agoarm64: zynqmp: Describe interrupts by using macros
Michal Simek [Fri, 22 Sep 2023 10:35:30 +0000 (12:35 +0200)]
arm64: zynqmp: Describe interrupts by using macros

Use arm-gic.h and irq.h for interrupt description. It helps to improve
readability of device tree file.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/e0db567e1eb4e4e90e59270f41708919682dacf4.1695378830.git.michal.simek@amd.com
14 months agoarm64: zynqmp: Remove resetin/out from K24 psu_init
Michal Simek [Mon, 18 Sep 2023 14:11:23 +0000 (16:11 +0200)]
arm64: zynqmp: Remove resetin/out from K24 psu_init

The code is not called that's why remove it.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/7b207e90f68028ab36fcc22df4127492f174793d.1695046281.git.michal.simek@amd.com
14 months agoarm64: zynqmp: Rename dt overlay file names from dts to dtso
Michal Simek [Mon, 18 Sep 2023 14:09:18 +0000 (16:09 +0200)]
arm64: zynqmp: Rename dt overlay file names from dts to dtso

Use dtso suffix instead of dts. Build option was introduced by
commit a0f9a77912b2 ("kbuild: Allow DTB overlays to built from .dtso named
source files").

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/1dce37e72428c14a3ccbb5dc674b90dfe56b75ac.1695046155.git.michal.simek@amd.com
14 months agoarm64: zynqmp: Describe assigned-clocks for uarts
Michal Simek [Mon, 18 Sep 2023 11:22:04 +0000 (13:22 +0200)]
arm64: zynqmp: Describe assigned-clocks for uarts

Describe assigned-clocks for both uarts. SOM is using this functionality.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/bddbb81209a4567b0939c5d2d0ecb42fdfcd71ea.1695036114.git.michal.simek@amd.com
14 months agopinctrl: zynqmp: Display the tristate configuration for all pins
Venkatesh Yadav Abbarapu [Thu, 14 Sep 2023 10:06:20 +0000 (15:36 +0530)]
pinctrl: zynqmp: Display the tristate configuration for all pins

Read the tristate config for all the pins and display it.

ZynqMP> pinmux status MIO1
MIO1: slew:fast bias:enabled pull:up input:cmos drive:12mA
      volt:1.8 tri_state:enabled

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20230914100620.26346-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
14 months agopinctrl: Increase size of pinmux status buffer
Venkatesh Yadav Abbarapu [Wed, 20 Sep 2023 03:00:06 +0000 (08:30 +0530)]
pinctrl: Increase size of pinmux status buffer

For Xilinx ZynqMP SOC new parameter was added and now it can
set 7 parameters for its pins. Pinmux status command will
print the status of these parameters for each pin. But
current print buffer length is only 80 characters long, increase it
to 90 to print all the parameters without truncation.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20230920030006.6488-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
14 months agonet: zynq_gem: Update the MDC clock divisor in the probe function
Venkatesh Yadav Abbarapu [Fri, 22 Sep 2023 04:50:10 +0000 (10:20 +0530)]
net: zynq_gem: Update the MDC clock divisor in the probe function

MDC clock change needs to be done when the driver probe function
is called as mdio is enabled at probe and not when the ethernet starts.
Setup the MDC clock at the probe itself.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20230922045010.22852-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
14 months agoMerge branch '2023-10-06-spl-prepare-for-universal-payload'
Tom Rini [Fri, 6 Oct 2023 21:23:47 +0000 (17:23 -0400)]
Merge branch '2023-10-06-spl-prepare-for-universal-payload'

To quote the author:
This series tidies up SPL a little and adds some core ofnode functions
needed to support Universal Payload. It also includes a few minor
fix-ups for sandbox.

For SPL the changes include CONFIG naming, removing various #ifdefs and
tidying up the FIT code.

One notable piece of the ofnode improvements is support for flattening a
livetree. This should be useful in future as we move FDT fixups to use
the ofnode API.

14 months agopci: serial: Support reading PCI-register size with base
Simon Glass [Tue, 26 Sep 2023 14:14:58 +0000 (08:14 -0600)]
pci: serial: Support reading PCI-register size with base

The PCI helpers read only the base address for a PCI region. In some cases
the size is needed as well, e.g. to pass along to a driver which needs to
know the size of its register area.

Update the functions to allow the size to be returned. For serial, record
the information and provided it with the serial_info() call.

A limitation still exists in that the size is not available when OF_LIVE
is enabled, so take account of that in the tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agodm: core: Tweak device_is_on_pci_bus() for code size
Simon Glass [Tue, 26 Sep 2023 14:14:57 +0000 (08:14 -0600)]
dm: core: Tweak device_is_on_pci_bus() for code size

This function cannot return true if PCI is not enabled, since no PCI
devices will have been bound. Add a check for this to reduce code size
where it is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agoserial: Drop ns16550 serial_getinfo() in SPL
Simon Glass [Tue, 26 Sep 2023 14:14:56 +0000 (08:14 -0600)]
serial: Drop ns16550 serial_getinfo() in SPL

This is typically not needed in SPL/TPL and increases the code size.
Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Add C-based runtime detection of SPL
Simon Glass [Tue, 26 Sep 2023 14:14:55 +0000 (08:14 -0600)]
spl: Add C-based runtime detection of SPL

The spl_phase() function indicates whether U-Boot is in SPL and before
or after relocation. But sometimes it is useful to check for SPL with
zero code-size impact. Since spl_phase() checks the global_data flags,
it does add a few bytes.

Add a new spl_in_proper() function to check if U-Boot proper is
running, regardless of the relocation status.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agocommand: Include a required header in command.h
Simon Glass [Wed, 27 Sep 2023 14:22:37 +0000 (08:22 -0600)]
command: Include a required header in command.h

This uses ARRAY_SIZE() but does not include the header file which declares
it. Fix this, so that command.h can be included without common.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
14 months agobloblist: Add missing name
Simon Glass [Tue, 26 Sep 2023 14:14:52 +0000 (08:14 -0600)]
bloblist: Add missing name

Add a missing bloblist name.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agobloblist: Support initing from multiple places
Simon Glass [Tue, 26 Sep 2023 14:14:51 +0000 (08:14 -0600)]
bloblist: Support initing from multiple places

Typically the bloblist is set up after the devicetree is present. This
makes sense because bloblist may use malloc() to allocate the space it
needs.

However sometimes the devicetree itself may be present in the bloblist.
In that case it is at a known location in memory so we can init the
bloblist very early, before devicetree.

Add a flag to indicate whether the bloblist has been inited. Add a
function to init it only if needed. Use that in the init sequence.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agosandbox: Move the bloblist down a little in memory
Simon Glass [Tue, 26 Sep 2023 14:14:50 +0000 (08:14 -0600)]
sandbox: Move the bloblist down a little in memory

Move this down by 4KB so that it is large enough to hold the devicetree.

Also fix up the devicetree address in the documetation while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agosandbox: Only read the state if we have a state file
Simon Glass [Tue, 26 Sep 2023 14:14:49 +0000 (08:14 -0600)]
sandbox: Only read the state if we have a state file

We should not read this unless requested. Make it conditional on the
option being provided.

Add some debugging to show the state being written.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agosandbox: Init the EC properly even if no state file is available
Simon Glass [Tue, 26 Sep 2023 14:14:48 +0000 (08:14 -0600)]
sandbox: Init the EC properly even if no state file is available

This currently relies on sandbox attempting to read a state file. At
present it always does, even when there is no state file, in which case it
fails, but still inits the EC.

That is a bug, so update this driver to set the current image always, even
if no state is read.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agosandbox: Move reading the RAM buffer into a better place
Simon Glass [Tue, 26 Sep 2023 14:14:47 +0000 (08:14 -0600)]
sandbox: Move reading the RAM buffer into a better place

This should not happen in the argument-parsing function. Move it to the
main program.

Add some debugging for reading/writing.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agodm: core: Add tests for oftree_path()
Simon Glass [Tue, 26 Sep 2023 14:14:46 +0000 (08:14 -0600)]
dm: core: Add tests for oftree_path()

Add a few simple tests for getting the root node, since this is handled
as a special case in the implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agodm: core: Support writing a 64-bit value
Simon Glass [Tue, 26 Sep 2023 14:14:45 +0000 (08:14 -0600)]
dm: core: Support writing a 64-bit value

Add support for writing a single 64-bit value into a property.

Repurpose the existing tests to handle this case too.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agodm: core: Support writing a boolean
Simon Glass [Tue, 26 Sep 2023 14:14:44 +0000 (08:14 -0600)]
dm: core: Support writing a boolean

Add functions to write a boolean property. This involves deleting it if
the value is false.

Add a new ofnode_has_property() as well. Add a comment about the behaviour
of of_read_property() when the property value is empty.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agodm: core: Add a way to convert a devicetree to a dtb
Simon Glass [Tue, 26 Sep 2023 14:14:43 +0000 (08:14 -0600)]
dm: core: Add a way to convert a devicetree to a dtb

Add a way to flatten a devicetree into binary form. For livetree this
involves generating the devicetree using fdt_property() and other calls.
For flattree it simply involves providing the buffer containing the tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agodm: core: Add a way to delete a node
Simon Glass [Tue, 26 Sep 2023 14:14:42 +0000 (08:14 -0600)]
dm: core: Add a way to delete a node

Add a function to delete a node in an existing tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agodm: core: Add a way to copy a node
Simon Glass [Tue, 26 Sep 2023 14:14:41 +0000 (08:14 -0600)]
dm: core: Add a way to copy a node

Add a function to copy a node to another place under a new name. This is
useful at least for testing, since copying a test node with existing
properties is easier than writing the code to generate it all afresh.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agodm: core: Add a function to create an empty tree
Simon Glass [Tue, 26 Sep 2023 14:14:40 +0000 (08:14 -0600)]
dm: core: Add a function to create an empty tree

Provide a function to create a new, empty tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agodm: core: Tidy up comments in the ofnode tests
Simon Glass [Tue, 26 Sep 2023 14:14:39 +0000 (08:14 -0600)]
dm: core: Tidy up comments in the ofnode tests

Add comments to the functions where the test name does not indicate what
is being tested. Rename functions in a few cases, so that a search for the
function will also file its test.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agodm: core: Ensure we run flattree tests on ofnode
Simon Glass [Tue, 26 Sep 2023 14:14:38 +0000 (08:14 -0600)]
dm: core: Ensure we run flattree tests on ofnode

We need the UT_TESTF_SCAN_FDT flag set for these tests to run with flat
tree. In some cases it is missing, so add it.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agodm: core: Reverse the argument order in ofnode_copy_props()
Simon Glass [Tue, 26 Sep 2023 14:14:37 +0000 (08:14 -0600)]
dm: core: Reverse the argument order in ofnode_copy_props()

Follow the order used by memcpy() as it may be less confusing.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Move bloblist writing until the image is known
Simon Glass [Tue, 26 Sep 2023 14:14:36 +0000 (08:14 -0600)]
spl: Move bloblist writing until the image is known

The bloblist should not be finalised until the image is fully set up.
This allows any final handoff information to be included in the bloblist.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Use the correct FIT_..._PROP constants
Simon Glass [Tue, 26 Sep 2023 14:14:35 +0000 (08:14 -0600)]
spl: Use the correct FIT_..._PROP constants

Rather than open-coding the property names, use the existing constants
provided for this purpose. This better aligns the simple-FIT code with
the full FIT implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Move the full FIT code to spl_fit.c
Simon Glass [Tue, 26 Sep 2023 14:14:34 +0000 (08:14 -0600)]
spl: Move the full FIT code to spl_fit.c

For some reason this code was put in the main spl.c file. Move it out
to the FIT implementation where it belongs.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Rename spl_load_fit_image() to load_simple_fit()
Simon Glass [Tue, 26 Sep 2023 14:14:33 +0000 (08:14 -0600)]
spl: Rename spl_load_fit_image() to load_simple_fit()

We have two functions called spl_load_fit_image(), one in spl.c and one in
spl_fit.c

Rename the second one, to indicate that it relates to simple FIT parsing,
rather than the full version.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Remove #ifdefs with BOOTSTAGE
Simon Glass [Tue, 26 Sep 2023 14:14:32 +0000 (08:14 -0600)]
spl: Remove #ifdefs with BOOTSTAGE

This feature has some helpers in its header file so that its functions
resolve to nothing when the feature is disabled. Add a few more and use
these to simplify the code.

With this there are no more #ifdefs in board_init_r()

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Avoid an #ifdef when printing gd->malloc_ptr
Simon Glass [Tue, 26 Sep 2023 14:14:31 +0000 (08:14 -0600)]
spl: Avoid an #ifdef when printing gd->malloc_ptr

Use an accessor in the header file to avoid this.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agodm: core: Correct help in TPL_DM and VPL_DM
Simon Glass [Tue, 26 Sep 2023 14:14:30 +0000 (08:14 -0600)]
dm: core: Correct help in TPL_DM and VPL_DM

There are copying errors in the help. Fix these.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agodoc: Clean up SYS_MALLOC_SIMPLE
Simon Glass [Tue, 26 Sep 2023 14:14:29 +0000 (08:14 -0600)]
doc: Clean up SYS_MALLOC_SIMPLE

Move the useful help to Kconfig.

Drop mention of CONFIG_SYS_MALLOC_SIMPLE since it doesn't exist.

Correct a 'CONFIGSYS_MALLOC_F_LEN' typo

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agoTidy up uses of CONFIG_SYS_MALLOC_F_LEN
Simon Glass [Tue, 26 Sep 2023 14:14:28 +0000 (08:14 -0600)]
Tidy up uses of CONFIG_SYS_MALLOC_F_LEN

Use CONFIG_SYS_MALLOC_F instead to of CONFIG_SYS_MALLOC_F_LEN to
determine whether pre-relocation malloc() is enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Use SYS_MALLOC_F instead of SYS_MALLOC_F_LEN
Simon Glass [Tue, 26 Sep 2023 14:14:27 +0000 (08:14 -0600)]
spl: Use SYS_MALLOC_F instead of SYS_MALLOC_F_LEN

Use the new SPL/TPL/VPL_SYS_MALLOC_F symbols to determine whether the
malloc pool exists.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
14 months agotpl: Enable CONFIG_TPL_SYS_MALLOC_F where needed
Simon Glass [Tue, 26 Sep 2023 14:14:26 +0000 (08:14 -0600)]
tpl: Enable CONFIG_TPL_SYS_MALLOC_F where needed

Enable CONFIG_TPL_SYS_MALLOC_F for boards which have a non-zero value
for CONFIG_TPL_SYS_MALLOC_F_LEN

Note that the default is yes in most cases, so no changes are needed to
board defconfig options.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Enable CONFIG_SPL_SYS_MALLOC_F where needed
Simon Glass [Tue, 26 Sep 2023 14:14:25 +0000 (08:14 -0600)]
spl: Enable CONFIG_SPL_SYS_MALLOC_F where needed

Enable CONFIG_SPL_SYS_MALLOC_F for boards which have a non-zero value
for CONFIG_SPL_SYS_MALLOC_F_LEN

Note that the default is yes in most cases, so no changes are needed to
board defconfig options.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Create proper symbols for enabling the malloc() pool
Simon Glass [Tue, 26 Sep 2023 14:14:24 +0000 (08:14 -0600)]
spl: Create proper symbols for enabling the malloc() pool

For U-Boot proper we have CONFIG_SYS_MALLOC_F which indicates that a
malloc() pool is available before relocation.

For SPL we only have CONFIG_SPL_SYS_MALLOC_F_LEN which indicates the
size of the pool.

In various places we use CONFIG_SPL_SYS_MALLOC_F_LEN == 0 to indicate
that there is no pool.

This differing approach is confusing. Add a new CONFIG_SPL_SYS_MALLOC_F
symbol for SPL (and similarly for TPL and VPL). Tidy up the Kconfig
help for clarity.

For now these symbols are not used. That is cleaned up in the following
patches.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agoserial: Drop mention of SPL/TPL_SYS_MALLOC_F
Simon Glass [Tue, 26 Sep 2023 14:14:23 +0000 (08:14 -0600)]
serial: Drop mention of SPL/TPL_SYS_MALLOC_F

These symbols do not (yet) exist, so drop the usage of them in the
serial Kconfig file. It has no effect.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Drop the switch() statement for OS selection
Simon Glass [Tue, 26 Sep 2023 14:14:22 +0000 (08:14 -0600)]
spl: Drop the switch() statement for OS selection

This code is pretty ugly, with many #ifdefs

There are quite a lot of IH_OS_U_BOOT values so the compiler struggles
to create a jump table here. Also, most of the options are normally
disabled.

Change it to an else...if construct instead. Add an accessor for the
spl_image field behind an #ifdef to avoid needing #ifdef in the C code.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Avoid #ifdef with CONFIG_SPL_PAYLOAD_ARGS_ADDR
Simon Glass [Tue, 26 Sep 2023 14:14:21 +0000 (08:14 -0600)]
spl: Avoid #ifdef with CONFIG_SPL_PAYLOAD_ARGS_ADDR

Move the condition to the header file to improve readability.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Drop #ifdefs for BOARD_INIT and watchdog
Simon Glass [Tue, 26 Sep 2023 14:14:20 +0000 (08:14 -0600)]
spl: Drop #ifdefs for BOARD_INIT and watchdog

Avoid using the preprocessor for these checks.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: mx6: powerpc: Drop the condition on timer_init()
Simon Glass [Tue, 26 Sep 2023 14:14:19 +0000 (08:14 -0600)]
spl: mx6: powerpc: Drop the condition on timer_init()

It doesn't make sense to have some boards do this differently. Drop the
condition in the hope that the maintainers can figure out any run-time
problems.

This has been tested on qemu-ppce500

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Leroy <christophe.leroy@csgroup.eu>
14 months agospl: Avoid #ifdef with CONFIG_SPL_SYS_MALLOC
Simon Glass [Tue, 26 Sep 2023 14:14:18 +0000 (08:14 -0600)]
spl: Avoid #ifdef with CONFIG_SPL_SYS_MALLOC

Use IF_ENABLED_INT() to avoid needing to use the preprocessor.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Rename SYS_SPL_ARGS_ADDR to SPL_PAYLOAD_ARGS_ADDR
Simon Glass [Tue, 26 Sep 2023 14:14:17 +0000 (08:14 -0600)]
spl: Rename SYS_SPL_ARGS_ADDR to SPL_PAYLOAD_ARGS_ADDR

Rename this so that SPL is first, as per U-Boot convention. Also add
PAYLOAD_ since this is where in memory the parameters for the payload
have been stored.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agospl: Use CONFIG_SPL... instead of CONFIG_..._SPL_...
Simon Glass [Tue, 26 Sep 2023 14:14:16 +0000 (08:14 -0600)]
spl: Use CONFIG_SPL... instead of CONFIG_..._SPL_...

We like to put the SPL first so it is clear that it relates to SPL. Rename
various malloc-related options which have crept in, to stick to this
convention.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com>
14 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 5 Oct 2023 17:26:44 +0000 (13:26 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

+ ae350: modify memory layout and target name
+ ae350: use generic RISC-V timer driver in S-mode
+ Support bootstage report for RISC-V
+ Support C extension exception command for RISC-V
+ Add Starfive timer support

14 months agoMerge branch '2023-10-04-TI-dts-updates'
Tom Rini [Thu, 5 Oct 2023 14:48:21 +0000 (10:48 -0400)]
Merge branch '2023-10-04-TI-dts-updates'

- Resync some TI K3 DTS files, to fix booting on them.

14 months agoMerge tag 'dm-pull-4oct23' of https://source.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Wed, 4 Oct 2023 22:49:58 +0000 (18:49 -0400)]
Merge tag 'dm-pull-4oct23' of https://source.denx.de/u-boot/custodians/u-boot-dm

moveconfig: enhance output; rename to qconfig

14 months agoarm: dts: k3-j721e: Sync with v6.6-rc1
Neha Malcom Francis [Wed, 27 Sep 2023 13:09:56 +0000 (18:39 +0530)]
arm: dts: k3-j721e: Sync with v6.6-rc1

Sync k3-j721e DTS with kernel.org v6.6-rc1.

* Use mcu_timer0 defined in k3-j721e-mcu-wakeup.dtsi and remove
  timer0, we have its clocks set up in clk-data now
* Remove hbmc node as support is buggy and needs to be fixed
* Remove aliases and chosen node, use them from Kernel
* Remove /delete-property/ and clock-frequency from sdhci,
  usbss, and mcu_uart nodes as we have them in clk and dev data
* Remove dummy_clocks as they are not needed
* Remove cpsw node as it is not required since it has been fixed
  in U-Boot
* Remove pcie nodes, they are not needed
* Remove mcu_i2c0 as it is used for tps659413 PMIC in j721e-sk
  for which support is not yet added
* Change secproxy nodes to their Linux definitions
* Remove overriding of ti,cluster-mode in MAIN R5 to default to
  lockstep mode same as Kernel
* Retain tps6594 node as TPS6594 PMIC support is still under
  review in the Kernel [1], cleanup will be taken post its merge

[1] https://lore.kernel.org/all/20230810-tps6594-v6-0-2b2e2399e2ef@ti.com/

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
14 months agoarm: dts: k3-j721e-r5: Clean up inclusion hierarchy
Neha Malcom Francis [Wed, 27 Sep 2023 13:09:55 +0000 (18:39 +0530)]
arm: dts: k3-j721e-r5: Clean up inclusion hierarchy

Get rid of k3-j721e-r5-*-u-boot.dtsi as it is not
necessary. Change the inclusion hierarchy to be as follows:

k3-j721e-<board>.dts---
       -
        -->k3-j721e-r5-<board>.dts
       -
k3-j721e-<board>-u-boot.dtsi---

Reason for explicitly mentioning the inclusion of -u-boot.dtsi in code
although it could've been automatically done by U-Boot is to resolve
some of the dependencies that R5 file requires.

Also remove duplicate phandles while making this shift as well as remove
firmware-loader as it serves no purpose without "phandlepart" property.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
14 months agoconfigs: j721e: Remove HBMC_AM654 config
Neha Malcom Francis [Wed, 27 Sep 2023 13:09:54 +0000 (18:39 +0530)]
configs: j721e: Remove HBMC_AM654 config

Kernel commit d93036b47f35 ("arm64: dts: ti: k3-j721e-mcu_wakeup: Add
HyperBus node") was merged to kernel without its dependent patch [1].
Similar fix is needed in U-Boot, and hbmc currently breaks boot. Till
this gets fixed in U-Boot, disable the config by default so that the
hbmc probe that happens in board/ti/j721e/evm.c will not take place
and lead to boot failure.

[1] https://lore.kernel.org/all/20230424184810.29453-1-afd@ti.com/

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
14 months agodrivers: firmware: ti_sci: Get SCI revision only if TIFS/SYSFW is up
Neha Malcom Francis [Wed, 27 Sep 2023 13:09:53 +0000 (18:39 +0530)]
drivers: firmware: ti_sci: Get SCI revision only if TIFS/SYSFW is up

When setting up boot media to load the TIFS binary in legacy boot flow
(followed by J721E), get_timer() is called which calls dm_timer_init()
which then gets the tick-timer: mcu_timer0. mcu_timer0 uses k3_clks
(clock controller) and k3_pds (power controller) from the dmsc node that
forces probe of the ti_sci driver of TIFS that hasn't been loaded yet!
Running ti_sci_cmd_get_revision from the probe leads to panic since no
TIFS and board config binaries have been loaded yet. Resolve this by
moving ti_sci_cmd_get_revision to ti_sci_get_handle_from_sysfw as a
common point of invocation for both legacy and combined boot flows.

Before doing this, it is important to go through whether any sync points
exist where revision is needed before ti_sci_get_handle_from_sysfw is
invoked. Going through the code along with boot tests on both flows
ensures that there are none.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
14 months agoarm: mach-k3: j721e_init: Move clk_k3 probe before loading TIFS
Neha Malcom Francis [Wed, 27 Sep 2023 13:09:52 +0000 (18:39 +0530)]
arm: mach-k3: j721e_init: Move clk_k3 probe before loading TIFS

When setting boot media to load the TIFS binary in legacy boot flow
(followed by J721E), get_timer() is called which eventually calls
dm_timer_init() to grab the tick-timer, which is mcu_timer0. Since we
need to set up the clocks before using the timer, move clk_k3 driver
probe before k3_sysfw_loader to ensure we have all necessary clocks set
up before.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
14 months agoarm: mach-k3: j721e: dev-data: Add mcu_timer0 ID
Neha Malcom Francis [Wed, 27 Sep 2023 13:09:51 +0000 (18:39 +0530)]
arm: mach-k3: j721e: dev-data: Add mcu_timer0 ID

U-Boot uses mcu_timer0 as the tick-timer, so add it to device list.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
14 months agoarm: dts: k3-am625-beagleplay: Fix Boot
Nishanth Menon [Mon, 2 Oct 2023 15:00:53 +0000 (10:00 -0500)]
arm: dts: k3-am625-beagleplay: Fix Boot

Since commit [1] A53 u-boot proper is broken. This is because nodes
marked as 'bootph-pre-ram' are not available at u-boot proper before
relocation.

To fix this we mark all nodes in u-boot.dtsi as 'bootph-all'.

[1]
9e644284ab812 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")

Reported-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
14 months agoarm: dts: k3-am625-sk: Mark dependent nodes for pre-relocation phase
Roger Quadros [Fri, 29 Sep 2023 13:46:46 +0000 (16:46 +0300)]
arm: dts: k3-am625-sk: Mark dependent nodes for pre-relocation phase

CPSW node needs PHY, MDIO, pinmux, DMA and INTC nodes.
main_conf is required for phy_gmii_sel.
Mark them as 'bootph-all' so they are available in all
pre-relocation phases.

Fixes the below dts warnings:

<stdout>: Warning (reg_format): /bus@f0000/syscon@100000/phy@4044:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
<stdout>: Warning (reg_format): /bus@f0000/ethernet@8000000/ethernet-ports/port@1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
<stdout>: Warning (unit_address_vs_reg): /bus@f0000/syscon@100000: node has a unit name, but no reg or ranges property
<stdout>: Warning (pci_device_reg): Failed prerequisite 'reg_format'
<stdout>: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
<stdout>: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
<stdout>: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
<stdout>: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
<stdout>: Warning (avoid_default_addr_size): /bus@f0000/syscon@100000/phy@4044: Relying on default #address-cells value
<stdout>: Warning (avoid_default_addr_size): /bus@f0000/syscon@100000/phy@4044: Relying on default #size-cells value
<stdout>: Warning (avoid_default_addr_size): /bus@f0000/ethernet@8000000/ethernet-ports/port@1: Relying on default #address-cells value
<stdout>: Warning (avoid_default_addr_size): /bus@f0000/ethernet@8000000/ethernet-ports/port@1: Relying on default #size-cells value
<stdout>: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
<stdout>: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
14 months agoarm: dts: k3-am625-sk: Fix boot
Roger Quadros [Fri, 29 Sep 2023 13:46:45 +0000 (16:46 +0300)]
arm: dts: k3-am625-sk: Fix boot

Since commit [1] A53 u-boot proper is broken.
This is because nodes marked as 'bootph-pre-ram' are
not available at u-boot proper before relocation.

To fix this we mark all nodes in sk-u-boot.dtsi as
'bootph-all'.

[1]
9e644284ab812 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
14 months agoarm: dts: k3-am642-sk: Mark dependent nodes for pre-relocation phase
Roger Quadros [Fri, 29 Sep 2023 13:46:44 +0000 (16:46 +0300)]
arm: dts: k3-am642-sk: Mark dependent nodes for pre-relocation phase

CPSW node needs PHY, MDIO, pinmux, DMA and INTC nodes.
Mark them as 'bootph-all' so they are available in all
pre-relocation phases.

Fixes below dts warnings:

<stdout>: Warning (reg_format): /bus@f4000/ethernet@8000000/mdio@f00/ethernet-phy@1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
<stdout>: Warning (unit_address_vs_reg): /bus@f4000/ethernet@8000000/mdio@f00: node has a unit name, but no reg or ranges property
<stdout>: Warning (pci_device_reg): Failed prerequisite 'reg_format'
<stdout>: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
<stdout>: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
<stdout>: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
<stdout>: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
<stdout>: Warning (avoid_default_addr_size): /bus@f4000/ethernet@8000000/mdio@f00/ethernet-phy@1: Relying on default #address-cells value
<stdout>: Warning (avoid_default_addr_size): /bus@f4000/ethernet@8000000/mdio@f00/ethernet-phy@1: Relying on default #size-cells value
<stdout>: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
<stdout>: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'
<stdout>: Warning (msi_parent_property): /bus@f4000/bus@48000000/dma-controller@485c0100:msi-parent: Could not get phandle node for (cell 0)
<stdout>: Warning (msi_parent_property): /bus@f4000/bus@48000000/dma-controller@485c0000:msi-parent: Could not get phandle node for (cell 0)
<stdout>: Warning (phys_property): /bus@f4000/ethernet@8000000/ethernet-ports/port@2:phys: Could not get phandle node for (cell 0)

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
14 months agoarm: dts: k3-am642-sk: Fix boot
Roger Quadros [Fri, 29 Sep 2023 13:46:43 +0000 (16:46 +0300)]
arm: dts: k3-am642-sk: Fix boot

Since commit [1] A53 u-boot proper is broken.
This is because nodes marked as 'bootph-pre-ram' are
not available at u-boot proper before relocation.

To fix this we mark all nodes in sk-u-boot.dtsi as
'bootph-all'.

Move cbass_mcu node to -r5-sk.dts as it is only required
for R5 SPL.

[1]
9e644284ab812 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
14 months agoarm: dts: k3-am64-evm: Mark dependent nodes for pre-relocation phase
Roger Quadros [Fri, 29 Sep 2023 13:46:42 +0000 (16:46 +0300)]
arm: dts: k3-am64-evm: Mark dependent nodes for pre-relocation phase

CPSW node needs PHY, MDIO, pinmux, DMA and INTC nodes.
USB and MMC nodes need pinmux.

Mark them as 'bootph-all' so they are available in all
pre-relocation phases.

Fixes below dts warning:

<stdout>: Warning (dmas_property): /bus@f4000/ethernet@8000000:dmas: Could not get phandle node for (cell 0)

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
14 months agoarm: dts: k3-am64-evm: Fix boot
Roger Quadros [Fri, 29 Sep 2023 13:46:41 +0000 (16:46 +0300)]
arm: dts: k3-am64-evm: Fix boot

Since commit [1] A53 u-boot proper is broken.
This is because nodes marked as 'bootph-pre-ram' are
not available at u-boot proper before relocation.

To fix this we mark all nodes in sk-u-boot.dtsi as
'bootph-all'.

Move vtt_supply and cbass_mcu node to -r5-evm.dts as
it is only required for R5 SPL.

[1]
9e644284ab812 ("dm: core: Report bootph-pre-ram/sram node as pre-reloc after relocation")

Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Nishanth Menon <nm@ti.com>
14 months agoqconfig: Update the documentation
Simon Glass [Sat, 23 Sep 2023 19:44:16 +0000 (13:44 -0600)]
qconfig: Update the documentation

Update qconfig's documentation to better reflect its new purpose in life.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agoqconfig: Rename the database file
Simon Glass [Sat, 23 Sep 2023 19:44:15 +0000 (13:44 -0600)]
qconfig: Rename the database file

Use qconfig.db as the new name, to reflect the tool's purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Rename the tool to qconfig
Simon Glass [Sat, 23 Sep 2023 19:44:14 +0000 (13:44 -0600)]
moveconfig: Rename the tool to qconfig

This does not move configs anymore, but queries them, based on a database
it can build. Rename the tool to better reflect its purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Move summaries to the end
Simon Glass [Sat, 23 Sep 2023 19:44:13 +0000 (13:44 -0600)]
moveconfig: Move summaries to the end

Write the summary for -s and -b at the end, using a unified format.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Drop the initial output
Simon Glass [Sat, 23 Sep 2023 19:44:12 +0000 (13:44 -0600)]
moveconfig: Drop the initial output

Since moveconfig now just does what it is told (build database or sync
defconfigs) we don't need to print what it is doing. Drop this info, which
is of very little use.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Show a summary at the end
Simon Glass [Sat, 23 Sep 2023 19:44:11 +0000 (13:44 -0600)]
moveconfig: Show a summary at the end

Rather than printing all the failed boards, which are now easily visible
on the terminal, just show a summary. Sort it by defconfig and drop the
'_defconfig' suffix.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Show failures in progress
Simon Glass [Sat, 23 Sep 2023 19:44:10 +0000 (13:44 -0600)]
moveconfig: Show failures in progress

Show the number of accumulated failures when processing. Use a shorter
format with colour.

An unwanted space appears before the defconfig name on every item except
the last. Fix that while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Use u_boot_pylib for terminal colour
Simon Glass [Sat, 23 Sep 2023 19:44:09 +0000 (13:44 -0600)]
moveconfig: Use u_boot_pylib for terminal colour

Use the existing terminal code to handle ANSI colours. Enable colour by
default if the output is going to a terminal.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Avoid showing progress at the end
Simon Glass [Sat, 23 Sep 2023 19:44:08 +0000 (13:44 -0600)]
moveconfig: Avoid showing progress at the end

When the process is finished, moveconfig leaves a line saying that all
boards were processed (for better or worse). Drop this, since it is
unncessary.

Future work will provide a summary at the end instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Reduce the amount of output
Simon Glass [Sat, 23 Sep 2023 19:44:07 +0000 (13:44 -0600)]
moveconfig: Reduce the amount of output

Output a single line in the case where the defconfig only has one line
of output. Show the name without the _defconfig suffix, since that is the
same for all boards.

Use a list for the log so it is easier to process at the end.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Only show output when there is a reason
Simon Glass [Sat, 23 Sep 2023 19:44:06 +0000 (13:44 -0600)]
moveconfig: Only show output when there is a reason

There is no point in listing a board if everything went well. It makes it
harder to see the failures, particularly on a fast machine.

Suppress output unless something actually happened.

Drop the 'Syncing by savedefconfig' since this is selected by the -s and
is the same for all boards in this mode.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Fix misc pylint warnings
Simon Glass [Sat, 23 Sep 2023 19:44:05 +0000 (13:44 -0600)]
moveconfig: Fix misc pylint warnings

Fix various remaining pylint warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Use an encoding with open()
Simon Glass [Sat, 23 Sep 2023 19:44:04 +0000 (13:44 -0600)]
moveconfig: Use an encoding with open()

Fix pylint warnings about needing an explicit character encoding.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Correct list-comprehension warnings
Simon Glass [Sat, 23 Sep 2023 19:44:03 +0000 (13:44 -0600)]
moveconfig: Correct list-comprehension warnings

Correct some pylint warnings about needing to use list comprehension.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Correct use of members not declared in __init__()
Simon Glass [Sat, 23 Sep 2023 19:44:02 +0000 (13:44 -0600)]
moveconfig: Correct use of members not declared in __init__()

Fix these pylint warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Correct non-snake variables names
Simon Glass [Sat, 23 Sep 2023 19:44:01 +0000 (13:44 -0600)]
moveconfig: Correct non-snake variables names

Correct some variable names that do not conform to snake case, with the
three-character minimum.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Correct unused variables
Simon Glass [Sat, 23 Sep 2023 19:44:00 +0000 (13:44 -0600)]
moveconfig: Correct unused variables

Fix pylint warnings about unused variables.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Use f strings where possible
Simon Glass [Sat, 23 Sep 2023 19:43:59 +0000 (13:43 -0600)]
moveconfig: Use f strings where possible

Avoid pylint warnings by using 'f' strings where possible.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Correct parameter-type warnings
Simon Glass [Sat, 23 Sep 2023 19:43:58 +0000 (13:43 -0600)]
moveconfig: Correct parameter-type warnings

Fix pylint warnings related to parameter types.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Correct some regular-expression strings
Simon Glass [Sat, 23 Sep 2023 19:43:57 +0000 (13:43 -0600)]
moveconfig: Correct some regular-expression strings

Use the 'r' prefix for these strings to avoid pylint warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Drop suspicious boards
Simon Glass [Sat, 23 Sep 2023 19:43:56 +0000 (13:43 -0600)]
moveconfig: Drop suspicious boards

This code isn't needed anymore. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Drop check_defconfig() and update_dotconfig()
Simon Glass [Sat, 23 Sep 2023 19:43:55 +0000 (13:43 -0600)]
moveconfig: Drop check_defconfig() and update_dotconfig()

These functions are not needed anymore. Drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Drop CONFIG-moving code
Simon Glass [Sat, 23 Sep 2023 19:43:54 +0000 (13:43 -0600)]
moveconfig: Drop CONFIG-moving code

As a step towards cleaning out old code, drop most of the code that moves
CONFIG options to Kconfig. This includes parse_one_config().

Drop the ACTION_... values as well, since they are no-longer used.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Drop unused cleanup options
Simon Glass [Sat, 23 Sep 2023 19:43:53 +0000 (13:43 -0600)]
moveconfig: Drop unused cleanup options

Cleaning up the README and config.h files are not needed now, since we
don't have any CONFIG options to convert. Drop this code.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Correct ordering of asteval import
Simon Glass [Sat, 23 Sep 2023 19:43:52 +0000 (13:43 -0600)]
moveconfig: Correct ordering of asteval import

This should be after the standard imports. Move it to avoid a lot of
pylint warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Avoid deprecation warning for setDaemon
Simon Glass [Sat, 23 Sep 2023 19:43:51 +0000 (13:43 -0600)]
moveconfig: Avoid deprecation warning for setDaemon

Use the recommended new way of setting a thread to be a daemon.

This avoids a warning:

   DeprecationWarning: setDaemon() is deprecated, set the daemon attribute
      instead

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agomoveconfig: Drop -H option
Simon Glass [Sat, 23 Sep 2023 19:43:50 +0000 (13:43 -0600)]
moveconfig: Drop -H option

Drop this option, which is no longer needed now that we have converted
all CONFIG options to Kconfig.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agodm: core: Adjust dump-sorting to get stats only when needed
Simon Glass [Wed, 20 Sep 2023 02:05:48 +0000 (20:05 -0600)]
dm: core: Adjust dump-sorting to get stats only when needed

If we are not sorting the tree we don't need to get the stats. Adjust the
code to avoid the wasted time.

Signed-off-by: Simon Glass <sjg@chromium.org>
14 months agoMerge tag 'u-boot-stm32-20231004' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Wed, 4 Oct 2023 14:49:30 +0000 (10:49 -0400)]
Merge tag 'u-boot-stm32-20231004' of https://source.denx.de/u-boot/custodians/u-boot-stm

STM32 MCU:
  _ alignment with kernel DT v6.5 for stm32f429 and stm32f746
  _ rework way of displaying ST logo for stm32f746-disco and stm32f769-disco

STM32 MPU:
  _ alignment with kernel DT v6.6-rc1
  _ add RNG support for stm32mp13
  _ add USB, USB boot and stm32prog command support for stm32mp13
  _ add support of USART1 clock for stm32mp1
  _ only print RAM and board code with SPL_DISPLAY_PRINT flag for
    stm32mp1
  _ rename update_sf to dh_update_sd_to_sf and add dh_update_sd_to_emmc
    for stm32mp15xx DHCOR

[ Fix merge conflict at board/st/common/stm32mp_dfu.c ]
Signed-off-by: Tom Rini <trini@konsulko.com>
14 months agoboard: st: common: cleanup dfu support
Patrick Delaunay [Tue, 26 Sep 2023 15:09:23 +0000 (17:09 +0200)]
board: st: common: cleanup dfu support

split the file stm32mp_dfu.c in two files to simplify the Makefile
- stm32mp_dfu.c: required by CONFIG_SET_DFU_ALT_INFO
- stm32mp_dfu_virt.c: required by CONFIG_DFU_VIRT for stm32prog
  command or VIRT device for PMIC for CONFIG_SET_DFU_ALT_INFO.

This patch also remove some remaining #ifdef CONFIG
and avoid compilation error when CONFIG_SET_DFU_ALT_INFO is not
activated.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
14 months agoconfigs: stm32mp13: add support of usb boot
Patrick Delaunay [Tue, 26 Sep 2023 15:09:22 +0000 (17:09 +0200)]
configs: stm32mp13: add support of usb boot

Add support of USB key boot in distro boot command.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
14 months agoconfigs: stm32mp13: activate command stm32prog
Patrick Delaunay [Tue, 26 Sep 2023 15:09:21 +0000 (17:09 +0200)]
configs: stm32mp13: activate command stm32prog

Activate the command stm32prog with CONFIG_CMD_STM32MPROG.
The CONFIG_SET_DFU_ALT_INFO is also activated to support
the required weak functions for the DFU virtual backen defined in
board/st/common/stm32mp_dfu.c.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>