oweals/u-boot.git
5 years agoMerge tag 'u-boot-imx-20190129' of git://git.denx.de/u-boot-imx
Tom Rini [Wed, 30 Jan 2019 12:22:12 +0000 (07:22 -0500)]
Merge tag 'u-boot-imx-20190129' of git://git.denx.de/u-boot-imx

For 2019.04

5 years agoarm: stm32mp1: deploy spl in root folder
Patrick Delaunay [Mon, 28 Jan 2019 10:13:27 +0000 (11:13 +0100)]
arm: stm32mp1: deploy spl in root folder

Update generation of spl binaries
- continue to generate all SPL files in spl sub-directory
- copy in root folder the needed file for user (YOCTO, buildroot):
  u-boot-spl.stm32

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoMerge tag 'u-boot-amlogic-20190129' of git://git.denx.de/u-boot-amlogic
Tom Rini [Tue, 29 Jan 2019 14:40:31 +0000 (09:40 -0500)]
Merge tag 'u-boot-amlogic-20190129' of git://git.denx.de/u-boot-amlogic

Adds pinconf support for the Amlogic pinctrl driver (fixed)

5 years agopinctrl: meson: add pinconf support
Jerome Brunet [Fri, 4 Jan 2019 14:44:34 +0000 (15:44 +0100)]
pinctrl: meson: add pinconf support

Adding pinconf support is necessary to enable boot from SPI
without breaking the eMMC. When booting from SPI, the ROM code
leave pull downs on the eMMC pad.

We need to set pinconf provided in DT to solve this

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
[narmstrong: added missing comma in pinctrl-meson-axg-pmx.c]

5 years agoARM: imx6q_logic: Enable Falcon Mode and fatwrite
Adam Ford [Fri, 28 Dec 2018 16:24:15 +0000 (10:24 -0600)]
ARM: imx6q_logic: Enable Falcon Mode and fatwrite

This patch enables Falcon Mode by default and updates the README
file to show instructions on how to run from the micro SD card
or eMMC.  This patch also enables fatwrite to help assist with
writing the 'args' to the microSD card.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: imx6q_logic: Enable DM_USB and dependent regulators
Adam Ford [Fri, 28 Dec 2018 15:04:25 +0000 (09:04 -0600)]
ARM: imx6q_logic: Enable DM_USB and dependent regulators

With the updated device trees in place, this patch enables
DM_USB which uses several regulators also enabled with this patch.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: DTS: imx6q-logicpd: Update DTS/DTSI files
Adam Ford [Fri, 28 Dec 2018 14:55:41 +0000 (08:55 -0600)]
ARM: DTS: imx6q-logicpd: Update DTS/DTSI files

The i.MX6 SOM and development kits have undergone significant
updates and changes over the past few months.  This re-sync's
the U-Boot with Logic PD's BSP.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoimx6q_logic: Enable MMC booting from SPL
Adam Ford [Fri, 28 Dec 2018 14:47:40 +0000 (08:47 -0600)]
imx6q_logic: Enable MMC booting from SPL

The MMC booting wasn't previously fitting into the codespace.
This patch enables MMC booting from the baseboard by reducing
some DM overhead during SPL.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoarm: imx7s-warp: Convert to DM PMIC
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:14 +0000 (17:40 +0000)]
arm: imx7s-warp: Convert to DM PMIC

This patch converts the warp7 and warp7_bl33 board ports over to using the
DM PMIC model.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agowarp7: defconfig: Switch to DM for I2C
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:13 +0000 (17:40 +0000)]
warp7: defconfig: Switch to DM for I2C

This commit switches to DM I2C for warp7 and warp7_bl33 defconfigs.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agowarp7: defconfig: Switch on IMX7 GPIO/pinctrl for both ports
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:12 +0000 (17:40 +0000)]
warp7: defconfig: Switch on IMX7 GPIO/pinctrl for both ports

Switches on the IMX7 pinctrl driver for the warp7 and warp7_bl33 ports,
necessary to convert over to DM for this board.

It is necessary to switch on pinctrl and GPIO in one go.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoarm: dts: imx7s-warp: Create alias for mmc0 to &usdhc3
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:11 +0000 (17:40 +0000)]
arm: dts: imx7s-warp: Create alias for mmc0 to &usdhc3

This patch sets up an alias for mmc0 to usdhc3.

Before the DM conversion only usdhc3 was enabled and therefore it appeared
as MMC 0 to u-boot. After enabling MMC DM though usdhc3 defaults to MMC 2,
which left unattended would drive changes to existing warp7 bootscripts and
environment variables that rely on mmc 0.

Setup the alias of mmc0 and usdhc3 so that existing warp7 boot code will
work unmodified.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoarm: imx7s-warp: Convert to DM MMC initialization
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:10 +0000 (17:40 +0000)]
arm: imx7s-warp: Convert to DM MMC initialization

Converts from fixed initialization of MMC to DM initialization of MMC.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoarm: imx7s-warp: Add DT file hooks
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:09 +0000 (17:40 +0000)]
arm: imx7s-warp: Add DT file hooks

This patch adds DT file hooks for imx7s-warp.dtb to the warp7 and
warp7_bl33 builds.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoarm: dts: imx7s-warp: Import Linux warp7 dts
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:08 +0000 (17:40 +0000)]
arm: dts: imx7s-warp: Import Linux warp7 dts

This patch imports the Linux kernel warp7 dts as at upstream kernel commit
cf76c364a1e1.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoarm: dts: imx7: Correct spelling mistake in GPIO name
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:07 +0000 (17:40 +0000)]
arm: dts: imx7: Correct spelling mistake in GPIO name

