platform/kernel/u-boot.git
5 years agoddr: altera: Stratix10: Add ECC memory scrubbing
Ley Foon Tan [Thu, 21 Mar 2019 17:24:05 +0000 (01:24 +0800)]
ddr: altera: Stratix10: Add ECC memory scrubbing

Scrub memory content if ECC is enabled and it is not
from warm reset boot.

Enable icache and dcache before scrub memory
and use "DC ZVA" instruction to clear memory
to zeros. This instruction writes a cache line
at a time and it can prevent false ECC error
trigger if write cache line partially.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
5 years agoarm: socfpga: stratix10: Add cpu_has_been_warmreset()
Ley Foon Tan [Thu, 21 Mar 2019 17:24:04 +0000 (01:24 +0800)]
arm: socfpga: stratix10: Add cpu_has_been_warmreset()

Add helper function cpu_has_been_warmreset() to check
if CPU is from warm reset boot.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
5 years agoarm: dts: Stratix10: Modify stratix10 socdk memory node
Ley Foon Tan [Thu, 21 Mar 2019 17:24:03 +0000 (01:24 +0800)]
arm: dts: Stratix10: Modify stratix10 socdk memory node

The stratix10 socdk ships with 4GB of memory.  Modify the
device tree to represent this.  Note that to access 4GB of
memory in Stratix 10, due to the IO space from 2GB to 4GB,
we use the fact that the DDR controller ignores upper address
bits outside of the configured DRAM's size.  This means that
, the 4GB DRAM is mapped to memory every 4GB.

For an 8GB memory, you can either live with the 2GB IO space,
and loose access to that memory from the processor, or use
the same trick:

Loose 2GB of memory:
        memory {
                device_type = "memory";
                /* 8GB */
/* first 2GB */
                reg = <0 0x00000000 0 0x80000000>,
/* last 4GB */
                      <1 0x00000000 1 0x00000000>;
                u-boot,dm-pre-reloc;
        };

or to map it all:
        memory {
                device_type = "memory";
                /* 8GB */
/* first 2GB */
                reg = <0 0x00000000 0 0x80000000>,
/* next 6GB */
                      <2 0x80000000 1 0x80000000>;
                u-boot,dm-pre-reloc;
        };

Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
5 years agoconfigs: stratix10: Change CONFIG_NR_DRAM_BANKS to 2
Ley Foon Tan [Thu, 21 Mar 2019 17:24:02 +0000 (01:24 +0800)]
configs: stratix10: Change CONFIG_NR_DRAM_BANKS to 2

Stratix10 maps dram in 2 address spans, from 0-2GB and from
2GB up to 128GB.

Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
5 years agoddr: altera: Stratix10: Add multi-banks DRAM size check
Ley Foon Tan [Thu, 21 Mar 2019 17:24:01 +0000 (01:24 +0800)]
ddr: altera: Stratix10: Add multi-banks DRAM size check

Stratix 10 maps dram from 0 to 128GB.  There is a 2GB hole
in the memory for peripherals and other IO from 2GB to 4GB.
However the dram controller ignores upper address bits for
smaller dram configurations.  Example: a 4GB dram
maps to multiple locations, every 4GB on the address.

Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
5 years agoddr: altera: stratix10: Move SDRAM size check to SDRAM driver
Ley Foon Tan [Thu, 21 Mar 2019 17:24:00 +0000 (01:24 +0800)]
ddr: altera: stratix10: Move SDRAM size check to SDRAM driver

Move SDRAM size check to SDRAM driver. sdram_calculate_size()
is called in SDRAM initialization already, avoid calling
twice in size check function.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
5 years agoarm: socfpga: implement proper peripheral reset
Simon Goldschmidt [Fri, 1 Mar 2019 19:12:36 +0000 (20:12 +0100)]
arm: socfpga: implement proper peripheral reset

This commit removes ad-hoc reset handling for peripheral resets from SPL
for socfpga gen5.

This is done because as U-Boot drivers support reset handling by now.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agospi: cadence_qspi: add reset handling
Simon Goldschmidt [Fri, 1 Mar 2019 19:12:35 +0000 (20:12 +0100)]
spi: cadence_qspi: add reset handling

This adds reset handling to the cadence qspi driver.

For backwards compatibility, only a warning is printed when failing to
get reset handles.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agomtd: rawnand: denali: add reset handling
Simon Goldschmidt [Fri, 1 Mar 2019 19:12:34 +0000 (20:12 +0100)]
mtd: rawnand: denali: add reset handling

This adds reset handling to the devicetree-enabled Denali NAND driver.

For backwards compatibility, only a warning is printed when failing to
get reset handles.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoarm: socfpga: move gen5 SDR driver to DM
Simon Goldschmidt [Tue, 16 Apr 2019 20:04:39 +0000 (22:04 +0200)]
arm: socfpga: move gen5 SDR driver to DM

To clean up reset handling for socfpga gen5, port the DDR driver to DM
using UCLASS_RAM and implement proper reset handling.

This gets us rid of one ad-hoc call to socfpga_per_reset().

