oweals/u-boot.git
9 years agoarmv8/ls2085a: Update common header file
Prabhakar Kushwaha [Sat, 21 Mar 2015 02:28:06 +0000 (19:28 -0700)]
armv8/ls2085a: Update common header file

ls2085a_common.h contains hard-coded information for NOR/NAND flash,
I2C, DDR, etc. These are platform specific. Move them out of common
header file and placed into respective board header files.

Move TEXTBASE to 1MB offset to fit NOR flash with up to 1MB sector
size.

Enable command auto complete. Update prompt symbol. Set fdt_high to
0xa0000000 because Linux requires that the fdt  be 8-byte aligned
and below 512 MiB. Besides ensuring compliance with the 512 MiB
limit, this avoids problems with the dtb being misaligned within
the FIT image.

Change the MC FW, MC DPL and Debug server NOR addresses in compliance
with the NOR flash layouts for 128MB flash.

Add PCIe macros. Enable "loadb" command. Disable debug server.
Enable workaround for erratum A008511.
Stop reset on panic for postmortem debugging.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
9 years agoarmv8/fsl-lsch3: Implement workaround for erratum A008585
York Sun [Sat, 21 Mar 2015 02:28:05 +0000 (19:28 -0700)]
armv8/fsl-lsch3: Implement workaround for erratum A008585

Generic Timer may contain an erroneous value. The workaround is to
read it twice until getting the same value.

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agodrivers/net/e1000.c: Cleanup whitespace
Minghuan Lian [Thu, 19 Mar 2015 16:43:51 +0000 (09:43 -0700)]
drivers/net/e1000.c: Cleanup whitespace

The patch removes unnecessary whitespace to fix checkpatch's
warning: unnecessary whitespace before a quoted newline

Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agocmd_mem: Store last address/size/etc as ulong
Scott Wood [Thu, 19 Mar 2015 16:43:12 +0000 (09:43 -0700)]
cmd_mem: Store last address/size/etc as ulong

Otherwise the high 32 bits get truncated on 64-bit U-boot.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver/ddr/fsl: Add workaround for DDR erratum A008511
York Sun [Thu, 19 Mar 2015 16:30:29 +0000 (09:30 -0700)]
driver/ddr/fsl: Add workaround for DDR erratum A008511

This erratum only applies to general purpose DDR controllers in LS2.
It shouldn't be applied to DP-DDR controller. Check DDRC versoin number
before applying workaround.

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agodriver/ddr/fsl: Add built-in memory test for DDR4 driver
York Sun [Thu, 19 Mar 2015 16:30:28 +0000 (09:30 -0700)]
driver/ddr/fsl: Add built-in memory test for DDR4 driver

Add built-in memory test to catch errors after DDR is initialized, before
any other transactions. To enable this test, define CONFIG_FSL_DDR_BIST.
An environmental variable "ddr_bist" is checked before starting test.
It takes a while (several seconds) depending on system memory size.

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agodriver/ddr/fsl: Fix driver to support empty first slot
York Sun [Thu, 19 Mar 2015 16:30:27 +0000 (09:30 -0700)]
driver/ddr/fsl: Fix driver to support empty first slot

CS0 was not allowed to be empty by u-boot driver in the past to simplify
the driver. This may be inconvenient for some debugging. This patch lifts
the restrictions. Controller interleaving still requires CS0 populated.

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agodrivers/ddr/fsl: Update DDR driver for DDR4
York Sun [Thu, 19 Mar 2015 16:30:26 +0000 (09:30 -0700)]
drivers/ddr/fsl: Update DDR driver for DDR4

Add/update registers for DDR4, including DQ mappings. Allow raw timing
method used for all controllers. Update mode_9 register to 0x500 for
improved stability. Check DDR controller version number individually
in case a SoC has multiple DDR controllers of different versions.
Increase read-write turnaround for DDR4 high speeds.

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agodriver/i2c/mxc: Enable I2C bus 3 and 4
York Sun [Fri, 20 Mar 2015 17:20:40 +0000 (10:20 -0700)]
driver/i2c/mxc: Enable I2C bus 3 and 4

Some SoCs have more than two I2C busses. Instead of adding ifdef
to the driver, macros are put into board header file where
CONFIG_SYS_I2C_MXC is defined.

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Heiko Schocher <hs@denx.de>
9 years agonand/fsl_ifc: Increase eccstat[] for IFC 2.0
Scott Wood [Thu, 19 Mar 2015 16:20:49 +0000 (09:20 -0700)]
nand/fsl_ifc: Increase eccstat[] for IFC 2.0

IFC 2.0 doubled the SRAM size, which means double the number of
ECCSTAT registers.  Fix the resulting array overflow.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver/fsl_ifc: Add support to finalize CS1, CS3 address binding
Prabhakar Kushwaha [Thu, 19 Mar 2015 16:20:48 +0000 (09:20 -0700)]
driver/fsl_ifc: Add support to finalize CS1, CS3 address binding

For fsl-lsch3, IFC is binded with address within 32-bit at fist.
After u-boot relocates to DDR, CS1, CS3 can be binded to higher
address to support large space.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
9 years agoboard/ls2085_common: Increase malloc length
Prabhakar Kushwaha [Thu, 19 Mar 2015 16:20:47 +0000 (09:20 -0700)]
board/ls2085_common: Increase malloc length

