]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
2 years agoMerge branch '2022-04-08-Kconfig-updates-and-dead-code-removal'
Tom Rini [Fri, 8 Apr 2022 17:33:14 +0000 (13:33 -0400)]
Merge branch '2022-04-08-Kconfig-updates-and-dead-code-removal'

- Migration of more symbols from board config.h files to defconfig
- Remove unused network drivers

2 years agoarm: Remove unused ep93xx code
Tom Rini [Thu, 31 Mar 2022 17:46:53 +0000 (13:46 -0400)]
arm: Remove unused ep93xx code

There are no platforms for this architecture anymore, remove unused
code.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: Remove uli526x driver
Tom Rini [Thu, 31 Mar 2022 17:46:52 +0000 (13:46 -0400)]
net: Remove uli526x driver

This driver is not enabled by any board and not converted to DM_ETH.
Remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: Remove ns8382x driver
Tom Rini [Thu, 31 Mar 2022 17:46:51 +0000 (13:46 -0400)]
net: Remove ns8382x driver

This driver is not enabled by any board and not converted to DM_ETH.
Remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: Remove natsemi driver
Tom Rini [Thu, 31 Mar 2022 17:46:50 +0000 (13:46 -0400)]
net: Remove natsemi driver

This driver is not enabled by any board and not converted to DM_ETH.
Remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: Remove lan91c96 driver
Tom Rini [Thu, 31 Mar 2022 17:46:49 +0000 (13:46 -0400)]
net: Remove lan91c96 driver

This driver is not enabled by any board and not converted to DM_ETH.
Remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: Remove ftmac110 driver
Tom Rini [Thu, 31 Mar 2022 17:46:48 +0000 (13:46 -0400)]
net: Remove ftmac110 driver

This driver is not enabled by any board and not converted to DM_ETH.
Remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: Remove dnet driver
Tom Rini [Thu, 31 Mar 2022 17:46:47 +0000 (13:46 -0400)]
net: Remove dnet driver

This driver is not enabled by any board and not converted to DM_ETH.
Remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: Remove cs8900 driver
Tom Rini [Thu, 31 Mar 2022 17:46:46 +0000 (13:46 -0400)]
net: Remove cs8900 driver

This driver is not enabled by any board and not converted to DM_ETH.
Remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: Remove ax88180 driver
Tom Rini [Thu, 31 Mar 2022 17:46:45 +0000 (13:46 -0400)]
net: Remove ax88180 driver

This driver is not enabled by any board and not converted to DM_ETH.
Remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonet: Remove armada100_fec driver
Tom Rini [Thu, 31 Mar 2022 17:46:44 +0000 (13:46 -0400)]
net: Remove armada100_fec driver

This driver is not enabled by any board and not converted to DM_ETH.
Remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm: fsl-layerscape: Migrate more DP-DDR options to Kconfig
Tom Rini [Wed, 30 Mar 2022 22:07:35 +0000 (18:07 -0400)]
arm: fsl-layerscape: Migrate more DP-DDR options to Kconfig

Based on current usage, migrate a number of DP-DDR related options to
Kconfig.

Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agosiemens-am33x-common: Drop CONFIG_DMA_COHERENT*
Tom Rini [Wed, 30 Mar 2022 22:07:34 +0000 (18:07 -0400)]
siemens-am33x-common: Drop CONFIG_DMA_COHERENT*

These values are not used in the code, remove them.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agom53menlo: Drop CONFIG_DISCOVER_PHY
Tom Rini [Wed, 30 Mar 2022 22:07:33 +0000 (18:07 -0400)]
m53menlo: Drop CONFIG_DISCOVER_PHY

This is not used in code, drop.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_FSL_QIXIS et al to Kconfig
Tom Rini [Wed, 30 Mar 2022 22:07:32 +0000 (18:07 -0400)]
Convert CONFIG_FSL_QIXIS et al to Kconfig

This converts the following to Kconfig:
   CONFIG_FSL_QIXIS
   CONFIG_QIXIS_I2C_ACCESS

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_DIMM_SLOTS_PER_CTLR to Kconfig
Tom Rini [Wed, 30 Mar 2022 22:07:31 +0000 (18:07 -0400)]
Convert CONFIG_DIMM_SLOTS_PER_CTLR to Kconfig

This converts the following to Kconfig:
   CONFIG_DIMM_SLOTS_PER_CTLR

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agogalileo: Remove CONFIG_DESIGNWARE_ETH reference
Tom Rini [Wed, 30 Mar 2022 22:07:30 +0000 (18:07 -0400)]
galileo: Remove CONFIG_DESIGNWARE_ETH reference

This platform has CONFIG_ETH_DESIGNWARE set already, which is the
correct value for the driver in question.  Remove this incorrect line.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agopowerpc: mpc83xx: Migrate DEFAULT_IMMR to Kconfig
Tom Rini [Wed, 30 Mar 2022 22:07:29 +0000 (18:07 -0400)]
powerpc: mpc83xx: Migrate DEFAULT_IMMR to Kconfig

As no platforms override this value, set it for all mpc83xx platforms.

Cc: Mario Six <mario.six@gdsys.cc>
Cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonds32: Migrate CONFIG_DEBUG_LED to Kconfig
Tom Rini [Wed, 30 Mar 2022 22:07:28 +0000 (18:07 -0400)]
nds32: Migrate CONFIG_DEBUG_LED to Kconfig

