platform/kernel/u-boot.git
2 years agoConvert CONFIG_SKIP_LOWLEVEL_INIT et al to Kconfig
Tom Rini [Sat, 28 Aug 2021 01:18:30 +0000 (21:18 -0400)]
Convert CONFIG_SKIP_LOWLEVEL_INIT et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SKIP_LOWLEVEL_INIT
   CONFIG_SKIP_LOWLEVEL_INIT_ONLY

In order to do this, we need to introduce SPL and TPL variants of these
options so that we can clearly disable these options only in SPL in some
cases, and both instances in other cases.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoFinish converting CONFIG_SYS_CACHELINE_SIZE to Kconfig
Tom Rini [Thu, 26 Aug 2021 15:47:59 +0000 (11:47 -0400)]
Finish converting CONFIG_SYS_CACHELINE_SIZE to Kconfig

We move the SYS_CACHE_SHIFT_N options from arch/arm/Kconfig to
arch/Kconfig, and introduce SYS_CACHE_SHIFT_4 to provide a size of 16.
Introduce select statements for other architectures based on current
usage.  For MIPS, we take the existing arch-specific symbol and migrate
to the generic symbol.  This lets us remove a little bit of otherwise
unused code.

Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>
Cc: Anup Patel <anup.patel@wdc.com>
Cc: Atish Patra <atish.patra@wdc.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Leo <ycliang@andestech.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Sean Anderson <seanga2@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
2 years agols1046ardb_qspi*: Enable RAMBOOT_PBL
Tom Rini [Wed, 25 Aug 2021 03:11:50 +0000 (23:11 -0400)]
ls1046ardb_qspi*: Enable RAMBOOT_PBL

Based on include/configs/ls1046ardb.h it seems that CONFIG_RAMBOOT_PBL
should have been enabled, but was not.  Enable and migrate the values to
Kconfig.

Cc: Mingkai Hu <mingkai.hu@nxp.com>
Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_RAMBOOT_PBL et al to Kconfig
Tom Rini [Wed, 25 Aug 2021 03:11:49 +0000 (23:11 -0400)]
Convert CONFIG_RAMBOOT_PBL et al to Kconfig

This converts the following to Kconfig:
   CONFIG_RAMBOOT_PBL
   CONFIG_SYS_FSL_PBL_PBI
   CONFIG_SYS_FSL_PBL_RCW

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_QSPI_BOOT to Kconfig
Tom Rini [Wed, 25 Aug 2021 01:19:12 +0000 (21:19 -0400)]
Convert CONFIG_QSPI_BOOT to Kconfig

This converts the following to Kconfig:
   CONFIG_QSPI_BOOT

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_FSL_DDR4 to Kconfig
Tom Rini [Wed, 25 Aug 2021 00:47:06 +0000 (20:47 -0400)]
Convert CONFIG_SYS_FSL_DDR4 to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_FSL_DDR4

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoconfigs: Remove unused IMX_NAND symbol
Tom Rini [Wed, 25 Aug 2021 00:41:04 +0000 (20:41 -0400)]
configs: Remove unused IMX_NAND symbol

The symbol CONFIG_IMX_NAND is not referenced in the code, remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonitrogen6x: Populate FDTFILE at build-time for all platforms
Tom Rini [Wed, 25 Aug 2021 00:41:03 +0000 (20:41 -0400)]
nitrogen6x: Populate FDTFILE at build-time for all platforms

Rather than using CONFIG_SABRELITE to set FDTFILE for only that
platform, switch to always setting this based on
CONFIG_DEFAULT_DEVICE_TREE as this should always match the kernel
device tree name anyhow.

Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Troy Kisky <troy.kisky@boundarydevices.com>
2 years agonitrogen6x: Migrate DDR_MB to Kconfig
Tom Rini [Wed, 25 Aug 2021 00:41:02 +0000 (20:41 -0400)]
nitrogen6x: Migrate DDR_MB to Kconfig

Move the CONFIG_DDR_MB symbol to Kconfig.  A later clean-up would be to
make dynamic memory size detection work based on how this is done on
other i.MX6 platforms.

Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Troy Kisky <troy.kisky@boundarydevices.com>
2 years agoConvert CONFIG_SPL to Kconfig
Tom Rini [Wed, 25 Aug 2021 00:41:01 +0000 (20:41 -0400)]
Convert CONFIG_SPL to Kconfig

This converts the following to Kconfig:
   CONFIG_SPL

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoimx: Finish migration of IMX_CONFIG to Kconfig
Tom Rini [Wed, 25 Aug 2021 00:41:00 +0000 (20:41 -0400)]
imx: Finish migration of IMX_CONFIG to Kconfig

- Provide a default Kconfig value of the default script
- Largely continue to define this via the board Kconfig file
- For the boards that select a script based on defconfig rather than
  TARGET, keep this within the defconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoimx: Introduce CONFIG_MACH_IMX
Tom Rini [Wed, 25 Aug 2021 00:40:59 +0000 (20:40 -0400)]
imx: Introduce CONFIG_MACH_IMX

Currently, there is no over-arching symbol for access to
arch/arm/mach-imx nor the CONFIG symbols that are common over all of
these related platforms.  This new CONFIG symbol will allow us to start
down this path.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_MX7D to Kconfig
Tom Rini [Mon, 23 Aug 2021 20:35:25 +0000 (16:35 -0400)]
Convert CONFIG_MX7D to Kconfig

This converts the following to Kconfig:
   CONFIG_MX7D

Cc: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_LOAD_ADDR to Kconfig
Tom Rini [Mon, 23 Aug 2021 14:25:31 +0000 (10:25 -0400)]
Convert CONFIG_SYS_LOAD_ADDR to Kconfig

Now that we have consistent usage, migrate this symbol to Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Rick Chen <rick@andestech.com>
2 years agoglobal: Convert CONFIG_LOADADDR to CONFIG_SYS_LOADADDR
Tom Rini [Mon, 23 Aug 2021 14:25:30 +0000 (10:25 -0400)]
global: Convert CONFIG_LOADADDR to CONFIG_SYS_LOADADDR