Increase malloc length for more than 2M.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver/ldpaa_eth: Add LDPAA Ethernet driver
Prabhakar Kushwaha [Thu, 19 Mar 2015 16:20:46 +0000 (09:20 -0700)]
driver/ldpaa_eth: Add LDPAA Ethernet driver

LDPAA Ethernet driver is a freescale's new ethernet driver based on
Layerscape architecture.

Every ethernet driver controls on DPNI object. Where all DPNIs share
one common DPBP and DPIO object to support  Rx and Tx flows.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
CC: Cristian Sovaiala <cristian.sovaiala@freescale.com>
CC: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
CC: J. German Rivera <German.Rivera@freescale.com>
[York Sun: s/NetReceive/net_process_received_packet]
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodm: Init device tree as well as driver model in SPL
Simon Glass [Sat, 28 Feb 2015 05:06:42 +0000 (22:06 -0700)]
dm: Init device tree as well as driver model in SPL

If enabled, make sure that the device tree is available in SPL before
setting up driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: Select device tree control correctly for SPL
Simon Glass [Sat, 28 Feb 2015 05:06:41 +0000 (22:06 -0700)]
dm: core: Select device tree control correctly for SPL

Some boards will not use device tree for SPL even with driver model. Add
the logic to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agofdt: Allow FDT functions to be built for SPL
Simon Glass [Sat, 28 Feb 2015 05:06:40 +0000 (22:06 -0700)]
fdt: Allow FDT functions to be built for SPL

Remove the implicit assumption that SPL does not support device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agofdt: Add an option to disable device tree in SPL
Simon Glass [Sat, 28 Feb 2015 05:06:38 +0000 (22:06 -0700)]
fdt: Add an option to disable device tree in SPL

Some boards cannot support device tree due to lack of memory. Add an option
to allow these boards to continue to work (and even use driver model).
This is a 'negative' option since most boards are expected to support device
tree in SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoCorrect malloc_limit value for pre-relocation malloc()
Simon Glass [Sat, 28 Feb 2015 05:06:37 +0000 (22:06 -0700)]
Correct malloc_limit value for pre-relocation malloc()

The limit is measured from the start of the malloc() area and is not an
absolute address. Correct this.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoMove initf_malloc() to a common place
Simon Glass [Sat, 28 Feb 2015 05:06:36 +0000 (22:06 -0700)]
Move initf_malloc() to a common place

To allow this function to be used from SPL, move it to the malloc()
code.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agofdt: Rename setup_fdt() and make it prepare also
Simon Glass [Sat, 28 Feb 2015 05:06:35 +0000 (22:06 -0700)]
fdt: Rename setup_fdt() and make it prepare also

There is little reason to split these two functions. Bring them together
which simplifies the init sequence.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agofdt: sandbox: Move setup code from board_f to fdtdec
Simon Glass [Sat, 28 Feb 2015 05:06:34 +0000 (22:06 -0700)]
fdt: sandbox: Move setup code from board_f to fdtdec

We want to be able to set up the device tree in SPL, so move this code
to a common place.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: Drop device removal error path when not supported
Simon Glass [Sat, 28 Feb 2015 05:06:33 +0000 (22:06 -0700)]
dm: core: Drop device removal error path when not supported

When CONFIG_DM_DEVICE_REMOVE is not enabled, such as in SPL, we cannot
remove or unbind devices and do not expect to get errors when binding
and probing devices. So drop the error path to reduce code size.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Add a panic_str() function to reduce code size
Simon Glass [Sat, 28 Feb 2015 05:06:32 +0000 (22:06 -0700)]
dm: Add a panic_str() function to reduce code size

The printf() in panic() adds about 1.5KB of code size to SPL when compiled
with Thumb-2. Provide a smaller version that does not support printf()-style
arguments and use it in two commonly compiled places.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: Remove unbind operations when not required
Simon Glass [Sat, 28 Feb 2015 05:06:31 +0000 (22:06 -0700)]
dm: core: Remove unbind operations when not required

The CONFIG_DM_DEVICE_REMOVE option takes out code related to removing
devices. It should also remove the 'unbind' code since if we cannot
remove we probably don't need to unbind.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: Allow sequence alias support to be removed for SPL
Simon Glass [Sat, 28 Feb 2015 05:06:30 +0000 (22:06 -0700)]
dm: core: Allow sequence alias support to be removed for SPL

In many cases SPL only uses a single serial port and there is no need for
alias sequence support. We will just use the serial port pointed to by
stdout-path in the /chosen node.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoRevert "spi: add config option to enable the WP pin function on st micron flashes"
Jagannadha Sutradharudu Teki [Thu, 23 Apr 2015 14:22:11 +0000 (19:52 +0530)]
Revert "spi: add config option to enable the WP pin function on st micron flashes"

This reverts commit 562f8df18da62ae02c4ace1e530451fe82c3312d.

Note: Even un-reverting this patch couldn't works as expected, based
on the latest testing from Heiko Schocher.

Signed-off-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Cc: Heiko Schocher <hs@denx.de>
9 years agocmd_led: Extend led command to support blinking and more leds
Stefan Roese [Wed, 11 Mar 2015 08:51:39 +0000 (09:51 +0100)]
cmd_led: Extend led command to support blinking and more leds

