Commit Graph

37402 Commits

Author SHA1 Message Date
Tim Harvey
385575bcb6 imx: ventana: add GW553x support
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:26:12 +02:00
Tim Harvey
fe63fcb6ca imx: ventana: remove several EEPROM config bit dependence
Removed several EEPROM bit dependencies:
 - for dt aliases that don't exist and thus don't ever do anything
   (pcie,lvds1,uart*,vpu,csi*,hdmi_in,hdmi_out,cvbs_in,cvbs_out,gps)
 - for features that don't effect bus ordering or have no detrimental affect
   if erroneously enabled when not present (ahci,nand,i2c*)
 - for features that have little to no impact on being erroneously enabled
   but high impact if erroneously disabled (can*, spi*)
 - for features that have an high adverse affect of not being set when they
   should and no adverse affect of being set when they
   shouldn't (ipu*).

Removing these means the following:
 - these no longer are supported with the econfig command
 - these no longer affect the device-tree in any way

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:26:00 +02:00
Tim Harvey
5c55572ff7 imx: ventana: remove dependence on EECONFIG_SATA eeprom feature bit
The MSATA feature is a board-specific feature on Gateworks Ventana boards.

In most cases a 2:1 mux will steer either PCIe or SATA to a miniPCIe socket
through an MSATA_EN gpio. In these such cases assign the gpio in the board
specific struct and use its presence to determine if we default the GPIO to
PCIe and if we later steer it according to hwconfig.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:25:47 +02:00
Tim Harvey
f17a9af846 imx: ventana: enable pwm device-tree property based on hwconfig
Most Ventana boards have a connector with off-board digital-I/O signals
including some that can be pinmuxed as either a PWM or a GPIO. The hwconfig
env variable is used to configure these and they will be pinmuxed according
to this configuration in the bootloader.

This patch adds a device-tree fixup that will enable the pwm controller
nodes appropriately for digital-I/O's that are configured as pwm via hwconfig
so that the pin can be used with the Linux kernel /sys/class/pwm API.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:25:31 +02:00
Tim Harvey
83e00f193e imx: ventana: fix invalid dio configuration for pwm mode
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:25:16 +02:00
Tim Harvey
7853262330 imx: ventana: export backlight gpio after gpio driver is available
Calling request_gpio to register bklt_gpio with the GPIO driver had no effect
in setup_display called from early board init (although pinmuxing it and
configuring it as output-low does do what it should). Therefore move the
request_gpio later in enable_lvds so that its registered for use by the
gpio command if LVDS is actually enabled.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:25:02 +02:00
Tim Harvey
ca628b74c9 imx: ventana: gsc: show board temp on boot
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:24:46 +02:00
Tim Harvey
82a17e75da imx: ventana: gsc: fix negative temperature readings
The GSC Temperature sensor is a 2's complement value - adjust accordingly
for negative temperatures.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:24:30 +02:00
Tim Harvey
efa7ed7236 imx: ventana: gsc: add gsc sleep command
The Gateworks System Controller on Ventana boards has the ability to
disable the board's primary power supply until the RTC hits a specific
time. When sleeping a button-down event on the GSC user pushbutton will
wake the board before it's wake time has been reached. This feature is
referred to as GSC sleep.

Add a command to invoke sleep mode for a specified number of seconds.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:24:15 +02:00
Tim Harvey
6052b1c6f4 imx: ventana: SPL: added support for 32bit IMX6DQ 8Gb density DRAM config
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:24:00 +02:00
Tim Harvey
1b99103fba imx: ventana: SPL: only disable boot watchdog if Falcon mode
If not booting Falcon mode, leave the boot watchdog enabled as a work-around
for other non-resolved bootloader hangs.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:23:46 +02:00
Tim Harvey
899f589bcd imx: ventana: config: add PREBOOT support
This allows the 'preboot' env variable to be executed prior to bootcmd
if defined.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:23:24 +02:00
Tim Harvey
509870958d imx: ventana: config: use explicit addr in loadscript
If we are loading a script to ${loadaddr} then we need to use that address
explicitly when calling the source command in case user has changed loadaddr

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:23:10 +02:00
Tim Harvey
543a4aba7f imx: ventana: config: use fs env var for block dev filesystem type
In order to make the default boot scripts more flexible, use the variable
'fs' to specify the filesystem type to use for block storage devices
(USB/MMC/SATA) when loading files.