- In most of the codebase, we reference CONFIG_SYS_LOAD_ADDR and not
  CONFIG_LOADADDR.
- Generally, CONFIG_SYS_LOADADDR is set to CONFIG_LOADADDR and then as
  noted, we use CONFIG_SYS_LOADADDR.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoqfw: Switch to CONFIG_SYS_LOAD_ADDR from CONFIG_LOADADDR
Tom Rini [Mon, 23 Aug 2021 14:25:29 +0000 (10:25 -0400)]
qfw: Switch to CONFIG_SYS_LOAD_ADDR from CONFIG_LOADADDR

All platforms define CONFIG_SYS_LOAD_ADDR, but only some define
CONFIG_LOADADDR.  Very very rarely are these not the same address, and
qemu-ppce500 is one such case.  However, based on reading the history of
the code, this mismatched value was simply a copy-paste from other
PowerPC platforms where it is this unused currently.  Switch the code to
use CONFIG_SYS_LOAD_ADDR and update the documentation.

Cc: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agoConvert CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT to Kconfig
Tom Rini [Sat, 21 Aug 2021 17:50:19 +0000 (13:50 -0400)]
Convert CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT to Kconfig

This converts the following to Kconfig:
   CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonxp: Migrate a number of DDR related symbols to Kconfig
Tom Rini [Sat, 21 Aug 2021 17:50:18 +0000 (13:50 -0400)]
nxp: Migrate a number of DDR related symbols to Kconfig

- Guard most of the options in drivers/ddr/fsl/Kconfig with
  SYS_FSL_DDR || SYS_FSL_MMDC.
- Migrate FSL_DMA, DDR_ECC, DDR_ECC_CMD, and ECC_INIT_VIA_DDRCONTROLLER
  to Kconfig.
- Clean up the logic for including the DDR_ECC_CMD code.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonxp: Migrate CONFIG_DDR_CLK_FREQ to Kconfig
Tom Rini [Sat, 21 Aug 2021 17:50:17 +0000 (13:50 -0400)]
nxp: Migrate CONFIG_DDR_CLK_FREQ to Kconfig

As this symbol can either be a fixed value or the function
get_board_ddr_clk, migration is tricky.  Introduce a choice of DYNAMIC
or STATIC_DDR_CLK_FREQ.  If DYNAMIC, we continue to use the board
defined get_board_ddr_clk function.  If STATIC, set CONFIG_DDR_CLK_FREQ
to that value and now include/clock_legacy.h contains the function
prototype or defines get_board_ddr_clk() to that static value.  Update
callers to test for DYNAMIC or STATIC.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoddr: Migrate DDR_SPD to Kconfig
Tom Rini [Sat, 21 Aug 2021 17:50:16 +0000 (13:50 -0400)]
ddr: Migrate DDR_SPD to Kconfig

Move the symbol that controls building some JEDEC SPD support functions
to Kconfig.  This is required on the TI keystone 2 platforms and very
frequently (but not always) used on large number of Freescale/NXP
platforms, so use imply there.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agomvebe: Migrate CONFIG_DDR_LOG_LEVEL to Kconfig
Tom Rini [Sat, 21 Aug 2021 17:50:15 +0000 (13:50 -0400)]
mvebe: Migrate CONFIG_DDR_LOG_LEVEL to Kconfig

Move this specific option to Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agomvebu: ddr: Rename CONFIG_DDR_FIXED_SIZE to CONFIG_SYS_SDRAM_SIZE
Tom Rini [Sat, 21 Aug 2021 17:50:14 +0000 (13:50 -0400)]
mvebu: ddr: Rename CONFIG_DDR_FIXED_SIZE to CONFIG_SYS_SDRAM_SIZE

We have a number of CONFIG symbols to express the fixed size of system
memory.  For now, rename CONFIG_DDR_FIXED_SIZE to CONFIG_SYS_SDRAM_SIZE
and adjust usage to match that CONFIG_SYS_SDRAM_SIZE expects the entire
size rather than MiB.

Cc: Marek Behún <marek.behun@nic.cz>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Marek Behún <marek.behun@nic.cz>
2 years agomvebu: Migrate CONFIG_DDR_32BIT/64BIT to Kconfig
Tom Rini [Sat, 21 Aug 2021 17:50:13 +0000 (13:50 -0400)]
mvebu: Migrate CONFIG_DDR_32BIT/64BIT to Kconfig

Move CONFIG_DDR_32BIT/64BIT to Kconfig as a choice for Armada XP
platforms.  Make 64bit the default as this mirrors the current code.

Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoglobal: Remove unused or unnecessary CONFIG symbols related to DDR
Tom Rini [Sat, 21 Aug 2021 17:50:12 +0000 (13:50 -0400)]
global: Remove unused or unnecessary CONFIG symbols related to DDR

These symbols are now either unused or were only used within the config
file to determine other logic, which could be done in a way that doesn't
further pollute the CONFIG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2021-08-30-kconfig-migrations-part1' into next
Tom Rini [Mon, 30 Aug 2021 20:44:54 +0000 (16:44 -0400)]
Merge branch '2021-08-30-kconfig-migrations-part1' into next

- Begin merging some Kconfig migration, and CONFIG namespace cleanup
  series in.  This gives us:
  - A number of I2C symbols migrated over
  - DWC2, i8042, altera_spi and a few other areas updated to use CFG not
    CONFIG for the concept of "configuration space" defines.
  - Rename CONFIG_EXTRA_ENV_BOARD_SETTINGS to EXTRA_ENV_BOARD_SETTINGS
  - Some dead code removal.
  - Rename a number of CONFIG symbols that were only referenced within
    the config header to not use CONFIG as a prefix.

2 years agoKconfig: Use spaces not tabs in Kconfig entires
Tom Rini [Thu, 19 Aug 2021 20:23:58 +0000 (16:23 -0400)]
Kconfig: Use spaces not tabs in Kconfig entires