The gen5 driver is implemented in 2 distinct files. One of it (containing
the calibration training) is not touched much and is kept at using
hard coded addresses since the code grows even more otherwise.

SPL is changed from calling hard into the DDR driver code to just
probing UCLASS_RESET and UCLASS_RAM. It is happy after finding a RAM
driver after that.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoreset: socfpga: add reset handling for old kernels
Simon Goldschmidt [Fri, 1 Mar 2019 19:12:32 +0000 (20:12 +0100)]
reset: socfpga: add reset handling for old kernels

This adds code to take peripherals out of reset based on an environment
variable. This is in preparation for removing the code that does this from
SPL.

However, some drivers even in current Linux cannot handle peripheral reset,
so until this works, we need a compatibility workaround.

This workaround is implemented in the 'assert' and 'remove' callbacks of
this reset driver: the 'assert' callback does not disable peripherals that
were already taken out of reset, while the 'remove' callback, which is
called on OS_PREPARE, deasserts all peripheral resets if the environment
variable "socfpga_legacy_reset_compat" is set to 1, which is what the gen5
SPL did up to now.

This is in preparation to clean up the SPL and implementing proper reset
handling for U-Boot.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoarm: socfpga: gen5: deassert peripheral reset by default
Simon Goldschmidt [Fri, 1 Mar 2019 19:12:31 +0000 (20:12 +0100)]
arm: socfpga: gen5: deassert peripheral reset by default

To keep the current behaviour of taking all peripherals out of reset
before booting the OS before removing that code from socfpga gen5 SPL,
this enables the new behaviour by default for all gen5 boards by adding
the environment variable "socfpga_legacy_reset_compat=1" to the default
environment.

This can be overridden in board config files or by saving an environment
without this variable enabled.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoreset: socfpga: rename membase ptr to modrst_base
Simon Goldschmidt [Fri, 1 Mar 2019 19:12:30 +0000 (20:12 +0100)]
reset: socfpga: rename membase ptr to modrst_base

The only member of this driver's priv struct is a pointer, which is
called 'membase'. However, since this driver handles multiple sub-
architectures, this is not the base address from dts but the base
address of some common registers of those sub-arches.

Reflect this better in sourcecode by renaming 'membase' to 'modrst_base'.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoarm: socfpga: gen5: add reset & sdr node to SPL devicetrees
Simon Goldschmidt [Fri, 1 Mar 2019 19:12:29 +0000 (20:12 +0100)]
arm: socfpga: gen5: add reset & sdr node to SPL devicetrees

The SPL for socfpga gen5 currently takes all peripherals out of reset
unconditionally. To implement proper reset handling for peripherals,
the reset node has to be provided with the SPL dts.

In preparation to move the DDR driver to DM, the sdr node is required
in SPL, too.

This patch adds "u-boot,dm-pre-reloc" to U-Boot specific dtsi addon
files so that the reset manager and SDR driver correctly probe in SPL.
It centralizes these settings into a common file since in contrast to
boot-type specific nodes, "soc", "rst" and "sdr" are always needed.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoarm: socfpga: gen5: sync devicetrees to Linux
Simon Goldschmidt [Fri, 1 Mar 2019 19:12:28 +0000 (20:12 +0100)]
arm: socfpga: gen5: sync devicetrees to Linux