This patch extends the U-Boot "led" command to support automatic blinking
by setting a blink frequency in milliseconds. Additionally the number of
supported LEDs is increased to 6 (0...5).

This will be used by the PCA9551 LED driver.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agointegrator: stop zeroing the gd flags
Linus Walleij [Tue, 21 Apr 2015 13:35:59 +0000 (15:35 +0200)]
integrator: stop zeroing the gd flags

This assignment conflicts with code that add flags with
gd->flags |= FOO prior to the execution of this function.
Seems like a historical artifact and creates bugs with
early alloc().

Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoARM: integrator: move CONFIG_ARCH_CINTEGRATOR to Kconfig
Masahiro Yamada [Tue, 21 Apr 2015 12:59:39 +0000 (21:59 +0900)]
ARM: integrator: move CONFIG_ARCH_CINTEGRATOR to Kconfig

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
9 years agoARM: integrator: abolish CONFIG_INTEGRATOR
Masahiro Yamada [Tue, 21 Apr 2015 12:59:38 +0000 (21:59 +0900)]
ARM: integrator: abolish CONFIG_INTEGRATOR

Switch to CONFIG_ARCH_INTEGRATOR defined by Kconfig.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
9 years agoARM: integrator: split board select into AP/CP select and CM select
Masahiro Yamada [Tue, 21 Apr 2015 12:59:37 +0000 (21:59 +0900)]
ARM: integrator: split board select into AP/CP select and CM select

Select integrator boards by the combination of platform select (AP/CP)
and core module select (CM720T, CM920T, ...).

This allows us to remove CONFIG_SYS_EXTRA_OPTIONS and make Kconfig
much cleaner.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
9 years agoARM: integrator: move board select into mach-integrator/Kconfig
Masahiro Yamada [Tue, 21 Apr 2015 12:59:36 +0000 (21:59 +0900)]
ARM: integrator: move board select into mach-integrator/Kconfig

The board/SoC select menu in arch/arm/Kconfig is still cluttered.
Add ARCH_INTEGRATOR into arch/arm/Kconfig and move the board select
under arch/arm/mach-integrator.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
9 years agoARM: ARM720t: remove empty asm/arch/hardware.h
Masahiro Yamada [Tue, 21 Apr 2015 12:59:35 +0000 (21:59 +0900)]
ARM: ARM720t: remove empty asm/arch/hardware.h

arch/arm/cpu/arm720t/start.S includes <asm/arch/hardware.h>,
but the hardware.h headers of ARM720T boards are all empty.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
9 years agoSPDX: add X11 SPDX-License-Identifier
Masahiro Yamada [Tue, 21 Apr 2015 04:39:27 +0000 (13:39 +0900)]
SPDX: add X11 SPDX-License-Identifier

These is a growing trend to license DT files dual GPL and X11
especially in the Linux community.  It allows easier reuse of
device trees for other software projects.

This commit prepares for doing so in U-Boot too, since DT files are
often copied from the kernel to U-Boot.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agoLicenses: fix a typo in README
Masahiro Yamada [Fri, 17 Apr 2015 01:20:43 +0000 (10:20 +0900)]
Licenses: fix a typo in README

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
9 years agovexpress64: use DM for all vexpress64 boards
Linus Walleij [Tue, 14 Apr 2015 08:01:35 +0000 (10:01 +0200)]
vexpress64: use DM for all vexpress64 boards

Commit d8bafe1310487ba0e0785997726b4792072178d3
"ARMv8: enable DM in vexpress64 board" only enabled DM
for the simulated vexpress64 board (FVP) with the
hardcoded clock value for the simulated board, causing
a console regression on the Juno board which was using
a different clock setting.

Fix this by enabling DM for all vexpress64 boards,
defining the clock frequency per-board, deleting the
static array of PL01x ports from the config file and
relying solely on the port defined in the boardfile
using platform data.

Cc: David Feng <fenghua@phytium.com.cn>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 years agoboard/BuR/tseries: change pinmux
Hannes Petermaier [Wed, 8 Apr 2015 05:38:35 +0000 (07:38 +0200)]
board/BuR/tseries: change pinmux

some pins on the board have been rerouted to other peripherals, so we
change the pinmux to apply with hardware-design.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
9 years agoboard/BuR/tseries: reactivate NAND-board
Hannes Petermaier [Wed, 8 Apr 2015 05:38:34 +0000 (07:38 +0200)]
board/BuR/tseries: reactivate NAND-board

The NAND-version has been become a bit orphan.
Now we need to reactivate it, so bring necessary things:

- loading devicetree
- switch control signal to correct pins
- setup pinmux
- default-environment

up to date.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
9 years agoboard/BuR/common: simplify access to devicetree
Hannes Petermaier [Wed, 8 Apr 2015 05:38:33 +0000 (07:38 +0200)]
board/BuR/common: simplify access to devicetree

instead of polling everytime the environment, we take usage of the global
gd->fdt_blob variable and check it only against NULL.

Variable "dtbaddr" from environment is needed only one time on loading the
devicetree within "load_devicetree()"

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
9 years agodm: spi: Correct SPI claim/release_bus() methods
Simon Glass [Sun, 19 Apr 2015 15:05:40 +0000 (09:05 -0600)]
dm: spi: Correct SPI claim/release_bus() methods

These methods should be passed a slave device, not a bus. This matches the
old SPI interface. It is important to know which device is claiming the bus
so passing a bus is not that useful.