While the Kconfig language seems to accept either form of whitespace, we
use a space throughout the project, except in these spots.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoastro_mcf5373l: Rework ASTRO_ID logic
Tom Rini [Thu, 19 Aug 2021 19:16:15 +0000 (15:16 -0400)]
astro_mcf5373l: Rework ASTRO_ID logic

Rather than using CONFIG namespace for logic internal to
include/configs/astro_mcf5373l.h to select ASTRO_ID (and populate the
default environment), strip CONFIG from the various options used and
set.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agompc83xx: Update comment
Tom Rini [Thu, 19 Aug 2021 19:15:06 +0000 (15:15 -0400)]
mpc83xx: Update comment

Update the comment here to refer to PCI_CONFIG_ADDRESS rather than
CONFIG_ADDRESS.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agospi: altera_spi: Do not abuse CONFIG namespace
Tom Rini [Thu, 19 Aug 2021 19:06:54 +0000 (15:06 -0400)]
spi: altera_spi: Do not abuse CONFIG namespace

The value CONFIG_ALTERA_SPI_IDLE_VAL is never re-defined by a board.
Rename this to ALTERA_SPI_IDLE_VAL.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agovideo: Remove ati_radeon_fb
Tom Rini [Thu, 19 Aug 2021 19:06:01 +0000 (15:06 -0400)]
video: Remove ati_radeon_fb

This driver is currently unused.  Remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agoglobal: Remove dead code that starts with CONFIG_[0-9A]
Tom Rini [Thu, 19 Aug 2021 19:02:35 +0000 (15:02 -0400)]
global: Remove dead code that starts with CONFIG_[0-9A]

This removes a number of spots of dead code based on symbols that start
with CONFIG_[0-9] or CONFIG_A.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoi8042: Do not abuse CONFIG namespace
Tom Rini [Thu, 19 Aug 2021 18:58:00 +0000 (14:58 -0400)]
i8042: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits.  However, CONFIG is reserved for the top-level
Kconfig based configuration system.  Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agoppc: Rework some hard-coded BOOTCOMMANDS
Tom Rini [Thu, 19 Aug 2021 18:29:00 +0000 (14:29 -0400)]
ppc: Rework some hard-coded BOOTCOMMANDS

There are an assortment of hard-coded CONFIG_BOOTCOMMAND options in some
board headers.  Rework these so that they do not add to the CONFIG
namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm: Migrate GICV2 / GICV3 to Kconfig
Tom Rini [Thu, 19 Aug 2021 18:19:39 +0000 (14:19 -0400)]
arm: Migrate GICV2 / GICV3 to Kconfig

Migrate CONFIG_GICV2 and CONFIG_GICV3 to Kconfig.  We still have the GIC
related registers that need to be handled more cleanly but start by
moving this symbol to Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agonand: vf610_nfc: Do not abuse CONFIG namespace
Tom Rini [Thu, 19 Aug 2021 17:56:20 +0000 (13:56 -0400)]
nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits.  However, CONFIG is reserved for the top-level
Kconfig based configuration system.  Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2 years agovarisys: Remove dead code
Tom Rini [Thu, 19 Aug 2021 03:12:39 +0000 (23:12 -0400)]
varisys: Remove dead code

The platforms this code was for have been removed, drop this support
code as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoREADME: Remove some old i2c related text
Tom Rini [Thu, 19 Aug 2021 03:12:38 +0000 (23:12 -0400)]
README: Remove some old i2c related text

These sections are no longer relevant, remove.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2 years agoConvert CONFIG_I2C_SET_DEFAULT_BUS_NUM et al to Kconfig
Tom Rini [Thu, 19 Aug 2021 03:12:37 +0000 (23:12 -0400)]
Convert CONFIG_I2C_SET_DEFAULT_BUS_NUM et al to Kconfig

This converts the following to Kconfig:
   CONFIG_I2C_SET_DEFAULT_BUS_NUM
   CONFIG_I2C_DEFAULT_BUS_NUMBER

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agotegra: Cleanup I2C support
Tom Rini [Thu, 19 Aug 2021 03:12:36 +0000 (23:12 -0400)]
tegra: Cleanup I2C support

Remove the irrelevant section from the README and remove the
non-functional SPL-undef section.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoi2c: fsl_i2c: Migrate to Kconfig
Tom Rini [Thu, 19 Aug 2021 03:12:35 +0000 (23:12 -0400)]
i2c: fsl_i2c: Migrate to Kconfig

- As there are no boards that use different values for speed / slave on
  different buses, use a single option.
- Switch to using the common SYS_I2C_SPEED / SYS_I2C_SLAVE options.
- Introduce _HAS_ options for additional buses as only the first one is
  common to all users.
- Convert all remaining symbols to Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agorcar: i2c: Migrate SYS_I2C_SH to Kconfig
Tom Rini [Thu, 19 Aug 2021 03:12:34 +0000 (23:12 -0400)]
rcar: i2c: Migrate SYS_I2C_SH to Kconfig

- Migrate SYS_I2C_SH and related defines to Kconfig
- Remove currently unused SYS_I2C_SH related defines
- Cleanup related README section.

Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_I2C_MXC et al to Kconfig
Tom Rini [Thu, 19 Aug 2021 03:12:33 +0000 (23:12 -0400)]
Convert CONFIG_SYS_I2C_MXC et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_I2C_MXC
   CONFIG_SYS_I2C_MXC_I2C1
   CONFIG_SYS_I2C_MXC_I2C2
   CONFIG_SYS_I2C_MXC_I2C3
   CONFIG_SYS_I2C_MXC_I2C4

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_I2C_SPEED et al to Kconfig
Tom Rini [Thu, 19 Aug 2021 03:12:32 +0000 (23:12 -0400)]
Convert CONFIG_SYS_I2C_SPEED et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_I2C_SPEED
   CONFIG_SYS_I2C_SLAVE

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agocmd/i2c.c: Remove unused legacy code
Tom Rini [Thu, 19 Aug 2021 03:12:31 +0000 (23:12 -0400)]
cmd/i2c.c: Remove unused legacy code