This is again a sync to linux-next + pending patches in Dinh's tree at
commit 1c909b2dfe6a ("ARM: dts: socfpga: update more missing reset
properties")'

It adds missing peripheral reset properties to socfpga.dtsi and removes
U-Boot specific leftovers from socfpga_cyclone5_socrates.dts.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoMerge tag 'u-boot-imx-20190415' of git://git.denx.de/u-boot-imx
Tom Rini [Mon, 15 Apr 2019 11:31:14 +0000 (07:31 -0400)]
Merge tag 'u-boot-imx-20190415' of git://git.denx.de/u-boot-imx

Move to DM
-----------

- DM support in sata
- Toradex Board to DM
- wandboard to DM
- tbs2910 to DM
- GE boards to DM
- VHybrid boards to DM
- DM_VIDEO for i.MX

5 years agoMerge tag 'efi-2019-07-rc1-2' of git://git.denx.de/u-boot-efi
Tom Rini [Mon, 15 Apr 2019 11:30:25 +0000 (07:30 -0400)]
Merge tag 'efi-2019-07-rc1-2' of git://git.denx.de/u-boot-efi

Pull request for UEFI sub-system for v2019.07-rc1 (2)

In the aarch64 crash dump information about the loaded EFI images is added.

In README.uefi the development target is for the UEFI subsystem is
described as "Embedded Base Boot Requirements (EBBR) Specification"
compliance.

Several bug fixes are supplied.

5 years agoMerge tag 'video-for-2019.07-rc1' of git://git.denx.de/u-boot-video
Tom Rini [Mon, 15 Apr 2019 11:30:07 +0000 (07:30 -0400)]
Merge tag 'video-for-2019.07-rc1' of git://git.denx.de/u-boot-video

- optional backlight PWM polarity config via polarity cell
- bug fix for ASCII characters > 127
- ANSI sequence handling extensions (implement clear line,
  reverse video and relative cursor movement commands)
- preparation for doing character set translations
- left/right and up/down arrow keys translation to ANSI
  control sequences for cursor movement to fix selection
  with an USB keyboard in bootmenu
- CONFIG_SYS_WHITE_ON_BLACK font scheme configuration for
  sunxi boards

5 years agoboard: tbs2910: Remove CMD_FDT support in defconfig to reduce u-boot size
Soeren Moch [Sun, 14 Apr 2019 18:41:05 +0000 (20:41 +0200)]
board: tbs2910: Remove CMD_FDT support in defconfig to reduce u-boot size

This fixes the build failure "u-boot.imx exceeds file size limit".

Signed-off-by: Soeren Moch <smoch@web.de>
5 years agosunxi: allow boards to de-select SYS_WHITE_ON_BLACK font scheme
Andre Przywara [Sat, 23 Mar 2019 01:30:02 +0000 (01:30 +0000)]
sunxi: allow boards to de-select SYS_WHITE_ON_BLACK font scheme

In the sunxi-common.h config header we unconditionally define
CONFIG_SYS_WHITE_ON_BLACK, although it's actually a Kconfig option which
could be individually selected by a user.
Remove this #define from the header and let it default to "y" on sunxi
boards (like we do for other platforms).

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agousb: kbd: Properly translate up/down arrow keys
Andre Przywara [Sat, 23 Mar 2019 01:30:01 +0000 (01:30 +0000)]
usb: kbd: Properly translate up/down arrow keys

So far arrows key pressed on an USB keyboard got translated to some
low ASCII control sequences (Ctrl+N, Ctrl+P). Some programs understand
these codes, but the standard for those keys is to use ANSI control
sequences for cursor movement (ESC [ A).
Our own boot menu is a victim of this, currently we cannot change the
selection with an USB keyboard due to this.

Since we already implement a queue for USB key codes, we can just insert
the three character ANSI sequence into the key buffer. This fixes the
bootmenu, and is more universal for other users (UEFI) as well.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agovideo/console: Factor out actual character output
Andre Przywara [Sat, 23 Mar 2019 01:29:59 +0000 (01:29 +0000)]
video/console: Factor out actual character output

In preparation for doing character set translations, factor out the
actual glyph display functionality into a separate function.
This will be used in a subsequent patch.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agovideo/console: Implement ANSI clear line command
Andre Przywara [Sat, 23 Mar 2019 01:29:58 +0000 (01:29 +0000)]
video/console: Implement ANSI clear line command

There is a standard ANSI terminal escape sequence to clear a whole line
of text. So far the DM_VIDEO console was missing this code.

Detect the sequence and use vidconsole_set_row with the background
colour to fix this omission.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agovideo/console: Implement relative cursor movement ANSI handling
Andre Przywara [Sat, 23 Mar 2019 01:29:57 +0000 (01:29 +0000)]
video/console: Implement relative cursor movement ANSI handling

The ANSI terminal escapce sequence standard defines relative cursor
movement commands (ESC [ A-F). So far the DM_VIDEO console code was
ignoring them.

Interpret those sequences and move the cursor by the requested amount of
rows or columns in the right direction. This brings the code on par with
the legacy video console driver (cfb_console).

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agovideo/console: Implement reverse video ANSI sequence for DM_VIDEO
Andre Przywara [Sat, 23 Mar 2019 01:29:56 +0000 (01:29 +0000)]
video/console: Implement reverse video ANSI sequence for DM_VIDEO

The video console for DM_VIDEO compliant drivers only understands a very
small number of ANSI sequences. First and foremost it misses the "reverse
video" command, which is used by our own bootmenu command to highlight
the selected entry.

To avoid forcing people to use their imagination when using the
bootmenu, let's just implement the rather simple reverse effect. We need
to store the background colour index for that, so that we can
recalculate both the foreground and background colour pixel values.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[agust: merged BG color escape seq change to fix "ut dm video_ansi" test]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agovideo/console: Fix DM_VIDEO font glyph array indexing
Andre Przywara [Sat, 23 Mar 2019 01:29:55 +0000 (01:29 +0000)]
video/console: Fix DM_VIDEO font glyph array indexing

When the character to be printed on a DM_VIDEO console is from the
"extended ASCII" range (0x80 - 0xff), it will be treated as a negative
number, as it's declared as a signed char. This leads to negative array
indicies into the glyph bitmap array, and random garbled characters.

Cast the character to an unsigned type to make the index always positive
and avoid an out-of-bounds access.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agovideo: backlight: Parse PWM polarity cell
Stefan Mavrodiev [Fri, 12 Apr 2019 05:56:27 +0000 (08:56 +0300)]
video: backlight: Parse PWM polarity cell

This patch enables the reading of the polarity cell from a PWM
phandle and calls pwm_set_invert().

Not all platforms have polarity cell, so skip if it's not pressent.

Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Sun, 14 Apr 2019 04:03:06 +0000 (00:03 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

Conflicts:
arch/arm/dts/armada-385-amc.dts
arch/arm/dts/armada-xp-theadorable.dts
arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoimx6: wandboard: fix dwc_ahsata build errors when DM enabled
Anatolij Gustschin [Mon, 1 Apr 2019 12:32:08 +0000 (14:32 +0200)]
imx6: wandboard: fix dwc_ahsata build errors when DM enabled

Enable CONFIG_AHCI to fix errors:
drivers/ata/dwc_ahsata.c: In function `ahci_init_one':
drivers/ata/dwc_ahsata.c:868:21: error: `struct blk_desc' has no member named `priv'
sata_dev_desc[pdev].priv = uc_priv;
     ^
drivers/ata/dwc_ahsata.c: In function `init_sata':
drivers/ata/dwc_ahsata.c:891:30: error: `struct blk_desc' has no member named `priv'
uc_priv = sata_dev_desc[dev].priv;
...

Also enable DM_SCSI to fix migration build warning.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: dts: add wandboard dtb target to fix build error
Anatolij Gustschin [Mon, 1 Apr 2019 12:32:07 +0000 (14:32 +0200)]
imx6: dts: add wandboard dtb target to fix build error

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

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: tbs2910: fix dtb build error
Anatolij Gustschin [Mon, 1 Apr 2019 12:45:45 +0000 (14:45 +0200)]
imx6: tbs2910: fix dtb build error

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

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoapalis/colibri_imx6: add device trees to makefile
Marcel Ziswiler [Mon, 25 Mar 2019 16:38:02 +0000 (17:38 +0100)]
apalis/colibri_imx6: add device trees to makefile

Add device trees 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>
5 years agoimx: aristainetos: fix build breakage
Anatolij Gustschin [Mon, 1 Apr 2019 09:32:07 +0000 (11:32 +0200)]
imx: aristainetos: fix build breakage

ipu.h header is not found since the ipuv3 driver was moved to
the drivers/video/imx subdirectory. Fix it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agotdx-cfg-block: fix off by one issue
Marcel Ziswiler [Mon, 25 Mar 2019 16:18:29 +0000 (17:18 +0100)]
tdx-cfg-block: fix off by one issue

Fix toradex_modules array off by one issue potentially leading to
spurious printout during boot e.g.

    Model: Toradex  V1.2A,

instead of

    Model: Toradex UNKNOWN MODULE V1.2A.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agotoradex: common: unify behaviour when config block is missing
Bhuvanchandra DV [Mon, 25 Mar 2019 16:18:28 +0000 (17:18 +0100)]
toradex: common: unify behaviour when config block is missing

If the config block is missing, various things may fail or behave
strangely on certain modules. This patch unifies that behaviour by
using a fake MAC address, until user updates the config block.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agotoradex: configblock: add an -y parameter to 'cfgblock create’
Dominik Sliwa [Mon, 25 Mar 2019 16:18:27 +0000 (17:18 +0100)]
toradex: configblock: add an -y parameter to 'cfgblock create’

Add an optional -y parameter to 'cfgblock create’ to simplify
automation.

Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: fix sdboot for vybrid modules
Gerard Salvatella [Mon, 25 Mar 2019 16:25:12 +0000 (17:25 +0100)]
colibri_vf: fix sdboot for vybrid modules

Currently, Vybrid's sdboot variable tries to load the kernel from /boot
of the root partition (typically second partition when using the sdcard
image). However, since we moved to flash the kernel in a separate UBI
volume, we no longer deploy the kernel/device tree to /boot, hence
sdboot does not work in its current state.

Load the kernel and device tree from the first (typically FAT) partition
as customary on all Toradex modules.

While at it also change from rw to ro as e.g. systemd will re-mount the
root file system rw anyway after checking it.

Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: use leveling evaluated by DDR validation tools
Stefan Agner [Mon, 25 Mar 2019 16:25:11 +0000 (17:25 +0100)]
colibri_vf: use leveling evaluated by DDR validation tools

The DDR validation tool (which is part of Processor Expert) allows
to evaluate leveling parameters for CR105/CR106/CR110. Several
runs have been made with Colibri VF50 and VF61 and it seems to
evaluate very similar values. Use this values by default.

Note: The newly evaluated parameters seem to require CTLUPD_AREF
to be enabled!

Note 2: The tool also evaluated 6 as a new value for PHY02/18
GATE_CFG (Coarse adjust of gate open time). However, this seems
not to work in practise.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_vf: adjust timing according to data sheet
Stefan Agner [Mon, 25 Mar 2019 16:25:10 +0000 (17:25 +0100)]
colibri_vf: adjust timing according to data sheet

Using the DDR Validation tool in Processor Expert uncovered two
timing inconsistencies. Since those timings are related to the
suspend mode they do not affect or change regular memory behaviour.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoarm: vf610: add uart2 clock/pinmux support
Stefan Agner [Mon, 25 Mar 2019 16:25:09 +0000 (17:25 +0100)]
arm: vf610: add uart2 clock/pinmux support

Add support for Vybrid's UART2 (Colibri UART_B).

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoconfig: colibri_vf: enable mtd partitions via dt
Stefan Agner [Mon, 25 Mar 2019 16:25:08 +0000 (17:25 +0100)]
config: colibri_vf: enable mtd partitions via dt

Use device tree to set MTD partitions of the NAND chip.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: disable undefined instruction events in user debug
Stefan Agner [Mon, 25 Mar 2019 16:25:07 +0000 (17:25 +0100)]
colibri_vf: disable undefined instruction events in user debug

It turns out that OpenSSL calls undefined instructions to detect
ARM capabilities at runtime (via SIGILL handler). This leads to
stack traces e.g. when logging in using SSH:
  [  877.464442] sshd (613): undefined instruction: pc=76ee2da8
  ...

Disable undefined instruction events since it is used as an
autodetecion mechanism.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: enable user debug by default
Stefan Agner [Mon, 25 Mar 2019 16:25:06 +0000 (17:25 +0100)]
colibri_vf: enable user debug by default

Let the kernel print some debug messages when a user program
crashes due to an exception.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: sync the board info message
Bhuvanchandra DV [Mon, 25 Mar 2019 16:25:05 +0000 (17:25 +0100)]
colibri_vf: sync the board info message

Use similar info message as on other modules.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: set fdtfile for distroboot
Stefan Agner [Mon, 25 Mar 2019 16:25:04 +0000 (17:25 +0100)]
colibri_vf: set fdtfile for distroboot

Set fdtfile to represent the current board. This allows distribution
to load the correct device tree, which in the module case often
deviates from the common fallback ${soc}-${board}${boardver}.dtb...

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: add distroboot support
Stefan Agner [Mon, 25 Mar 2019 16:25:03 +0000 (17:25 +0100)]
colibri_vf: add distroboot support

Add support for distro boot. This is especially helpful for external
devices. There is a global boot command which scans a predefined
list of boot targets:
  run distro_bootcmd

As well as direct boot commands such as:
  run bootcmd_mmc0
  run bootcmd_usb
  run bootcmd_dhcp
  ...

Refer to doc/README.distro fo details.

While at it also re-order boot command macros as well as the
CONFIG_EXTRA_ENV_SETTINGS.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoconfig: colibri_vf: use macros from linux/sizes.h
Marcel Ziswiler [Mon, 25 Mar 2019 16:25:02 +0000 (17:25 +0100)]
config: colibri_vf: use macros from linux/sizes.h

Use SZ_X{MK} macros from linux/sizes.h for include/configs/colibri_vf.h.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: migrate fec, esdhc, nfc and usb to driver model
Marcel Ziswiler [Mon, 25 Mar 2019 16:25:01 +0000 (17:25 +0100)]
colibri_vf: migrate fec, esdhc, nfc and usb to driver model

Migrate FEC, ESDHC, NFC and USB to driver model.

While at it also do no longer enable optional I2C clock in board file as
the generic clock code now handles this. Note for space reason and as
it is not required just for booting we do not enable I2C in U-Boot by
default.

While at it also update copyright period.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: migrate pinctrl and regulators to dtb/dm
Marcel Ziswiler [Mon, 25 Mar 2019 16:25:00 +0000 (17:25 +0100)]
colibri_vf: migrate pinctrl and regulators to dtb/dm

Migrate pinctrl and regulators to device tree resp. driver model: DDR,
DSPI, ENET, ESDHC, I2C, NFC and UART.

Enable CMD_DM, PINCTRL and DM_REGULATOR.

While at it also update copyright period and sort include files.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoconfigs: colibri_vf: disable obscure options
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:59 +0000 (17:24 +0100)]
configs: colibri_vf: disable obscure options

Disable more obscure options to save another 26 KB in preparation of
the upcoming driver model migration.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoARM: dts: colibri_vf: update device trees
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:58 +0000 (17:24 +0100)]
ARM: dts: colibri_vf: update device trees

Update device tree in preparation of further driver model migration:
Ethernet FEC, ESDHC aka MMC/SD card, I2C, NFC aka NAND flash controller,
USBH_PEN GPIO regulator.

Add iomux resp. pinctrl entries to be removed from proprietary platform
data: DSPI, ESDHC, FEC, I2C, NFC, UART, USBH_PEN GPIO.

Introduce a U-Boot specific device tree with some required
u-boot,dm-pre-reloc properties: soc, aips0, pinctrl_ddr and uart0 incl.
pinctrl.

While at it also update the MAINTAINERS file.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoconfigs: move CONFIG_MXC_OCOTP to Kconfig
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:57 +0000 (17:24 +0100)]
configs: move CONFIG_MXC_OCOTP to Kconfig

While commit 3e020f03e94f ("driver: misc: add MXC_OCOTP Kconfig entry")
introduced a Kconfig entry it did not actually migrate all
configurations to using it.

As CONFIG_MXC_OCOTP was in mx{6/7}_common.h enable it by default on
those architectures. Additionally, also enable it on ARCH_IMX8M and
ARCH_VF610 where all current members enabled it through their legacy
configuration header files.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agoconfigs: colibri_vf: limit size of malloc() pool before relocation
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:56 +0000 (17:24 +0100)]
configs: colibri_vf: limit size of malloc() pool before relocation