Additionally default this to ext4 and enable ext4 filesystem support
(which encompasses ext2 support) instead of just ext2 support.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:22:56 +02:00
Tim Harvey
1b7400011e imx: ventana: config: use bootdir env var for directory of fdt files
In order to make the default boot scripts more flexible, use the variable
'bootdir' to specify the filesystem directory to look for fdt files in.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:22:35 +02:00
Tim Harvey
4df0bff3ce imx: ventana: config: add fixfdt script to apply manual fdt fixups
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:22:20 +02:00
Tim Harvey
7698cdfddd imx: ventana: config: add env vars for disk and part
In order to make the default boot scripts more flexible, use the variable
'disk' to specify the disk device number and the variable 'part' to specify
the partition number.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31 17:21:55 +02:00
Sebastien Bourdelin
e96b6ee7bd ts4800: add CONFIG_SYS_FSL_ERRATUM_ESDHC_A001
This commit fixes the MMC data transactions timeout problem on the
TS4800.

The changes introduced in the commit e978a31 on the timeout calculation
for the MMC data transactions has revealed there is something wrong with
the timeout setting of the eSDHC controller used in the IMX51.

The IMX51 seems to be concerned by this erratum and without this change
the MMC driver is unable to do any transactions.

Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2016-05-24 15:11:48 +02:00
Damien Riegel
e453794f87 ts4800: update environment to boot with device tree
This commit updates the environment variables to be able to boot with a
device tree. The expected partition layout on the SD card is:
 - partition 1: type 0xDA, contains u-boot.bin
 - partition 2: type 0xC (fat), contains zImage and device tree
 - partition 3: type 0x83, root filesystem.

Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com>
2016-05-24 15:05:45 +02:00
Tim Harvey
a0eb8c9b91 imx: ventana: remove SPL_EXT_SUPPORT
Remove SPL_EXT_SUPPORT to resolve build issue. It may be useful to bring
it back in the future after comparing its merits to storing the args/kernel
in fixed raw locations.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-24 15:01:43 +02:00
Tim Harvey
3c0fd17f61 imx: ventana: use EEPROM register for falcon boot mode
NAND+MMC env support costs 12KB in the SPL which is fairly expensive just
for the ability to specify whether or not to boot to uboot or directly
to linux. The Ventana boards have plenty of EEPROM storage so we will use
a byte there to signify if we should boot to the bootloader or to the OS.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-24 15:01:43 +02:00
Tim Harvey
a419352daf imx: ventana: gsc: remove dependence on env
remove dependence on getenv() by using global board info struct for model.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-24 15:01:43 +02:00
Tim Harvey
3061a5766a imx: ventana: config: remove redundant config
remove redundant define that exists in mx6_common.h

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-24 15:01:43 +02:00
Peng Fan
83e1394242 board: mx6sabresd/auto: use simpler runtime cpu dection macros
Use simpler runtime cpu dection macros.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
2016-05-24 14:59:57 +02:00
Peng Fan
3fd9eb6689 block: dwc_ahsata: support i.MX6DQPlus
i.MX6DQPlus support sata interface, so not return failure
when CPU is i.MX6DQPlus.