As pointed out by Lucas WDOD1_WDOG_ANY should be WDOG1_WDOG_ANY. Once
corrected we can import the latest kernel DTS unmodified.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reported-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
5 years agoimx8: cpu: restrict checking ROM passover info for revA
Peng Fan [Fri, 18 Jan 2019 08:58:38 +0000 (08:58 +0000)]
imx8: cpu: restrict checking ROM passover info for revA

Passover info only for revA.

move get_cpu_rev out of CONFIG_CPU to avoid build failure when using
get_cpu_rev in SPL.
Add a CONFIG_SPL_BUILD for passover usage, no need to execute it again
in normal U-Boot stage. Also if still checking passover info in normal
U-Boot stage, need to make the passover code executed after
arch_cpu_init_dm.
So to make it easy and clean, only execute the code for SPL stage.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: Check the PL310 version for applying errata
Ye Li [Mon, 7 Jan 2019 09:29:21 +0000 (09:29 +0000)]
imx: Check the PL310 version for applying errata

Apply errata based on PL310 version instead of compile
time. Also set Prefetch offset to 15, since it improves
memcpy performance by 35%. Don't enable Incr double
Linefill enable since it adversely affects memcpy
performance by about 32MB/s and reads by 90MB/s. Tested
with 4K to 16MB sized src and dst aligned buffer.

Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
5 years agoARM: imx: fix: Provide correct enum values for ONENAND/NOR boot recognition
Lukasz Majewski [Thu, 3 Jan 2019 22:50:51 +0000 (23:50 +0100)]
ARM: imx: fix: Provide correct enum values for ONENAND/NOR boot recognition

According to "Table 5-1. Boot Device Select" (page 335,
i.MX 6Dual/6Quad Applications Processor Reference Manual, Rev. 4, 09/2017)
the BOOT_CFG1[3] have following values (regarding EIM booting):
0 - NOR flash and 1 - ONENAND

This commit provides correct identification of the boot medium for IMX6Q
boards booting from NOR memory (MCCMON6 is one of them).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agodm: arm: imx: migrate cx9020 to CONFIG_DM_MMC
Patrick Bruenn [Thu, 3 Jan 2019 06:54:34 +0000 (07:54 +0100)]
dm: arm: imx: migrate cx9020 to CONFIG_DM_MMC

Enable esdhc1/2 device nodes for cx9020 and build with CONFIG_DM_MMC=y

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
5 years agoarm: imx: Add esdhc1/2 nodes to imx53.dtsi
Patrick Bruenn [Thu, 3 Jan 2019 06:54:33 +0000 (07:54 +0100)]
arm: imx: Add esdhc1/2 nodes to imx53.dtsi

These nodes are required by CX9020 when build with CONFIG_DM_MMC=y
They are copied from Linux 4.20

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
5 years agommc: fsl_esdhc: add compatible for fsl, imx53-esdhc
Patrick Bruenn [Thu, 3 Jan 2019 06:54:32 +0000 (07:54 +0100)]
mmc: fsl_esdhc: add compatible for fsl, imx53-esdhc

Add compatible "fsl,imx53-esdhc" to keep mmc working on i.MX53 platforms
with CONFIG_DM_MMC=y

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
5 years agoimx8mq_evk/README: remove ARCH environment variable
Baruch Siach [Wed, 2 Jan 2019 06:58:29 +0000 (08:58 +0200)]
imx8mq_evk/README: remove ARCH environment variable

There is no need to set the ARCH variable when building U-Boot. In fact,
the ARCH name in U-Boot is 'arm'.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
5 years agoMTD: nand: mxs_nand_spl: Fix empty function pointer for BBT
Adam Ford [Sun, 30 Dec 2018 16:11:16 +0000 (10:11 -0600)]
MTD: nand: mxs_nand_spl: Fix empty function pointer for BBT

The initialization function calls a nand_chip.scan_bbt(mtd) but
scan_bbt is never initialized resulting in an undefined function
pointer.  This will direct the function pointer to nand_default_bbt
defined in the same file.

Signed-off-by: Adam Ford <aford173@gmail.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
5 years agospi: mxc_spi: Fix build warning on ARM64 platforms
Ye Li [Fri, 4 Jan 2019 09:26:00 +0000 (09:26 +0000)]
spi: mxc_spi: Fix build warning on ARM64 platforms

When building mxc_spi driver on ARM64 platforms, get below build warnings.
Fix it in this patch.

In file included from include/common.h:48:0,
 from drivers/spi/mxc_spi.c:9:
 drivers/spi/mxc_spi.c: In function ‘spi_xchg_single’:
drivers/spi/mxc_spi.c:232:21: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
 _func_, bitlen, (u32)dout, (u32)din);
 ^
 include/log.h:135:26: note: in definition of macro ‘debug_cond’