Limit the size of the malloc() pool before relocation
(SYS_MALLOC_F_LEN).

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoconfigs: colibri_vf: remove obsolete mmc/sd card environment
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:55 +0000 (17:24 +0100)]
configs: colibri_vf: remove obsolete mmc/sd card environment

Remove obsolete MMC/SD card environment configuration dating back to
un-fused samples times.

While at it also remove meanwhile spurious "USB Storage" comment.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoconfigs: move CONFIG_USB_EHCI_VF to Kconfig
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:54 +0000 (17:24 +0100)]
configs: move CONFIG_USB_EHCI_VF to Kconfig

Move CONFIG_USB_EHCI_VF to drivers/usb/host/Kconfig and update the one
and only user thereof being colibri_vf.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoimx: bootaux: add dependency on vf610
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:53 +0000 (17:24 +0100)]
imx: bootaux: add dependency on vf610

Allow using bootaux also on VF610 aka Vybrid.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agovf610: ddrmc: add missing include
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:52 +0000 (17:24 +0100)]
vf610: ddrmc: add missing include

The DDR memory controller include file for the Vybrid uses
iomux_v3_cfg_t without actually including iomux-vf610.h.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoAdd missing space in comment
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:51 +0000 (17:24 +0100)]
Add missing space in comment

Spotted two missing spaces in comments.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoimx6: wandboard: convert to DM_MMC
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:47 +0000 (23:29 +0100)]
imx6: wandboard: convert to DM_MMC

Move SDHC init to SPL code since it is not required with
DM_MMC. Enable DM_MMC support.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: wandboard: convert to DM_I2C
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:46 +0000 (23:29 +0100)]
imx6: wandboard: convert to DM_I2C

Allow building with DM_I2C enabled.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: wandboard: convert to DM_PMIC
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:45 +0000 (23:29 +0100)]
imx6: wandboard: convert to DM_PMIC

Enable DM_PMIC_PFUZE100 driver and add PMIC description to DTS.
Rework power_init_board() code.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: wandboard: convert to DM_VIDEO
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:44 +0000 (23:29 +0100)]
imx6: wandboard: convert to DM_VIDEO

Enable DM_VIDEO in defconfig.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: wandboard: convert to DM_USB
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:43 +0000 (23:29 +0100)]
imx6: wandboard: convert to DM_USB

Drop CONFIG_USB_MAX_CONTROLLER_COUNT and enable DM_USB
in defconfig.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: wandboard: convert to DM_GPIO and enable pinctrl driver
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:42 +0000 (23:29 +0100)]
imx6: wandboard: convert to DM_GPIO and enable pinctrl driver

Enable DM_GPIO and pinctrl in defconfig and add gpio_request()
calls where required.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: wandboard: add device tree
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:41 +0000 (23:29 +0100)]
imx6: wandboard: add device tree

Add device trees from Linux in preparation for driver model
conversions.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agomx6sabreauto: convert to DM_VIDEO
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:40 +0000 (23:29 +0100)]
mx6sabreauto: convert to DM_VIDEO

Enable DM_VIDEO in defconfig.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agomx6sabresd: convert to DM_VIDEO
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:39 +0000 (23:29 +0100)]
mx6sabresd: convert to DM_VIDEO

Enable DM_VIDEO in defconfig.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agocolibri_imx6: convert to DM_VIDEO
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:38 +0000 (23:29 +0100)]
colibri_imx6: convert to DM_VIDEO

Enable DM_VIDEO in defconfig.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: ge_bx50v3: convert to DM_VIDEO
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:37 +0000 (23:29 +0100)]
imx6: ge_bx50v3: convert to DM_VIDEO

Enable DM_VIDEO in defconfig.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: icore: convert to DM_VIDEO
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:36 +0000 (23:29 +0100)]
imx6: icore: convert to DM_VIDEO

Enable DM_VIDEO in defconfigs.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoapalis_imx6: convert to DM_VIDEO
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:35 +0000 (23:29 +0100)]
apalis_imx6: convert to DM_VIDEO

Enable DM_VIDEO in defconfig.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: dts: add 'u-boot, dm-pre-reloc' to soc and ipu nodes
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:34 +0000 (23:29 +0100)]
imx6: dts: add 'u-boot, dm-pre-reloc' to soc and ipu nodes

u-boot,dm-pre-reloc is required for reserving video memory
when binding DM_VIDEO driver.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx: move CONFIG_VIDEO_IPUV3 to defconfigs
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:33 +0000 (23:29 +0100)]
imx: move CONFIG_VIDEO_IPUV3 to defconfigs

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agovideo: move ipuv3 files to subdirectory
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:32 +0000 (23:29 +0100)]
video: move ipuv3 files to subdirectory

Place ipuv3 files and headers in custom driver subdirectory.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agovideo: ipuv3: add DM_VIDEO support
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:31 +0000 (23:29 +0100)]
video: ipuv3: add DM_VIDEO support

Extend the driver to build with DM_VIDEO enabled. DTS files
must additionally include 'u-boot,dm-pre-reloc' property in
soc and ipu nodes to enable driver binding to ipu device.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoboard: tbs2910: Convert mmc to driver model
Soeren Moch [Fri, 1 Mar 2019 12:11:01 +0000 (13:11 +0100)]
board: tbs2910: Convert mmc to driver model

So we don't need to duplicate settings from the device tree in the board file.

Signed-off-by: Soeren Moch <smoch@web.de>
5 years agoboard: tbs2910: Convert sata to ahci driver model
Soeren Moch [Fri, 1 Mar 2019 12:11:00 +0000 (13:11 +0100)]
board: tbs2910: Convert sata to ahci driver model

While at it, also configure 64-bit LBA support.

Signed-off-by: Soeren Moch <smoch@web.de>
5 years agoata: dwc_ahsata: Add ahci driver model support
Soeren Moch [Fri, 1 Mar 2019 12:10:59 +0000 (13:10 +0100)]
ata: dwc_ahsata: Add ahci driver model support

Disable this support for cm_fx6 to avoid breakage.

Signed-off-by: Soeren Moch <smoch@web.de>
5 years agoata: dwc_ahsata: Fix sector reports for large disks
Soeren Moch [Fri, 1 Mar 2019 12:10:58 +0000 (13:10 +0100)]
ata: dwc_ahsata: Fix sector reports for large disks

Do not report negative sector numbers for disks > 1TB, do not limit
sector numbers to 32 bit if CONFIG_SYS_64BIT_LBA is enabled.

Signed-off-by: Soeren Moch <smoch@web.de>
5 years agoboard: tbs2910: Convert i2c and rtc to driver model
Soeren Moch [Fri, 1 Mar 2019 12:10:57 +0000 (13:10 +0100)]
board: tbs2910: Convert i2c and rtc to driver model

So we don't need to duplicate settings from the device tree in the board file.

Signed-off-by: Soeren Moch <smoch@web.de>
5 years agoboard: tbs2910: Convert usb to driver model
Soeren Moch [Fri, 1 Mar 2019 12:10:56 +0000 (13:10 +0100)]
board: tbs2910: Convert usb to driver model

So we don't need to duplicate settings from the device tree in the board file.

Signed-off-by: Soeren Moch <smoch@web.de>
5 years agoboard: tbs2910: Add pinctrl driver and convert gpio to driver model
Soeren Moch [Fri, 1 Mar 2019 12:10:55 +0000 (13:10 +0100)]
board: tbs2910: Add pinctrl driver and convert gpio to driver model

We need this for additional driver model conversions.

Signed-off-by: Soeren Moch <smoch@web.de>
5 years agoboard: tbs2910: Add device tree
Soeren Moch [Fri, 1 Mar 2019 12:10:54 +0000 (13:10 +0100)]
board: tbs2910: Add device tree

... as preparation for additional driver model coonversions.

We use CONFIG_OF_EMBED here to keep u-boot.imx as final binary name. So we
maintain compatibility with the original TBS u-boot and available HOWTOs
for u-boot updates.

Signed-off-by: Soeren Moch <smoch@web.de>
5 years agoboard: tbs2910: Remove efi loader support in defconfig to reduce u-boot size
Soeren Moch [Fri, 1 Mar 2019 12:10:53 +0000 (13:10 +0100)]
board: tbs2910: Remove efi loader support in defconfig to reduce u-boot size

Signed-off-by: Soeren Moch <smoch@web.de>
5 years agoboard: colibri_imx6: check for and report ecc errors in fuses
Gerard Salvatella [Fri, 8 Feb 2019 17:42:29 +0000 (18:42 +0100)]
board: colibri_imx6: check for and report ecc errors in fuses

The PMIC on the Colibri iMX6 may have ECC errors in fuses that will
prevent correct settings. Up to one bit error per fuse bank can be
reported and corrected by the ECC logic. Two bit errors can only be
reported.

Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx6: added nreset gpio on reboot
Gerard Salvatella [Fri, 8 Feb 2019 17:42:28 +0000 (18:42 +0100)]
colibri_imx6: added nreset gpio on reboot

RGMII_RD1 pin (active high, GPIO6_IO27) is triggered on reboot during
the SPL phase. This asserts (active low) nReset_Out from the PMIC.
Only V1.1 and later Colibri iMX6 modules implement this in hw. Previous
versions do not use this pin, so it is safe to leave it enabled at all
times.

Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx6: switch to zimage
Bhuvanchandra DV [Fri, 8 Feb 2019 17:42:27 +0000 (18:42 +0100)]
colibri_imx6: switch to zimage

Switch to the generic compressed Kernel image type (zImage) instead of
the U-Boot specific uImage format.

While at it also fix device tree naming for MMC DFU.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx6: use SDP if USB serial downloader has been used
Stefan Agner [Fri, 8 Feb 2019 17:42:26 +0000 (18:42 +0100)]
colibri_imx6: use SDP if USB serial downloader has been used

In case USB serial downloader has been used to load U-Boot start the
serial download protocol (SDP) emulation. This allows to download
complete images such as Toradex Easy Installer over USB SDP as well.
This code uses the boot ROM provided boot information to reliably
detect USB serial downloader.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoconfigs: colibri_imx6: Use ext4 file system by default
Sanchayan Maity [Fri, 8 Feb 2019 17:42:25 +0000 (18:42 +0100)]
configs: colibri_imx6: Use ext4 file system by default

Use ext4 file system by default.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agotoradex: colibri_imx6: overwrite CMA memory set in device tree
Bhuvanchandra DV [Fri, 8 Feb 2019 17:42:24 +0000 (18:42 +0100)]
toradex: colibri_imx6: overwrite CMA memory set in device tree

Make sure CMA memory is not greater than 50% of available physical
memory.

Allow user to change the CMA memory via 'cma-size' U-Boot environment
variable.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx6: revert fuse value set in mfgr_fuse
Max Krummenacher [Fri, 8 Feb 2019 17:42:23 +0000 (18:42 +0100)]
colibri_imx6: revert fuse value set in mfgr_fuse

We have two commands to change the bootmode fuses:
mfgr_fuse which set fuse 0/5 and 0/6
and
updt_fuse which burns bit 4 of 0/5.

Before Image 2.6 we fused in mfgr_fuse 0x5062, which boots
from the user partition of the eMMC.
To workaround certain hangs we moved to fastboot mode and
using the first bootpartition of the eMMC requiring a fuse
value of 0x5072 which could be achived by the then added
updt_fuse command. At the same time the mfgr_fuse command
was changed to also fuse 0x5072, revert that second change
so that one can fuse both values, one with just mfgr_fuse
and the later with mfgr_fuse;updt_fuse.

Note that the mfgr_fuse command is only needed at module
production time, a customer might need to use updt_fuse
when upgrading an older module to be compatible with a
newer image. The command is integrated into the image
update scripts.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx6: change pmic fusing according to hw 1.1 requirements
Max Krummenacher [Fri, 8 Feb 2019 17:42:22 +0000 (18:42 +0100)]
colibri_imx6: change pmic fusing according to hw 1.1 requirements

Colibri iMX6 V1.1 HW can use the PMIC GEN3 to power the NVCC_SD1.
Change the settings fused into the PMIC's OTP to powerup with
GEN3 set to output 3.3V.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri imx6: disable ri and dcd irq in uarts
Max Krummenacher [Fri, 8 Feb 2019 17:42:21 +0000 (18:42 +0100)]
colibri imx6: disable ri and dcd irq in uarts

If the UART is used in DTE mode the RI and DCD bits in UCR3 become
irq enable bits. Both are set to enabled after reset and both likely
are pending.

Disable the bits also on UARTs not used in the boot loader to prevent
an interrupt storm when Linux enables the UART interrupts.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri imx6: pf0100: reorder and cleanup message printing
Max Krummenacher [Fri, 8 Feb 2019 17:42:20 +0000 (18:42 +0100)]
colibri imx6: pf0100: reorder and cleanup message printing

Keep debug code at the end of the function.
Use a one line informational message for the PMIC only.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx6: unify sd/mmc drive strenght with linux kernel settings
Max Krummenacher [Fri, 8 Feb 2019 17:42:19 +0000 (18:42 +0100)]
colibri_imx6: unify sd/mmc drive strenght with linux kernel settings

In the linux device tree we use 40Ohm drive strenght. So use the same
value in U-Boot.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx6: add distroboot support
Stefan Agner [Fri, 8 Feb 2019 17:42:18 +0000 (18:42 +0100)]
colibri_imx6: add distroboot support

Add support for distro boot. This is especially helpful for external
devices. There is a global boot command which scans a predefined
list of boot targets:
  run distro_bootcmd

As well as direct boot commands such as:
  run bootcmd_mmc1
  run bootcmd_usb
  run bootcmd_dhcp
  ...

Refer to doc/README.distro fo details.

While at it, remove the CONFIG_DRIVE_TYPES define which has not
been used and was meant to be used for multi device boot support
which is now provided by distroboot.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx6: print also 64-bit IT
Max Krummenacher [Fri, 8 Feb 2019 17:42:17 +0000 (18:42 +0100)]
colibri_imx6: print also 64-bit IT

Print also for Colibri iMX6 512MB IT with 64-bit RAM bus.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx6: drop CONFIG_OF_SYSTEM_SETUP
Max Krummenacher [Fri, 8 Feb 2019 17:42:16 +0000 (18:42 +0100)]
colibri_imx6: drop CONFIG_OF_SYSTEM_SETUP

This doesn't do anything anymore, probably never did.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx6: migrate usb to using driver model
Marcel Ziswiler [Fri, 8 Feb 2019 17:42:15 +0000 (18:42 +0100)]
colibri_imx6: migrate usb to using driver model

Migrate USB to using driver model.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx6: migrate mmc to using driver model
Marcel Ziswiler [Fri, 8 Feb 2019 17:42:14 +0000 (18:42 +0100)]
colibri_imx6: migrate mmc to using driver model

Migrate MMC to using driver model.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>