Reported-by: Haikun Wang <haikun.wang@freescale.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Peng Fan <Peng.Fan@freescale.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
9 years agoserial: ns16550: Remove unnecessary init on UART setup
Simon Glass [Sat, 28 Feb 2015 05:06:28 +0000 (22:06 -0700)]
serial: ns16550: Remove unnecessary init on UART setup

It is not necessary to write a zero baud rate to the device, and for some
chips this will cause problems. Drop this code.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: ns16550: Support non-byte register spacing with driver model
Simon Glass [Sat, 28 Feb 2015 05:06:26 +0000 (22:06 -0700)]
dm: ns16550: Support non-byte register spacing with driver model

Allow this driver to support boards where the register shift is not 0.
This fixes some compiler warnings which appear in that case.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoserial: ns16550: Add an option to specify the debug UART register shift
Simon Glass [Sat, 28 Feb 2015 05:06:25 +0000 (22:06 -0700)]
serial: ns16550: Add an option to specify the debug UART register shift

This UART permits different register spacing. To support the debug UART on
devices which have a spacing other than 1 byte, allow the shift value to
be specified.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoexynos: sandbox: ti: Add SPDX license identifiers and notes
Simon Glass [Mon, 13 Apr 2015 17:19:07 +0000 (11:19 -0600)]
exynos: sandbox: ti: Add SPDX license identifiers and notes

For some files I neglected to add a license. Rectify this:

arch/arm/dts/exynos4210-pinctrl-uboot.dtsi
arch/arm/dts/exynos4x12-pinctrl-uboot.dtsi
arch/arm/dts/exynos5250-pinctrl-uboot.dtsi
arch/arm/dts/exynos54xx-pinctrl-uboot.dtsi
arch/arm/dts/s5pc100-pinctrl.dtsi
arch/arm/dts/s5pc110-pinctrl.dtsi

This file came from Linux and has no license information there, so add a
comment to that effect:

arch/sandbox/include/asm/bitops.h

This file also came from Linux - presumably someone from TI could add the
license:

include/dt-bindings/pinctrl/omap.h

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Ingrid Viitanen <ingrid.viitanen@nokia.com>
9 years agodm: test: Don't clear global_data in dm_test_uclass_before_ready()
Simon Glass [Sun, 19 Apr 2015 13:21:02 +0000 (07:21 -0600)]
dm: test: Don't clear global_data in dm_test_uclass_before_ready()

We must not clear global_data even in tests, since the ram_buffer (which
is used by malloc()) will also be lost, and subsequent tests will fail.

Zero only the global_data fields that are required for the test to function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Tested-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agodm: Update the README to reflect the current test output
Simon Glass [Sun, 19 Apr 2015 13:21:01 +0000 (07:21 -0600)]
dm: Update the README to reflect the current test output

There are a lot more tests now. To avoid confusion add the updated test
output to the driver model README.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agodm: usb: Add a terminator to the string destructor list
Simon Glass [Sun, 19 Apr 2015 13:20:59 +0000 (07:20 -0600)]
dm: usb: Add a terminator to the string destructor list

The terminator is missing. Add it for completeness.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Tested-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agodm: core: Handle recursive unbinding of uclass devices
Simon Glass [Sun, 19 Apr 2015 13:20:58 +0000 (07:20 -0600)]
dm: core: Handle recursive unbinding of uclass devices

Since a device can have children in the same uclass as itself, we need
to handle unbinding carefully: we must allow that unbinding a device in a
uclass may cause another device in the same uclass to be unbound.

Adjust the code to cope.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Tested-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agodm: core: precise comments for get/find device by name
Przemyslaw Marczak [Mon, 20 Apr 2015 11:32:34 +0000 (13:32 +0200)]
dm: core: precise comments for get/find device by name

The functions:
- uclass_find_device_by_name()
- uclass_get_device_by_name()
searches the required device for the exactly given name.
This patch, presice this fact for both function's comments.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: test: Add tests for get/find uclass's device by name
Przemyslaw Marczak [Mon, 20 Apr 2015 11:32:33 +0000 (13:32 +0200)]
dm: test: Add tests for get/find uclass's device by name

This commit introduces simple tests for functions:
- uclass_find_device_by_name()
- uclass_get_device_by_name()

Tests added by this commit:
- Test: dm_test_uclass_devices_find_by_name: for uclass id: UCLASS_TEST_FDT
 * get uclass's devices by uclass_find_first/next_device() each as 'testdev',
 * for each returned device, call: uclass_find_device_by_name(),
   with previously returned device's name as an argument ('testdev->name').
 * for the found device ('founddev') check if:
   * founddev != NULL
   * testdev == founddev
   * testdev->name == founddev->name (by strcmp)

- Test: dm_test_uclass_devices_get_by_name: for uclass id: UCLASS_TEST_FDT
 * get uclass's devices by uclass_get_first/next_device() each as 'testdev',
 * for each returned device, call: uclass_get_device_by_name(),
   with previously returned device's name as an argument ('testdev->name').
 * for the found device ('founddev') check if:
   * founddev != NULL
   * founddev is active
   * testdev == founddev
   * testdev->name == founddev->name (by strcmp)

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: remove type 'static' of function uclass_get_device_tail()
Przemyslaw Marczak [Mon, 20 Apr 2015 11:32:32 +0000 (13:32 +0200)]
dm: core: remove type 'static' of function uclass_get_device_tail()

