oweals/u-boot.git
4 years agoconfigs: j721e_evm_r5_defconfig: Enable ESM modules
Tero Kristo [Fri, 14 Feb 2020 09:18:20 +0000 (11:18 +0200)]
configs: j721e_evm_r5_defconfig: Enable ESM modules

Enable ESM modules for both PMIC and SoC side for proper watchdog
handling on the board.

SPL_BOARD_INIT is also enabled so that the board init function
probing the drivers is called.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
4 years agoboard: ti: j721e: initialize ESM support
Tero Kristo [Fri, 14 Feb 2020 09:18:19 +0000 (11:18 +0200)]
board: ti: j721e: initialize ESM support

Initialize both ESM and ESM_PMIC support if available for the board.
If support is not available for either, a warning is printed out.

ESM signals are only properly routed on PM2 version of the J721E SOM,
so only probe the drivers on this device.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
4 years agoarm: dts: k3-j721e: Add ESM PMIC support for tps659413 based board
Tero Kristo [Fri, 14 Feb 2020 09:18:18 +0000 (11:18 +0200)]
arm: dts: k3-j721e: Add ESM PMIC support for tps659413 based board

The ESM handling on J7 processor board requires routing the
MCU_SAFETY_ERROR signal to the PMIC on the board for critical safety
error handling. The PMIC itself should then reset the board based on
receiving it. Enable the support for the board by adding the esm
node in place.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
4 years agoarm: dts: k3-k721e: Add Main domain ESM support
Tero Kristo [Fri, 14 Feb 2020 09:18:17 +0000 (11:18 +0200)]
arm: dts: k3-k721e: Add Main domain ESM support

Main domain ESM support is needed to configure main domain watchdogs
to generate ESM pin events by default. On J7 processor board these
propagate to the PMIC to generate a reset when watchdog expires.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
4 years agomisc: pmic_esm: Add support for PMIC ESM driver
Tero Kristo [Fri, 14 Feb 2020 09:18:16 +0000 (11:18 +0200)]
misc: pmic_esm: Add support for PMIC ESM driver

The ESM (Error Signal Monitor) is used on certain PMIC versions to
handle error signals propagating from rest of the system. If these
reach the PMIC, it is typically a last resort fatal error which
requires a system reset. The ESM driver does the proper configuration
for the ESM module to reach this end goal. Initially, only TPS65941
PMIC is supported for this.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
4 years agomisc: k3_esm: Add support for Texas Instruments K3 ESM driver
Tero Kristo [Fri, 14 Feb 2020 09:18:15 +0000 (11:18 +0200)]
misc: k3_esm: Add support for Texas Instruments K3 ESM driver

The ESM (Error Signaling Module) is used to route error signals within
the K3 SoCs somewhat similar to interrupts. The handling for these is
different though, and can be routed for hardware error handling, to
be handled by safety processor or just as error interrupts handled
by the main processor. The u-boot level ESM driver is just used to
configure the ESM signals so that they get routed to proper destination.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
4 years agopower: pmic: tps65941: Add support for probing the child devices
Tero Kristo [Fri, 14 Feb 2020 09:18:14 +0000 (11:18 +0200)]
power: pmic: tps65941: Add support for probing the child devices

TPS65941 can have child devices under it (like the ESM support), so
probe these once the master pmic node completes probe.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
4 years agoconfigs: j721e_evm_r5_defconfig: Remove saving ENV in eMMC
Keerthy [Wed, 12 Feb 2020 08:25:11 +0000 (13:55 +0530)]
configs: j721e_evm_r5_defconfig: Remove saving ENV in eMMC

Remove saving ENV in eMMC in R5 as the power domains are not
setup. Environment in eMMC cannot be read if we do not boot from
eMMC.

Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoconfigs: j721e_evm_r5: Enable R5F remoteproc support
Keerthy [Wed, 12 Feb 2020 08:25:10 +0000 (13:55 +0530)]
configs: j721e_evm_r5: Enable R5F remoteproc support

Enable R5F remoteproc support in R5 defconfig so that R5s can
be started in SPL. While at it enable the SPL_FS_EXT4 config
option to load the firmwares from file system.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoinclude: configs: j721e_evm: Add env variables for mcu_r5fss0_core0 & main_r5fss0_core0
Keerthy [Wed, 12 Feb 2020 08:25:09 +0000 (13:55 +0530)]
include: configs: j721e_evm: Add env variables for mcu_r5fss0_core0 & main_r5fss0_core0

Add env variables for mcu_r5fss0_core0 & main_r5fss0_core0 firmware
loadaddr and name.

Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoarm: dts: k3-j721e-r5: Enable r5fss0 cluster in SPL
Keerthy [Wed, 12 Feb 2020 08:25:08 +0000 (13:55 +0530)]
arm: dts: k3-j721e-r5: Enable r5fss0 cluster in SPL

Enable MAIN domain r5fss0 cluster and its core0 in R5 spl.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agoarm: dts: k3-j721e-r5-u-boot: Add fs_loader node
Keerthy [Wed, 12 Feb 2020 08:25:07 +0000 (13:55 +0530)]
arm: dts: k3-j721e-r5-u-boot: Add fs_loader node

Add fs_loader node which will be needed for loading firmwares
from the boot media/filesystem.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agoarmv7R: K3: Add support for jumping to firmware
Keerthy [Wed, 12 Feb 2020 08:25:06 +0000 (13:55 +0530)]
armv7R: K3: Add support for jumping to firmware

