oweals/u-boot.git
4 years agoARM: imx: vining2000: Convert MMC and block to DM
Marek Vasut [Fri, 17 May 2019 20:25:24 +0000 (22:25 +0200)]
ARM: imx: vining2000: Convert MMC and block to DM

Enable DM block and DM MMC support on iMX6SX VINING|2000 .
Convert board code to match the DM support. This disables
USB mass storage support due to missing DM USB, however
that will be re-enabled in subsequent patch.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Silvio Fricke <silvio.fricke@softing.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoARM: imx: vining2000: Enable DM pin control
Marek Vasut [Fri, 17 May 2019 20:25:23 +0000 (22:25 +0200)]
ARM: imx: vining2000: Enable DM pin control

Enable DM pin control support on iMX6SX VINING|2000.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Silvio Fricke <silvio.fricke@softing.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoARM: dts: imx: vining2000: Import VINING|2000 DT from Linux
Marek Vasut [Fri, 17 May 2019 20:25:22 +0000 (22:25 +0200)]
ARM: dts: imx: vining2000: Import VINING|2000 DT from Linux

Import iMX6SX VINING|2000 device tree from Linux 5.1.1 b724e9356404 .
Enable DT control in full U-Boot .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Silvio Fricke <silvio.fricke@softing.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoARM: imx: Rename VINING|2000
Marek Vasut [Fri, 17 May 2019 20:25:21 +0000 (22:25 +0200)]
ARM: imx: Rename VINING|2000

The company Samtec was merged into Softing, migrate the board over to
the new name and update copyright headers.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Silvio Fricke <silvio.fricke@softing.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agomx6sx: vining2000: pinmux usdhc4 reset
Christoph Fritz [Fri, 17 May 2019 19:19:31 +0000 (21:19 +0200)]
mx6sx: vining2000: pinmux usdhc4 reset

This patch configures pinmux for pin usdhc4 reset.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
4 years agoMAINTAINERS: Add imx dts files to i.MX maintainers list
Fabio Estevam [Fri, 10 May 2019 12:23:53 +0000 (09:23 -0300)]
MAINTAINERS: Add imx dts files to i.MX maintainers list

Add imx dts files to the MAINTAINERS file list, so that i.MX
devicetree related patches can be properly sent to the i.MX folks.

Reported-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 years agoserial: mxc: Add iMX6SX compatible string
Marek Vasut [Fri, 17 May 2019 19:56:40 +0000 (21:56 +0200)]
serial: mxc: Add iMX6SX compatible string

Add compatible string for iMX6SX.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Silvio Fricke <silvio.fricke@softing.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoARM: imx: novena: Enable DM PCI
Marek Vasut [Fri, 17 May 2019 18:32:19 +0000 (20:32 +0200)]
ARM: imx: novena: Enable DM PCI

Enable DM PCI support on iMX6Q Novena.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
4 years agopci: imx: Add DM and DT support
Marek Vasut [Sun, 9 Jun 2019 01:50:55 +0000 (03:50 +0200)]
pci: imx: Add DM and DT support

Add DM support and support for probing the iMX PCI driver from DT.
The legacy non-DM support is retained, however shall be removed once
DM PCI is the only option remaining.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agopci: imx: Pass driver private data around
Marek Vasut [Sun, 9 Jun 2019 01:50:54 +0000 (03:50 +0200)]
pci: imx: Pass driver private data around

Pass the driver private data around the driver as much as possible, instead
of having it as a static global variable. This is done in preparation for
the DM conversion, no functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agopci: imx: Fix potential 64bit memory access clamping
Marek Vasut [Sun, 9 Jun 2019 01:50:53 +0000 (03:50 +0200)]
pci: imx: Fix potential 64bit memory access clamping

The driver limits the config space base to 32bit, however it can be
64bit on 64bit iMX hardware too. Remove that limitation. This patch
has no impact on the iMX6, which is the only SoC currently supported
by this driver.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agopci: imx: Factor out hard-coded register base addresses
Marek Vasut [Sun, 9 Jun 2019 01:50:52 +0000 (03:50 +0200)]
pci: imx: Factor out hard-coded register base addresses

Pull out hard-coded register base addresses into driver private
structure in preparation for DM conversion. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoARM: imx: Call imx_pcie_remove() only for non-DM PCI driver
Marek Vasut [Sun, 9 Jun 2019 01:50:51 +0000 (03:50 +0200)]
ARM: imx: Call imx_pcie_remove() only for non-DM PCI driver

The DM iMX PCI driver has DM_FLAG_OS_PREPARE set and will call
imx_pcie_remove() from the .remove callback. Do not call it from
the architecture code again.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agomx6sabresd: Remove U-Boot proper mmc initialization
Fabio Estevam [Tue, 21 May 2019 13:37:54 +0000 (10:37 -0300)]
mx6sabresd: Remove U-Boot proper mmc initialization

After the conversion to DM there is no need to have mmc initialization
code inside U-Boot proper.

Remove the unneeded code.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agomx6sabresd: Select pinctrl driver
Fabio Estevam [Tue, 21 May 2019 13:37:53 +0000 (10:37 -0300)]
mx6sabresd: Select pinctrl driver

With the conversion to DM we should select the pinctrl driver.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agomx6sabresd: Remove CONFIG_SPL_DM to decrease the SPL size
Fabio Estevam [Tue, 21 May 2019 13:37:52 +0000 (10:37 -0300)]
mx6sabresd: Remove CONFIG_SPL_DM to decrease the SPL size