There are no longer any cases where we are neither SYS_I2C_LEGACY nor
DM_I2C.  Remove these code paths.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoi2c: Remove non-DM code from ihs_i2c.c
Tom Rini [Thu, 19 Aug 2021 03:12:30 +0000 (23:12 -0400)]
i2c: Remove non-DM code from ihs_i2c.c

This driver and it's only user are converted to DM_I2C, remove legacy
code.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoti: i2c: Convert CONFIG_SYS_OMAP24_I2C to CONFIG_SYS_I2C namespace
Tom Rini [Thu, 19 Aug 2021 03:12:29 +0000 (23:12 -0400)]
ti: i2c: Convert CONFIG_SYS_OMAP24_I2C to CONFIG_SYS_I2C namespace

The omap24xx I2C driver uses its own CONFIG namespace for common I2C
variables.  Rather than convert more of them to Kconfig, rename these to
the common I2C ones and remove the entirely unused functionality.  As
part of this, we make the am335x_shc platforms consistent with their
intended speed values.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoam43xx: Drop non-DM_I2C code
Tom Rini [Thu, 19 Aug 2021 03:12:28 +0000 (23:12 -0400)]
am43xx: Drop non-DM_I2C code

On this platform, we have DM_I2C and SPL_DM_I2C always enabled.
Remove legacy options.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
2 years agoam335x: Drop non-DM_I2C code
Tom Rini [Thu, 19 Aug 2021 03:12:27 +0000 (23:12 -0400)]
am335x: Drop non-DM_I2C code

On this platform, we have DM_I2C and SPL_DM_I2C always enabled.  Remove
legacy options.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoi2c: designware: Remove unused non-DM functionality
Tom Rini [Thu, 19 Aug 2021 03:12:26 +0000 (23:12 -0400)]
i2c: designware: Remove unused non-DM functionality

There are no users of more than 1 i2c bus in the non-DM case currently.
Remove the additional defines for this.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_I2C_EARLY_INIT to Kconfig
Tom Rini [Thu, 19 Aug 2021 03:12:25 +0000 (23:12 -0400)]
Convert CONFIG_SYS_I2C_EARLY_INIT to Kconfig

Convert SYS_I2C_EARLY_INIT to Kconfig, and make it depend on
SPL_SYS_I2C_LEGACY.  Remove the weak implementation as it's either
something that needs to exist for real, or shouldn't be called.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_I2C_LEGACY to Kconfig and add CONFIG_[ST]PL_SYS_I2C_LEGACY
Tom Rini [Thu, 19 Aug 2021 03:12:24 +0000 (23:12 -0400)]
Convert CONFIG_SYS_I2C_LEGACY to Kconfig and add CONFIG_[ST]PL_SYS_I2C_LEGACY

First, we convert CONFIG_SYS_I2C_LEGACY to Kconfig.  Next, as you cannot
have SYS_I2C_LEGACY and DM_I2C at the same time, introduce
CONFIG_SPL_SYS_I2C_LEGACY so that we can enable the legacy option only
in SPL.  Finally, for some PowerPC cases we also need
CONFIG_TPL_SYS_I2C_LEGACY support.  Convert all of the existing users to
one or more symbols.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoi2c: Remove unused additional legacy soft i2c bus support
Tom Rini [Tue, 17 Aug 2021 21:59:48 +0000 (17:59 -0400)]
i2c: Remove unused additional legacy soft i2c bus support

Currently the legacy software i2c support is only used for a single bus.
Remove all of the extra and unused support.  Also update the README to
not reference that, and finish removing some already badly auto-edited
related text.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_I2C_MVTWSI to Kconfig
Tom Rini [Tue, 17 Aug 2021 21:59:47 +0000 (17:59 -0400)]
Convert CONFIG_SYS_I2C_MVTWSI to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_I2C_MVTWSI

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_I2C_SOFT et al to Kconfig
Tom Rini [Tue, 17 Aug 2021 21:59:46 +0000 (17:59 -0400)]
Convert CONFIG_SYS_I2C_SOFT et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_I2C_SOFT
   CONFIG_SYS_I2C_SOFT_SPEED
   CONFIG_SYS_I2C_SOFT_SLAVE

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_I2C_EEPROM_ADDR et al to Kconfig
Tom Rini [Tue, 17 Aug 2021 21:59:45 +0000 (17:59 -0400)]
Convert CONFIG_SYS_I2C_EEPROM_ADDR et al to Kconfig

- Rename usages of CONFIG_SYS_DEF_EEPROM_ADDR to CONFIG_SYS_I2C_EEPROM_ADDR
  based on current usage.
- Convert CONFIG_SYS_I2C_EEPROM_ADDR, CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
  CONFIG_SYS_I2C_EEPROM_BUS, CONFIG_CONFIG_SYS_EEPROM_SIZE
  CONFIG_SYS_EEPROM_PAGE_WRITE_BITS and CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS
  to Kconfig.  We move these symbols around a bit and add appropriate
  dependencies to them.  In some cases, we now add a correct default value
  as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoeeprom: Drop CONFIG_ENV_EEPROM_IS_ON_I2C usage
Tom Rini [Tue, 17 Aug 2021 21:59:44 +0000 (17:59 -0400)]
eeprom: Drop CONFIG_ENV_EEPROM_IS_ON_I2C usage

At this point in time, there's no systems with "U-Boot environment
exists on an EEPROM which is accessed over the I2C bus" that sets this
option.  Drop it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agocl-som-imx7: Enable CMD_EEPROM
Tom Rini [Tue, 17 Aug 2021 21:59:43 +0000 (17:59 -0400)]
cl-som-imx7: Enable CMD_EEPROM