Move this value to the board Kconfig file.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agols1021atwr: Use DEBUG and not CONFIG_DEBUG
Tom Rini [Wed, 30 Mar 2022 22:07:27 +0000 (18:07 -0400)]
ls1021atwr: Use DEBUG and not CONFIG_DEBUG

We use 'DEBUG' and not 'CONFIG_DEBUG' tree-wide for debug code that is
left in, and not wrapped by some other regular debugging type print
macro.

Cc: Alison Wang <alison.wang@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agomicroblaze: Migrate DCACHE/ICACHE to Kconfig
Tom Rini [Wed, 30 Mar 2022 22:07:26 +0000 (18:07 -0400)]
microblaze: Migrate DCACHE/ICACHE to Kconfig

Move these two options to the arch Kconfig file.

Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
2 years agotegra: Drop CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
Tom Rini [Wed, 30 Mar 2022 22:07:25 +0000 (18:07 -0400)]
tegra: Drop CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS

This is not currently set by any boards, so drop.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agocontrolcenterdc: Migrate CUSTOMER_BOARD_SUPPORT to Kconfig
Tom Rini [Wed, 30 Mar 2022 22:07:24 +0000 (18:07 -0400)]
controlcenterdc: Migrate CUSTOMER_BOARD_SUPPORT to Kconfig

This symbol is only possibly useful on some mvebu platforms, so move the
symbol there and select it for the only current user.

Cc: Mario Six <mario.six@gdsys.cc>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agospi: cadence_qspi: Migrate CONFIG_CQSPI_REF_CLK to Kconfig
Tom Rini [Wed, 30 Mar 2022 22:07:23 +0000 (18:07 -0400)]
spi: cadence_qspi: Migrate CONFIG_CQSPI_REF_CLK to Kconfig

This is a little tricky since SoCFPGA has code to determine this as
runtime.  Introduce a guard variable for platforms to select if they
have a static value to use.  Then for ARCH_SOCFPGA, call
cm_get_qspi_controller_clk_hz() and otherwise continue the previous
behavior.

Cc: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SH_SCIF_CLK_FREQ to Kconfig
Tom Rini [Wed, 30 Mar 2022 22:07:22 +0000 (18:07 -0400)]
Convert CONFIG_SH_SCIF_CLK_FREQ to Kconfig

This converts the following to Kconfig:
   CONFIG_SH_SCIF_CLK_FREQ

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_CONS_SCIF0 et al to Kconfig
Tom Rini [Wed, 30 Mar 2022 22:07:21 +0000 (18:07 -0400)]
Convert CONFIG_CONS_SCIF0 et al to Kconfig

This converts the following to Kconfig:
   CONFIG_CONS_SCIF0
   CONFIG_CONS_SCIF1
   CONFIG_CONS_SCIF2
   CONFIG_CONS_SCIF4
   CONFIG_CONS_SCIFA0

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoat91: Remove unused LED code
Tom Rini [Wed, 30 Mar 2022 22:07:20 +0000 (18:07 -0400)]
at91: Remove unused LED code

These LED files (and CONFIG values) are unused today, remove the code in
question.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agostm32f429-discovery: Migrate CONFIG_*_LED out of CONFIG namespace
Tom Rini [Wed, 30 Mar 2022 22:07:19 +0000 (18:07 -0400)]
stm32f429-discovery: Migrate CONFIG_*_LED out of CONFIG namespace

These values are only used in one file, reference them more directly.

Cc: Kamil Lulko <kamil.lulko@gmail.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: uboot-stm32@st-md-mailman.stormreply.com
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agocorvus: Migrate CONFIG_*_LED out of CONFIG namespace
Tom Rini [Wed, 30 Mar 2022 22:07:18 +0000 (18:07 -0400)]
corvus: Migrate CONFIG_*_LED out of CONFIG namespace

This code is only used on the corvus platform, so migrate the LED on/off
code to this platform and remove it from the CONFIG namespace.  In
theory, this should likely be moved to the modern GPIO LED driver as a
further cleanup.

Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2 years agoMPC837XERDB: Stop using CONFIG_RAMDISKFILE
Tom Rini [Wed, 30 Mar 2022 22:07:17 +0000 (18:07 -0400)]
MPC837XERDB: Stop using CONFIG_RAMDISKFILE

We don't really configure this, just set it directly in the environment
section.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agos5p_goni, smdkc100: Move some environment settings out of CONFIG
Tom Rini [Wed, 30 Mar 2022 22:07:16 +0000 (18:07 -0400)]
s5p_goni, smdkc100: Move some environment settings out of CONFIG

A number of CONFIG options are used on these platforms as part of the
default environment.  Set some of these more directly and in other
cases, just reference them directly.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm: integrator: Migrate platform-specific options and cleanup armcoremodule.h
Tom Rini [Wed, 30 Mar 2022 22:07:15 +0000 (18:07 -0400)]
arm: integrator: Migrate platform-specific options and cleanup armcoremodule.h

This converts the following to Kconfig:
   CONFIG_CM_INIT
   CONFIG_CM_REMAP
   CONFIG_CM_SPD_DETECT
   CONFIG_CM_MULTIPLE_SSRAM
   CONFIG_CM_TCRAM

We make the first three of these options be always enabled, as that
matches usage.  We select the last two based on how they were defined in
armcoremodule.h.  This also allows us to remove some unused code in
board/armltd/integrator/lowlevel_init.S

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_CMDLINE_PS_SUPPORT to Kconfig
Tom Rini [Wed, 30 Mar 2022 22:07:14 +0000 (18:07 -0400)]
Convert CONFIG_CMDLINE_PS_SUPPORT to Kconfig

This converts the following to Kconfig:
   CONFIG_CMDLINE_PS_SUPPORT

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agotegra: Migrate CI_UDC_HAS_HOSTPC to Kconfig
Tom Rini [Wed, 30 Mar 2022 22:07:13 +0000 (18:07 -0400)]
tegra: Migrate CI_UDC_HAS_HOSTPC to Kconfig

This option is only enabled for CI_UDC and !TEGRA20, so implement it as
such in Kconfig directly.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
2 years agomvebu: Move BOOTROM_ERR_REG out of CONFIG namespace
Tom Rini [Wed, 30 Mar 2022 22:07:12 +0000 (18:07 -0400)]
mvebu: Move BOOTROM_ERR_REG out of CONFIG namespace

This register is referenced in one location and does not seem
configurable, so remove it from CONFIG namespace.

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoConvert CONFIG_BOARD_SIZE_LIMIT to Kconfig
Tom Rini [Wed, 30 Mar 2022 22:07:11 +0000 (18:07 -0400)]
Convert CONFIG_BOARD_SIZE_LIMIT to Kconfig

This converts the following to Kconfig:
   CONFIG_BOARD_SIZE_LIMIT

To do this, introduce CONFIG_HAS_BOARD_SIZE_LIMIT.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2022-04-08-env-updates'
Tom Rini [Fri, 8 Apr 2022 12:27:50 +0000 (08:27 -0400)]
Merge branch '2022-04-08-env-updates'

- Assorted env tooling updates
- Bug fix around multiple possible env locations and ENV_IS_NOWHERE
- Add 'indirect' sub-command to env
- Allow for FAT env to have the location overridden by the board code.

2 years agoenv: Allow text-env tests to run with awk
Simon Glass [Sun, 13 Mar 2022 05:47:49 +0000 (22:47 -0700)]
env: Allow text-env tests to run with awk

At present the tests assume that gawk is being used. Adjust the tests so
that the names are inserted in alphabetical order, so that awk is happy.

Also use PROCINFO to make gawk output in alphabetical order. This is not
ideal, since it changes the env-car ordering from what the user provided,
but it may be acceptable.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Fixes: https://source.denx.de/u-boot/u-boot/-/issues/10
2 years agoenv: Drop the unncessary protocol mention in autoload
Simon Glass [Fri, 11 Mar 2022 23:22:39 +0000 (16:22 -0700)]
env: Drop the unncessary protocol mention in autoload

Drop this text at the end since it already mentions bootp and dhcp.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2 years agoenv: Move the doc comment to the code
Simon Glass [Fri, 11 Mar 2022 23:22:38 +0000 (16:22 -0700)]
env: Move the doc comment to the code

This doesn't really make much sense in the documentation. Add a code
comment instead.

Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoMakefile: Sort u-boot-initial-env output
Christoph Niedermaier [Tue, 1 Mar 2022 08:38:51 +0000 (09:38 +0100)]
Makefile: Sort u-boot-initial-env output

This will sort the default environment file generated by
"make u-boot-initial-env", but won't sort the default
environment in the compiled u-boot binary. The file
u-boot-initial-env is considered to use for the userpace
environment access tools [1] in case of that the
environments is written the first time into its location.
This is done on the one hand for a better overview and
comparison of the generated environment file. On the other
hand it is to synchronize the output with the script
get_default_env.sh, which generated a sorted default
environment file. The sorting preserves the order of equal
variable names by sorting only the variable name, and
disable the last-resort comparison. After sorting,
unnoticed blank lines at the end move to the top. Avoid
that by removing it before sorting.

[1] https://github.com/sbabic/libubootenv

Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Marek Behún <marek.behun@nic.cz>
To: u-boot@lists.denx.de
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoscripts/get_default_envs.sh: Remove blank lines
Christoph Niedermaier [Wed, 23 Feb 2022 09:33:36 +0000 (10:33 +0100)]
scripts/get_default_envs.sh: Remove blank lines

After sorting, unnoticed blank lines at the end move to the top.
Avoid this by removing it before sorting.

Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de

2 years agoenv: fat: Allow overriding interface, device and partition
He Yong [Thu, 17 Feb 2022 16:07:25 +0000 (00:07 +0800)]
env: fat: Allow overriding interface, device and partition

For platform which can boot on different device, this allows
to override interface, device and partition from board code

Signed-off-by: He Yong <hyyoxhk@163.com>
2 years agocmd: env: Add `indirect` to indirectly set values
Samuel Dionne-Riel [Mon, 20 Dec 2021 23:31:56 +0000 (18:31 -0500)]
cmd: env: Add `indirect` to indirectly set values

This allows an ergonomic-enough approximation of ${!variable} expansion.
This could be used the following way:

```
for target in ${boot_targets}; do
   env indirect target_name target_name_${target}
   # ...
done
```

Assuming `target_name_mmc0` and similar are set appropriately.

A default value can be optionally provided.