Currently the mx6qsabresd board does not boot:

U-Boot SPL 2019.07-rc2 (May 16 2019 - 14:28:55 -0300)
Trying to boot from MMC1
spl: could not find mmc device 0. error: -19
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

The reason for the boot failure is that that the SPL
size got greater than the 68KB limit (4KB header + 64KB max
size) as explained in include/configs/imx6_spl.h.

Remove the CONFIG_SPL_DM option, so that the SPL binary could
fit into the allowed size and the board can boot again.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx8qxp_mek: Remove unneeded config options settings
Fabio Estevam [Wed, 8 May 2019 12:02:08 +0000 (09:02 -0300)]
imx8qxp_mek: Remove unneeded config options settings

Remove such unneeded custom config options because the
provided default values are good enough.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8qm_mek: Remove unneeded config options settings
Fabio Estevam [Wed, 8 May 2019 12:02:07 +0000 (09:02 -0300)]
imx8qm_mek: Remove unneeded config options settings

Remove such unneeded custom config options because the
provided default values are good enough.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
Parthiban Nallathambi [Wed, 10 Apr 2019 14:35:32 +0000 (16:35 +0200)]
imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM

Extend PHYTEC phyBOARD-i.MX6UL for phyCORE-i.MX6UL SoM (PCL063)
with eMMC on SoM.

CPU:   Freescale i.MX6ULL rev1.0 792 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 38C
Reset cause: POR
Model: Phytec phyBOARD-i.MX6ULL-Segin SBC
Board: PHYTEC phyCORE-i.MX6ULL
DRAM:  256 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
In:    serial@02020000
Out:   serial@02020000
Err:   serial@02020000
Net:   FEC0

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

Signed-off-by: Parthiban Nallathambi <parthitce@gmail.com>
4 years agoapalis-tk1: use UUID for rootfs
Igor Opaniuk [Wed, 29 May 2019 10:00:43 +0000 (13:00 +0300)]
apalis-tk1: use UUID for rootfs

1. Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs
partition. This fixes the issue, when MMC controllers are probed in
a different order in U-boot and Linux kernel.
2. Fix legacy USB command (both sdboot and usbboot can be used now).

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agoapalis_imx6: use UUID for rootfs
Igor Opaniuk [Wed, 29 May 2019 10:00:42 +0000 (13:00 +0300)]
apalis_imx6: use UUID for rootfs

1. Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs
partition. This fixes the issue, when MMC controllers are probed in
a different order in U-boot and Linux kernel.
2. Fix legacy USB command (both sdboot and usbboot can be used now).

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agocolibri_vf: use UUID for rootfs
Igor Opaniuk [Wed, 29 May 2019 10:00:41 +0000 (13:00 +0300)]
colibri_vf: use UUID for rootfs

Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs
partition. This fixes the issue, when MMC controllers are probed in
a different order in U-boot and Linux kernel.

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agocolibri-imx6ull: use UUID for rootfs
Igor Opaniuk [Wed, 29 May 2019 10:00:40 +0000 (13:00 +0300)]
colibri-imx6ull: use UUID for rootfs

Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs
partition. This fixes the issue, when MMC controllers are probed in
a different order in U-boot and Linux kernel.

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agocolibri_imx7: use UUID for rootfs
Igor Opaniuk [Wed, 29 May 2019 10:00:39 +0000 (13:00 +0300)]
colibri_imx7: use UUID for rootfs

Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs
partition. This fixes the issue, when MMC controllers are probed in
a different order in U-boot and Linux kernel.

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agoboard: toradex: add apalis imx8qm 4gb wb it v1.0b module support
Marcel Ziswiler [Fri, 31 May 2019 16:00:20 +0000 (19:00 +0300)]
board: toradex: add apalis imx8qm 4gb wb it v1.0b module support

This commit adds initial support for the Toradex Apalis iMX8QM 4GB WB IT
V1.0B module. Unlike the V1.0A early access samples exclusively booting
from SD card, they are now strapped to boot from eFuses which are
factory fused to properly boot from their on-module eMMC. U-Boot
supports either booting from the on-module eMMC or may be used for
recovery purpose using the universal update utility (uuu) aka mfgtools
3.0.

Functionality wise the following is known to be working:
- eMMC, 8-bit and 4-bit MMC/SD card slots
- Gigabit Ethernet
- GPIOs
- I2C

Unfortunately, there is no USB functionality for the i.MX 8QM as of yet.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
4 years agoimx8: fuse: fix fuse driver
Marcel Ziswiler [Fri, 31 May 2019 16:00:19 +0000 (19:00 +0300)]
imx8: fuse: fix fuse driver

This fixes the i.MX 8 fuse driver to actually build for i.MX 8QM as
well.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
4 years agoimx8qm: fix cpu frequency reporting
Marcel Ziswiler [Fri, 31 May 2019 16:00:18 +0000 (19:00 +0300)]
imx8qm: fix cpu frequency reporting

CPU frequency reporting failed with the following error message being
printed:

sc_pm_get_clock_rate: resource:507 clk:2: res:3
Could not read CPU frequency: -22
CPU:   NXP i.MX8QM RevB A53 at 0 MHz

Fix this by differentiating between the A35 as found on the i.MX 8QXP
and the A53 as found on the i.MX 8QM SoCs.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
4 years agoclk: imx8qm: fix usdhc2 clocks
Marcel Ziswiler [Fri, 31 May 2019 16:00:17 +0000 (19:00 +0300)]
clk: imx8qm: fix usdhc2 clocks