In this patch, also use simpler runtime cpu dections macros to replace
is_cpu_type.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tang Yuantian <Yuantian.Tang@freescale.com>
Cc: Shaohui Xie <Shaohui.Xie@freescale.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
2016-05-24 14:59:57 +02:00
Peng Fan
87f9989502 net: fec_mxc: use simpler runtime cpu dection macros
Use simpler runtime cpu dection macros.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2016-05-24 14:59:57 +02:00
Peng Fan
bff7550331 ocotp: mxc: use simpler runtime cpu dection macros
Use simpler runtime cpu dection macros.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
2016-05-24 14:59:57 +02:00
Peng Fan
9aa550d2e8 mtd: nand: mxs: use simpler runtime cpu dection macros
Use simpler runtime cpu dection macros.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Scott Wood <oss@buserror.net>
2016-05-24 14:59:57 +02:00
Peng Fan
492d60ac79 imx-common: timer: support i.MX6DQPlus
To i.MX6DQPlus, osc can be choosed as the source of gpt, so
add i.MX6DQPlus support in gpt_has_clk_source_osc.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
2016-05-24 14:59:56 +02:00
Peng Fan
aff3756104 imx-common: sata: return failure if not i.MX6DQPlus
The i.MX6DQPlus support sata interface, we should not
return failure when CPU is i.MX6DQPlus.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
2016-05-24 14:59:56 +02:00
Peng Fan
b5437a8082 imx-common: hab: support i.MX6DQPlus
Support i.MX6DQPlus, otherwise wrong hab address will be used
for i.MX6QDPlus.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Ulises Cardenas <Ulises.Cardenas@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
2016-05-24 14:59:56 +02:00
Peng Fan
04cb3c0b0e imx: mx6: correct get_cpu_speed_grade_hz for i.MX6DQP
Correct get_cpu_speed_grade_hz for i.MX6DQP, otherwise we
will get wrong speed grade info i.MX6DQP.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
2016-05-24 14:59:56 +02:00
Peng Fan
e4d79dcaa4 imx: mx6: ddr: support i.MX6D/QPlus
Support i.MX6D/QPlus.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
2016-05-24 14:59:56 +02:00
Peng Fan
27cd0da41e imx-common: use simpler runtime cpu dection macros
Use simpler runtime cpu dection macros.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Cc: "Benoît Thébaudeau" <benoit.thebaudeau.dev@gmail.com>
2016-05-24 14:59:56 +02:00
Peng Fan
003f0c7eb2 imx-common: hab: support i.MX6SOLO
Add i.MX6SOLO support for hab function.
The difference between i.MX6SOLO and i.MX6DL is
the number of CPU cores. Besides this, they work
the same.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Cc: "Benoît Thébaudeau" <benoit.thebaudeau.dev@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
2016-05-24 14:59:56 +02:00
Peng Fan
b949fd2ccb imx: mx6: use simpler runtime cpu dection macros
Use simpler runtime cpu dection macros.
i.MX6DL and i.MX6SOLO work the same, so use is_mx6sdl.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
2016-05-24 14:59:56 +02:00
Peng Fan
dea572379e imx: mx6: support i.MX6SOLO when enable/disable_ldb_di_clock_sources
i.MX6DL and i.MX6SOLO work the same, add i.MX6SOLO support
when enable/disable_ldb_di_clock_sources.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
2016-05-24 14:59:56 +02:00
Peng Fan
32ff58bb2e imx-common: introduce simpler macros for runtime dection
Introduce simpler macros for runtime cpu dection.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
2016-05-24 14:59:55 +02:00
Stefano Babic
08ca213aca Merge branch 'master' of git://git.denx.de/u-boot 2016-05-24 14:55:06 +02:00
Tom Rini
d7d0003112 Merge branch 'master' of git://git.denx.de/u-boot-mips 2016-05-23 11:51:37 -04:00
Masahiro Yamada
d38fca40c8 ARM: fix ifdef in ARMv8 lowlevel_init() again
Commit 116611937f ("ARM: fix ifdefs in ARMv8 lowlevel_init()")
accidentally inverted the logic of CONFIG_ARMV8_MULTIENTRY.

Fixes: 116611937f ("ARM: fix ifdefs in ARMv8 lowlevel_init()")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
2016-05-23 11:51:27 -04:00
Tom Rini
d550e82e4e SPL: fat: Fix spl_parse_image_header() return value handling
The spl_parse_image_header() can return 0 and it is not an error.
Only treat non-zero return value as an error.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Peng Fan <van.freenix@gmail.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-05-23 11:51:13 -04:00
Martin Hejnfelt
5f89a15e16 omap3: Fix SPI registers on am33xx and am43xx
When the base registers are read from device tree the base is not
0x48030100 as the driver expects, but 0x48030000, resulting in
non functioning SPI. To deal with this, use same idea as how this
is done in the linux kernel (drivers/spi/spi-omap2-mcspi.c) and
add a structure with a field that is used to shift the registers
on these systems.

v2: Fixed commit subject line to correct cpu