This platform defines everything needed to be able to use the
eeprom command.  In addition, board/compulab/common/eeprom.c is required
by the platform, and does not use CONFIG_ID_EEPROM to enable/disable
builing of it.  In order to migrate CONFIG symbols to Kconfig and to not
have to add complex logic to handle this case, enable CMD_EEPROM on this
board.

Cc: Uri Mashiach <uri.mashiach@compulab.co.il>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoi2c: S3C24X0: Finish Kconfig migration
Tom Rini [Tue, 17 Aug 2021 21:59:42 +0000 (17:59 -0400)]
i2c: S3C24X0: Finish Kconfig migration

Finish moving this driver to Kconfig.
- Update the dependency logic for Exynos5 too
- Remove the unused CONFIG_SYS_I2C_S3C24X0_SPEED variable
- Drop CONFIG_SYS_I2C_S3C24X0_SLAVE as it's always set to 0.
- Move the internal SYS_I2C_S3C24X0_SLAVE define closer to the only user.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agoConvert CONFIG_ID_EEPROM to Kconfig
Tom Rini [Tue, 17 Aug 2021 21:59:41 +0000 (17:59 -0400)]
Convert CONFIG_ID_EEPROM to Kconfig

This converts the following to Kconfig:
   CONFIG_ID_EEPROM

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agosiemens: Move CONFIG_SYS_I2C_EEPROM_ADDR usage out of CONFIG namespace
Tom Rini [Tue, 17 Aug 2021 21:59:40 +0000 (17:59 -0400)]
siemens: Move CONFIG_SYS_I2C_EEPROM_ADDR usage out of CONFIG namespace

The instances of CONFIG_SYS_I2C_EEPROM_ADDR on these platforms doesn't
match up with the rest of the EERPOM related defines in U-Boot.  Move
these out of the CONFIG namespace rather than make complex Kconfig
logic.

Cc: Samuel Egli <samuel.egli@siemens.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
2 years agokeymile: Use CONFIG_SYS_IVM_EEPROM_ADR
Tom Rini [Tue, 17 Aug 2021 21:59:39 +0000 (17:59 -0400)]
keymile: Use CONFIG_SYS_IVM_EEPROM_ADR

As the code reads now, making this code path use
CONFIG_SYS_IVM_EEPROM_ADR rather than CONFIG_SYS_I2C_EEPROM_ADDR seems
to make sense as the rest of the EEPROM infrastructure isn't used on
these platforms.

Cc: Aleksandar Gerasimovski <aleksandar.gerasimovski@hitachi-powergrids.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Aleksandar Gerasimovski <aleksandar.gerasimovski@hitachi-powergrids.com>
2 years agoarm: shc: Change CONFIG_SYS_I2C_EEPROM_ADDR to EEPROM_ADDR
Tom Rini [Tue, 17 Aug 2021 21:59:38 +0000 (17:59 -0400)]
arm: shc: Change CONFIG_SYS_I2C_EEPROM_ADDR to EEPROM_ADDR

The shc platforms do not make use of the rest of the EEPROM
infrastructure.  Rather than make more elaborate Kconfig logic, remove
this setting from the CONFIG namespace.

Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2 years agodavinci: Drop CONFIG_MAC_ADDR_IN_EEPROM
Tom Rini [Tue, 17 Aug 2021 21:59:37 +0000 (17:59 -0400)]
davinci: Drop CONFIG_MAC_ADDR_IN_EEPROM

Looking over the current boards, there are no users of
CONFIG_MAC_ADDR_IN_EEPROM.  Further, omapl138_lcdk uses
CONFIG_NET_RANDOM_ETHADDR.  Drop various unused code paths.

Cc: Adam Ford <aford173@gmail.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agokp_imx53: Switch to using a local namespace for ID EEPROM
Tom Rini [Tue, 17 Aug 2021 21:59:36 +0000 (17:59 -0400)]
kp_imx53: Switch to using a local namespace for ID EEPROM

This platform does not use any of the standard EEPROM functionality and
instead provides its own.  Use a local namespace for the I2C related
defines to access the EEPROM.

Cc: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
2 years agopowerpc: Remove unused FCC ethernet code
Tom Rini [Wed, 11 Aug 2021 12:26:52 +0000 (08:26 -0400)]
powerpc: Remove unused FCC ethernet code

This code is no longer used, remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoexynos: Update environment macros a bit
Tom Rini [Tue, 10 Aug 2021 21:34:22 +0000 (17:34 -0400)]
exynos: Update environment macros a bit

Rework the default environment a bit to not use non-standard
CONFIG_ENV_... names and similar one-off CONFIG names.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agoarm: keystone2: Rename CONFIG_ENV_KS2_BOARD_SETTINGS
Tom Rini [Tue, 10 Aug 2021 21:34:21 +0000 (17:34 -0400)]
arm: keystone2: Rename CONFIG_ENV_KS2_BOARD_SETTINGS

Rename CONFIG_ENV_KS2_BOARD_SETTINGS to ENV_KS2_BOARD_SETTINGS so that
it better fits with the rest of the environment addition macros.

Cc: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoaristainetos2: Rename CONFIG_EXTRA_ENV_BOARD_SETTINGS
Tom Rini [Tue, 10 Aug 2021 21:34:20 +0000 (17:34 -0400)]
aristainetos2: Rename CONFIG_EXTRA_ENV_BOARD_SETTINGS

Rename CONFIG_EXTRA_ENV_BOARD_SETTINGS to EXTRA_ENV_BOARD_SETTINGS in
order to not further add to the CONFIG namespace.

Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2 years agousb: dwc2: Rename CONFIG_DWC2 namespace to DWC2
Tom Rini [Tue, 10 Aug 2021 20:17:55 +0000 (16:17 -0400)]
usb: dwc2: Rename CONFIG_DWC2 namespace to DWC2