Uclass API provides a few functions for get/find the device.
To provide a complete function set of uclass-internal functions,
for use by the drivers, the function uclass_get_device_tail()
should be non-static.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: device: add function: dev_get_uclass_name()
Przemyslaw Marczak [Wed, 15 Apr 2015 11:07:25 +0000 (13:07 +0200)]
dm: core: device: add function: dev_get_uclass_name()

This commit extends the driver model device's API by function:
- dev_get_uclass_name()

And this function returns the device's uclass driver name if:
- given dev pointer, is non_NULL
otherwise, the NULL pointer is returned.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: device: add function: dev_get_driver_ops()
Przemyslaw Marczak [Wed, 15 Apr 2015 11:07:24 +0000 (13:07 +0200)]
dm: core: device: add function: dev_get_driver_ops()

This commit extends the driver model device's API by function:
- dev_get_driver_ops()

And this function returns the device's driver's operations if given:
- dev pointer, is non-NULL
- dev->driver->ops pointer, is non-NULL
in other case the, the NULL pointer is returned.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: uclass: add function: uclass_get_device_by_name()
Przemyslaw Marczak [Wed, 15 Apr 2015 11:07:23 +0000 (13:07 +0200)]
dm: core: uclass: add function: uclass_get_device_by_name()

This commit extends the driver model uclass's API by function:
- uclass_get_device_by_name()

And this function returns the device if:
- uclass with given ID, exists,
- device with exactly given name(dev->name), exists,
- device probe, doesn't return an error.

The returned device is activated and ready to use.

Note:
This function returns the first device, which name is equal
to the given one. This means, that using this function you must
assume, that the device name is unique in the given uclass's ID
device list.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: uclass: add function: uclass_find_device_by_name()
Przemyslaw Marczak [Wed, 15 Apr 2015 11:07:22 +0000 (13:07 +0200)]
dm: core: uclass: add function: uclass_find_device_by_name()

This commit extends the driver model uclass's API by function:
- uclass_find_device_by_name()

And this function returns the device if:
- uclass with given ID, exists,
- device with exactly given name(dev->name), exists.

The returned device is not activated - need to be probed before use.

Note:
This function returns the first device, which name is equal
to the given one. This means, that using this function you must
assume, that the device name is unique in the given uclass's ID
device list.

uclass-internal.h: cleanup - move the uclass_find_device_by_seq()
declaration and description, near the other uclass_find*() functions.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: test: Add tests for get/find uclass devices
Przemyslaw Marczak [Wed, 15 Apr 2015 11:07:20 +0000 (13:07 +0200)]
dm: test: Add tests for get/find uclass devices

This commit introduces simple tests for functions:
- uclass_find_first_device()
- uclass_find_next_device()
- uclass_first_device()
- uclass_next_device()

Tests added by this commit:
- Test: dm_test_uclass_devices_find:
  * call uclass_find_first_device(), then check if: (dev != NULL), (ret == 0)
  * for the rest devices, call uclass_find_next_device() and do the same check

- Test: dm_test_uclass_devices_get:
  * call uclass_first_device(), then check if:
    -- (dev != NULL), (ret == 0), device_active()
  * for the rest devices, call uclass_next_device() and do the same check

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: test: Add tests for device's uclass platform data
Przemyslaw Marczak [Wed, 15 Apr 2015 11:07:19 +0000 (13:07 +0200)]
dm: test: Add tests for device's uclass platform data

This test introduces new test structure type:dm_test_perdev_uc_pdata.
The structure consists of three int values only. For the test purposes,
three pattern values are defined by enum, starting with TEST_UC_PDATA_INTVAL1.

This commit adds two test cases for uclass platform data:
- Test: dm_test_autobind_uclass_pdata_alloc - this tests if:
  * uclass driver sets: .per_device_platdata_auto_alloc_size field
  * the devices's: dev->uclass_platdata is non-NULL

- Test: dm_test_autobind_uclass_pdata_valid - this tests:
  * if the devices's: dev->uclass_platdata is non-NULL
  * the structure of type 'dm_test_perdev_uc_pdata' allocated at address
    pointed by dev->uclass_platdata. Each structure field, should be equal
    to proper pattern data, starting from .intval1 == TEST_UC_PDATA_INTVAL1.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: Extend struct udevice by '.uclass_platdata' field.
Przemyslaw Marczak [Wed, 15 Apr 2015 11:07:18 +0000 (13:07 +0200)]
dm: core: Extend struct udevice by '.uclass_platdata' field.

This commit adds 'uclass_platdata' field to 'struct udevice', which
can be automatically allocated at bind. The allocation size is defined
in 'struct uclass_driver' as 'per_device_platdata_auto_alloc_size'.

New device's flag is added: DM_FLAG_ALLOC_UCLASS_PDATA, which is used
for memory freeing at device unbind method.

As for other udevice's fields, a complementary function is added:
- dev_get_uclass_platdata()

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: add internal functions for getting the device without probe
Przemyslaw Marczak [Wed, 15 Apr 2015 11:07:17 +0000 (13:07 +0200)]
dm: core: add internal functions for getting the device without probe

This commit extends the uclass-internal functions by:
- uclass_find_first_device()
- uclass_find_next_device()
For both functions, the returned device is not probed.