Signed-off-by: Martin Hejnfelt <mh@newtec.dk>
2016-05-23 11:50:22 -04:00
Tom Rini
c1420f8b2b kbuild: fixdep: Check fstat(2) return value
Coverity has recently added a check that will find when we don't check
the return code from fstat(2).  Copy/paste the checking logic that
print_deps() has with an appropriate re-wording of the perror() message.

[ Linux commit : 46fe94ad18aa7ce6b3dad8c035fb538942020f2b ]

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
2016-05-23 11:50:21 -04:00
Michal Simek
c409bd015c spl: Setup default value for OF_LIST
OF_LIST can't remain empty that's why setup it up to default DTB.

If it is empty u-boot.img is created without FDT partition:
For example:
  ./tools/mkimage -f auto -A arm -T firmware -C none -O u-boot -a
0x8000000 -e 0 -n "U-Boot 2016.05-rc3 ..." -E -b  -d u-boot-nodtb.bin u-boot.img
Can't set 'timestamp' property for '' node (FDT_ERR_NOSPACE)
FIT description: Firmware image with one or more FDT blobs
Created:         Wed May  4 15:02:52 2016
 Image 0 (firmware@1)
  Description:  U-Boot 2016.05-rc3-00080-gff2e12ae22a8-dirty for zynqmp
board
  Created:      Wed May  4 15:02:52 2016
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    unavailable
  Architecture: ARM
  Load Address: 0x08000000
 Default Configuration: 'conf@1'
 Configuration 0 (conf@1)
  Description:  unavailable
  Kernel:       unavailable

And then image like this doesn't contain description and link to FDT and
can't boot.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-05-23 11:50:21 -04:00
Michal Simek
5adfa26579 spl: fit: Print error message when FDT is not present
When FDT is not present in the image user doesn't get any error what's
wrong. Print error message if LIBCOMMON_SUPPORT is enabled.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Seris-cc: uboot
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-23 11:50:20 -04:00
Simon Glass
bd6e142094 mkimage: Add a quiet mode
Some build systems want to be quiet unless there is a problem. At present
mkimage displays quite a bit of information when generating a FIT file. Add
a '-q' flag to silence this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-05-23 11:50:19 -04:00
Simon Glass
8df81e17f8 image-fit: Don't display an error in fit_set_timestamp()
This function returns an error code and its caller may be able to fix the
error. For example fit_handle_file() expands the device tree to fit if there
is a lack of space.

In this case the caller does not want an error displayed. It is confusing,
since it suggests that something is wrong, when it fact everything is fine.
Drop the error.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-05-23 11:50:18 -04:00
Stephen Warren
034eda867f malloc: improve memalign fragmentation fix
Commit 4f144a4164 "malloc: work around some memalign fragmentation
issues" enhanced memalign() so that it can succeed in more cases where
heap fragmentation is present. However, it did not solve as many cases
as it could. This patch enhances the code to cover more cases.

The alignment code works by allocating more space than the user requests,
then adjusting the returned pointer to achieve alignment. In general, one
must allocate "alignment" bytes more than the user requested in order to
guarantee that alignment is possible. This is what the original code does.
The previous enhancement attempted a second allocation if the padded
allocation failed, and succeeded if that allocation just happened to be
aligned; a fluke that happened often in practice. There are still cases
where this could fail, yet where it is still possible to honor the user's
allocation request. In particular, if the heap contains a free region that
is large enough for the user's request, and for leading padding to ensure
alignment, but has no or little space for any trailing padding. In this
case, we can make a third(!) allocation attempt after calculating exactly
the size of the leading padding required to achieve alignment, which is
the minimal over-allocation needed for the overall memalign() operation to
succeed if the third and second allocations end up at the same location.

This patch isn't checkpatch-clean, since it conforms to the existing
coding style in dlmalloc.c, which is different to the rest of U-Boot.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-05-23 11:50:17 -04:00
Fabio Estevam
83b6a43e6e pico-imx6ul: Select CONFIG_HUSH_PARSER option
Select CONFIG_HUSH_PARSER option in order to fix the following
problem:

Unknown command 'if' - try 'help'
Unknown command 'then' - try 'help'
Unknown command 'else' - try 'help'
Unknown command 'fi' - try 'help'

Reported-by: Daiane Angolini <daiane.angolini@nxp.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: Daiane Angolini <daiane.angolini@nxp.com>
2016-05-20 20:42:57 -04:00