printf(pr_fmt(fmt), ##args); \
 ^~~~
 drivers/spi/mxc_spi.c:231:2: note: in expansion of macro ‘debug’
debug("%s: bitlen %d dout 0x%x din 0x%x\n",
 ^~~~~
 drivers/spi/mxc_spi.c:232:32: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
 _func_, bitlen, (u32)dout, (u32)din);
 ^
 include/log.h:135:26: note: in definition of macro ‘debug_cond’
printf(pr_fmt(fmt), ##args); \
 ^~~~
 drivers/spi/mxc_spi.c:231:2: note: in expansion of macro ‘debug’
debug("%s: bitlen %d dout 0x%x din 0x%x\n",
 ^~~~~

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: Fix potential lmb memory overwritten by stack
Ye Li [Fri, 4 Jan 2019 09:10:20 +0000 (09:10 +0000)]
imx: Fix potential lmb memory overwritten by stack

At default, u-boot reserves the memory from SP - 4KB to DRAM end for
lmb in arch_lmb_reserve. So lmb won't allocate any memory from it.
But we found the 4K gap for SP is not enough now, because some FDT
updating operations are added in our u-boot before jumping to kernel,
which needs larger stack. This causes the lmb allocated memory is overwritten
by stack.

Fix the issue by implementing the board_lmb_reserve to reserve from
SP - 16KB to memory end for lmb.

Signed-off-by: Ye Li <ye.li@nxp.com>
5 years agopinctrl: imx: Fix select input issue
Ye Li [Fri, 4 Jan 2019 09:08:26 +0000 (09:08 +0000)]
pinctrl: imx: Fix select input issue

The pinctrl supports to set any bit in input register on iMX6 if
the MSB of input value is 0xff. But the driver uses signed int for
input value, so when executing the codes below, it won't meet.
Because this is arithmetic right shift.

    if (input_val >> 24 == 0xff)

Fix the issue by changing the input_val, config_val and mux_mode to u32.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8qxp: mek: update README
Peng Fan [Fri, 21 Dec 2018 06:21:37 +0000 (06:21 +0000)]
imx8qxp: mek: update README

Update README after we switch to use SPL

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8qxp: mek: default enable SPL
Peng Fan [Fri, 21 Dec 2018 06:21:34 +0000 (06:21 +0000)]
imx8qxp: mek: default enable SPL

Enable SPL for i.MX8QXP MEK, and currently use SPL FIT.
The SPL enable SPL_DM to use MMC/PINCTRL/POWER DOMAIN/CLK.

Note: SPL FIT could not support secure boot chain, because i.MX8/8X
only support i.MX container format. This container format has
not been upstreamed, so we use FIT for now. When SPL container
supported, we could switch to that.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: build flash.bin for i.MX8
Peng Fan [Fri, 21 Dec 2018 06:21:31 +0000 (06:21 +0000)]
imx: build flash.bin for i.MX8

Build flash.bin for i.MX8 when SPL enabled.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: mkimage_fit_atf: introduce BL33_BASE_ADDR
Peng Fan [Fri, 21 Dec 2018 06:21:29 +0000 (06:21 +0000)]
imx: mkimage_fit_atf: introduce BL33_BASE_ADDR

Introduce BL33_BASE_ADDR, then we could reuse this script for i.MX8QXP.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agodts: imx8qxp-mek: introduce u-boot dtsi
Peng Fan [Fri, 21 Dec 2018 06:21:26 +0000 (06:21 +0000)]
dts: imx8qxp-mek: introduce u-boot dtsi

Introduce u-boot dtsi for i.MX8QXP MEK board.
we do not introduce a common dtsi for SoC, because different board
has different requirement on which needs to be enabled in SPL DM.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agospl: imx8: add spl boot device
Peng Fan [Fri, 21 Dec 2018 06:21:23 +0000 (06:21 +0000)]
spl: imx8: add spl boot device

Add spl_boot_device for i.MX8, also add BOOT_DEVICE_MMC2_2 for
spl_boot_mode.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agogpio: introduce CONFIG_SPL_DM_PCA953X
Peng Fan [Fri, 21 Dec 2018 06:21:21 +0000 (06:21 +0000)]
gpio: introduce CONFIG_SPL_DM_PCA953X

Introduce CONFIG_SPL_DM_PCA953X for SPL usage.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoarm: imx: build mach-imx for i.MX8
Peng Fan [Fri, 21 Dec 2018 06:21:18 +0000 (06:21 +0000)]
arm: imx: build mach-imx for i.MX8

To enable SPL for i.MX8, we could reuse code in arch/arm/mach-imx.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8: scu: use dedicated MU for SPL
Peng Fan [Fri, 21 Dec 2018 06:21:15 +0000 (06:21 +0000)]
imx8: scu: use dedicated MU for SPL

SPL runs in EL3 mode, except MU0_A, others are not powered on,
and could not be used. However normal U-Boot use MU1_A, so we
could not reuse the one in dts. And we could not replace the one
in dts with MU0_A, because MU0_A is reserved in secure world.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8qxp: add SUPPORT_SPL option
Peng Fan [Fri, 21 Dec 2018 06:21:13 +0000 (06:21 +0000)]
imx8qxp: add SUPPORT_SPL option

Enable SUPPORT_SPL option for i.MX8QXP, then we could enable SPL.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoMAINTAINERS: imx: Change Fabio's email address
Fabio Estevam [Mon, 21 Jan 2019 16:29:54 +0000 (14:29 -0200)]
MAINTAINERS: imx: Change Fabio's email address

I prefer to use my personal email address for U-Boot related work.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agoconfigs: add default configuraiton for Colibri iMX7 with eMMC
Stefan Agner [Tue, 8 Jan 2019 11:42:38 +0000 (12:42 +0100)]
configs: add default configuraiton for Colibri iMX7 with eMMC

Add a default configuration for Colibri iMX7D 1GB (with eMMC
NAND flash).

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
5 years agoconfigs: colibri_imx7: use distro defaults
Stefan Agner [Tue, 8 Jan 2019 11:42:37 +0000 (12:42 +0100)]
configs: colibri_imx7: use distro defaults

The defconfig already use most features implied by distro defaults.
Make sure we enable all features required by distro boot by making
use of CONFIG_DISTRO_DEFAULTS.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
5 years agoconfigs: colibri_imx7: use DFU for NAND instead of MMC
Stefan Agner [Tue, 8 Jan 2019 11:42:36 +0000 (12:42 +0100)]
configs: colibri_imx7: use DFU for NAND instead of MMC

The colibri_imx7_defconfig is for Colibri iMX7 raw NAND devices.
Hence DFU for NAND is more useful then for MMC devices.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
5 years agoconfigs: colibri_imx7: enable CAAM driver
Stefan Agner [Tue, 8 Jan 2019 11:42:35 +0000 (12:42 +0100)]
configs: colibri_imx7: enable CAAM driver

Access to CAAM in non-secure mode must be enabled by the boot
loader first. The U-Boot CAAM driver enables access to CAAM in
non-secure mode by default. Hence enable the CAAM driver to
allow Linux accessing CAAM directly. This prevents error
messages like the following on Linux boot:
  caam 30900000.caam: Entropy delay = 3200
  caam 30900000.caam: failed to acquire DECO 0
  caam 30900000.caam: failed to instantiate RNG

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx7: drop legacy usdhc support
Stefan Agner [Tue, 8 Jan 2019 11:42:34 +0000 (12:42 +0100)]
colibri_imx7: drop legacy usdhc support

Drop legacy pinmux/usdhc board configuration.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoconfigs: colibri_imx7: use DM_MMC
Stefan Agner [Tue, 8 Jan 2019 11:42:33 +0000 (12:42 +0100)]
configs: colibri_imx7: use DM_MMC

Now that device tree is in place use DM_MMC for Colibri iMX7
devices.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoarm: dts: imx7: colibri: add usdhci peripherals to device tree
Stefan Agner [Tue, 8 Jan 2019 11:42:32 +0000 (12:42 +0100)]
arm: dts: imx7: colibri: add usdhci peripherals to device tree

Add usdhci peripherals to device tree. This allows to use DM_MMC
for Colibri iMX7 devices.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
5 years agoconfigs: colibri_imx7: use separate device tree
Stefan Agner [Tue, 8 Jan 2019 11:42:31 +0000 (12:42 +0100)]
configs: colibri_imx7: use separate device tree

Use OF_SEPARATE as suggested by the build system.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoconfigs: colibri_imx7: enable DM for raw NAND devices
Stefan Agner [Tue, 8 Jan 2019 11:42:30 +0000 (12:42 +0100)]
configs: colibri_imx7: enable DM for raw NAND devices

Use DM and device trees for raw NAND devices by default. This
fixes -74 NAND read errors since it makes sure the ECC settings
are the same as used in Linux and our downstream U-Boot.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
5 years agoarm: dts: imx7: colibri: split dt for raw NAND and eMMC devices
Stefan Agner [Tue, 8 Jan 2019 11:42:29 +0000 (12:42 +0100)]
arm: dts: imx7: colibri: split dt for raw NAND and eMMC devices

In preparation of adding CONFIG_DM_MMC support use separate device
trees for raw NAND and eMMC devices.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx7: fix boot commands
Stefan Agner [Tue, 8 Jan 2019 11:42:28 +0000 (12:42 +0100)]
colibri_imx7: fix boot commands

Fix mixed up boot commands between raw NAND and eMMC variant. Also
make sure that the boot_file is defined for the eMMC boot command.

Fixes: a62c60610f51 ("colibri_imx7_emmc: add Colibri iMX7D 1GB (eMMC) module support")
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoRevert "tools: imx8image: set dcd_skip to true"
Fabio Estevam [Fri, 18 Jan 2019 13:00:11 +0000 (11:00 -0200)]
Revert "tools: imx8image: set dcd_skip to true"

This reverts commit f7e475db4011d18b4ae974154eb022c3af6a4d16.

This commit breaks the boot on imx8qxp evk and it should only
be re-applied after imx8qxp evk is converted to SPL.

Revert it for now, so that imx8qxp evk can be functional.

Reported-by: Breno Lima <breno.lima@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Breno Lima <breno.lima@nxp.com>
5 years agotools: imx8image: use correct printf escape sequence
Heinrich Schuchardt [Mon, 17 Dec 2018 09:22:21 +0000 (10:22 +0100)]
tools: imx8image: use correct printf escape sequence

core is of type uint64_t. So for printing we need "%"PRIu64 (not "%lu").

Without the patch a warning is issued when building on a 32bit system.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agom53menlo: fix addmtd cmd in default environment
Olaf Mandel [Wed, 12 Dec 2018 13:43:43 +0000 (13:43 +0000)]
m53menlo: fix addmtd cmd in default environment

The original definition added the string mtdparts= to the Linux Kernel
args twice: mtdparts=mtdparts=. Fix that.

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Reviewed-by: Marek Vasut <marex@denx.de>
5 years agom53menlo: fix splashfile location
Olaf Mandel [Wed, 12 Dec 2018 13:42:00 +0000 (13:42 +0000)]
m53menlo: fix splashfile location

After merging the boot partition into the root partition, the splashfile
resides in the /boot subdirectory: update the default environment to
reflect that.

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Reviewed-by: Marek Vasut <marex@denx.de>
5 years agopico-imx7d: Add LCD support
Fabio Estevam [Tue, 11 Dec 2018 18:40:38 +0000 (16:40 -0200)]
pico-imx7d: Add LCD support

Add support for the VXT VL050-8048NT-C01 panel connected through
the 24 bit parallel LCDIF interface.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agomx7: Do not call lcdif_power_down() in the SPL case
Fabio Estevam [Tue, 11 Dec 2018 18:40:37 +0000 (16:40 -0200)]
mx7: Do not call lcdif_power_down() in the SPL case

Like it was done on imx6 in commit 9236269de57d ("imx: mx6: Fix
implementantion reset_misc")

Do not call lcdif_power_down() in the SPL case to fix the following
build error:

  LD      spl/u-boot-spl
  MKIMAGE u-boot.img
arch/arm/mach-imx/built-in.o: In function `reset_misc':
/home/fabio/ossystems/u-boot/arch/arm/mach-imx/mx7/soc.c:372: undefined reference to `lcdif_power_down'
scripts/Makefile.spl:375: recipe for target 'spl/u-boot-spl' failed

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: Add PHYTEC phyBOARD-i.MX6UL-Segin
Martyn Welch [Tue, 11 Dec 2018 11:34:46 +0000 (11:34 +0000)]
imx: Add PHYTEC phyBOARD-i.MX6UL-Segin

Port for the PHYTEC phyBOARD-i.MX6UL-Segin single board computer. Based on
the PHYTEC phyCORE-i.MX6UL SOM (PCL063).

CPU:   Freescale i.MX6UL rev1.2 528 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 44C
Reset cause: POR
Board: PHYTEC phyCORE-i.MX6UL
I2C:   ready
DRAM:  256 MiB
NAND:  512 MiB
MMC:   FSL_SDHC: 0
In:    serial
Out:   serial
Err:   serial
Net:   FEC0

Working:
 - Eth0
 - i2C
 - MMC/SD
 - NAND
 - UART (1 & 5)
 - USB (host & otg)

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
5 years agoEnable FEC driver to retrieve PHY address from device tree
Martyn Welch [Tue, 11 Dec 2018 11:34:45 +0000 (11:34 +0000)]
Enable FEC driver to retrieve PHY address from device tree

Currently if we have more than one phy on the MDIO bus, we do not have a
good mechanism for determining which should be used at runtime. Enable the
FEC driver to determine the address for the PHY from the device tree.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agoimx: hab: Convert non-NULL IVT DCD pointer warning to an error
Breno Matheus Lima [Fri, 7 Dec 2018 22:31:49 +0000 (22:31 +0000)]
imx: hab: Convert non-NULL IVT DCD pointer warning to an error

The following NXP application notes and manual recommend to ensure the
IVT DCD pointer is Null prior to calling HAB API authenticate_image()
function:

- AN12263: HABv4 RVT Guidelines and Recommendations
- AN4581: Secure Boot on i.MX50, i.MX53, i.MX 6 and i.MX7 Series using
  HABv4
- CST docs: High Assurance Boot Version 4 Application Programming
  Interface Reference Manual

Commit ca89df7dd46f ("imx: hab: Convert DCD non-NULL error to warning")
converted DCD non-NULL error to warning due to the lack of documentation
at the time of first patch submission. We have warned U-Boot users since
v2018.03, and it makes sense now to follow the NXP recommendation to
ensure the IVT DCD pointer is Null.

DCD commands should only be present in the initial boot image loaded by
the SoC ROM. Starting in HAB v4.3.7 the HAB code  will generate an error
if a DCD pointer is present in an image being authenticated by calling the
HAB RVT API. Older versions of HAB will process and run DCD if it is
present, and this could lead to an incorrect authentication boot flow.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
5 years agolinker: Modify linker scripts to be more generic
Tom Rini [Tue, 22 Jan 2019 22:09:26 +0000 (17:09 -0500)]
linker: Modify linker scripts to be more generic

Make use of "IMAGE_MAX_SIZE" and "IMAGE_TEXT_BASE" rather than
CONFIG_SPL_MAX_SIZE and CONFIG_SPL_TEXT_BASE.  This lets us re-use the
same script for both SPL and TPL.  Add logic to scripts/Makefile.spl to
pass in the right value when preprocessing the script.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Jagan Teki <jagan@openedev.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Adam Ford <aford173@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tested-by: Adam Ford <aford173@gmail.com> #da850evm & omap3_logic_somlv
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agorockchip: Add TPL_MAX_SIZE for RK3288
Tom Rini [Tue, 22 Jan 2019 22:09:25 +0000 (17:09 -0500)]
rockchip: Add TPL_MAX_SIZE for RK3288

Per Kever Yang, 32768 is a reasonable max size for TPL on RK3288.

Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 years agoPowerPC: Stop re-using CONFIG_SPL_TEXT_BASE for TPL
Tom Rini [Tue, 22 Jan 2019 22:09:24 +0000 (17:09 -0500)]
PowerPC: Stop re-using CONFIG_SPL_TEXT_BASE for TPL

Rather than checking for CONFIG_TPL_BUILD and then re-defining
CONFIG_SPL_TEXT_BASE make use of CONFIG_TPL_TEXT_BASE directly.

Cc: York Sun <york.sun@nxp.com>
Cc: Po Liu <po.liu@nxp.com>
Cc: Qiang Zhao <qiang.zhao@nxp.com>
Cc: Timur Tabi <timur@tabi.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge branch '2019-01-25-master-imports'
Tom Rini [Sun, 27 Jan 2019 03:47:55 +0000 (22:47 -0500)]
Merge branch '2019-01-25-master-imports'

- snapdragon 820c improvements
- poplar updates
- DFU + SPL cleanups
- Improve the mediatek mmc driver
- Other minor cleanups / improvements

5 years agohashtable: remove caps buffer
Heinrich Schuchardt [Wed, 23 Jan 2019 07:17:02 +0000 (08:17 +0100)]
hashtable: remove caps buffer

slre_match() checks if caps == NULL. In this case it does not try to
update it. So there is no need to create a buffer caps which we do not
evaluate.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agolib: lmb: cleanup var names and patman warnings
Simon Goldschmidt [Mon, 21 Jan 2019 19:29:56 +0000 (20:29 +0100)]
lib: lmb: cleanup var names and patman warnings

Change multiple usages of 'j' into 'rgn'; fix whitespace/coding style
reported by patman.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agolib: lmb: rename lmb_get_unreserved_size to lmb_get_free_size
Simon Goldschmidt [Mon, 21 Jan 2019 19:29:55 +0000 (20:29 +0100)]
lib: lmb: rename lmb_get_unreserved_size to lmb_get_free_size

As a follow-up, change the name of the newly introduced function
'lmb_get_unreserved_size' to 'lmb_get_free_size', which is more
appropriate.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
[trini: Fix test/lib/lmb.c]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agobcm968380gerg: disable SPI_FLASH
Philippe Reynes [Mon, 21 Jan 2019 17:52:05 +0000 (18:52 +0100)]
bcm968380gerg: disable SPI_FLASH

The board bcm968380gerg don't have a spi flash so
we disable the spi flash support.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
5 years agoMAINTAINERS: update stm32mp1 path for arch
Patrick Delaunay [Mon, 21 Jan 2019 16:20:00 +0000 (17:20 +0100)]
MAINTAINERS: update stm32mp1 path for arch

Handle correctly directory arch/arm/mach-stm32mp/ :
Add a trailing slash to include all files
and subdirectory files.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agomisc: i2c_eeprom: Add atmel,24c08 to the list
Michal Simek [Mon, 21 Jan 2019 12:54:57 +0000 (13:54 +0100)]
misc: i2c_eeprom: Add atmel,24c08 to the list

Linux kernel binding is using atmel,24c08 compatible string. On the
other hand there is atmel,24c08a which is not listed in the kernel.
Add compatible string without "a" suffix to be compatible with Linux
kernel binding.

These eeproms are available on several ZynqMP development boards.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agotests: dtoc: adapt tests to changed dtoc output
Simon Goldschmidt [Mon, 21 Jan 2019 09:07:55 +0000 (10:07 +0100)]
tests: dtoc: adapt tests to changed dtoc output

The dtoc tests need to be adapted to dtoc being changed to output platdata
structs as const, which has been introduced in commit 7d05d3a8e35f ("dtoc:
make generated platdata structs const").

Fixes: 7d05d3a8e35f ("dtoc: make generated platdata structs const")
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
5 years agoatmel: add CMD_FS_GENERIC to SAMA5D3 for EFI boot
Greg Czerniak [Mon, 21 Jan 2019 04:51:26 +0000 (23:51 -0500)]
atmel: add CMD_FS_GENERIC to SAMA5D3 for EFI boot

I'm working on getting OpenBSD to run on the Atmel SAMA5D3 Xplained.
OpenBSD uses an EFI bootloader, which requires the "load" command to
work, since "fatload" doesn't initialize the EFI memory addresses
properly. To get "load" on the SAMA5D3 version of U-Boot, I propose
adding the CONFIG_CMD_FS_GENERIC option.

Signed-off-by: Greg Czerniak <greg@czerniak.info>
5 years agodrivers: esdhc: add support for ColdFire mcf5441x family
Angelo Dureghello [Sat, 19 Jan 2019 09:40:38 +0000 (10:40 +0100)]
drivers: esdhc: add support for ColdFire mcf5441x family

This patch has been tested on the mcf54415-based stmark2
board. The eSDHC driver works reliably using DMA mode.

Signed-off-by: Angelo Dureghello <angelo@sysam.it>
5 years agoenv: Fix saving environment to "bad CRC" location
Sam Protsenko [Fri, 18 Jan 2019 19:19:04 +0000 (21:19 +0200)]
env: Fix saving environment to "bad CRC" location

In case when the environment on some location is malformed (CRC isn't
matching), there is a chance we won't be able to save the environment to
that location. For example, consider the case when we only have the
environment on eMMC, but it's zeroed out. In that case, we won't be able
to "env save" to it, because of "bad CRC" error. That's happening
because in env_load() function we consider malformed environment as
incorrect one, and  defaulting to the location with highest (0)
priority, which can be different from one we are dealing with right now
(e.g., highest priority can be ENV_FAT on SD card, which is not
inserted, but we want to use ENV_MMC on eMMC, where we were booted
from).

This issue began to reproduce after commit d30ba2315ae3 ("u-boot: remove
driver lookup loop from env_save()") on BeagleBone Black, but that
commit didn't introduce the wrong logic, it just changed the behavior
for default location to use, merely revealing this issue.

To fix that, let's implement next logic in env_load():
  1. Try to find out correct environment; if found -- use it
  2. If working environment wasn't found, but we found malformed one
     (with bad CRC), let's use it for further "env save". But make sure
     to use malformed environment location with highest priority.
  3. If neither correct nor malformed environment was found, let's
     default to environment location with highest priority (0)

Steps to reproduce mentioned issue on BeagleBone Black (fixed in this
patch):

1. Boot from SD card and erase eMMC in U-Boot shell:
   => mmc dev 1
   => mmc erase 0 100000
   => gpt write mmc 1 $partitions
2. Write new SPL and U-Boot to eMMC; the rest of eMMC will stay filled
   with zeroes
3. Boot from eMMC; try to do:
   => env save
4. Observe the error (incorrect behavior). Correct behavior: environment
   should be stored correctly on eMMC, in spite of it has "bad CRC"

Fixes: d30ba2315ae3 ("u-boot: remove driver lookup loop from env_save()")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoenv: common: Return specific error code on bad CRC
Sam Protsenko [Fri, 18 Jan 2019 19:19:03 +0000 (21:19 +0200)]
env: common: Return specific error code on bad CRC

Callers of env_import*() functions might want to check the case when we
have incorrect environment (with bad CRC). For example, when environment
location is being defined in env_load(), call chain may look like this:

    env_load() -> drv->load() = env_mmc_load() -> env_import()

Return code will be passed from env_import() all way up to env_load().
Right now both env_mmc_load() and env_import() return -EIO error code,
so env_load() can't differentiate between two cases:
  1. Driver reports the error, because device is not accessible
  2. Device is actually accessible, but environment is broken

Let's return -ENOMSG in env_import(), so we can distinguish two cases
mentioned above. It will make it possible to continue working with "bad
CRC" environment (like doing "env save"), instead of considering it not
functional (implemented in subsequent patch).

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoARM: chiliboard: enable DM_SPI
Marcin Niestroj [Fri, 18 Jan 2019 16:35:42 +0000 (17:35 +0100)]
ARM: chiliboard: enable DM_SPI

Add DM_SPI to suppress build warning about dm conversion.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
5 years agoMakefile: have "make distclean" remove CHANGELOG
Robert P. J. Day [Fri, 18 Jan 2019 13:41:23 +0000 (08:41 -0500)]
Makefile: have "make distclean" remove CHANGELOG

Ensure that "make distclean" deletes an existing CHANGELOG file.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
5 years agoARM: mach-omap2: Kconfig: Allow OMAP5 devices to set entry point
Andrew F. Davis [Thu, 17 Jan 2019 19:43:05 +0000 (13:43 -0600)]
ARM: mach-omap2: Kconfig: Allow OMAP5 devices to set entry point

Like AM33xx and AM43xx, DRA7xx and AM57xx devices may need to
have an non-standard boot address in memory. This may be due
to the device being a high security variant, which place the
Initial SoftWare (ISW) after certificates and secure software.

Allow these devices to set this from Kconfig.

Signed-off-by: Andrew F. Davis <afd@ti.com>
5 years agodfu: Remove dependency on HUSH parser in SPL
Andrew F. Davis [Thu, 17 Jan 2019 19:43:04 +0000 (13:43 -0600)]
dfu: Remove dependency on HUSH parser in SPL

CLI support with the HUSH parser is not currently SPL safe due to it's
use of realloc. That function is not defined for SPLs that use
SYS_MALLOC_SIMPLE. CLI support can be built in to SPL and some functions
do work, but use of some like run_command() will cause build to fail.
When no SPL code calls this function build works as the compiler removes
this unreachable code so the unresolved symbols are ignored.

If DFU support is enabled in SPL then MMU DFU support may get brought in
also, this code does make a call to run_command() causing build to fail
if the HUSH parser is not built-in. To break this odd and unneeded
dependency chain we use CONFIG_IS_ENABLED where appropriate to prevent
calls into HUSH code from SPL. This also removes our need to pull in the
rather unrelated source file when SPL_DFU is defined.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agodfu: Make DFU support more SPL friendly
Andrew F. Davis [Thu, 17 Jan 2019 19:43:03 +0000 (13:43 -0600)]
dfu: Make DFU support more SPL friendly

Do this by using $(SPL_) in Makefiles and CONFIG_IS_ENABLED in C code.
This ensures the files and features are only built into the right build
for which they are enabled. Using the macros to simplify this patch was
made possible by the config symbol rename done in the last patch.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
5 years agospl: Kconfig: Drop the _SUPPORT postfix from SPL_DFU
Andrew F. Davis [Thu, 17 Jan 2019 19:43:02 +0000 (13:43 -0600)]
spl: Kconfig: Drop the _SUPPORT postfix from SPL_DFU

The symbol CONFIG_SPL_DFU_SUPPORT in SPL build has the same
meaning as CONFIG_DFU in regular U-Boot. Drop the _SUPPORT
to allow for cleaner use in code.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
5 years agommc: mtk-sd: fix SPL compilation when GPIO=y and SPL_GPIO=n
Fabien Parent [Thu, 17 Jan 2019 17:06:01 +0000 (18:06 +0100)]
mmc: mtk-sd: fix SPL compilation when GPIO=y and SPL_GPIO=n

It is not possible to link the SPL image when CONFIG_GPIO is enabled
but CONFIG_SPL_GPIO is not.  Use the IS_ENABLED macro instead to
correctly check whether CONFIG_{SPL_}GPIO is enabled.

This commit fixes the following errors:
* undefined reference to `dm_gpio_get_value
* undefined reference to `gpio_request_by_name'

Signed-off-by: Fabien Parent <fparent@baylibre.com>
[trini: Move guard to fix warning in msdc_ops_get_wp()]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agommc: mtk-sd: fix possible incomplete read ops
Fabien Parent [Thu, 17 Jan 2019 17:06:00 +0000 (18:06 +0100)]
mmc: mtk-sd: fix possible incomplete read ops

The code is checking for incomplete read when it see the INT_XFER_COMPL
flag, but it forget to first check whether there is anything left in the
FIFO to copy to the RX buffer. This means that sometimes we will get
errors because of erroneous incomplete read operation.

This commit fixes the driver re-ordering the code so that we first
check for data inside the RX fifo and only after check the status
of the INT_XFER_COMPL flag.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
5 years agoarm64: dt: poplar: add optee node
Igor Opaniuk [Thu, 17 Jan 2019 14:37:40 +0000 (16:37 +0200)]
arm64: dt: poplar: add optee node

As Poplar supports running TF-A with OP-TEE as BL32
payload, add op-tee node in DT, which enables usage of
OP-TEE driver (which provides an interface for requesting services
from OP-TEE).

Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agopoplar: clean up board level mmc initialization code
Shawn Guo [Thu, 17 Jan 2019 04:09:52 +0000 (12:09 +0800)]
poplar: clean up board level mmc initialization code

We have converted mmc to driver model on Poplar.  So let's clean up
board level mmc initialization code.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
5 years agommc: hi6220_dw_mmc: add compatible for Poplar support
Shawn Guo [Thu, 17 Jan 2019 04:09:51 +0000 (12:09 +0800)]
mmc: hi6220_dw_mmc: add compatible for Poplar support

It adds compatible "hisilicon,hi3798cv200-dw-mshc" for Poplar SoC
Hi3798CV200 to probe this mmc driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
5 years agopoplar: sync up device tree with kernel 4.20
Shawn Guo [Thu, 17 Jan 2019 04:09:50 +0000 (12:09 +0800)]
poplar: sync up device tree with kernel 4.20

It adds missing pinctrl headers, updates clock header and sync up Poplar
device tree with kernel 4.20 release.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
5 years agodts: 820c: Add pinctrl node and uart mux
Ramon Fried [Sat, 12 Jan 2019 09:47:28 +0000 (11:47 +0200)]
dts: 820c: Add pinctrl node and uart mux

* Add pinctrl node for TLMM and add mux request for uart node.
* Rename uart to the actual board uart port.
* Fix indentendation of sdhc2 node.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
5 years agoarm: mach-snapdragon: pinctrl: clarify gpio disable bit
Ramon Fried [Sat, 12 Jan 2019 09:47:27 +0000 (11:47 +0200)]
arm: mach-snapdragon: pinctrl: clarify gpio disable bit

The TLMM_GPIO_ENABLE bit is actually use to disable
the GPIO. change it to TLMM_GPIO_DISABLE so it's clearer.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
5 years agoconfigs: dragonboard820c: Enable pinctrl/mux config
Ramon Fried [Sat, 12 Jan 2019 09:47:26 +0000 (11:47 +0200)]
configs: dragonboard820c: Enable pinctrl/mux config

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
5 years agoarm: mach-snapdragon: add pinctrl driver for db820c
Ramon Fried [Sat, 12 Jan 2019 09:47:25 +0000 (11:47 +0200)]
arm: mach-snapdragon: add pinctrl driver for db820c

Add pinctrl driver for Dragonboard820c, currently with only
one mux func to initialize pins for serial console.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
5 years agoarm: mach-snapdragon: db820c: Actually init PLL for serial
Ramon Fried [Sat, 12 Jan 2019 09:47:24 +0000 (11:47 +0200)]
arm: mach-snapdragon: db820c: Actually init PLL for serial

The PLL for the UART was not set, and relied on previous
initializtion made by LK. add the appropriate initialization.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
5 years agocmd: ximg: Invert check for fit image compression
Stefan Theil [Mon, 7 Jan 2019 09:25:52 +0000 (10:25 +0100)]
cmd: ximg: Invert check for fit image compression

The imgextract command runs a number of checks of
the specified fit. Where it checks for a load address
for compressed images the logic in the expression
is inverted as fit_image_check_comp returns 1 on
success and not 0.

5 years agoarm: stm32mp1: deploy spl in root folder
Sean Nyekjær [Fri, 4 Jan 2019 11:37:24 +0000 (11:37 +0000)]
arm: stm32mp1: deploy spl in root folder

Deploy u-boot-spl.stm32 binary in u-boot root folder like
the rest of the boards.
This makes it more streamlined when building in Yocto, Buildroot etc..

Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
5 years agoconfigs: Migrate CONFIG_DFU_MMC again
Tom Rini [Fri, 25 Jan 2019 17:03:31 +0000 (12:03 -0500)]
configs: Migrate CONFIG_DFU_MMC again

A few platforms recently added in CONFIG_DFU_MMC under include/configs
rather than via the defconfig, update them.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge tag 'arc-fixes-for-2019.04-rc1' of git://git.denx.de/u-boot-arc
Tom Rini [Fri, 25 Jan 2019 15:41:24 +0000 (10:41 -0500)]
Merge tag 'arc-fixes-for-2019.04-rc1' of git://git.denx.de/u-boot-arc

A couple of trivial fixes and improvements for ARC

Most notable are:
 * Move of ENV_SIZE/ENV_OFFSET to Kconfig
 * Fix with private structure allocation for arc_uart
 * Definition of CONFIG_SYS_CACHELINE_SIZE useful for building drivers

5 years agoARC: cache: define CONFIG_SYS_CACHELINE_SIZE as ARCH_DMA_MINALIGN
Alexey Brodkin [Tue, 22 Jan 2019 16:37:15 +0000 (19:37 +0300)]
ARC: cache: define CONFIG_SYS_CACHELINE_SIZE as ARCH_DMA_MINALIGN

Even though we don't use CONFIG_SYS_CACHELINE_SIZE in ARC-specific code
it is used a lot in different drivers for alignment purposes.

So we define it and make much more drivers at least compilable for ARC.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
5 years agoARC: Fix iteration in arc_xx_version()
Alexey Brodkin [Tue, 22 Jan 2019 16:33:59 +0000 (19:33 +0300)]
ARC: Fix iteration in arc_xx_version()

"i" gets incremented before we're entering loop body
and effectively we iterate from 1 to 8 instead of 0 to 7.

This way we:
 a) Skip the first line of struct hs_versions
 b) Go over it and access memory beyond the structure

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
5 years agoserial_arc: Allocate buffer for private data
Alexey Brodkin [Tue, 22 Jan 2019 15:18:51 +0000 (18:18 +0300)]
serial_arc: Allocate buffer for private data

Apparently we never allocated buffer for arc_serial_platdata
which for some reason never caused problems when executed in nSIM.
But in Qemu this causes expected problems.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
5 years agoARC: Move ENV_SIZE and ENV_OFFSET to Kconfig
Alexey Brodkin [Tue, 15 Jan 2019 08:42:48 +0000 (11:42 +0300)]
ARC: Move ENV_SIZE and ENV_OFFSET to Kconfig

Join the party of some ARM boards and drop more
items from include/configs/xxx.h.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoserial: Get rid of CONFIG_DW_SERIAL
Alexey Brodkin [Wed, 9 Jan 2019 08:22:40 +0000 (11:22 +0300)]
serial: Get rid of CONFIG_DW_SERIAL

CONFIG_DW_SERIAL is no longer used anywhere so let's forget about it.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Adam Ford <aford173@gmail.com>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Cc: Alex Kiernan <alex.kiernan@gmail.com>
Cc: "Jorg Krause" <joerg.krause@embedded.rocks>
Cc: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Thu, 24 Jan 2019 20:30:48 +0000 (15:30 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi