Commit Graph

46769 Commits

Author SHA1 Message Date
Fabio Estevam
a0046393da mx6slevk: Use PARTUUID to specify the rootfs location
mx6slevk can run different kernel versions, such as NXP 4.1 or mainline.

Currently the rootfs location is passed via mmcblk number and the
problem with this approach is that the mmcblk number for the SD
card changes depending on the kernel version.

In order to avoid such issue, use the UUID method to specify the
rootfs location.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-12 17:58:15 +02:00
Sven-Ola Tuecke
b2915ba25e drivers: pci: imx: fix imx_pcie_remove function
We have at least a minor count of boards, that failed to re-initialize
PCI express in the Linux kernel. Typical failure rate is 20% on affected
boards. This is mitigated by commit 6ecbe13756 ("drivers: pci: imx:
add imx_pcie_remove function").

However, at least on some i.MX6 custom boards, when calling
assert_core_reset() as part of the first-time PCIe init, read access
to PCIE_PL_PFLR simply hangs. Surround this readl() with
imx_pcie_fix_dabt_handler() does not help. For this reason, the forced
LTSSM detection is only used on the second assert_core_reset() that is
called shorly before starting the Linux kernel.

Signed-off-by: Sven-Ola Tuecke <sven-ola.tuecke@numberfour.eu>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: David Müller <d.mueller@elsoft.ch>
2017-10-12 17:56:28 +02:00
Fabio Estevam
066d97c733 wandboard: Add support for the latest revd1 revision
Latest wandboard hardware revision is revd1, which brings the following
new features:

- PFUZE100 PMIC
- AR8035 Ethernet PHY
- Upgrade Wifi/BT chip to BCM4339/BCM43430.

The detection mechanism is to probe the PMIC and when it is
found, then the revision of the board is revd1.

As the detection is done via PMIC, we need to print the board version
at a later stage via CONFIG_DISPLAY_BOARDINFO_LATE and also need
to disable CONFIG_DISPLAY_BOARDINFO, which is done much earlier.

Make the necessary adjustments for the AR8035 PHY to work on revd1.

Based on Richard Hu's work from Technexion's U-Boot tree.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-12 17:31:16 +02:00
Stefan Agner
accb428402 doc: update imx_usb_loader URL
The changes required to use U-Boot's Serial Download Protocol
implementation are now available in upstream imx_usb_loader
repository. Update the URL accordingly.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-10-12 17:31:16 +02:00
Ilya Ledvich
6963204c4c arm: imx7d: add support for Compulab cl-som-imx7
Add initial support for Compulab cl-som-imx7 SoM.
The initial support includes:
 - MMC
 - eMMC
 - SPI flash
 - I2C
 - FEC
 - USB
 - Serial console

Signed-off-by: Ilya Ledvich <ilya@compulab.co.il>
2017-10-12 17:31:16 +02:00
Uri Mashiach
c5c6f37a04 imx: mx7: SPL support for i.MX7
Add configuration file and spl_boot_device function for the i.MX7 SPL.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
2017-10-12 17:31:16 +02:00
Uri Mashiach
258bad41ac imx: mx7: DDR controller configuration for the i.MX7 architecture
The configuration files imximage.cfg are used for the DDR controller
configuration.
Add DDR configuration function to replace the DDR controller
configuration in the imximage.cfg file. The function can be used for
DDR size detection.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
2017-10-12 17:31:16 +02:00
Uri Mashiach
8bf2d77806 imx: mx7: fix the CCM_ macros
The CCM_ macros use the CCM_BASE_ADDRESS macro, which doesn't exist.
Replace the CCM_BASE_ADDRESS macros with CCM_BASE_ADDR.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
2017-10-12 17:31:16 +02:00
Jagan Teki
683a06b1dc icorem6_rqs: env: Return mmc devno
Instead of changing mmc devno from dts nodes better
to return the detected devno so-that env trigger the same.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-10-12 17:31:16 +02:00
Jagan Teki
913bdd65d3 icore: configs: Fix merge conflict issue
Fix for finding mmc devices on i.MX6Q icore boards
added in below comment
"icorem6: Fix to find MMC devices"
(sha1: a2b137b38d)

which is reverted in during u-boot-imx merge
" Merge git://git.denx.de/u-boot-imx"
(sha1: 6aee2ab68c)

This patch, is recreated to fix merge conflict.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-10-12 17:31:16 +02:00
Fabio Estevam
fadcf4811a topic_miami: Remove CONFIG_CMD_BOOTZ undef
CONFIG_CMD_BOOTZ option has been converted to defconfig, so there
is no need to undefine it in board config file anymore.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-12 17:31:16 +02:00
Diego Dorta
adaf7c9f13 mx6sabresd: Include <usb/ehci-ci.h> header file
When compiling with W=1 the following warning is observed:

board/freescale/mx6sabresd/mx6sabresd.c:586:5: warning: no previous prototype for ‘board_ehci_hcd_init’ [-Wmissing-prototypes] int board_ehci_hcd_init(int port)

Remove this warning by including <usb/ehci-ci.h>.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
2017-10-12 17:31:16 +02:00
Diego Dorta
2dcff642ef usb: ehci-ci: Add a prototype for board_ehci_power()
When compiling with W=1 the following warning is observed:

board/freescale/mx6sabresd/mx6sabresd.c:601:5: warning: no previous prototype for ‘board_ehci_power’ [-Wmissing-prototypes] int board_ehci_power(int port, int on)

Remove this warning by adding the function prototype into usb/ehci-ci.h file.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
2017-10-12 17:31:16 +02:00
Diego Dorta
adf9bd3b23 mx6sabresd: Include <asm/mach-imx/spi.h> header file
When compiling with W=1 the following warning is observed:

board/freescale/mx6sabresd/mx6sabresd.c:680:5: warning: no previous prototype for ‘board_spi_cs_gpio’ [-Wmissing-prototypes] int board_spi_cs_gpio(unsigned bus, unsigned cs)

Remove this warning by including <asm/mach-imx/spi.h>.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
2017-10-12 17:31:16 +02:00
Diego Dorta
c49fa34e5b mx6: soc: Include <asm/bootm.h> header file
When compiling with W=1 the following warning is observed:

arch/arm/mach-imx/mx6/soc.c:213:12: warning: no previous prototype for ‘get_board_rev’ [-Wmissing-prototypes] u32 __weak get_board_rev(void)

Fix the build warning by including <asm/bootm.h>.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
2017-10-12 17:31:16 +02:00
Fabio Estevam
d26e2c8453 mx7ulp_evk: Move CONFIG_CMD_BOOTZ to Kconfig
CONFIG_CMD_BOOTZ symbol does not work in board config file
anymore, so fix this by moving it to Kconfig.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2017-10-12 17:31:16 +02:00
Diego Dorta
9f272573b7 imx: sys_proto: Add a prototype for board_mmc_get_env_dev()
When compiling with W=1 the following warning is observed:

board/freescale/mx6sabresd/mx6sabresd.c:266:5: warning:
no previous prototype for ‘board_mmc_get_env_dev’
[-Wmissing-prototypes] int board_mmc_get_env_dev(int devno)

Remove this warning by adding the function prototype into sys_proto.h file.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-10-12 17:31:16 +02:00
Diego Dorta
7594c51ae6 imx: Include <input.h> header file
When building with W=1 errors like the one below is seen:

board/freescale/mx6sabresd/mx6sabresd.c:546:5: warning:
no previous prototype for ‘overwrite_console’
[-Wmissing-prototypes] int overwrite_console(void)

Fix the build warnings by including <input.h>.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-12 17:31:16 +02:00
Fabio Estevam
54ba383873 mx6: toradex: Remove custom CONFIG_SPL_PAD_TO definition
CONFIG_SPL_PAD_TO is already defined inside "imx6_spl.h", so there
is no need to redefine it in the board config files.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
2017-10-12 17:31:16 +02:00
Otavio Salvador
baf348fb36 mx25pdk: Remove duplicated define
The CONFIG_SYS_MMC_ENV_DEV is duplicated, drop it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2017-10-12 17:31:16 +02:00
Otavio Salvador
f3652c1888 mx25pdk: Use generic filesystem commands
This rework the board to use the generic filesystem commands instead
of forcing the use of FAT for the boot files.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2017-10-12 17:31:16 +02:00
Fabio Estevam
626365b4f7 README.imx6: Prefer loading SPL via the new SDP mechanism
Now that it is possible to load SPL and u-boot.img via imx_usb_loader
tool, mention this method instead of the old one that relied on ymodem.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-12 17:31:16 +02:00
Fabio Estevam
560a8af2f4 mx53loco: Let CONFIG_DISPLAY_CPUINFO be selected
With CONFIG_DISPLAY_CPUINFO=y we get a "Reset cause" line, which
brings important information of the reboot cause.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-12 17:31:16 +02:00
Anatolij Gustschin
38df370182 imx6: disable clock command and print_cpuinfo code in SPL
We do not use print_cpuinfo and clock command code in SPL,
disable it when building SPL image.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2017-10-12 17:30:32 +02:00
Fabio Estevam
464c988a1d colibri_imx6: Avoid calling setup_display() from SPL code
There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-12 17:30:32 +02:00
Fabio Estevam
f89bfe7c17 apalis_imx6: Avoid calling setup_display() from SPL code
There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-12 17:30:32 +02:00
Fabio Estevam
ae40e82eef mx6cuboxi: Avoid calling setup_display() from SPL code
There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-10-12 17:30:32 +02:00
Fabio Estevam
1b853e4793 wandboard: Avoid calling setup_display() from SPL code
There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-10-12 17:30:32 +02:00
Fabio Estevam
5e5b20c89f cgtqmx6eval: Avoid calling setup_display() from SPL code
There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-10-12 17:30:32 +02:00
Fabio Estevam
b5d959910b mx6sabresd: Avoid calling setup_display() from SPL code
There is no need call setup_display() from SPL code, so move it to
board_init(), which executes only in U-Boot proper.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-10-12 17:30:32 +02:00
Rob Clark
2d5dc2a52d efi_loader: console support for color attributes
Shell.efi uses this, and supporting color attributes makes things look
nicer.  Map the EFI fg/bg color attributes to ANSI escape sequences.
Not all colors have a perfect match, but spec just says "Devices
supporting a different number of text colors are required to emulate the
above colors to the best of the device’s capabilities".

Signed-off-by: Rob Clark <robdclark@gmail.com>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
[agraf: s/unsigned/unsigned int/]
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-10-12 17:24:25 +02:00
Rob Clark
bf19273e81 efi_loader: Add mem-mapped for fallback
When we don't have a real device/image path, such as 'bootefi hello',
construct a mem-mapped device-path.

This fixes 'bootefi hello' after devicepath refactoring.

Fixes: 95c5553ea2 ("efi_loader: refactor boot device and loaded_image handling")
Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-10-12 17:22:58 +02:00
Tom Rini
1b22c5ba49 Merge git://git.denx.de/u-boot-i2c 2017-10-11 08:38:20 -04:00
Chris Packham
5bc90a8953 i2c: muxes: pca954x: look up width from chip_desc
Commit 8e6eda7cda ("drivers/i2c/muxes/pca954x: Add pca9547 I2C mux
support") introduced a chip_desc for the pca954x devices but failed to
update pca954x_ofdata_to_platdata() to be aware of it. Make
pca954x_ofdata_to_platdata() lookup the chip_desc to validate the device
width.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Marek Behun <marek.behun@nic.cz>
2017-10-11 06:17:22 +02:00
Tom Rini
2ee87b0c1a Merge branch 'rmobile' of git://git.denx.de/u-boot-sh 2017-10-10 20:14:38 -04:00
Tuomas Tynkkynen
45c9d96ae4 configs: Re-sync CONFIG_CMD_IMLS with moveconfig
The option is specified in Kconfig, but still a few config header files
are overriding the choice by #undef'ing it. Re-sync the option with
moveconfig to rid of the #undefs.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-10-10 17:52:07 -04:00
Tuomas Tynkkynen
ad12dc1844 cmd: Toggle the default value of CONFIG_CMD_IMLS
Having this as a 'default y' is rather annoying because it doesn't
actually compile unless other options are defined in the board header:

../cmd/bootm.c: In function 'do_imls_nor':
../cmd/bootm.c:330:7: error: 'CONFIG_SYS_MAX_FLASH_BANKS' undeclared (first use in this function); did you mean 'CONFIG_SYS_MAX_FLASH_SECT'?
   i < CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {

Make it 'default n' so people who develop new boards that start from a
blank defconfig have one less compilation failure to debug.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-10-10 17:51:04 -04:00
Jonathan Gray
bcbc4a8046 efi_loader: don't increment part twice per loop
Correct a mistake in the part number handling of commit
16a73b249d and only increment part once
per loop.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-10-10 18:14:05 +02:00
Heinrich Schuchardt
984f251fee efi_loader: MAX_UTF8_PER_UTF16 = 3
The constant MAX_UTF8_PER_UTF16 is used to calculate
required memory when converting from UTF-16 to UTF-8.
If this constant is too big we waste memory.

A code point encoded by one UTF-16 symbol is converted to a
maximum of three UTF-8 symbols, e.g.

0xffff could be encoded as 0xef 0xbf 0xbf.
The first byte carries four bits, the second and third byte
carry six bits each.

A code point encoded by two UTF-16 symbols is converted to four
UTF-8 symbols.

So in this case we need a maximum of two UTF-8 symbols per
UTF-16 symbol.

As the overall maximum is three UTF-8 symobls per UTF-16 symbol
we need MAX_UTF8_PER_UTF16 = 3.

Fixes: 78178bb0c9 lib: add some utf16 handling helpers
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-10-10 10:01:27 +02:00
Jonathan Gray
16a73b249d efi_loader: search all possible disk partitions
When searching for partitions don't stop if a partition is not present
for a given partition number as there may be valid partitions after.

Search for up to MAX_SEARCH_PARTITIONS matching the other callers of
part_get_info().

This allows OpenBSD to boot via the efi_loader on rpi_3 again after
changes made after U-Boot 2017.09.  With MBR partitioning OpenBSD will
by default use the fourth partition for the 0xA6 (OpenBSD) partition.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-10-10 09:56:04 +02:00
Tom Rini
ebdd65258b Merge git://git.denx.de/u-boot-dm 2017-10-09 20:19:39 -04:00
Marek Vasut
17cf99a5bb ARM: rmobile: dts: Add SDR104/HS200 to Salvator-X
Add DT nodes to enable SDR104/HS200 modes on Salvator-X boards.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-10-10 08:22:54 +09:00
Marek Vasut
3219c77e58 ARM: rmobile: Fixup ULCB CPLD support after PFC rework
The ULCB CPLD support was not updated during the PFC table rework,
fix up the GPIO numbers until the CPLD support is rewritten to a
proper DM capable and DT probing driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2017-10-10 08:22:47 +09:00
Tom Rini
74d90d17ee Merge git://git.denx.de/u-boot-video 2017-10-09 13:31:33 -04:00
York Sun
23af484b01 armv8: ls1043ardb_sdcard: prepare falcon boot
Due to a conflict with recent Primary Protected Application (PPA),
PPA cannot be loaded for SPL stage, falcon boot is not enabled by
default. With compatible PPA image, to enable falcon boot, activate
these Kconfig options in defconfig
CONFIG_SPL_FIT=y
CONFIG_SPL_FSL_LS_PPA=y
CONFIG_SPL_GZIP=y
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_OS_BOOT=y
CONFIG_SPL_OF_LIBFDT=y

Because environment variables are not avaiable during SPL stage for
SD boot, set "boot_os=y" as default.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-09 08:48:45 -07:00
York Sun
b7234531db armv8: ls1043ardb: Enable spl_board_init() function
CONFIG_SPL_BOARD_INIT is used for SPL boot. Enable it in defconfig
for LS1043ARDB SPL targets.

Signed-off-by: York Sun <york.sun@nxp.com>
2017-10-09 08:48:45 -07:00
York Sun
fb97b8621e armv8: layerscape: Enable falcon boot
Add jump_to_image_linux() for arm64. Add "noreturn" flag to
armv8_switch_to_el2(). Add hooks to fsl-layerscape to enable falcon
boot.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Łukasz Majewski <lukma@denx.de>
Tested-by: Łukasz Majewski <lukma@denx.de>
2017-10-09 08:48:45 -07:00
York Sun
f554411bea armv8: ls1043ardb: Use static DDR setting for SPL boot
This board has soldered DDR chips. To reduce the SPL image size,
use static DDR setting instead of dynamic DDR driver.

Signed-off-by: York Sun <york.sun@nxp.com>
2017-10-09 08:48:45 -07:00
York Sun
7eb40f0f9d armv8: fsl-layerscape: Avoid running dram_init_banksize again
gd->ram_size is reduced in this function to reserve secure memory.
Avoid running this function again to further reduce memory size.
This fixes issue for SPL boot with PPA image loaded in which case
secure memory is incorrectly allocated due to repeated calling.

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-09 08:48:44 -07:00
York Sun
b65ac633f5 cmd: spl: fix compiling error when CONFIG_CMD_SPL_WRITE_SIZE not defined
CONFIG_CMD_SPL_WRITE_SIZE is used for writing parameters to non-volatile
storage. So far it is only used for NAND. Fix compiling error when this
macro is not used for SD.

Signed-off-by: York Sun <york.sun@nxp.com>
CC: Anatolij Gustschin <agust@denx.de>
2017-10-09 08:48:44 -07:00