MCU Domain rf50 is currently shutting down after loading the ATF.
Load elf firmware and jump to firmware post loading ATF.

ROM doesn't enable ATCM memory, so make sure that firmware that
is being loaded doesn't use ATCM memory or override SPL.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoarmv7R: K3: r5_mpu: Enable execute permission for MCU0 BTCM
Keerthy [Wed, 12 Feb 2020 08:25:05 +0000 (13:55 +0530)]
armv7R: K3: r5_mpu: Enable execute permission for MCU0 BTCM

Enable execute permission for mcu_r5fss0_core0 BTCM so that we can jump
to a firmware directly from SPL.

Signed-off-by: Keerthy <j-keerthy@ti.com>
4 years agoarm: k3: Add support for loading non linux remote cores
Keerthy [Wed, 12 Feb 2020 08:25:04 +0000 (13:55 +0530)]
arm: k3: Add support for loading non linux remote cores

Add MAIN domain R5FSS0 remoteproc support from spl. This enables
loading the elf firmware in SPL and starting the remotecore.

In order to start the core, there should be a file with path
"/lib/firmware/j7-main-r5f0_0-fw" under filesystem
of respective boot mode.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
[Guard start_non_linux_remote_cores under CONFIG_FS_LOADER]
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
4 years agolib: elf: Move the generic elf loading/validating functions to lib
Keerthy [Wed, 12 Feb 2020 08:25:03 +0000 (13:55 +0530)]
lib: elf: Move the generic elf loading/validating functions to lib

Move the generic elf loading/validating functions to lib/
so that they can be re-used and accessed by code existing
outside cmd.

While at it remove the duplicate static version of load_elf_image_phdr
under arch/arm/mach-imx/imx_bootaux.c.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Suggested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agoconfigs: j721e_hs_evm: Enable OSPI related configs
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:59 +0000 (11:09 +0530)]
configs: j721e_hs_evm: Enable OSPI related configs

Enable OSPI related configs for J721e HS variant.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agoconfigs: ama65x_hs_evm: Enable OSPI related configs
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:58 +0000 (11:09 +0530)]
configs: ama65x_hs_evm: Enable OSPI related configs

Enable OSPI related defconfigs for AM65x HS variant.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agoboard: ti: Update AM65x and J721e READMEs for OSPI boot
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:57 +0000 (11:09 +0530)]
board: ti: Update AM65x and J721e READMEs for OSPI boot

Update AM65x and J721e README files with instructions for flashing OSPI
images.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agoconfigs: am65x_evm_defconfig: Enable OSPI configs
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:56 +0000 (11:09 +0530)]
configs: am65x_evm_defconfig: Enable OSPI configs

Enable OSPI related defconfigs. Also enable SPL_DMA so that DMA is used
during OSPI boot

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agoconfigs: j721e_evm_defconfig: Enable OSPI configs
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:55 +0000 (11:09 +0530)]
configs: j721e_evm_defconfig: Enable OSPI configs

Enable OSPI related defconfigs. Also enable SPL_DMA so that DMA is used
during OSPI boot

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agoconfigs: j721e_evm: Setup mtdparts for OSPI
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:54 +0000 (11:09 +0530)]
configs: j721e_evm: Setup mtdparts for OSPI

Set up mtdparts cmdline argument to be passed to kernel

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agoconfigs: am65x_evm: Setup mtdparts for OSPI
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:53 +0000 (11:09 +0530)]
configs: am65x_evm: Setup mtdparts for OSPI

Set up mtdparts cmdline argument to be passed to kernel

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agoARM: dts: k3-j721e: Add OSPI DT nodes
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:52 +0000 (11:09 +0530)]
ARM: dts: k3-j721e: Add OSPI DT nodes

Add OSPI DT nodes to enable OSPI at U-Boot prompt and also to support
OSPI boot.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agoARM: dts: k3-am65: Add OSPI DT nodes
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:51 +0000 (11:09 +0530)]
ARM: dts: k3-am65: Add OSPI DT nodes

Add OSPI DT nodes to enable OSPI at U-Boot prompt and also to support
OSPI boot.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agoARM: mach-k3: sysfw-loader: Use SPI memmapped addr when loading SYSFW
Lokesh Vutla [Tue, 4 Feb 2020 05:39:50 +0000 (11:09 +0530)]
ARM: mach-k3: sysfw-loader: Use SPI memmapped addr when loading SYSFW

Since ROM configures OSPI controller to be in memory mapped mode in OSPI
boot, R5 SPL can directly pass the memory mapped pointer to ROM. With
this ROM can directly pull the SYSFW image from OSPI.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agoARM: mach-k3: arm64-mmu: map 64bit FSS MMIO space in A53 MMU
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:49 +0000 (11:09 +0530)]
ARM: mach-k3: arm64-mmu: map 64bit FSS MMIO space in A53 MMU

Populate address mapping entries in A53 MMU for 4 GB of MMIO space
reserved for providing MMIO access to multiple flash devices through
OSPI/HBMC IPs within FSS.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
4 years agodrivers: Descend to drivers/soc unconditionally
Vignesh Raghavendra [Tue, 4 Feb 2020 05:39:48 +0000 (11:09 +0530)]
drivers: Descend to drivers/soc unconditionally