After some cleanup, the above functions are called by:
- uclass_first_device()
- uclass_next_device()
for which, the returned device is probed.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agocmd_scsi: Enable SoC AHCI device on platforms with PCI
tang yuantian [Fri, 20 Mar 2015 02:27:54 +0000 (10:27 +0800)]
cmd_scsi: Enable SoC AHCI device on platforms with PCI

Current driver assumes the AHCI is connected to PCI, this is not
true on some SoCs, e.g. LS1021A, which has PCI but the AHCI is
in SoC. This patch will enable embedded AHCI devices on platforms
with PCI.
PCI AHCI devices still can be used by commenting CONFIG_SCSI_AHCI_PLAT
option in head file.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agostm32f4: Add support for stm32f429-discovery board
rev13@wp.pl [Sun, 1 Mar 2015 11:44:42 +0000 (12:44 +0100)]
stm32f4: Add support for stm32f429-discovery board

Signed-off-by: Kamil Lulko <rev13@wp.pl>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agostm32f4: Add serial driver
rev13@wp.pl [Sun, 1 Mar 2015 11:44:41 +0000 (12:44 +0100)]
stm32f4: Add serial driver

Signed-off-by: Kamil Lulko <rev13@wp.pl>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoARMv7M: Add STM32F4 support
rev13@wp.pl [Sun, 1 Mar 2015 11:44:40 +0000 (12:44 +0100)]
ARMv7M: Add STM32F4 support

Signed-off-by: Kamil Lulko <rev13@wp.pl>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoARM: Add ARMv7-M support
rev13@wp.pl [Sun, 1 Mar 2015 11:44:39 +0000 (12:44 +0100)]
ARM: Add ARMv7-M support

Signed-off-by: Kamil Lulko <rev13@wp.pl>
9 years agounzip: add gzwrite command to write compressed image to block device
Eric Nelson [Sun, 15 Feb 2015 23:16:07 +0000 (16:16 -0700)]
unzip: add gzwrite command to write compressed image to block device

Add gzwrite command to write gzip-compressed images to block devices.

Input must be gzip-compressed according to RFC1952, since the crc
and file size in the trailer will be confirmed during operation.
The decompressed file size must be specified on the command line
for images with decompressed sizes >= 4GiB because the trailer
only contains the low 32 bits of the original file size.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
9 years agogunzip: add gzwrite routine for extracting compresed images to block device
Eric Nelson [Tue, 17 Feb 2015 18:30:30 +0000 (11:30 -0700)]
gunzip: add gzwrite routine for extracting compresed images to block device

Initial filesystem images are generally highly compressible.

Add a routine gzwrite that allows gzip-compressed images to be
written to block devices.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agomx6sabresd: Remove uneeded ifdef
Fabio Estevam [Fri, 17 Apr 2015 01:11:48 +0000 (22:11 -0300)]
mx6sabresd: Remove uneeded ifdef

RTT_NOM_120OHM is not defined, so remove its ifdef.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agomx6sabresd: Fix SPL memory description
Fabio Estevam [Fri, 17 Apr 2015 01:11:47 +0000 (22:11 -0300)]
mx6sabresd: Fix SPL memory description

mx6sabresd has four MT41K128M16JT-125 chips. Each memory has 16-bit bus
and 2GiB, so fix the width and density fields accordingly.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agonitrogen6x: allow gzipped bitmap display
Eric Nelson [Thu, 16 Apr 2015 18:31:33 +0000 (11:31 -0700)]
nitrogen6x: allow gzipped bitmap display

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
9 years agoiMX: Fix compilation error when enabling SECURE_BOOT
gaurav rana [Mon, 6 Apr 2015 07:35:33 +0000 (13:05 +0530)]
iMX: Fix compilation error when enabling SECURE_BOOT

Move the compilation of file fsl_validate.c in MACRO CONFIG_CMD_ESBC_VALIDATE.
This file should be compiled only when the above MACRO is defined

This caused a break in compilation of iMX platforms when compiling for SECURE_BOOT

Signed-off-by: Gaurav Rana <gaurav.rana@freescale.com>
9 years agoarm: mx6: tqma6: Extract baseboard configs into separate config file
Stefan Roese [Thu, 12 Mar 2015 15:34:16 +0000 (16:34 +0100)]
arm: mx6: tqma6: Extract baseboard configs into separate config file

This patch extracts all baseboard specific defines into a separate config file.
This makes it easier to add other baseboards that use the TQMa6 SoM.

This patch will be used by the upcoming WRU-IV board support which also
uses the TQMa6 SoM.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-By: Markus Niebel <Markus.Niebel@tq-group.com>
9 years agopower: pfuze100: fix LDO_EN bit value
Tim Harvey [Fri, 3 Apr 2015 23:56:16 +0000 (16:56 -0700)]
power: pfuze100: fix LDO_EN bit value

The LDO_EN is bit 4, not value 4. This is only used on the Ventana boards so
we will change it in the header as the other values there are in terms of
values and not bit numbers.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: Update missing memory/calib handling
Pushpal Sidhu [Wed, 8 Apr 2015 19:55:04 +0000 (12:55 -0700)]
imx: ventana: Update missing memory/calib handling

This commit combines catching missing memory and calibration data into
one if() block. It further prints pertinent information in determining
why the failure occurred.

Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: Add new memory configuration
Pushpal Sidhu [Wed, 8 Apr 2015 19:55:03 +0000 (12:55 -0700)]
imx: ventana: Add new memory configuration