Note: this acts on environment variables, not hush variables.

Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: "Marek Behún" <marek.behun@nic.cz>
[trini: Don't enable by default]

2 years agoenv: Load env when ENV_IS_NOWHERE is only location selected
Felix.Vietmeyer@jila.colorado.edu [Wed, 21 Apr 2021 02:04:26 +0000 (20:04 -0600)]
env: Load env when ENV_IS_NOWHERE is only location selected

This patch prevent u-boot from hanging on a UltraZed EG board (zynqmp).

Without the patch,
(drv = env_driver_lookup(ENVOP_INIT, prio))
evaluates to 0, causing prio = 0
Then, (!prio) is hit, returning -ENODEV causing a stall.

With the patch,
instead of returning -ENODEV and causing a stall, we
set gd->env_addr (is this really needed?)
and then
mark gd->env_valid = ENV_INVALID to use the default env.

2 years agoimx8/ls10xx: Use a sane SYS_MALLOC_F_LEN default
Fabio Estevam [Sat, 26 Mar 2022 14:47:40 +0000 (11:47 -0300)]
imx8/ls10xx: Use a sane SYS_MALLOC_F_LEN default

When adding new features to imx8m boards, such as DM clock support,
the malloc area can be exhausted.

To avoid such issue, provide a reasonable default for the
SYS_MALLOC_F_LEN size.

Quoting Tom Rini:

"This seems to be an area where everyone is either:
- Kicking the value up a bit for themselves
- Having hard to figure out problems booting the platform because it's
  too small a value until they see someone else picked a larger value.

So lets raise these a bit and get some acks, please."

Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Tested-by: Adam Ford <aford173@gmail.com> #imx8mm-beacon, imx8mn-beacon
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
2 years agoMerge branch '2022-04-06-various-verified-boot-bugfixes'
Tom Rini [Thu, 7 Apr 2022 13:49:27 +0000 (09:49 -0400)]
Merge branch '2022-04-06-various-verified-boot-bugfixes'

To quote the author:

This series collects together various misc patches that were needed when
building mainline U-Boot against Chromium OS verified boot. Most of them
fix minor bugs.

2 years agodm: blk: Expand iteration and add tests
Simon Glass [Mon, 28 Feb 2022 19:08:35 +0000 (12:08 -0700)]
dm: blk: Expand iteration and add tests

Add some functions which support iteration before probing. Also add tests
for the functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agodm: core: Tidy up comments in uclass headers
Simon Glass [Mon, 28 Feb 2022 19:08:34 +0000 (12:08 -0700)]
dm: core: Tidy up comments in uclass headers

Improve some of the comments in these files, which don't follow the
correct style.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agodm: core: Add a required struct declaration
Simon Glass [Mon, 28 Feb 2022 19:08:33 +0000 (12:08 -0700)]
dm: core: Add a required struct declaration

This file uses struct driver, so declare it at the top in case the
header-inclusion order is not as expected.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agostdint: Add a definition of UINT8_MAX
Simon Glass [Mon, 28 Feb 2022 19:08:32 +0000 (12:08 -0700)]
stdint: Add a definition of UINT8_MAX

This is normally defined in stdint.h but is not used in U-Boot. When
libraries (such as Chromium OS vboot) are built against U-Boot they may
expect this value to be available. Add it to avoid build errors in this
case.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoMake ASYMMETRIC_KEY_TYPE depend on FIT_SIGNATURE
Simon Glass [Mon, 28 Feb 2022 19:08:31 +0000 (12:08 -0700)]
Make ASYMMETRIC_KEY_TYPE depend on FIT_SIGNATURE

Add this dependency to avoid a build error if FIT_SIGNATURE is not
enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoAdd a default for TPL_TEXT_BASE
Simon Glass [Mon, 28 Feb 2022 19:08:30 +0000 (12:08 -0700)]
Add a default for TPL_TEXT_BASE

If this value is not provided it causes a hang in the build. Add a default
value to avoid this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agodisk: Correct the conditions for SPL
Simon Glass [Mon, 28 Feb 2022 19:08:29 +0000 (12:08 -0700)]
disk: Correct the conditions for SPL

These filesystems may have different settings for SPL and TPL. Use the
correct Makefile variable to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agospi: Avoid checking console in SPL
Simon Glass [Mon, 28 Feb 2022 19:08:28 +0000 (12:08 -0700)]
spi: Avoid checking console in SPL

When SPI flash is used in SPL there is no console, so ctrlc() cannot be
called. Add a condition to fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agocros_ec: Complete the comment for cros_ec_read_batt_charge()
Simon Glass [Mon, 28 Feb 2022 19:08:27 +0000 (12:08 -0700)]
cros_ec: Complete the comment for cros_ec_read_batt_charge()

Add the missing 'Return' information.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agocbfs: Add some more definititions
Simon Glass [Mon, 28 Feb 2022 19:08:26 +0000 (12:08 -0700)]
cbfs: Add some more definititions

Add definitions for a payload or 'self', which is like an unpacked ELF
file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agolzma: Tidy up the function prototype
Simon Glass [Mon, 28 Feb 2022 19:08:25 +0000 (12:08 -0700)]
lzma: Tidy up the function prototype

This should use a const pointer for the input stream. Fix this and also
add a proper comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agofdt: sandbox: Avoid looking for an appended device tree
Simon Glass [Mon, 28 Feb 2022 19:08:24 +0000 (12:08 -0700)]
fdt: sandbox: Avoid looking for an appended device tree

We don't use an appended tree for sandbox and the required symbols are
not present. Add a condition to avoid a build error.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agofdt: Correct condition for SEPARATE_BSS
Simon Glass [Mon, 28 Feb 2022 19:08:23 +0000 (12:08 -0700)]
fdt: Correct condition for SEPARATE_BSS

This may have different settings for SPL and TPL. Correct the condition.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoabuf: Correct a corner case with abuf_realloc()
Simon Glass [Mon, 28 Feb 2022 19:08:22 +0000 (12:08 -0700)]
abuf: Correct a corner case with abuf_realloc()

If the buffer is empty and not allocated, then abuf_realloc() tries to
copy invalid data. This happens because an incorrect change to use
memdup() was added after the original code was written.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoerrno: Avoid including strings in SPL
Simon Glass [Mon, 28 Feb 2022 19:08:21 +0000 (12:08 -0700)]
errno: Avoid including strings in SPL

At present the header file defines this function in SPL but the file may
not actually be built. This causes a build error if the option is enabled.

Fix the condition in the header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agobinman: Correct Chromium OS entry types
Simon Glass [Mon, 28 Feb 2022 19:08:20 +0000 (12:08 -0700)]
binman: Correct Chromium OS entry types

The conversion to bintools broke the invocation of the utility, since
the arguments are not correct. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Wed, 6 Apr 2022 15:52:17 +0000 (11:52 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

2 years agoMerge branch '2022-04-06-assorted-updates'
Tom Rini [Wed, 6 Apr 2022 15:51:00 +0000 (11:51 -0400)]
Merge branch '2022-04-06-assorted-updates'

- Add DM_PMIC support to TPS65217 and migrate some platforms to it.
- mkimage verification fixes
- DM rST fix, add missing flag when linking u-boot-elf.o

2 years agodm: fix function documentation in include/dm/ofnode.h
Heinrich Schuchardt [Thu, 24 Mar 2022 15:22:32 +0000 (16:22 +0100)]
dm: fix function documentation in include/dm/ofnode.h

We use Sphinx style comments to describe functions.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agotools: mkimage: Call verify_header after writing image to disk
Pali Rohár [Fri, 14 Jan 2022 17:34:43 +0000 (18:34 +0100)]
tools: mkimage: Call verify_header after writing image to disk

If image backend provides verify_header callback then call it after writing
image to disk. This ensures that written image is correct.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agotools: mkimage: No need to verify_header for header_v2
Yi Liu [Wed, 30 Mar 2022 10:05:59 +0000 (18:05 +0800)]
tools: mkimage: No need to verify_header for header_v2

rockchip header_v2 do not have a spl_hdr, so remove the verify.

Signed-off-by: Yi Liu <liuyi@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoMakefile: add endian link flag to u-boot-elf.o
Du Huanpeng [Wed, 30 Mar 2022 18:41:42 +0000 (02:41 +0800)]
Makefile: add endian link flag to u-boot-elf.o

fix compile error when using a little-endian to build with configs:
sfr_nb4-ser_ram_defconfig
comtrend_wap5813n_ram_defconfig
comtrend_ar5387un_ram_defconfig
comtrend_ct5361_ram_defconfig
comtrend_vr3032u_ram_defconfig
comtrend_ar5315u_ram_defconfig
huawei_hg556a_ram_defconfig
netgear_dgnd3700v2_ram_defconfig

Signed-off-by: Du Huanpeng <dhu@hodcarrier.org>
2 years agoriscv: alloc space exhausted
Heinrich Schuchardt [Tue, 5 Apr 2022 14:47:15 +0000 (16:47 +0200)]
riscv: alloc space exhausted

When trying to run qemu-riscv64_smode_defconfig with 32 harts booting
fails. The debug UART shows a message

    alloc space exhausted

32 is the current maximum number of harts for machine virt in QEMU 7.0.

Raise the default for SYS_MALLOC_F_LEN to 16 KiB.

Move the setting to /Kconfig where we define SYS_MALLOC_F_LEN for
other architectures too.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Rick Chen <rick@andestech.com>
2 years agoriscv: enable CONFIG_CMD_SBI for QEMU boards
Heinrich Schuchardt [Wed, 23 Mar 2022 21:46:43 +0000 (22:46 +0100)]
riscv: enable CONFIG_CMD_SBI for QEMU boards

Let CONFIG_TARGET_QEMU_VIRT imply CONFIG_CMD_SBI.

The sbi command provides detailed information about the SBI.
It is useful to test the discovery of extensions.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agocmd/sbi: add missing SBI information
Heinrich Schuchardt [Thu, 17 Mar 2022 06:36:15 +0000 (07:36 +0100)]
cmd/sbi: add missing SBI information

Let the sbi command display:

* machine vendor ID
* machine architecture ID
* machine implementation ID

With this patch the output for the HiFive Unmatched looks like

    => sbi
    SBI 0.3
    OpenSBI 0.9
    Machine:
      Vendor ID 489
      Architecture ID 8000000000000007
      Implementation ID 20181004
    Extensions:
      sbi_set_timer
      sbi_console_putchar
      sbi_console_getchar
      sbi_clear_ipi
      sbi_send_ipi
      sbi_remote_fence_i
      sbi_remote_sfence_vma
      sbi_remote_sfence_vma_asid
      sbi_shutdown
      SBI Base Functionality
      Timer Extension
      IPI Extension
      RFENCE Extension
      Hart State Management Extension
      System Reset Extension

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
2 years agoriscv: provide missing base extension functions
Heinrich Schuchardt [Thu, 17 Mar 2022 06:36:14 +0000 (07:36 +0100)]
riscv: provide missing base extension functions

Provide library functions to read:

* machine vendor ID
* machine architecture ID
* machine implementation ID

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
2 years agocmd: sbi: add Performance Monitoring Unit Extension
Heinrich Schuchardt [Wed, 16 Mar 2022 20:21:18 +0000 (21:21 +0100)]
cmd: sbi: add Performance Monitoring Unit Extension

Version 1.0-rc3 of the RISC-V Supervisor Binary Interface Specification
has added the Performance Monitoring Unit Extension.

The sbi command should be able to detect it.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agopower: pmic: Provide DM_PMIC support for tps65217 driver
Lukasz Majewski [Sat, 12 Mar 2022 07:11:11 +0000 (08:11 +0100)]
power: pmic: Provide DM_PMIC support for tps65217 driver

The tps65217 PMIC driver is used with am335x SoC based designs.

It is used in the SPL (MLO) as well, so the DM conversion only is
for u-boot proper.

This driver only allows simple reading/writing/dumping of the content
of its registers and requires the DM_I2C for proper operation.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agopower: Rename CONFIG_POWER_TPS65217 with CONFIG_PMIC_TPS65217
Lukasz Majewski [Sat, 12 Mar 2022 07:11:10 +0000 (08:11 +0100)]
power: Rename CONFIG_POWER_TPS65217 with CONFIG_PMIC_TPS65217

Up till now the CONFIG_POWER_TPS65217 has been defined in several header
files for am335x SoC.

This patch renames it to CONFIG_PMIC_TPS65217, which better reflects the
role of this IC circuit.

Moreover, new CONFIG_PMIC_TPS65217 has been introduced in Kconfig
to be used with boards, which both support DM_PMIC and DM_I2C.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
[trini: Migrate all other platforms as well]
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2022-04-04-platform-updates'
Tom Rini [Tue, 5 Apr 2022 17:45:22 +0000 (13:45 -0400)]
Merge branch '2022-04-04-platform-updates'

- Updates for exynos78x0 and TI K3 platforms

2 years agoMerge tag 'xilinx-for-v2022.07-rc1-v2' of https://source.denx.de/u-boot/custodians...
Tom Rini [Tue, 5 Apr 2022 15:27:39 +0000 (11:27 -0400)]
Merge tag 'xilinx-for-v2022.07-rc1-v2' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

Xilinx changes for v2022.07-rc1 v2

xilinx:
- Allow booting bigger kernels till 100MB

zynqmp:
- DT updates (reset IDs)
- Remove unneeded low level uart initialization from psu_init*
- Enable PWM features
- Add support for 1EG device

serial_zynq:
- Change fifo behavior in DEBUG mode

zynq_sdhci:
- Fix BASECLK setting calculation

clk_zynqmp:
- Add support for showing video clock

gpio:
- Update slg driver to handle DT flags

net:
- Update ethernet_id code to support also DM_ETH_PHY
- Add support for DM_ETH_PHY in gem driver
- Enable dynamic mode for SGMII config in gem driver

pwm:
- Add driver for cadence PWM

versal:
- Add support for reserved memory

firmware:
- Handle PD enabling for SPL
- Add support for IOUSLCR SGMII configurations

include:
- Sync phy.h with Linux
- Update xilinx power domain dt binding headers

2 years agonet: zynq_gem: Add SGMII dynamic config support
T Karthik Reddy [Wed, 30 Mar 2022 09:07:58 +0000 (11:07 +0200)]
net: zynq_gem: Add SGMII dynamic config support

Add support for SGMII dynamic configuration which will takes care of
configuring SGMII in the GEM secure (GEM_CLK_CTRL) configuration
register.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/a8915186e44015959978d080a31de652f544cd4a.1648631275.git.michal.simek@xilinx.com
2 years agofirmware: firmware-zynqmp: Add zynqmp_pm_set_gem_config api
T Karthik Reddy [Wed, 30 Mar 2022 09:07:57 +0000 (11:07 +0200)]
firmware: firmware-zynqmp: Add zynqmp_pm_set_gem_config api

Add zynqmp_pm_set_gem_config() api to configure GEM secure registers.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/f69e32355c6a6be7d2780663353c52757530207d.1648631275.git.michal.simek@xilinx.com
2 years agogpio: slg7xl45106: Update gpio desc flags from DT
T Karthik Reddy [Wed, 30 Mar 2022 09:07:56 +0000 (11:07 +0200)]
gpio: slg7xl45106: Update gpio desc flags from DT

In current slg7xl45106 gpio driver xlate() function we are not updating
gpio flags from DT. Read the given flag from DT and update the gpio desc
flags variable with required gpio direction state.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/a8d7b4799337bd99f61ace509889f02b192a9414.1648631275.git.michal.simek@xilinx.com
2 years agonet: zynq_gem: Move ethernet info print statement
T Karthik Reddy [Wed, 30 Mar 2022 09:07:55 +0000 (11:07 +0200)]
net: zynq_gem: Move ethernet info print statement

As we are not reading the PHY address in case of CONFIG_ETH_PHY in plat
function, phy address always prints as -1. So move the ethernet info
print statement to probe function, to display proper phy address.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/f6efc6719d767b1bebe65987c22c6d52329f4225.1648631275.git.michal.simek@xilinx.com
2 years agonet: phy: Avoid phy gpio reset sequence if DM_ETH_PHY is enabled
T Karthik Reddy [Wed, 30 Mar 2022 09:07:54 +0000 (11:07 +0200)]
net: phy: Avoid phy gpio reset sequence if DM_ETH_PHY is enabled

If DM_ETH_PHY config is enabled PHY gpio reset is taken care by the
eth-phy-uclass driver, so use the PHY gpio reset functionality from
ethernet_id file when this config is disabled to reset the PHY.
Use debug() print instead of dev_err() to avoid warning incase if phy-id
compatible string is not present.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/4d0fd3f9f886c1d943776025e5efb5438b0eb389.1648631275.git.michal.simek@xilinx.com
2 years agonet: zynq_gem: Use shared MDIO bus support for zynqmp
Michal Simek [Wed, 30 Mar 2022 09:07:53 +0000 (11:07 +0200)]
net: zynq_gem: Use shared MDIO bus support for zynqmp

CONFIG_ETH_PHY enables support to utilize generic ethernet phy
framework. Though if ethernet PHY node is in other ethernet node, it
will use shared MDIO to access the PHY of other ethernet.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Link: https://lore.kernel.org/r/337b1a38ba36cde1951739af62fb3d2736d97f53.1648631275.git.michal.simek@xilinx.com
2 years agodt-bindings: xilinx: Add missing ids for PD
Michal Simek [Wed, 30 Mar 2022 07:56:23 +0000 (09:56 +0200)]
dt-bindings: xilinx: Add missing ids for PD

There are some new power domain IDs which are used in Linux kernel that's
why add them here too.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/e6092e1d3766c0ac11bf620820739c93ab677a85.1648626981.git.michal.simek@xilinx.com
2 years agoarm64: zynqmp: Record ID code for XCZU1EG device
Michal Simek [Wed, 30 Mar 2022 05:51:58 +0000 (07:51 +0200)]
arm64: zynqmp: Record ID code for XCZU1EG device

Add ID code for 1eg device.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/5b6c9f6a25bba076f304bc4699f6f676a929a683.1648619516.git.michal.simek@xilinx.com
2 years agonet: phy: Fix rgmii-id phy reset timeout issue
T Karthik Reddy [Tue, 29 Mar 2022 14:05:57 +0000 (16:05 +0200)]
net: phy: Fix rgmii-id phy reset timeout issue

While creating a phy device using phy_device_create(), we need to
provide a valid phyaddr instead of 0 causing phy address being
registered as 0 with mdio bus and shows mdio phy list as below

ZynqMP>  mdio list
eth0:
0 - TI DP83867 <--> ethernet@ff0b0000
eth1:
0 - TI DP83867 <--> ethernet@ff0c0000

Also PHY soft reset is being requested on 0 instead of valid
address causing "PHY reset timed out" error.

So add phyaddr argument to phy_connect_phy_id() and to its prototype
to create phy device with valid phyaddress.

Fixes: a744a284e354 ("net: phy: Add support for ethernet-phy-id with gpio reset")
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Link: https://lore.kernel.org/r/fe35fddb9faa5af577ffdfabaec6879c935a30f8.1648562755.git.michal.simek@xilinx.com
2 years agoclk: zynqmp: Add support for for DP audio/video clocks
Michal Simek [Tue, 29 Mar 2022 11:13:56 +0000 (13:13 +0200)]
clk: zynqmp: Add support for for DP audio/video clocks

Add support for getting rate for DP audio and video clocks.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/8792efe1fd9715f7c8a2e1e24f0454fb5b25d833.1648552434.git.michal.simek@xilinx.com
2 years agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
Tom Rini [Tue, 5 Apr 2022 12:33:32 +0000 (08:33 -0400)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi

A big part is the DM pinctrl driver, which allows us to get rid of quite
some custom pinmux code and make the whole port much more robust. Many
thanks to Samuel for that nice contribution! There are some more or less
cosmetic warnings about missing clocks right now, I will send the trivial
fixes for that later.
Another big chunk is the mkimage upgrade, which adds RISC-V and TOC0
(secure images) support. Both features are unused at the moment, but I
have an always-secure board that will use that once the DT lands in the
kernel.
On top of those big things we have some smaller fixes, improving the
I2C DM support, fixing some H6/H616 early clock setup and improving the
eMMC boot partition support.

The gitlab CI completed successfully, including the build test for all
161 sunxi boards. I also boot tested on a A64, A20, H3, H6, and F1C100
board. USB, SD card, eMMC, and Ethernet all work there (where applicable).

2 years agoxilinx: Increase max size of image from 60 to 100MB
Michal Simek [Tue, 29 Mar 2022 10:54:41 +0000 (12:54 +0200)]
xilinx: Increase max size of image from 60 to 100MB

Recently big Linux kernels can have more then 60MB that's why increase this
limit to also cover these large kernels.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/f52f7c8ea419d69b248ba1460a96d1635194e128.1648551279.git.michal.simek@xilinx.com
2 years agosunxi: defconfig: enable eMMC boot partition support
Andre Przywara [Mon, 12 Jul 2021 10:06:51 +0000 (11:06 +0100)]
sunxi: defconfig: enable eMMC boot partition support

Now that the SPL can safely detect whether it was loaded from an eMMC
boot partition or the normal user data partition, let's enable this
feature on some boards that feature eMMC storage.

That covers the boards where I could test this on, and allows the same
build to be written to an SD card, eMMC user partition, eMMC boot
partition, or into SPI NOR flash.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agosunxi: eMMC: Improve automatic boot source detection
Andre Przywara [Mon, 12 Jul 2021 10:06:50 +0000 (11:06 +0100)]
sunxi: eMMC: Improve automatic boot source detection

When the Allwinner BROM loads the SPL from an eMMC boot partition, it
sets the boot source byte to the same value as when booting from the
user data partition. This prevents us from determining the boot source
to load U-Boot proper from the proper partition for sure.

The generic SPL MMC code already looks at the enabled boot partition
number, to load U-Boot proper from the same partition, but this fails
if there is nothing bootable in this partition, as the BROM then
silently falls back to the user data partition, which the SPL misses.

To learn about the actual boot source anyway, we repeat the algorithm
the BROM used to select the boot partition in the first place:
- Test EXT_CSD[179] to check if an eMMC boot partition is enabled.
- Test EXT_CSD[177] to check for valid MMC interface settings.
- Check if BOOT_ACK is enabled.
- Check the beginning of the first sector for a valid eGON signature.
- Load the whole SPL.
- Recalculate the checksum to verify the SPL is valid.

If one of those steps fails, we bail out and continue loading from the
user data partition. Otherwise we load from the selected boot partition.

Since the boot source is needed twice in the boot process, we cache the
result of this test to avoid doing this costly test multiple times.

This allows the very same image file to be put onto an SD card, into the
eMMC user data partition or into the eMMC boot partition, and safely
loads the whole of U-Boot from there.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agoram: k3-am654: Make VTT regulator optional
Christian Gmeiner [Wed, 23 Mar 2022 15:04:28 +0000 (16:04 +0100)]
ram: k3-am654: Make VTT regulator optional

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2 years agoram: k3-am654: Write all configuration values
Dominic Rath [Wed, 23 Mar 2022 15:04:27 +0000 (16:04 +0100)]
ram: k3-am654: Write all configuration values

Makes it possible to use 16-bit DDR memory.

Signed-off-by: Dominic Rath <rath@ibv-augsburg.net>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2 years agoconfigs: am64x_evm_r5: Add CONFIG_NR_DRAM_BANKS as done in a53 defconfig
Dave Gerlach [Thu, 17 Mar 2022 17:03:46 +0000 (12:03 -0500)]
configs: am64x_evm_r5: Add CONFIG_NR_DRAM_BANKS as done in a53 defconfig

Add CONFIG_NR_DRAM_BANKS from am64x_evm_a53_defconfig as this is needed
to calculate the size of DDR that is available.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
2 years agoarm: dts: k3-am64-ddr: Add ss_cfg reg entry
Dave Gerlach [Thu, 17 Mar 2022 17:03:45 +0000 (12:03 -0500)]
arm: dts: k3-am64-ddr: Add ss_cfg reg entry

Add 'ss_cfg' memory region for memorycontroller node which is required
to enable ECC.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
2 years agoboard: ti: am64x: Account for DDR size fixups if ECC is enabled
Dave Gerlach [Thu, 17 Mar 2022 17:03:44 +0000 (12:03 -0500)]
board: ti: am64x: Account for DDR size fixups if ECC is enabled

Call into k3-ddrss driver to fixup device tree and resize the available
amount of DDR if ECC is enabled.

A second fixup is required from A53 SPL to take the fixup as done from
R5 SPL and apply it to DT passed to A53 U-boot, which in turn passes
this to the OS.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
2 years agoram: k3-ddrss: Introduce ECC Functionality for full memory space
Dave Gerlach [Thu, 17 Mar 2022 17:03:43 +0000 (12:03 -0500)]
ram: k3-ddrss: Introduce ECC Functionality for full memory space

Introduce ECC Functionality for full memory space as implemented in the
DDRSS. The following is done to accomplish this:

 * Introduce a memory region "ss" to allow dt to provide DDRSS region,
   which is not the same as "ctl" which is the controller region.

 * Introduce a "ti,ecc-enable" flag which allows a memorycontroller
   instance to enable ecc.

 * Introduce functionality to properly program the DDRSS registers to
   enable ECC for the full DDR memory space if enabled with above flag.

 * Expose a k3_ddrss_ddr_fdt_fixup call to allow fixup of fdt blob to
   account from DDR memory that must be reserved for ECC operation.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
2 years agoram: k3-ddrss: Rename ddrss_ss_regs to ddrss_ctl_regs
Dave Gerlach [Thu, 17 Mar 2022 17:03:42 +0000 (12:03 -0500)]
ram: k3-ddrss: Rename ddrss_ss_regs to ddrss_ctl_regs

The current address being read from dt actually represents the ddrss_ctl
memory region, while ddrss_ss region is something else. Introduce
ddrss_ctl_regs and use it to free up ddrss_ss_regs for its proper
purpose later so that we can avoid confusion.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
2 years agodt-bindings: memory-controller: Add information about ECC bindings
Dave Gerlach [Thu, 17 Mar 2022 17:03:41 +0000 (12:03 -0500)]
dt-bindings: memory-controller: Add information about ECC bindings

Add DT binding documentation for enabling ECC in the DDR sub system present
on AM64 device.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>