There are a number of DWC2 configuration options that are set in dwc2.h
and referenced in dwc2.c only.  Move these out of the CONFIG_DWC2
namespace and in to the DWC2 namespace.  Note that hikey was defining an
option that was already always enabled, so we can remove that hunk.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoPrepare v2021.10-rc3
Tom Rini [Mon, 30 Aug 2021 16:45:46 +0000 (12:45 -0400)]
Prepare v2021.10-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 30 Aug 2021 16:40:24 +0000 (12:40 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge tag 'xilinx-for-v2021.10-rc3' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Fri, 27 Aug 2021 12:33:02 +0000 (08:33 -0400)]
Merge tag 'xilinx-for-v2021.10-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze

Xilinx changes for v2021.10-rc3

xilinx:
- Disable CONFIG_ARCH_FIXUP_FDT_MEMORY
- Print information about cpu via soc drivers and enable DISPLAY_CPUINFO
- Wire infrastructure for DTB_RESELECT and MULTI_DTB_FIT

zynq:
- Wire single QSPI
- Use power-source instead of io-standard properties
- Enable nor on zc770-xm012

zynqmp:
- Change handling around multi_boot()
- Setup offset for u-boot.itb in spi
- Generate run time dfu_alt_info for capsule update
- Use explicit values for enums (zynqmp_firmware.h)
- Enable RTC/SHA1/BUTTON/BUTTON_GPIO command
- Disable WDT driver by default
- Bind usb/scsi via preboot because of EFI
- DT updates/fixes
- Add soc driver
- Fix SPL SPI boot mode

versal:
- Add soc driver

sdhci:
- Update tap delay programming for zynq_sdhci driver

cmd:
- Fix RTC uclass handling in date command
- Update pwm help message
- Update reset help message

watchdog:
- Fix wwdt compilation

rtc:
- Deal with seq alias in rtc uclass
- Add zynqmp RTC driver

fdt:
- Add kernel-doc for fdt_fixup_memory_banks()

2 years agoxilinx: zynqmp: Enable stack relocation to DDR
Michal Simek [Tue, 24 Aug 2021 12:56:47 +0000 (14:56 +0200)]
xilinx: zynqmp: Enable stack relocation to DDR

There is no space in OCM for SPL stack because the space in OCM is occupied
by TF-A. That's why move relocate stack to DDR to 0x18000000 address
and also enable SPL_SIZE_LIMIT not to be more then 0xfffea000 which is
default address for TFA.

It is good to summarize current DDR usage in SPL flow.
0-0x80000 is used for BSS
 (CONFIG_SPL_BSS_START_ADDR, CONFIG_SPL_BSS_MAX_SIZE)
0x100000 is used for DTB passing address
 (CONFIG_XILINX_OF_BOARD_DTB_ADDR)
0x17fffe70 - CONFIG_SPL_STACK_R_ADDR - is used for GD
0x18000000 is used for SPL stack
 (CONFIG_SPL_STACK_R_ADDR)
0x20000000-0x21000000 is used for SPL malloc area
 (CONFIG_SYS_SPL_MALLOC_START, CONFIG_SYS_SPL_MALLOC_SIZE)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoxilinx: zynqmp: Update descriptions for u-boot.its
Michal Simek [Thu, 19 Aug 2021 12:17:37 +0000 (14:17 +0200)]
xilinx: zynqmp: Update descriptions for u-boot.its

Use TF-A instead of ATF in description. And update generic description with
removing ATF because also configurations without it are supported.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoxilinx: common: Enabling generic function for DT reselection
Michal Simek [Wed, 11 Aug 2021 12:23:54 +0000 (14:23 +0200)]
xilinx: common: Enabling generic function for DT reselection

U-Boot support board detection at run time and based on it change DT.
This feature is implemented for SOM Kria platforms which contain two
eeproms which contain information about SOM module and CC (Carrier card).
Full U-Boot starts with minimal DT file defined by
CONFIG_DEFAULT_DEVICE_TREE which is available in multi DTB fit image.
It is using default setup of board_name variable initializaed to
DEVICE_TREE which corresponds to CONFIG_DEFAULT_DEVICE_TREE option.

When DTB_RESELECT is enabled board_detection() is called. Keep it your mind
that this code is called before relocation. board_detection() is calling
xilinx_read_eeprom() which fills board_info (xilinx_board_description)
structure which are parsed in board_name_decode().
Based on DT configuration and amount of nvmemX aliases name of the board is
composed by concatenating CONFIG_SYS_BOARD "-" <board_name> "-rev"
<board_revision> "-" <cc_name> "-rev" <cc_revision>.

If CC is not present or more are available it keeps going.

When board name is composed and returned from board_name_decode() it is
assigned to board_name variable which is used by
board_fit_config_name_match() which is called via fdtdec_setup() when it
goes over config options in multi dtb FIT image.

From practical point of view multi DTB image is key point here which has to
contain configs for detected combinations. Unfortunately as of now they
have to be full DTBs and DTBOs are not supported.

That's why configuration like:
config_X {
description = "zynqmp-board-cc";
fdt = "board", "cc";
};

needs to be squashed together with:
fdtoverlay -o zynqmp-board-cc -i arch/arm/dts/zynqmp-board.dtb \
arch/arm/dts/zynqmp-cc.dtbo

and only one dtb is in fit:
config_X {
description = "zynqmp-board-cc";
fdt = "board-cc";
};

For creating multi DTBs fit image use mkimage -E, e.g.:
mkimage -E -f all.its all.dtb

When DTB_RESELECT is enabled xilinx_read_eeprom() is called before
relocation and it uses calloc for getting a buffer. Because this is dynamic
memory it is not relocated that's why xilinx_read_eeprom() is called again
as the part of board_init(). This second read with calloc buffer placed in
proper position board_late_init_xilinx() can setup u-boot variables as
before.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoxilinx: zynqmp: Generate different u-boot.itb for MULTI_DTB_FIT
Michal Simek [Thu, 19 Aug 2021 10:02:57 +0000 (12:02 +0200)]
xilinx: zynqmp: Generate different u-boot.itb for MULTI_DTB_FIT