Add memory configuration for an IMX6SDL + 1GB density DRAM.

Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: set HDMI video in to yuv422bt656 for GW551x-A
Tim Harvey [Wed, 8 Apr 2015 19:55:02 +0000 (12:55 -0700)]
imx: ventana: set HDMI video in to yuv422bt656 for GW551x-A

The initial revision of the GW551x does not connect enough signals between
the HDMI receiver and the IMX6 CSI for 16bit capture mode necessary for
yuv422smp capture. Future revisions will, but for the initial rev force it
to yuv422bt656 mode which requires an 8bit video data bus.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: use hdmiinfmt env var to override HDMI capture format
Tim Harvey [Wed, 8 Apr 2015 19:55:01 +0000 (12:55 -0700)]
imx: ventana: use hdmiinfmt env var to override HDMI capture format

The HDMI receiver used on the GW54xx and GW551x has a 16bit video data bus
interconnect between it and the IMX6 CSI. This can be used in two different
modes, each having advantages and disadvantages. Allow the hdmiinfmt env
var to specify which format is desired (yuv422smp or yuv422bt656).

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: add DT fixup for GW522x to change PCIE_RST# GPIO
Pushpal Sidhu [Wed, 8 Apr 2015 19:55:00 +0000 (12:55 -0700)]
imx: ventana: add DT fixup for GW522x to change PCIE_RST# GPIO

The GW522x is functionally the same as a GW52xx except for PCIE_RST#
GPIO. Add a DT fixup to change this gpio upon bootup.

Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: add 'gsc wd' command for enabling and disabling GSC watchdog
Tim Harvey [Wed, 8 Apr 2015 19:54:59 +0000 (12:54 -0700)]
imx: ventana: add 'gsc wd' command for enabling and disabling GSC watchdog

This adds information about the Gateworks System Controller to the gsc command
such as the firmware version, firmware CRC and status of the GSC watchdog
(if its enabled and if its tripped).

Additionally the 'gsc wd' command can be used to enable or disable the
watchdog with the following usage:
 gsc wd enable [30|60]
 gsc wd disable

Note that the GSC registers are battery-backed by the GSC coincell so once
eanbled, they remain enabled across power-cycles or until either the GSC
firmware has been updated or FLASH has been re-programmed by the Gateworks
JTAG adapter.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: added device-tree display configuration for LVDS displays
Tim Harvey [Wed, 8 Apr 2015 19:54:58 +0000 (12:54 -0700)]
imx: ventana: added device-tree display configuration for LVDS displays

Configure kernel device-tree for display from env var. This is useful
to specify the display present when the device-tree supports multiple
non-detectable display configurations.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: add support for DLC-700JMGT4 and DLC-800FIGT3 LCD displays
Tim Harvey [Wed, 8 Apr 2015 19:54:57 +0000 (12:54 -0700)]
imx: ventana: add support for DLC-700JMGT4 and DLC-800FIGT3 LCD displays

Add LVDS support for two LVDS LCD displays:
 DLC-700JMGT4 - 7" 1024x600
 DLC-800FIGT3 - 8" 1024x768

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: add DT fixup for GW54xx compatibility with older kernels
Tim Harvey [Wed, 8 Apr 2015 19:54:56 +0000 (12:54 -0700)]
imx: ventana: add DT fixup for GW54xx compatibility with older kernels

Certain older kernels in use by some customers erroneously define a uart3
for GW54xx with a pinmux that conflicts with NAND. This will remove
that node to avoid such conflicts.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: remove 128x16 calibration (share with 128x32)
Tim Harvey [Wed, 8 Apr 2015 19:54:55 +0000 (12:54 -0700)]
imx: ventana: remove 128x16 calibration (share with 128x32)

The calibration data for dual 2Gb density chips can be used for a single 2Gb
density chip.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: updated 16bit DDR calibration
Tim Harvey [Wed, 8 Apr 2015 19:54:54 +0000 (12:54 -0700)]
imx: ventana: updated 16bit DDR calibration

Updated 16bit DDR calibration using values obtained from running the
i.MX6 DDR Stress Test tool over a set of boards over full operationg
temperature.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: added DT fixup for GW551x-A video input
Tim Harvey [Wed, 8 Apr 2015 19:54:53 +0000 (12:54 -0700)]
imx: ventana: added DT fixup for GW551x-A video input

The GW551x-A revision does not have the CSI0_DATA_EN pin connected, therefore
we need to make sure that signal is not muxed to the CSI_DATA_EN signal
internally and do so by steering it to the unused GPIO5_IO20.

We do this so that the kernel device-tree can properly define the signal for
RevB and beyond boards that do have this hooked up properly and require it.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: gsc: add new hwmon rails
Tim Harvey [Wed, 8 Apr 2015 19:54:52 +0000 (12:54 -0700)]
imx: ventana: gsc: add new hwmon rails

Add a new voltage rail added in various -C revision PCB's.

Additionally make VDD_CORE, VDD_SOC, and VDD_IO2 common as all Ventana boards
have those.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: add mem_mb dynamic env var
Tim Harvey [Wed, 8 Apr 2015 19:54:51 +0000 (12:54 -0700)]
imx: ventana: add mem_mb dynamic env var