Trying to bring up uSDHC2 the following error message was observed:

MMC:   imx8_clk_set_rate(Invalid clk ID #60)
imx8_clk_set_rate(Invalid clk ID #60)
usdhc@5b030000 - probe failed: -22

This commit fixes this by properly setting resp. clocks.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
4 years agoarm: dts: imx8qm: add support for i2c0, i2c1, i2c2, i2c3 and i2c4
Marcel Ziswiler [Fri, 31 May 2019 16:00:16 +0000 (19:00 +0300)]
arm: dts: imx8qm: add support for i2c0, i2c1, i2c2, i2c3 and i2c4

Add support for i2c0, i2c1, i2c2, i2c3 and i2c4.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
4 years agoarm: dts: imx8qm: add lpuart1, lpuart2, lpuart3, lpuart4
Marcel Ziswiler [Fri, 31 May 2019 16:00:15 +0000 (19:00 +0300)]
arm: dts: imx8qm: add lpuart1, lpuart2, lpuart3, lpuart4

Add support for lpuart1, lpuart2, lpuart3 and lpuart4.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
4 years agopico-imx6ul: MAINTAINERS: Add pico-dwarf entry
Fabio Estevam [Fri, 26 Apr 2019 16:56:34 +0000 (13:56 -0300)]
pico-imx6ul: MAINTAINERS: Add pico-dwarf entry

pico-dwarf-imx6ul_defconfig does not have an entry in MAINTAINERS file,
so add it to avoid a build warning.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agopico-imx6ul: MAINTAINERS: Unify all board entries
Fabio Estevam [Fri, 26 Apr 2019 16:56:33 +0000 (13:56 -0300)]
pico-imx6ul: MAINTAINERS: Unify all board entries

It is easier to consolidate all boards into a single entry.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agopico-imx7d: MAINTAINERS: Unify all board entries
Fabio Estevam [Fri, 26 Apr 2019 16:56:32 +0000 (13:56 -0300)]
pico-imx7d: MAINTAINERS: Unify all board entries

It is easier to consolidate all boards into a single entry.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agocolibri_imx7: fastboot support
Igor Opaniuk [Fri, 31 May 2019 10:19:35 +0000 (13:19 +0300)]
colibri_imx7: fastboot support

Enable fastboot support (including "fastboot oem" subset of commands).

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
4 years agoARM: imx: novena: Convert to DM VIDEO
Marek Vasut [Fri, 17 May 2019 18:32:20 +0000 (20:32 +0200)]
ARM: imx: novena: Convert to DM VIDEO

Enable DM Video support on iMX6Q Novena and fix minor details
to restore previous behavior of the system.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
4 years agoARM: imx: novena: Enable DM USB
Marek Vasut [Fri, 17 May 2019 18:32:18 +0000 (20:32 +0200)]
ARM: imx: novena: Enable DM USB

Enable DM USB support on iMX6Q Novena.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
4 years agoARM: imx: novena: Convert block devices to DM
Marek Vasut [Fri, 17 May 2019 18:32:17 +0000 (20:32 +0200)]
ARM: imx: novena: Convert block devices to DM

Enable DM block, DM MMC and DM SATA support on iMX6Q Novena
convert board code to match the DM support.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
4 years agoARM: imx: novena: Enable DM GPIO
Marek Vasut [Fri, 17 May 2019 18:32:16 +0000 (20:32 +0200)]
ARM: imx: novena: Enable DM GPIO

Enable DM GPIO support on iMX6Q Novena and fix up board code
where applicable.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
4 years agoARM: imx: novena: Enable DM pin control
Marek Vasut [Fri, 17 May 2019 18:32:15 +0000 (20:32 +0200)]
ARM: imx: novena: Enable DM pin control

Enable DM pin control support on iMX6Q Novena.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
4 years agoARM: dts: imx: novena: Import Novena DT from Linux
Marek Vasut [Fri, 17 May 2019 18:32:14 +0000 (20:32 +0200)]
ARM: dts: imx: novena: Import Novena DT from Linux

Import iMX6Q Novena device tree from Linux 5.1-rc7 37624b58542f .
Enable DT control in full U-Boot .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
4 years agopico-imx7d: enable boot without PMIC
Jun Nie [Wed, 8 May 2019 06:38:36 +0000 (14:38 +0800)]
pico-imx7d: enable boot without PMIC

If PMIC is not probed successfully, it is still OK to boot
with default configuration although power is not optimized.

Default voltage of SW1A/SW1B is 1.1V/1.0V for PC32PF3000A1EP
on pico according to table 42 of spec of PF3000 ver 9.0.

Default mode of SW1A/SW1B is APS as expected(table 47).

Signed-off-by: Jun Nie <jun.nie@linaro.org>
4 years agopico-imx7d: README: Add BL33 usage case
Jun Nie [Wed, 8 May 2019 06:38:35 +0000 (14:38 +0800)]
pico-imx7d: README: Add BL33 usage case

Add Documentation of BL33 usage case. U-boot is in
non-secure world in this case.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
4 years agopico-imx7d: Add bl33 config
Jun Nie [Wed, 8 May 2019 06:38:34 +0000 (14:38 +0800)]
pico-imx7d: Add bl33 config

Add default configuration to run u-boot as BL33 in the boot flow case
of ATF(ARM Trusted Firmware) -> OPTEE -> U-boot.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agopico-imx7d: Add boot option for verified boot
Jun Nie [Wed, 8 May 2019 06:38:33 +0000 (14:38 +0800)]
pico-imx7d: Add boot option for verified boot

Add boot option to boot from fitimage to support verified boot.
The boot script plain text file should be packed into fit blob as
image with name of bootscr.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
4 years agopico-imx7d: Reserve region of memory to OPTEE
Jun Nie [Wed, 8 May 2019 06:38:32 +0000 (14:38 +0800)]
pico-imx7d: Reserve region of memory to OPTEE

Subtracts CONFIG_OPTEE_TZDRAM_SIZE from the available DRAM size so that
the OPTEE memory is not override during u-boot relocation.

Note the OPTEE live in the end part of DRAM and OPTEE boot process will
itself subtract the DRAM region it lives in from the memory map passed
to Linux.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 years agopico-imx7d: Correct uart clock root
Jun Nie [Wed, 8 May 2019 06:38:31 +0000 (14:38 +0800)]
pico-imx7d: Correct uart clock root

Correct uart clock root ID. Incorrect ID may result the
clock is gated because rate value 0 is returned in
imx_get_uartclk()

The ID can be ignored if CONFIG_SKIP_LOWLEVEL_INIT is not enabled
because init_clk_uart() will enable all uart clocks in that case.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
4 years agoimx: mx7: Skip secure init in arch_cpu_init
Jun Nie [Wed, 8 May 2019 06:38:30 +0000 (14:38 +0800)]
imx: mx7: Skip secure init in arch_cpu_init

Skip secure related initialization in arch_cpu_init if low level
init is skipped.  Because these should be done in early stage
firmware, such as ARM trusted firmware.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
4 years agomx7_common: Share configs to skip low level init
Jun Nie [Wed, 8 May 2019 06:38:29 +0000 (14:38 +0800)]
mx7_common: Share configs to skip low level init

Share configs in mx7 to skip low level init if we are in the case where
OPTEE is loaded already (maybe by ARM Trusted Firmware) and that most of
the low level initialization is already done and that we may/should skip
it doing them here.

Fix the definition detection with size detection to decide whether to skip
it.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agospi: imx: work with cs greater 0
Heiko Schocher [Sun, 26 May 2019 10:15:47 +0000 (12:15 +0200)]
spi: imx: work with cs greater 0

currently spi mxc driver can only handle cs 0.
Allow it to handle also cs > 0.

Signed-off-by: Heiko Schocher <hs@denx.de>
4 years agospi: imx: remove doubled pointer from mxc_spi_probe
Heiko Schocher [Sun, 26 May 2019 10:15:46 +0000 (12:15 +0200)]
spi: imx: remove doubled pointer from mxc_spi_probe

in mxc_spi_probe() plat and mxcs pointer are created:

struct mxc_spi_slave *plat = bus->platdata;
struct mxc_spi_slave *mxcs = dev_get_platdata(bus);

which have the same value. Remove plat pointer.

Signed-off-by: Heiko Schocher <hs@denx.de>
4 years agoarm, imx, Makefile: fix u-boot-dtb.imx build in CONFIG_MULTI_DTB_FIT case
Heiko Schocher [Tue, 28 May 2019 11:44:31 +0000 (13:44 +0200)]
arm, imx, Makefile: fix u-boot-dtb.imx build in CONFIG_MULTI_DTB_FIT case

in case CONFIG_MULTI_DTB_FIT is set and u-boot-dtb.imx
image is build, currently u-boot-dtb.bin is used for
generating the u-boot-dtb.imx binary, which is wrong, as
it contains only a dtb blob not the fit.blob

Use instead the u-boot-fit-dtb.bin for generating
u-boot-dtb.imx which contains the fit.blob.

Signed-off-by: Heiko Schocher <hs@denx.de>
4 years agowandboard: Rework Makefile to prevent spl.o from being built
Ezequiel Garcia [Sat, 25 May 2019 22:19:41 +0000 (19:19 -0300)]
wandboard: Rework Makefile to prevent spl.o from being built

The spl.c source was entirely conditioned by CONFIG_SPL_BUILD.
Change this moving CONFIG_SPL_BUILD to be used in the Makefile,
which is slightly cleaner and more readable.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
4 years agoARM: imx: dh-imx6: Convert SPI support to DM
Marek Vasut [Fri, 17 May 2019 14:58:54 +0000 (16:58 +0200)]
ARM: imx: dh-imx6: Convert SPI support to DM

Enable DM SPI and SF support on DHCOM iMX6 PDK2.
Convert board code to match the DM support.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoARM: imx: dh-imx6: Convert USB support to DM
Marek Vasut [Fri, 17 May 2019 14:58:53 +0000 (16:58 +0200)]
ARM: imx: dh-imx6: Convert USB support to DM

Enable DM USB host support on DHCOM iMX6 PDK2.
Convert board code to match the DM support.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoARM: imx: dh-imx6: Convert SATA support to DM
Marek Vasut [Fri, 17 May 2019 14:58:52 +0000 (16:58 +0200)]
ARM: imx: dh-imx6: Convert SATA support to DM

Enable DM SATA support on DHCOM iMX6 PDK2.
Convert board code to match the DM support.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoARM: imx: dh-imx6: Convert SD/MMC support to DM
Marek Vasut [Fri, 17 May 2019 14:58:51 +0000 (16:58 +0200)]
ARM: imx: dh-imx6: Convert SD/MMC support to DM

Enable DM block and DM MMC support on DHCOM iMX6 PDK2.
Convert board code to match the DM support.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoARM: imx: dh-imx6: Enable DM GPIO
Marek Vasut [Fri, 17 May 2019 14:58:50 +0000 (16:58 +0200)]
ARM: imx: dh-imx6: Enable DM GPIO

Enable DM GPIO support on DHCOM iMX6 PDK2 and fix up board code
where applicable.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoARM: imx: dh-imx6: Enable DM pin control
Marek Vasut [Fri, 17 May 2019 14:58:49 +0000 (16:58 +0200)]
ARM: imx: dh-imx6: Enable DM pin control

Enable DM pin control support on DHCOM iMX6 PDK2.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoARM: dts: imx: dh-imx6: Fix SPI CS polarity on DHCOM iMX6 PDK2
Marek Vasut [Fri, 17 May 2019 14:58:48 +0000 (16:58 +0200)]
ARM: dts: imx: dh-imx6: Fix SPI CS polarity on DHCOM iMX6 PDK2

The SPI nCS signal is active low, make it so.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoARM: dts: imx: dh-imx6: Import DHCOM iMX6 PDK2 DTs from Linux
Marek Vasut [Fri, 17 May 2019 14:58:47 +0000 (16:58 +0200)]
ARM: dts: imx: dh-imx6: Import DHCOM iMX6 PDK2 DTs from Linux

Import DHCOM iMX6 PDK2 device tree from Linux 5.1.1 b724e9356404 .
Enable DT control in full U-Boot .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoRevert "drivers/crypto/fsl: assign job-rings to non-TrustZone"
Breno Matheus Lima [Tue, 4 Jun 2019 02:54:44 +0000 (02:54 +0000)]
Revert "drivers/crypto/fsl: assign job-rings to non-TrustZone"

Commit 22191ac35344 ("drivers/crypto/fsl: assign job-rings to
 non-TrustZone") breaks HABv4 encrypted boot support in the
following i.MX devices:

- i.MX6UL
- i.MX7S
- i.MX7D
- i.MX7ULP

For preparing a HABv4 encrypted boot image it's necessary to
encapsulate the generated DEK in a blob. In devices listed
above the blob generation function takes into consideration
the Job Ring TrustZone ownership configuration (JROWN_NS)
and can be only decapsulated by the same configuration.

The ROM code expects DEK blobs encapsulated by the Secure World
environments which commonly have JROWN_NS = 0.

As U-Boot is running in Secure World we must have JROWN_NS = 0
so the blobs generated by dek_blob tool can be decapsulated
by the ROM code.

Job-rings assignment is now handled in OP-TEE OS, this commit can
be safely reverted.
https://github.com/OP-TEE/optee_os/pull/2986

This reverts commit 22191ac353445ad8fafc5a78aefcd94e78963041.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
4 years agoconfig: Update KP's imx53 HSC config to pass key pressed information
Lukasz Majewski [Wed, 8 May 2019 14:26:23 +0000 (16:26 +0200)]
config: Update KP's imx53 HSC config to pass key pressed information

The information about pressed key is relevant in performing correct
update and recovery scenarios via USB pendrive.

This commit modifies envs to provide it.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
4 years agoconfig: Update KP's imx53 HSC config to support SWUpdate
Lukasz Majewski [Wed, 8 May 2019 14:26:22 +0000 (16:26 +0200)]
config: Update KP's imx53 HSC config to support SWUpdate

This commit updates envs responsible for using USB pendrive as a
SWUpdate based tool for recovery and update.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
4 years agoimx: Use a convenient default value for SYS_MALLOC_F_LEN
Fabio Estevam [Fri, 3 May 2019 17:05:04 +0000 (14:05 -0300)]
imx: Use a convenient default value for SYS_MALLOC_F_LEN

Commit 3a7c45f6a772 ("simple-bus: add DM_FLAG_PRE_RELOC flag to
simple-bus driver") causes some i.MX boards that were converted
to DM, such as warp7, to fail to boot.

As explained by Lukas Auer:

"With the patch, U-Boot probes the drivers for devices under simple-bus
device tree nodes in the pre-relocation device model. The default value
of CONFIG_SYS_MALLOC_F_LEN (0x400) leaves U-Boot with not enough memory to
do this, causing it to hang."

Fix this problem by providing a convenient default value for
CONFIG_SYS_MALLOC_F_LEN.

Reported-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Suggested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Heiko Schocher <hs@denx.de>
4 years agoopos6uldev: don't call enable_lcdif_clock
Sébastien Szymanski [Tue, 14 May 2019 11:46:20 +0000 (13:46 +0200)]
opos6uldev: don't call enable_lcdif_clock

The mxsfb driver already calls enable_lcdif_clock.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoopos6ul: set REFSEL and REFR fields
Sébastien Szymanski [Tue, 14 May 2019 11:33:46 +0000 (13:33 +0200)]
opos6ul: set REFSEL and REFR fields

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
4 years agoimx: hab: Increase CSF_SIZE for i.MX6 and i.MX7 devices
Breno Matheus Lima [Fri, 26 Apr 2019 02:56:48 +0000 (02:56 +0000)]
imx: hab: Increase CSF_SIZE for i.MX6 and i.MX7 devices

In certain i.MX devices the encrypted boot image is failing to boot.

According to AN12056 "Encrypted Boot on HABv4 and CAAM Enabled Devices"
it's necessary to pad CSF to 0x2000 and append DEK blob.

In this case the total image size in boot data structure must cover the
entire binary otherwise the dek_blob won't be copied to memory and image
won't be decrypted.

Increase CSF_SIZE to 0x4000 to avoid such issue when booting encrypted
boot images.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agocolibri-imx6ull: fix usb host mode
Marcel Ziswiler [Fri, 26 Apr 2019 18:48:14 +0000 (20:48 +0200)]
colibri-imx6ull: fix usb host mode

This fixes an issue with USB host mode.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agoARM: imx: apalis_imx6: Drop ad-hoc SATA binding
Marek Vasut [Sun, 12 May 2019 20:43:25 +0000 (22:43 +0200)]
ARM: imx: apalis_imx6: Drop ad-hoc SATA binding

Drop the ad-hoc AHCI binding code, this is superseded by
CONFIG_DWC_AHSATA_AHCI=y resp. drivers/ata/dwc_ahsata.c

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Max Krummenacher <max.krummenacher@toradex.com>
Cc: Stefan Agner <stefan.agner@toradex.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
4 years agoregulator: bd71837: copy the bd71837 pmic driver from NXP imx u-boot
Matti Vaittinen [Tue, 7 May 2019 07:43:39 +0000 (10:43 +0300)]
regulator: bd71837: copy the bd71837 pmic driver from NXP imx u-boot

https://source.codeaurora.org/external/imx/uboot-imx

cherry picked, styled and merged commits:
- MLK-18387 pmic: Add pmic driver for BD71837e9a3bec2e95a
- MLK-18590 pmic: bd71837: Change to use new fdt API: acdc5c297a96

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agocolibri_imx7: migrate usb to driver model
Igor Opaniuk [Fri, 10 May 2019 09:35:29 +0000 (12:35 +0300)]
colibri_imx7: migrate usb to driver model

Migrate USB to Driver Model (CONFIG_DM_USB=y).

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agoconfigs: imx6-engicam: Update the recoveryboot setting
Jagan Teki [Fri, 26 Apr 2019 09:01:46 +0000 (14:31 +0530)]
configs: imx6-engicam: Update the recoveryboot setting

Since recovery boot on mmc can get the mmcpart and mmcroot
dynamically, drop the static definitions and handle it
properly.

Tested-by: Shyam Saini <shyam.saini@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
4 years agotoradex apalis/colibri: extend CONFIG_SYS_MALLOC_F_LEN
Igor Opaniuk [Fri, 17 May 2019 14:48:43 +0000 (17:48 +0300)]
toradex apalis/colibri: extend CONFIG_SYS_MALLOC_F_LEN

Extend size of the malloc() pool for use before relocation, from 0x400
(default one) to 0x2000 (CONFIG_SYS_MALLOC_F_LEN=0x2000),
as adding of DM_FLAG_PRE_RELOC flag to simple-bus driver introduced a
regression on multiple boards, because of more intensive usage of malloc()
pool and therefore a broken boot as the size of pool isn't sufficient.

Fixes: 3a7c45f6a7 ("simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoapalis_imx6: add device tree to makefile
Marcel Ziswiler [Tue, 9 Apr 2019 15:21:48 +0000 (17:21 +0200)]
apalis_imx6: add device tree to makefile

Add device tree to Makefile to avoid newly introduced error:

Device Tree Source is not correctly specified.
Please define 'CONFIG_DEFAULT_DEVICE_TREE'
or build with 'DEVICE_TREE=<device_tree>' argument

make[1]: *** [dts/Makefile:28: arch/arm/dts/imx6-apalis.dtb] Error 1
make: *** [Makefile:1009: dts/dt.dtb] Error 2

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agoapalis/colibri imx6: provide proper fdtfile value
Igor Opaniuk [Thu, 23 May 2019 11:05:50 +0000 (11:05 +0000)]
apalis/colibri imx6: provide proper fdtfile value

Provide proper fdtfile env variable value before invoking distro_bootcmd
command.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agoARM: dts: i.MX6ULL: U-Boot specific dts for u-boot, dm-spl
Parthiban Nallathambi [Sun, 7 Apr 2019 18:32:42 +0000 (20:32 +0200)]
ARM: dts: i.MX6ULL: U-Boot specific dts for u-boot, dm-spl

u-boot,dm-spl property is specific to U-Boot, so created one
for i.MX6ULL platforms.

Signed-off-by: Parthiban Nallathambi <parthitce@gmail.com>
4 years agopower: pfuze100: Fix off by one error in voltage table handling
Trent Piepho [Thu, 4 Apr 2019 21:52:04 +0000 (21:52 +0000)]
power: pfuze100: Fix off by one error in voltage table handling

The code that sets a regulator by looking up the voltage in a table had
an off by one error.  vsel_mask is a bitmask, not the number of table
entries, so a vsel_mask value of 0x7 indicates there are 8, not 7,
entries in the table.

Cc: Peng Fan <Peng.Fan@freescale.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Trent Piepho <tpiepho@impinj.com>
4 years agomx7ulp: Add common plugin codes for mx7ulp
Ye Li [Thu, 16 May 2019 03:18:51 +0000 (03:18 +0000)]
mx7ulp: Add common plugin codes for mx7ulp

Add common plugin codes to call ROM's hwcnfg_setup and generate IVT2
header.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoboard: toradex: add colibri imx8qxp 2gb wb it v1.0b module support
Marcel Ziswiler [Fri, 31 May 2019 15:56:39 +0000 (18:56 +0300)]
board: toradex: add colibri imx8qxp 2gb wb it v1.0b module support

This commit adds initial support for the Toradex Colibri iMX8QXP 2GB WB
IT V1.0B module. Unlike the V1.0A early access samples exclusively
booting from SD card, they are now strapped to boot from eFuses which
are factory fused to properly boot from their on-module eMMC. U-Boot
supports either booting from the on-module eMMC or may be used for
recovery purpose using the universal update utility (uuu) aka mfgtools
3.0.

Functionality wise the following is known to be working:
- eMMC and MMC/SD card
- Ethernet
- GPIOs
- I2C

Unfortunately, there is no USB functionality for the i.MX 8QXP as of
yet.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agoimx: fix building for i.mx8 without spl
Marcel Ziswiler [Fri, 31 May 2019 15:56:38 +0000 (18:56 +0300)]
imx: fix building for i.mx8 without spl

Building with Travis CI complained and stopped with the following error:
+cc1: fatal error: opening output file spl/u-boot-spl.cfgout: No such
file or directory
+compilation terminated.

This fixes commit caceb739ea07 ("imx: build flash.bin for i.MX8") which
took SPL being enabled on i.MX8 for granted.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 years agoARM: imx6logic: Stop overwriting fdt_file if manually set
Adam Ford [Wed, 13 Mar 2019 15:49:22 +0000 (10:49 -0500)]
ARM: imx6logic: Stop overwriting fdt_file if manually set

The board file uses the processor type to determine what dtb file
is set.  Unfortunately, if the user wants to manually set this,
it get gets overwritten upon boot.  This patch adds a check to
see if the value is already set and only changes it if the value
is empty.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agospl: Correct SPL_SIZE_LIMIT Kconfig option
Tom Rini [Sat, 8 Jun 2019 00:39:32 +0000 (20:39 -0400)]
spl: Correct SPL_SIZE_LIMIT Kconfig option

When introduced this limit was an int but was then changed to hex
without noting as much in the prompt nor changing existing users.  Put
this back to an int.

Reported-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Fabio Estevam <festevam@gmail.com>
Fixes: 2577015dc5c4 ("spl: add overall SPL size check")
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge branch '2019-06-07-master-imports'
Tom Rini [Fri, 7 Jun 2019 22:03:18 +0000 (18:03 -0400)]
Merge branch '2019-06-07-master-imports'

- Include Heinrich's series to move the i.MX board size check function
  to be more widely available.
- Include Simon Goldschmidt's patch to make it possible to have a more
  accurate SPL size check applied.

4 years agospl: add overall SPL size check
Simon Goldschmidt [Fri, 24 May 2019 20:07:04 +0000 (22:07 +0200)]
spl: add overall SPL size check

This adds a size check for SPL that can dynamically check generated
SPL binaries (including devicetree) for a size limit that ensures
this image plus global data, heap and stack fit in initial SRAM.

Since some of these sizes are not available to make, a new host tool
'spl_size_limit' is added that dumps the resulting maximum size for
an SPL binary to stdout. This tool is used in toplevel Makefile to
implement the size check on SPL binaries.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agoconfigs: rk3288: Tinker Board SPL file must fit into 32 KiB
Heinrich Schuchardt [Tue, 2 Apr 2019 17:19:07 +0000 (19:19 +0200)]
configs: rk3288: Tinker Board SPL file must fit into 32 KiB

The SPL image for the Tinker Board has to fit into 32 KiB. This includes
up to 2 KiB for the file header.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoconfigs: define CONFIG_SPL_SIZE_LIMIT
Heinrich Schuchardt [Tue, 2 Apr 2019 17:19:06 +0000 (19:19 +0200)]
configs: define CONFIG_SPL_SIZE_LIMIT

A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
the board specific maximum size for the SPL file.

Use Makefile function size_check() to implement the test.

Depending on the size of CONFIG_SPL_SIZE_LIMIT an error like the following
is thrown:

spl/u-boot-spl.bin exceeds file size limit:
  limit:  30720 bytes
  actual: 33426 bytes
  excess: 2706 bytes
make: *** [Makefile:1663: spl/u-boot-spl.bin] Error 1

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoimx: move BOARD_SIZE_CHECK to main Makefile
Heinrich Schuchardt [Tue, 2 Apr 2019 17:19:05 +0000 (19:19 +0200)]
imx: move BOARD_SIZE_CHECK to main Makefile

We currently have duplicate definitions for BOARD_SIZE_CHECK in Makefile
and arch/arm/mach-imx/Makefile.

Move the board size check from arch/arm/mach-imx/Makefile to Makefile.

Depending on the value of CONFIG_BOARD_SIZE_LIMIT an error like an error
like the following is thrown:

u-boot-dtb.imx exceeds file size limit:
  limit:  503696 bytes
  actual: 509720 bytes
  excess: 6024 bytes
make: *** [Makefile:1051: u-boot-dtb.imx] Error 1

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoMakefile: reusable function for BOARD_SIZE_CHECK
Heinrich Schuchardt [Tue, 2 Apr 2019 17:19:04 +0000 (19:19 +0200)]
Makefile: reusable function for BOARD_SIZE_CHECK

Carve out function size_check from macro BOARD_SIZE_CHECK. This will allow
us to reuse the function for other file size checks.

Depending on the value of CONFIG_BOARD_SIZE_LIMIT an error like the
following is thrown:

u-boot-dtb.img exceeds file size limit:
  limit:  409516 bytes
  actual: 444346 bytes
  excess: 34830 bytes
make: *** [Makefile:1212: u-boot-dtb.img] Error 1

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agolib/vsprintf: allow printing upper case GUIDs
Heinrich Schuchardt [Mon, 29 Apr 2019 06:08:43 +0000 (08:08 +0200)]
lib/vsprintf: allow printing upper case GUIDs

In the UEFI context GUIDs are expected to be rendered in upper case.

The patch uses the formerly unused bit 1 of the parameter str_format
of function uuid_bin_to_str() to indicate if we need upper or lower case
output.

Function uuid_string() in vsprint.c is adjusted to correctly set the bit
depending on the print format code.

%pUb: 01020304-0506-0708-090a-0b0c0d0e0f10
%pUB: 01020304-0506-0708-090A-0B0C0D0E0F10
%pUl: 04030201-0605-0807-090a-0b0c0d0e0f10
%pUL: 04030201-0605-0807-090A-0B0C0D0E0F10

Up to this point only a diagnostic message in mount_ubifs() using '%pUB' is
concerned by the change. Further patches are needed to adjust the UEFI
subsystem.

A unit test is provided inside the ut_print command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMerge tag 'efi-2019-07-rc4-2' of git://git.denx.de/u-boot-efi
Tom Rini [Wed, 5 Jun 2019 19:53:18 +0000 (15:53 -0400)]
Merge tag 'efi-2019-07-rc4-2' of git://git.denx.de/u-boot-efi

Pull request for UEFI sub-system for v2019.07-rc4-2

Support for managing the non-volatile attribute of UEFI variables
is added though we do not have a backend for persistence yet.

Error messages for changes of UEFI variables are provided.

UEFI boottime service implementations are corrected.

4 years agoMerge branch '2019-06-05-master-imports'
Tom Rini [Wed, 5 Jun 2019 19:49:09 +0000 (15:49 -0400)]
Merge branch '2019-06-05-master-imports'

- More DaVinci fixes
- BuR platform fix

4 years agocmd/led: check subcommand "list" instead "l"
Heiko Schocher [Mon, 27 May 2019 06:14:16 +0000 (08:14 +0200)]
cmd/led: check subcommand "list" instead "l"

current implementation for checking if "led list"
command is called checks only if "l" is passed to the
led command. This prevents switching leds with name
which starts also with a "l". So check for passing
"list".

While at it, also fix a typo in led command usage.

Signed-off-by: Heiko Schocher <hs@denx.de>
4 years agoboard: am335x/mux: configure the pins for 8-bit data transfer on MMC1
Jean-Jacques Hiblot [Thu, 23 May 2019 12:07:23 +0000 (14:07 +0200)]
board: am335x/mux: configure the pins for 8-bit data transfer on MMC1

This is required for proper operation of the 8-bit data transfers.
This fixes transient errors seen on BeagleBone Black.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
4 years agoboard/km: update maintainer e-mail
Holger Brunck [Tue, 4 Jun 2019 12:10:32 +0000 (14:10 +0200)]
board/km: update maintainer e-mail

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
4 years agoarm: davinci: remove leftover assembly
Bartosz Golaszewski [Wed, 29 May 2019 08:02:00 +0000 (10:02 +0200)]
arm: davinci: remove leftover assembly

There are no more users of lowlevel_init.S. Remove the file.

Suggested-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
4 years agoconfigs/legoev3: define CONFIG_SKIP_LOWLEVEL_INIT
David Lechner [Wed, 29 May 2019 08:01:59 +0000 (10:01 +0200)]
configs/legoev3: define CONFIG_SKIP_LOWLEVEL_INIT

This adds a define for CONFIG_SKIP_LOWLEVEL_INIT in the legoev3 config.
On the EV3, U-Boot is loaded into RAM by another bootloader, so we
don't need the lowlevel init in U-Boot.

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
4 years agoARM: da850evm: Fix reading MAC from SPI
Adam Ford [Wed, 29 May 2019 14:36:58 +0000 (09:36 -0500)]
ARM: da850evm: Fix reading MAC from SPI

The MAC address is located at at the last 64K of SPI Flash, and
it's 6 bytes long.  This patch corrects both the length and
starting byte of the MAC address.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoarm: omap3: Manually initialize GPIO if OF_CONTROL doesn't
Adam Ford [Wed, 29 May 2019 20:42:53 +0000 (15:42 -0500)]
arm: omap3: Manually initialize GPIO if OF_CONTROL doesn't

The commong initialization code manually initializes the GPIO
even when OF_CONTROL does it, so we can reduce the code size a
bit by not doing it manually when we have device tree support.

Using the omap3_logic board (dm3730), the sizes shrunk:

Before:

   text    data     bss     dec     hex filename
 561066   28596  116880  706542   ac7ee u-boot
  55245    1605    1888   58738    e572 spl/u-boot-spl

After
  text    data     bss     dec     hex filename
 560898   28548  116872  706318   ac70e u-boot
  55121    1557    1888   58566    e4c6 spl/u-boot-spl

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoARM: DTS: imx6q-logicpd: Resync with Linux 5.1
Adam Ford [Fri, 31 May 2019 12:09:22 +0000 (07:09 -0500)]
ARM: DTS: imx6q-logicpd: Resync with Linux 5.1

Resync imx6q-logicpd with Kernel 5.1.5

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoARM: davinci: Remove ipam390 linker script from Kconfig
Adam Ford [Thu, 30 May 2019 23:04:44 +0000 (18:04 -0500)]
ARM: davinci: Remove ipam390 linker script from Kconfig

With ipam390 support removed in we can remove the reference to the
linker script since that case will never be true.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>