When MULTI_DTB_FIT is enabled fit-dtb.blob fit image is created which
contain all DTBs listed by CONFIG_OF_LIST. And with DTB_RELESELECT there is
a need to handle it as one file with DTBs in it not as separate DTBs in
u-boot.its/itb.
That's why extend mkimage_fit_atf.sh to generate u-boot.itb correctly.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoarm64: dts: Make sure that all DTBs are 64bit aligned
Michal Simek [Thu, 19 Aug 2021 09:29:41 +0000 (11:29 +0200)]
arm64: dts: Make sure that all DTBs are 64bit aligned

Start of DTB should be 64bit aligned that's why also make sure that end is
also 64bit aligned. It is not required but it is nice thing to do.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoMakefile: Align fit-dtb.blob and u-boot.itb by 64bits
Michal Simek [Thu, 19 Aug 2021 09:09:37 +0000 (11:09 +0200)]
Makefile: Align fit-dtb.blob and u-boot.itb by 64bits

Enabling MULTI_DTB_FIT and DTB_RESELECT can end up with multi DTBs in FIT
image placed and aligned only by 32bits (4bytes). Based on device tree
specification:
"Specifically, the memory reservation block shall be aligned to an 8-byte boundary
and the structure block to a 4-byte boundary."
is 64bit (8bytes) alignment required. That's why make sure that
fit-dtb.blob and u-boot.itb as our primary target images for Xilinx ZynqMP
are all 64bit aligned.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2 years agoxilinx: zynqmp: Check that DT is 64bit aligned
Michal Simek [Thu, 19 Aug 2021 09:07:59 +0000 (11:07 +0200)]
xilinx: zynqmp: Check that DT is 64bit aligned

DT needs to be 64bit aligned. If it is not fdt64_to_cpu will fail when try
to read information about reserved memory. The system ends in exception
without any clue what's going it. That's why detect not aligned DT and
panic to show where the issue is coming from.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoxilinx: Add support for generic board detection
Michal Simek [Fri, 23 Jul 2021 07:59:59 +0000 (09:59 +0200)]
xilinx: Add support for generic board detection

Add support for changing DT at run time. It is done via board_detection()
which returns platform_id and platform_version which can be used via
board_name_decode() to compose board_local_name string which corresponds
with DT which is should be used.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoxilinx: common: Free allocated structure
Michal Simek [Fri, 13 Aug 2021 07:17:10 +0000 (09:17 +0200)]
xilinx: common: Free allocated structure

There is no need to keep fru_content around. Free this space.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoxilinx: common: Change board_info[] handling
Michal Simek [Thu, 12 Aug 2021 10:30:36 +0000 (12:30 +0200)]
xilinx: common: Change board_info[] handling

Origin code was allocating only pointers to struct xilinx_board_description
and there was separate allocation for structure self and freeing in case of
failure.
The code is directly allocating space for all structures by one calloc to
simlify logic.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoxilinx: Use variable for passing board_name
Michal Simek [Fri, 23 Jul 2021 07:55:59 +0000 (09:55 +0200)]
xilinx: Use variable for passing board_name

Use variable which points to DEVICE_TREE by default. The reason for this
change is to enable DTB_RESELECT and MULTI_DTB_FIT where board detection
can be used for change DTB at run time. That's why there must be reference
in board_fit_config_name_match() via variable instead of hardcoding it
which is sufficient for that use case.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoxilinx: fru: Replace spaces with \0 in detected name
Michal Simek [Thu, 12 Aug 2021 09:03:49 +0000 (11:03 +0200)]
xilinx: fru: Replace spaces with \0 in detected name

FRU spec expected \0 for unused symbols but unfortunately a lot of boards
are using spaces instead of \0. That's why after saving it to desc->name
name is checked again and all spaces are converted to \0. This will ensure
that names can be used for string manipulations like concatenation.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoxilinx: zynqmp: Enable gpio-key/button driver
Michal Simek [Thu, 21 Jan 2021 13:02:30 +0000 (14:02 +0100)]
xilinx: zynqmp: Enable gpio-key/button driver

Enable button uclass and also gpio-key driver by default.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoarm64: zynqmp: Enable sha1sum command
Michal Simek [Fri, 4 Dec 2020 09:37:38 +0000 (10:37 +0100)]
arm64: zynqmp: Enable sha1sum command

Enable it for TPM usage.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agowatchdog: versal: Include header file needed for dev_ functions
Ashok Reddy Soma [Tue, 10 Aug 2021 06:16:12 +0000 (00:16 -0600)]
watchdog: versal: Include header file needed for dev_ functions

dev_dbg, dev_err and dev_warn seems to be moved to different header file.
Include dm/device_compat.h file to compile properly.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoxilinx: zynqmp: Add debug messages for boot mode
Michal Simek [Wed, 28 Jul 2021 10:25:49 +0000 (12:25 +0200)]
xilinx: zynqmp: Add debug messages for boot mode

Add debug messages to see HW boot mode and also alternative boot mode in
logs directly.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agocmd: boot: Update reset usage message
Michal Simek [Wed, 11 Aug 2021 10:01:25 +0000 (12:01 +0200)]
cmd: boot: Update reset usage message