Descend to drivers/soc directory unconditionally for SPL and U-Boot
builds. Individual drivers can have their own config to check what needs
to be built for SPL. There should be no increase in SPL code size
due to this change.

This is required on K3 SoCs to support DMA in SPL.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agoPrepare v2020.04-rc3 v2020.04-rc3
Tom Rini [Wed, 26 Feb 2020 12:53:20 +0000 (07:53 -0500)]
Prepare v2020.04-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx
Tom Rini [Wed, 26 Feb 2020 04:35:53 +0000 (23:35 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx

- Update Sata node for T2080QDS and revert SATA related unrequired
  patches.

4 years agoMerge branch '2020-02-25-master-imports'
Tom Rini [Tue, 25 Feb 2020 18:59:21 +0000 (13:59 -0500)]
Merge branch '2020-02-25-master-imports'

- Assorted fixes

4 years agoboard: novtech: meerkat96: use correct mmc driver
Carl Gelfand [Wed, 22 Jan 2020 21:03:02 +0000 (16:03 -0500)]
board: novtech: meerkat96: use correct mmc driver

When the board was originally submitted, it was attempting to use the
ESDHC driver. The board uses the USDHC driver.

Signed-off-by: Carl Gelfand <carl@novtech.com>
Cc: Shawn Guo <shawn.guo@kernel.org> (maintainer:MEERKAT96 BOARD)
Acked-by: Shawn Guo <shawnguo@kernel.org>
4 years agomoveconfig: convert ps.stderr to string
Markus Klotzbuecher [Wed, 12 Feb 2020 19:46:45 +0000 (20:46 +0100)]
moveconfig: convert ps.stderr to string

Printing the error message in verbose mode fails, since python3
doesn't implicitely convert bytes to strings.

Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agomoveconfig: replace unsafe eval with asteval
Markus Klotzbuecher [Wed, 12 Feb 2020 19:46:44 +0000 (20:46 +0100)]
moveconfig: replace unsafe eval with asteval

Commit b237d358b425 ("moveconfig: expand simple expressions") added
support for expanding expressions in configs, but used the unsafe python
built-in "eval". This patch fixes this by replacing eval with the
asteval module.

Signed-off-by: Markus Klotzbuecher <mk@mkio.de>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMAINTAINERS: set maintainer for doc/api/efi.rst
Heinrich Schuchardt [Sat, 22 Feb 2020 06:45:50 +0000 (07:45 +0100)]
MAINTAINERS: set maintainer for doc/api/efi.rst

doc/api/efi.rst belongs to the UEFI sub-system documentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoarch: arm: Fix SZ_64K undeclared compilation error
Wasim Khan [Fri, 14 Feb 2020 05:30:52 +0000 (11:00 +0530)]
arch: arm: Fix SZ_64K undeclared compilation error

Macro SZ_64K is undeclared. Include sizes.h to fix the compilation
error.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agotools: image-host.c: remove uboot_aes.h
Philippe Reynes [Tue, 18 Feb 2020 16:23:20 +0000 (17:23 +0100)]
tools: image-host.c: remove uboot_aes.h

The include uboot_aes.h is not useful and
it breaks the compilation on android, so
we remove it.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reported-by: Praneeth Bajjuri <praneeth@ti.com>
4 years agoMerge branch '2020-02-24-ci-htmldocs'
Tom Rini [Tue, 25 Feb 2020 14:06:50 +0000 (09:06 -0500)]
Merge branch '2020-02-24-ci-htmldocs'

- Update our CI loops to run 'make htmldocs' and stop on errors

4 years agodoc/Makefile: turn warnings into errors
Heinrich Schuchardt [Fri, 21 Feb 2020 17:24:03 +0000 (18:24 +0100)]
doc/Makefile: turn warnings into errors

Several patches delivered incorrect restructured text as documentation. We
should be able to discover this in Travis CI, Gitlab CI, or Azure CI.

So let us turn all build warnings into errors.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoazure: build HTML documentation
Heinrich Schuchardt [Fri, 21 Feb 2020 17:24:02 +0000 (18:24 +0100)]
azure: build HTML documentation

Several patches delivered incorrect restructured text as documentation. We
should be able to discover this in Azure CI.

Provide a build step for 'make htmldocs'.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agogitlab: build HTML documentation
Heinrich Schuchardt [Fri, 21 Feb 2020 17:24:01 +0000 (18:24 +0100)]
gitlab: build HTML documentation

Several patches delivered incorrect restructured text as documentation. We
should be able to discover this in Gitlab CI.

Provide a build step for 'make htmldocs'.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agotravis: build HTML docs
Heinrich Schuchardt [Fri, 21 Feb 2020 17:24:00 +0000 (18:24 +0100)]
travis: build HTML docs

Several patches delivered incorrect restructured text as documentation.
We should be able to discover this in Travis CI.

Provide a build step for 'make htmldocs'.

Add required package graphviz.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agotravis: Add python3-sphinx to the package list
Tom Rini [Mon, 24 Feb 2020 20:10:36 +0000 (15:10 -0500)]
travis: Add python3-sphinx to the package list

In order to build htmldocs we need sphinx-build which comes from
python3-sphinx.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoarch: powerpc: Rewrite the sata node to fit the driver
Peng Ma [Mon, 23 Dec 2019 09:28:18 +0000 (09:28 +0000)]
arch: powerpc: Rewrite the sata node to fit the driver

The sata of our powerpc platforms are updated. These changes is to
fit the driver probe.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoRevert "configs: enable sata device module in T2080QDS"
Peng Ma [Mon, 23 Dec 2019 09:28:15 +0000 (09:28 +0000)]
Revert "configs: enable sata device module in T2080QDS"

This reverts commit 02dc1599ba0b16eb21ba0c206e5b6f38fe7b67a7

Commit 02dc1599ba0b ("configs: enable sata, eSDHC, USB device module in
T2080QDS")

has some sata defconfig changes to fit support DM mode, Now the driver
will be reverted, So revert it.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoRevert "powerpc: mpc85xx: delete FSL_SATA for T2080QDS board."
Peng Ma [Mon, 23 Dec 2019 09:28:12 +0000 (09:28 +0000)]
Revert "powerpc: mpc85xx: delete FSL_SATA for T2080QDS board."

This reverts commit 856b9cdb53f0e6c8d98f81cf71ef363c16b0aa0e.

Commit 856b9cdb53f0 ("powerpc: mpc85xx: delete FSL_SATA for T2080QDS
board.") is to fit support sata DM mode, Now the driver will be reverted,
So revert it.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoRevert "ata: fsl_ahci: Add sata DM support for Freescale powerpc socs"
Peng Ma [Mon, 23 Dec 2019 09:28:09 +0000 (09:28 +0000)]
Revert "ata: fsl_ahci: Add sata DM support for Freescale powerpc socs"

This reverts commit 1ee494291880fd51ef0c5f7342e072bdb069d7ff.

Commit 1ee494291880 ("ata: fsl_ahci: Add sata DM support for Freescale
powerpc socs") introduced SCSI layer to call AHCI private API in order
to support sata operations, In DM mode, This is not necessary for
non-AHCI sata. So revert it and have already updated the driver itself
to operate sata directly.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodoc: update doc/sphinx/kerneldoc.py
Heinrich Schuchardt [Fri, 21 Feb 2020 17:23:59 +0000 (18:23 +0100)]
doc: update doc/sphinx/kerneldoc.py

Update doc/sphinx/kerneldoc.py from Linux next-20200219 to avoid warnings
like:

doc/sphinx/kerneldoc.py:125: RemovedInSphinx20Warning:
AutodocReporter is now deprecated. Use
sphinx.util.docutils.switch_source_input() instead.
  self.state.memo.reporter =
   AutodocReporter(result, self.state.memo.reporter)

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoAzure / GitLab: Update Docker image
Tom Rini [Mon, 24 Feb 2020 16:04:29 +0000 (11:04 -0500)]
Azure / GitLab: Update Docker image

Bring in a newer Docker image to build on that has everything required
for running 'make htmldocs'.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge tag 'u-boot-rockchip-20200220' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Fri, 21 Feb 2020 03:14:29 +0000 (22:14 -0500)]
Merge tag 'u-boot-rockchip-20200220' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip

- rk3399: split roc-pc-rk3399 out of evb_rk3399
- sync dts from upstream kernel for rk3399,rk3288,px30
- boot_mode: find the saradc device name

4 years agoMerge tag 'mmc-2-20-2020' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Thu, 20 Feb 2020 12:27:31 +0000 (07:27 -0500)]
Merge tag 'mmc-2-20-2020' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc

- sdhci: code clean-up and fix cache coherency problem
- enable cache snooping on mpc830x
- Fix build error when MMC_WRITE disabled

4 years agommc: sdhci: fix missing cache invalidation after reading by DMA
Masahiro Yamada [Fri, 14 Feb 2020 07:40:27 +0000 (16:40 +0900)]
mmc: sdhci: fix missing cache invalidation after reading by DMA

This driver currently performs cache operation before the DMA start,
but does nothing after the DMA completion.

When reading data by DMA, the cache invalidation is needed also after
finishing the DMA transfer. Otherwise, the CPU might read data from
the cache instead of from the main memory when speculative memory read
or memory prefetch occurs.

Instead of calling the cache operation directly, this commit adds
dma_unmap_single(), which performs cache invalidation internally,
but drivers do not need which operation is being run.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
4 years agommc: sdhci: use dma_map_single() instead of flush_cache() before DMA
Masahiro Yamada [Fri, 14 Feb 2020 07:40:26 +0000 (16:40 +0900)]
mmc: sdhci: use dma_map_single() instead of flush_cache() before DMA

Currently, sdhci_prepare_dma() calls flush_cache() regardless of the
DMA direction.

Actually, cache invalidation is enough when reading data from the device.

This is correctly handled by dma_map_single(), which mimics the DMA-API
in Linux kernel. Drivers can be agnostic which cache operation occurs
behind the scene.

This commit also sanitizes the difference between the virtual address
and the dma address.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
4 years agommc: add mmc_get_dma_dir() helper
Masahiro Yamada [Fri, 14 Feb 2020 07:40:25 +0000 (16:40 +0900)]
mmc: add mmc_get_dma_dir() helper

Copied from Linux kernel.
include/linux/mmc/host.h

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agommc: sdhci: remove unneeded casts
Masahiro Yamada [Fri, 14 Feb 2020 07:40:24 +0000 (16:40 +0900)]
mmc: sdhci: remove unneeded casts

host->mmc is already (struct mmc *).

memalign() returns an opaque pointer, so there is no need for casting.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agommc: sdhci: use lower_32_bit2() and upper_32_bits() for setting adma_addr
Masahiro Yamada [Fri, 14 Feb 2020 07:40:23 +0000 (16:40 +0900)]
mmc: sdhci: use lower_32_bit2() and upper_32_bits() for setting adma_addr

Use {lower,upper}_32_bits() instead of the combination of cast
and shift.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agommc: sdhci: reduce code duplication for aligned buffer
Masahiro Yamada [Fri, 14 Feb 2020 07:40:22 +0000 (16:40 +0900)]
mmc: sdhci: reduce code duplication for aligned buffer

The same code is run for both SDHCI_QUIRK_32BIT_DMA_ADDR and
define(CONFIG_FIXED_SDHCI_ALIGNED_BUFFER).

Unify the code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agommc: sdhci: put the aligned buffer pointer to struct sdhci_host
Masahiro Yamada [Fri, 14 Feb 2020 07:40:21 +0000 (16:40 +0900)]
mmc: sdhci: put the aligned buffer pointer to struct sdhci_host

Using the global variable does not look nice.

Add a new field sthci::align_buffer to point to the bounce buffer.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agodma-mapping: add <asm/dma-mapping.h> for all architectures
Masahiro Yamada [Thu, 20 Feb 2020 05:15:37 +0000 (14:15 +0900)]
dma-mapping: add <asm/dma-mapping.h> for all architectures

To avoid "asm/dma-mapping.h: No such file or directory" error,
we need something.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
4 years agoarch: arm: rockchip: order the rk3399 entries alphabetically
Peter Robinson [Wed, 8 Jan 2020 03:56:11 +0000 (03:56 +0000)]
arch: arm: rockchip: order the rk3399 entries alphabetically

Put the target entries for rk3399 devices in alphabetical order.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: rk3399: add target type for evb based board
Kever Yang [Wed, 19 Feb 2020 09:51:07 +0000 (17:51 +0800)]
rockchip: rk3399: add target type for evb based board

There are many boards share the board file and device header file with
rk3399 evb, add target type MACRO so that it is fixed instead of default
to the first target in "RK3399 board select".

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoMerge tag 'efi-2020-04-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Wed, 19 Feb 2020 22:25:26 +0000 (17:25 -0500)]
Merge tag 'efi-2020-04-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-04-rc3

* Update the Kconfig description of CONFIG_EFI_RNG_PROTOCOL
* Fix a function comment resolving a warning in 'make htmldocs'

4 years agodma-mapping: move dma_map_(un)single() to <linux/dma-mapping.h>
Masahiro Yamada [Fri, 14 Feb 2020 07:40:19 +0000 (16:40 +0900)]
dma-mapping: move dma_map_(un)single() to <linux/dma-mapping.h>

The implementation of dma_map_single() and dma_unmap_single() is
exactly the same for all the architectures that support them.

Factor them out to <linux/dma-mapping.h>, and make all drivers to
include <linux/dma-mapping.h> instead of <asm/dma-mapping.h>.

If we need to differentiate them for some architectures, we can
move the generic definitions to <asm-generic/dma-mapping.h>.

Add some comments to the helpers. The concept is quite similar to
the DMA-API of Linux kernel. Drivers are agnostic about what is
going on behind the scene. Just call dma_map_single() before the
DMA, and dma_unmap_single() after it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
4 years agodma-mapping: fix the prototype of dma_unmap_single()
Masahiro Yamada [Fri, 14 Feb 2020 07:40:18 +0000 (16:40 +0900)]
dma-mapping: fix the prototype of dma_unmap_single()

dma_unmap_single() takes the dma address, not virtual address.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
4 years agodma-mapping: fix the prototype of dma_map_single()
Masahiro Yamada [Fri, 14 Feb 2020 07:40:17 +0000 (16:40 +0900)]
dma-mapping: fix the prototype of dma_map_single()

Make dma_map_single() return the dma address, and remove the
pointless volatile.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
4 years agommc: fsl_esdhc: actually enable cache snooping on mpc830x
Rasmus Villemoes [Thu, 30 Jan 2020 12:06:45 +0000 (12:06 +0000)]
mmc: fsl_esdhc: actually enable cache snooping on mpc830x

The reference manuals for MPC8308 and MPC8309 both say that the
esdhcctl aka DMA Control Register "is implemented as SDHCCR" in the
System configuration registers. Unfortunately, that doesn't mean that
the registers are just mirrors of each other - any write to esdhcctl
is simply ignored. So to actually enable cache snooping, we
unfortunately have to add a little ifdeffery.

There is, naturally, no description of the bit fields of esdhcctl in
the MPC8309 manual, but comparing the description of esdhcctl from the
LS1021A reference manual to the description of the sdhccr in MPC8309,
one also finds that the fields are bit-reversed, so the bit to set is
0x02000000 rather than 0x00000040 - this is also what board_mmc_init()
uses in the two gdsys/mpc8308/ boards.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Yangbo Lu <yangbo.lu@nxp.com>
4 years agoefi_loader: EFI_RNG_PROTOCOL
Heinrich Schuchardt [Fri, 14 Feb 2020 22:28:58 +0000 (23:28 +0100)]
efi_loader: EFI_RNG_PROTOCOL

Do not use quotation marks for Kconfig help text.
Replace rng abbreviation by full words.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: fix efi_install_fdt() description
Heinrich Schuchardt [Fri, 7 Feb 2020 21:10:49 +0000 (22:10 +0100)]
efi_loader: fix efi_install_fdt() description

In the function description use the correct parameter name.

Mention EFI_FDT_USE_INTERNAL.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoconfigs: fix typos in khadas-edge defconfigs
Jared Baldridge [Fri, 7 Feb 2020 03:53:14 +0000 (19:53 -0800)]
configs: fix typos in khadas-edge defconfigs

s/dtbi/dtb/

Signed-off-by: Jared Baldridge <jrb@expunge.us>
4 years agoboard: roc-pc-rk3399: Add support for onboard LED's and push button to indicate power...
Suniel Mahesh [Mon, 3 Feb 2020 13:50:05 +0000 (19:20 +0530)]
board: roc-pc-rk3399: Add support for onboard LED's and push button to indicate power mode

Added support for onboard LED's and push button. When powered board will be
in low power mode(yellow LED), on button press, board enters full power mode
(red LED) and boots u-boot.

Signed-off-by: Suniel Mahesh <sunil@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: rk3399: split roc-pc-rk3399 out of evb_rk3399
Suniel Mahesh [Mon, 3 Feb 2020 13:50:04 +0000 (19:20 +0530)]
rockchip: rk3399: split roc-pc-rk3399 out of evb_rk3399

roc-pc-rk3399 board has one user button & three user LED's. Currently
we don't have any code support for these devices. Since button and LED's are
specific to roc-pc-rk3399 board, split it into its own board file and add code
support here.

Signed-off-by: Suniel Mahesh <sunil@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: boot_mode: find the saradc device name
Hugh Cole-Baker [Sat, 25 Jan 2020 16:19:36 +0000 (16:19 +0000)]
rockchip: boot_mode: find the saradc device name

adc_channel_single_shot() requires the full device name e.g.
"saradc@ff100000", which differs between Rockchip SoC's, but they all
share the prefix "saradc"; find the ADC device with this name prefix and
use its full name.

Signed-off-by: Hugh Cole-Baker <sigmaris@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agork3288: vyasa: Add console settings
Jagan Teki [Thu, 23 Jan 2020 14:12:22 +0000 (19:42 +0530)]
rk3288: vyasa: Add console settings

Add console settings like stdin, stdout and stderr as
cros-ec-keyb and vidconsole respectively for Vyasa Rk3288
board.

This would certainly help to detect the attached video
devices (like HDMI) and print the console message on display.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agork3288: tinker: Enable HDMI output
Jagan Teki [Thu, 23 Jan 2020 14:12:21 +0000 (19:42 +0530)]
rk3288: tinker: Enable HDMI output

Enable HDMI output for Tinker RK3288 board.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoARM: dts: rockchip: Sync rk3288-vyasa dts from linux
Jagan Teki [Thu, 23 Jan 2020 14:12:20 +0000 (19:42 +0530)]
ARM: dts: rockchip: Sync rk3288-vyasa dts from linux

Sync rk3288-vyasa dts file from Linux.

This sync has changes required to work HDMI output on
Vyasa RK3288 board.

This sync excludes the io_domains node since it is not
available in rk3288.dtsi.

Changes like vcc50_hdmi, vdd10_lcd and ddc-i2c-bus are
not merged to Linux yet but wil resync later if any
further updates on this.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: rk3288: Enable pre console buffer
Jagan Teki [Thu, 23 Jan 2020 14:12:19 +0000 (19:42 +0530)]
rockchip: rk3288: Enable pre console buffer

Enable pre console buffer for rk3288 platform.

This would help to capture the console messages prior to
the console being initialised. Enabling this would help
to capture all the console messages on video output source
like HDMI. So we can find the full console messages of
U-Boot proper on HDMI display when enabled it for RK3288
platform boards.

Buffer address used for pre console is 0x0f000000 which is
ram base plus 240MiB. right now the Allwinner SoC is using
similar computation.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: px30: sync the main px30 dtsi from mainline
Heiko Stuebner [Wed, 22 Jan 2020 09:31:43 +0000 (10:31 +0100)]
rockchip: px30: sync the main px30 dtsi from mainline

There have been multiple peripherals added to the main px30 dtsi
in the Linux kernel since its addition to u-boot. So to make it easier
to sync board devicetrees, update the core dtsi from Linux.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoarm: dts: rockchip: puma: move U-Boot specific bits to u-boot.dtsi
Peter Robinson [Mon, 20 Jan 2020 09:18:18 +0000 (09:18 +0000)]
arm: dts: rockchip: puma: move U-Boot specific bits to u-boot.dtsi

Move the U-Boot specific bits to a -u-boot.dtsi include so all the
u-boot.dtsi hierarchy is included.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoarm: dts: rockchip: rk3399: Move U-Boot specific bits to rk3399-u-boot
Peter Robinson [Mon, 20 Jan 2020 09:17:00 +0000 (09:17 +0000)]
arm: dts: rockchip: rk3399: Move U-Boot specific bits to rk3399-u-boot

There's some bits in the U-Boot rk3399.dtsi that aren't yet in the
upstream Linux dtsi but are needed for early boot. This moves them
to the u-boot.dtsi to make it easier to sync the rest of rk3399.dtsi
with upstream.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoarm: dts: rockchip: Update EVB/Puma devices to upstream USB/dwc3 conventions
Peter Robinson [Mon, 20 Jan 2020 09:15:26 +0000 (09:15 +0000)]
arm: dts: rockchip: Update EVB/Puma devices to upstream USB/dwc3 conventions

The upstream linux kernel for the Rockchip 3399 SoC use usbdrd3 naming so move
the two remaining devices over to that for their device trees to make it
easier to sync with upstream DTs.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: make the global board_fit_config_name_match __weak
Heiko Stuebner [Fri, 17 Jan 2020 20:37:09 +0000 (21:37 +0100)]
rockchip: make the global board_fit_config_name_match __weak

The core Rockchip spl code contains a default board_fit_config_name_match
implementation doing nothing. Individual boards may want to handle this
differently, so add a __weak atribute to make it possible to override
this function in other places.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: make_fit_atf: use correct fdt_x references in config nodes
Heiko Stuebner [Fri, 17 Jan 2020 20:26:04 +0000 (21:26 +0100)]
rockchip: make_fit_atf: use correct fdt_x references in config nodes

The script iterates over the given devicetrees and creates both
fdt_x node as well as a conf-node for each passed dt.

But there is a slight bug in that it always references fdt_1 in each
conf node instead of the matching fdt_x as expected.

So fix that by referencing the number of the current dt similar to
how the fdt_x nodes gets created.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoMerge tag 'bugfixes-for-v2020.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c
Tom Rini [Tue, 18 Feb 2020 12:08:05 +0000 (07:08 -0500)]
Merge tag 'bugfixes-for-v2020.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c

i2c bugfixes for 2020.04
- i2c: designware_i2c: Correct the selection of speed mode
  Fixes: d96440d1e3 ("i2c: designware_i2c: Add support for fast-plus speed")

4 years agoi2c: designware_i2c: Correct the selection of speed mode
Simon Glass [Thu, 13 Feb 2020 20:24:55 +0000 (13:24 -0700)]
i2c: designware_i2c: Correct the selection of speed mode

Unfortunately a recent change adjusted the order of the checks here such
that 400MHz now shows up as fast-plus speed (1Mbps). Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: d96440d1e3 ("i2c: designware_i2c: Add support for fast-plus speed")

4 years agommc: remove unneeded forward declarations
Masahiro Yamada [Thu, 23 Jan 2020 06:54:01 +0000 (15:54 +0900)]
mmc: remove unneeded forward declarations

These functions are defined before the callers.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 years agommc: check the return value of mmc_select_mode_and_width()
Masahiro Yamada [Thu, 23 Jan 2020 05:31:12 +0000 (14:31 +0900)]
mmc: check the return value of mmc_select_mode_and_width()

Since commit 01298da31d92 ("mmc: Change mode when switching to a boot
partition"), errors in mmc_select_mode_and_width() are ignored.
The return value should be checked.

Fixes: 01298da31d92 ("mmc: Change mode when switching to a boot partition")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
4 years agommc: sdhci-cadence: send tune request twice to work around errata
Masahiro Yamada [Tue, 21 Jan 2020 09:42:05 +0000 (18:42 +0900)]
mmc: sdhci-cadence: send tune request twice to work around errata

Cadence sent out an errata report to their customers of this IP.
This errata is not so severe, but the tune request should be sent
twice to avoid the potential issue.

Quote from the report:

Problem Summary
---------------
The IP6116 SD/eMMC PHY design has a timing issue on receive data path.
This issue may lead to an incorrect values of read/write pointers of
the synchronization FIFO. Such a situation can happen at the SDR104
and HS200 tuning procedure when the PHY is requested to change a phase
of sampling clock when moving to the next tuning iteration.

Workarounds
-----------
The following are valid workarounds to resolve the issue:

1. In eMMC mode, software sends tune request twice instead of once at
   each iteration. This means that the clock phase is not changed on
   the second request so there is no potential for clock instability.
2. In SD mode, software must not use the hardware tuning and instead
   perform an almost identical procedure to eMMC, using the HRS34 Tune
   Force register.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
4 years agommc: fix the build error when MMC_WRITE is disabled
Jaehoon Chung [Fri, 17 Jan 2020 06:06:54 +0000 (15:06 +0900)]
mmc: fix the build error when MMC_WRITE is disabled

erase_grp_size is used, when MMC_WRITE is enabled.
- error: ‘struct mmc’ has no member named ‘erase_grp_size’

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 years agodrivers: mmc: rpmb: Use R1 response
Bharat Kumar Reddy Gooty [Fri, 22 Nov 2019 23:13:09 +0000 (15:13 -0800)]
drivers: mmc: rpmb: Use R1 response

If the host has Broken R1B, use only R1 response type.

Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
4 years agoMerge tag 'u-boot-stm32-20200214' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Fri, 14 Feb 2020 12:31:47 +0000 (07:31 -0500)]
Merge tag 'u-boot-stm32-20200214' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- add DH Electronics DHCOM SoM and PDK2 board
- DT alignment with kernel v5.5-rc7 for stm32mp1 boards
- fix STM32 image format for big endian hosts in mkimage
- solve warnings in device tree and code for stm32mp1 boards
- remove fdt_high and initrd_high for stm32 and stih boards
- add support of STM32MP15x Rev.Z
- update stm32mp1 readme

4 years agoMerge tag 'ti-v2020.04-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
Tom Rini [Fri, 14 Feb 2020 12:31:02 +0000 (07:31 -0500)]
Merge tag 'ti-v2020.04-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti

K3 J721E/AM65X:
- UART boot fixes for J721E
- Enabling debug uart for AM65x

DRA7xx/AM57xx:
- Preveinting boot from Invalid boot configuration for AM57xx

Keysonte2:
- Linux Boot fixes for K2 platforms.

AM33/AM43/Davinci:
- Ethernt boot fixes for AM43XX
- USB Host boot fixes for AM43XX

4 years agoMerge branch '2020-02-13-master-imports'
Tom Rini [Thu, 13 Feb 2020 18:37:59 +0000 (13:37 -0500)]
Merge branch '2020-02-13-master-imports'

- Minor Kconfig fixes
- Ensure we use python3 on all CI in all cases.
- Other minor fixes

4 years agoboard: stm32: remove fdt_high and fdt_highinitrd_high
Patrice Chotard [Mon, 3 Feb 2020 14:10:40 +0000 (15:10 +0100)]
board: stm32: remove fdt_high and fdt_highinitrd_high

For stm32 f4, f7 and h7 boards, remove fdt_high and
initrd_high as they shouldn't be used, this allows the fdt
and initrd relocation.
This implies to set CONFIG_SYS_BOOTMAPSZ to indicate the
amount of memory available to contain kernel, device tree
and initrd for relocation.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@st.com>
4 years agoboard: stm32: fix extra env setings addresses
Patrice Chotard [Mon, 3 Feb 2020 14:10:39 +0000 (15:10 +0100)]
board: stm32: fix extra env setings addresses

For stm32f4, f7 and h7 boards, reserve:
 - 4MB for kernel
 - 64KB for fdt, boot script, pxefile
 - the remaining memory for ramdisk

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@st.com>
4 years agoboard: stih410-b2260: remove fdt_high and initrd_high
Patrice Chotard [Mon, 3 Feb 2020 14:00:59 +0000 (15:00 +0100)]
board: stih410-b2260: remove fdt_high and initrd_high

Remove fdt_high and initrd_high as they shouldn't be used,
this allows the fdt and initrd relocation.
This implies to set CONFIG_SYS_BOOTMAPSZ to indicate the
amount of memory available to contain kernel, device tree
and initrd for relocation.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@st.com>
4 years agostm32mp1: remove fdt_high and initrd_high in environment
Patrick Delaunay [Mon, 10 Feb 2020 10:54:11 +0000 (11:54 +0100)]
stm32mp1: remove fdt_high and initrd_high in environment

Remove fdt_high and initrd_high (set to 0xffffffff) in stm32mp1 board
enviromnent, and U-Boot always relocate FDT and initrd in bootm command.

This relocation is limited by CONFIG_SYS_BOOTMAPSZ which indicates
the size of the memory region where it is safe to place data passed
to the Linux kernel (DTB, initrd), it is
a) Less than or equal to RAM size.
b) not within the kernel's highmem region

So 256M seems large enough in most circumstances and users
can override this value via environment variable "bootm_mapsize"
if needed.

This modification increases the boot time but avoid assumption
on aligned address for bootm command.

A user can still define this variables themselves if the FDT or
initrd is either left in-place or copied to a specific location.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agoclk: stm32mp1: solve type issue in stm32mp1_lse_enable and stm32mp1_clktree
Patrick Delaunay [Tue, 28 Jan 2020 09:44:15 +0000 (10:44 +0100)]
clk: stm32mp1: solve type issue in stm32mp1_lse_enable and stm32mp1_clktree

Solve type issue in stm32mp1_lse_enable and stm32mp1_clktree.

This patch solves the warnings when compiling with W=1
on stm32mp1 board:

clk_stm32mp1.c: In function ‘stm32mp1_lse_enable’:
clk_stm32mp1.c:1238:15: warning: comparison of integer expressions
  of different signedness: ‘u32’ {aka ‘unsigned int’} and ‘int’
  [-Wsign-compare]
clk_stm32mp1.c:1239:13: warning: comparison of integer expressions
  of different signedness: ‘u32’ {aka ‘unsigned int’} and ‘int’
  [-Wsign-compare]

clk_stm32mp1.c: In function ‘stm32mp1_clktree’:
clk_stm32mp1.c:1814:17: warning: comparison of integer expressions
  of different signedness: ‘int’ and ‘unsigned int’
  [-Wsign-compare]

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agopinctrl: stmfx: update the result type of dm_i2c_reg_read
Patrick Delaunay [Tue, 28 Jan 2020 09:44:14 +0000 (10:44 +0100)]
pinctrl: stmfx: update the result type of dm_i2c_reg_read

Use int as result of dm_i2c_reg_read to avoid warning with
W=1 (warning: comparison is always false due to limited range
of data type [-Wtype-limits])

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoboard: stm32mp1: change dfu function to static
Patrick Delaunay [Tue, 28 Jan 2020 09:44:13 +0000 (10:44 +0100)]
board: stm32mp1: change dfu function to static

Change the dfu functions dfu_otp_read and dfu_pmic_read to static,
this patch avoids warning when compiling with W=1.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoboard: stm32mp1: board: add include for dfu
Patrick Delaunay [Tue, 28 Jan 2020 09:44:12 +0000 (10:44 +0100)]
board: stm32mp1: board: add include for dfu

Add include for dfu, add prototype for set_dfu_alt_info
and avoid warning when compiling with W=1.

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