Certain OS bootscripts need to know how much memory a board has to adjust
kernel parameters (namely Android). This allows those boards to determine
mem size in MB.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: remove GSC hwmon voltage rail min/max test
Tim Harvey [Wed, 8 Apr 2015 19:54:50 +0000 (12:54 -0700)]
imx: ventana: remove GSC hwmon voltage rail min/max test

The min/max of each depends not only on board but on CPU. Simplify by removing
this rarely needed and difficult to maintain feature and just display the
rails and their values.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: update boot scripts to support ubifs boot vol
Tim Harvey [Wed, 8 Apr 2015 19:54:49 +0000 (12:54 -0700)]
imx: ventana: update boot scripts to support ubifs boot vol

Added support in default boot scripts to find kernel/dtbs on a boot volume
separate from rootfs volume.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: only pinmux FEC enet signals for boards using it
Tim Harvey [Wed, 8 Apr 2015 19:54:48 +0000 (12:54 -0700)]
imx: ventana: only pinmux FEC enet signals for boards using it

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: add wdis config for GW5520
Tim Harvey [Wed, 8 Apr 2015 19:54:47 +0000 (12:54 -0700)]
imx: ventana: add wdis config for GW5520

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: add usb_pgood_delay 2sec default
Tim Harvey [Wed, 8 Apr 2015 19:54:46 +0000 (12:54 -0700)]
imx: ventana: add usb_pgood_delay 2sec default

We have encountered many USB storage devices that require more warm-up
than the spec allows for.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: Add support for GW551x
Tim Harvey [Wed, 8 Apr 2015 19:54:45 +0000 (12:54 -0700)]
imx: ventana: Add support for GW551x

The GW551x is a small form factor board based on the IMX6 SoC that includes:
 * up to 512MB DDR3 memory
 * up to 2GB NAND flash
 * 1x miniPCIe socket (with USB)
 * HDMI out (micro-HDMI)
 * HDMI in (micro-HDMI)
 * TTL level I/O (supported by GW16111 breakout board):
  * I2C
  * 2x UART
  * CAN
  * 2x DIO (GPIO/PWM)
  * USB OTG

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: disable IMX6 watchdogs on GW51xx RevA and RevB
Tim Harvey [Wed, 8 Apr 2015 19:54:44 +0000 (12:54 -0700)]
imx: ventana: disable IMX6 watchdogs on GW51xx RevA and RevB

A board level errata causes the IMX6 watchdog to be unstable on the GW51xx
RevA and RevB boards which can cause the watchdog to trip extremely early
(under 5seconds) under certain operating conditions. Disable the watchdog
node in the device-tree to work around this issue.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: fix various sparse warnings
Tim Harvey [Wed, 8 Apr 2015 19:54:43 +0000 (12:54 -0700)]
imx: ventana: fix various sparse warnings

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: config: enable EXT4 filesystem read/write support
Tim Harvey [Wed, 8 Apr 2015 19:54:42 +0000 (12:54 -0700)]
imx: ventana: config: enable EXT4 filesystem read/write support

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: config: enable edid support
Tim Harvey [Wed, 8 Apr 2015 19:54:41 +0000 (12:54 -0700)]
imx: ventana: config: enable edid support

Enable the 'i2c edid' command to query and display data from an attached
HDMI monitor of LVDS display with an EDID device.

Example:
 Ventana > i2c dev 2 && i2c edid 0x50

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: config: Support ramdisk
Tim Harvey [Wed, 8 Apr 2015 19:54:40 +0000 (12:54 -0700)]
imx: ventana: config: Support ramdisk

Set the initrd_high env so that ramdisk range can be properly set.

See commit 7e9603e and README

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: config: add USB Mass Storage (ums) support
Tim Harvey [Wed, 8 Apr 2015 19:54:39 +0000 (12:54 -0700)]
imx: ventana: config: add USB Mass Storage (ums) support

Add support for the USB mass storage gadget to enable access to on-board
storage.

Example:
 Ventana > ums 0 mmc 0 # provide ums access to the uSD
 Ventana > ums 0 usb 0 # provide ums access to the first USB device
 Ventana > ums 0 sata 0 # provide ums access to an mSATA device

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: set LTC3676 PMIC to appropriate values per datasheet
Tim Harvey [Wed, 8 Apr 2015 19:54:38 +0000 (12:54 -0700)]
imx: ventana: set LTC3676 PMIC to appropriate values per datasheet

The IMX6 Datasheets specifies that when the IMX6 LDO is enabled
(internal Anatop LDO's for VDD_ARM, VDD_SOC, and VDD_xPU) you need to
provide 1350mV on VDD_ARM_IN and VDD_SOC_IN for IMX6Q@1GHz (Automotive)
and 1275mV for IMX6DL@800MHz (Industrial). While we are still about 50mV
shy on the IMX6Q operating at 1GHz we set it to the max we can and leave it
up to the kernel to implement a regulator driver for the LTC3676 and put
the LDO's in bypass mode which allows us to drop the voltages by 125mV
respectively.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: add support for 4Gb density mem devices with IMX6DL
Tim Harvey [Wed, 8 Apr 2015 19:54:37 +0000 (12:54 -0700)]
imx: ventana: add support for 4Gb density mem devices with IMX6DL

Signed-off-by: Tim Harvey <tharvey@gateworks.com>