The commit 573a3811edc8 ("sysreset: psci: support system reset in a generic
way with PSCI") has added support for warm reset via PSCI but this hasn't
been reflected in usage message and user has to look at the code how to run
it. That's why update usage text to make this clear.

Here is full help with updated usage:
ZynqMP> help reset
reset - Perform RESET of the CPU

Usage:
reset - cold boot without level specifier
reset -w - warm reset if implemented

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
2 years agocmd: pwm: Remove additional pwm description
Michal Simek [Thu, 1 Jul 2021 09:44:51 +0000 (11:44 +0200)]
cmd: pwm: Remove additional pwm description

The first name is taken from command name that's why shouldn't be listed in
help. And commands shouldn't be listed with <> which means value but value
itself is command name.
Also add description for commands to make it clear what it does.

Before
pwm pwm <invert> <pwm_dev_num> <channel> <polarity>
pwm <config> <pwm_dev_num> <channel> <period_ns> <duty_ns>
...

After:
pwm invert <pwm_dev_num> <channel> <polarity> - invert polarity
pwm config <pwm_dev_num> <channel> <period_ns> <duty_ns> - config PWM
pwm enable <pwm_dev_num> <channel> - enable PWM output
pwm disable <pwm_dev_num> <channel> - disable PWM output

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoxilinx: Enable config to display cpuinfo
T Karthik Reddy [Tue, 10 Aug 2021 12:50:21 +0000 (06:50 -0600)]
xilinx: Enable config to display cpuinfo

Enable CONFIG_DISPLAY_CPUINFO to display SoC family & revision.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Reviewed-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoxilinx: common: Add function to print SoC info
T Karthik Reddy [Tue, 10 Aug 2021 12:50:20 +0000 (06:50 -0600)]
xilinx: common: Add function to print SoC info

Add print_cpuinfo() to print SoC info like family & revision.
This function depends on CONFIG_DISPLAY_CPUINFO config.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Reviewed-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agosoc: xilinx: versal: Add soc_xilinx_versal driver
T Karthik Reddy [Tue, 10 Aug 2021 12:50:19 +0000 (06:50 -0600)]
soc: xilinx: versal: Add soc_xilinx_versal driver

soc_xilinx_versal driver allows identification of family & revision
of versal SoC. This driver is selected by CONFIG_SOC_XILINX_VERSAL.
Probe this driver using platdata U_BOOT_DEVICE structure which is
defined at mach-versal/cpu.c.
Add this config to xilinx_versal_virt_defconfig &
xilinx_versal_mini_ospi_defconfig file to select this driver.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Reviewed-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agosoc: xilinx: zynqmp: Add soc_xilinx_zynqmp driver
T Karthik Reddy [Tue, 10 Aug 2021 12:50:18 +0000 (06:50 -0600)]
soc: xilinx: zynqmp: Add soc_xilinx_zynqmp driver

soc_xilinx_zynqmp driver allows identification of family & revision
of zynqmp SoC. This driver is selected by CONFIG_SOC_XILINX_ZYNQMP.
Add this config to xilinx_zynqmp_virt_defconfig file.
Probe this driver using platdata U_BOOT_DEVICE structure which is
specified in mach-zynqmp/cpu.c.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Reviewed-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agofdt_support: Add kernel-doc for fdt_fixup_memory_banks()
Michal Simek [Tue, 10 Aug 2021 07:21:54 +0000 (09:21 +0200)]
fdt_support: Add kernel-doc for fdt_fixup_memory_banks()

Add kernel-doc description for fdt_fixup_memory_banks() because it is
implemented in one specific way and this information should be available
for others to decide if their SoC conforms to it.
If you don't want U-Boot to update your memory DT layout please disable
CONFIG_ARCH_FIXUP_FDT_MEMORY.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoxilinx: Disable ARCH_FIXUP_FDT_MEMORY
Michal Simek [Fri, 6 Aug 2021 12:09:32 +0000 (14:09 +0200)]
xilinx: Disable ARCH_FIXUP_FDT_MEMORY

Based on DT spec you can have one memory node which multiple ranges or
multiple nodes.
fdt_fixup_memory_banks() is not implemented in a correct way when multiple
memory nodes are present because all ranges are put it to the first memory
node found. And next memory nodes are kept in DT which ends up in the same
range specification in the same DT.

Here is what it is happening.
Origin DT.
memory@0 {
        device_type = "memory";
        reg = <0x0 0x0 0x0 0x80000000>;
};

memory@800000000 {
        device_type = "memory";
        reg = <0x8 0x00000000 0x0 0x80000000>;
};

After fdt_fixup_memory_banks()

memory@0 {
        device_type = "memory";
        reg = <0x0 0x0 0x0 0x80000000>, <0x8 0x00000000 0x0 0x80000000>;
};

memory@800000000 {
        device_type = "memory";
        reg = <0x8 0x00000000 0x0 0x80000000>;
};

As is visible memory@0 node got second range but there is still
memory@800000000 node present and 2G range is listed twice.

The solution can't be that second node is removed because it can be
referenced already that's why it is better for us to disable this option
for now.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoARM: zynq: Enable smcc and nor for zc770-xm012
Michal Simek [Fri, 6 Aug 2021 11:30:11 +0000 (13:30 +0200)]
ARM: zynq: Enable smcc and nor for zc770-xm012

Enable cfi flash on zc770-xm012 configuration.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoARM: zynq: Wire single qspi on couple of boards
Michal Simek [Fri, 6 Aug 2021 11:30:19 +0000 (13:30 +0200)]
ARM: zynq: Wire single qspi on couple of boards

Single configuration is working fine and no issue to enable it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoARM: zynq: Replace 'io-standard' with 'power-source' property
Sai Krishna Potthuri [Fri, 6 Aug 2021 07:41:46 +0000 (01:41 -0600)]
ARM: zynq: Replace 'io-standard' with 'power-source' property

Replace 'io-standard' property with 'power-source' property in all
zynq dts files to be in sync with Zynq Pinctrl driver.

Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2 years agoxilinx: Add jedec compatible string for QSPI (Zynq/ZynqMP)
Raju Kumar Pothuraju [Thu, 1 Jul 2021 08:45:11 +0000 (14:15 +0530)]
xilinx: Add jedec compatible string for QSPI (Zynq/ZynqMP)

Add missing "jedec, spi-nor" compatible string for QSPI flash node.
Spi-nor framework uses this compatibility string to probe &
initialize flash. With missing compatibility string we are observing
below error:

Zynq> sf probe 0 0 0
 jedec_spi_nor spi_flash@0:0: unrecognized JEDEC id bytes:
00, 00, 00  Failed to initialize SPI flash at 0:0 (error -2)

Signed-off-by: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>