]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
11 years agoadd missing \n KARO-2012-06-14
Lothar Waßmann [Thu, 14 Jun 2012 13:24:26 +0000 (15:24 +0200)]
add missing \n

11 years agosupport TX51 board variants
Lothar Waßmann [Thu, 14 Jun 2012 13:20:33 +0000 (15:20 +0200)]
support TX51 board variants

11 years agoproperly support TX51 board variants
Lothar Waßmann [Thu, 14 Jun 2012 13:20:09 +0000 (15:20 +0200)]
properly support TX51 board variants

11 years agocleanup
Lothar Waßmann [Thu, 14 Jun 2012 13:19:36 +0000 (15:19 +0200)]
cleanup

11 years agoproperly support TX51 board variants
Lothar Waßmann [Thu, 14 Jun 2012 13:19:02 +0000 (15:19 +0200)]
properly support TX51 board variants

11 years agoFix setting of DDR clock in case DDR_HF_SEL is set
Lothar Waßmann [Thu, 14 Jun 2012 13:18:08 +0000 (15:18 +0200)]
Fix setting of DDR clock in case DDR_HF_SEL is set

11 years agosilence debug output
Lothar Waßmann [Thu, 14 Jun 2012 10:29:23 +0000 (12:29 +0200)]
silence debug output

11 years agoremoved debug code
Lothar Waßmann [Thu, 14 Jun 2012 10:16:17 +0000 (12:16 +0200)]
removed debug code

11 years agoTX51 support
Lothar Waßmann [Thu, 14 Jun 2012 09:50:04 +0000 (11:50 +0200)]
TX51 support

11 years ago- flush dcache where appropriate
Lothar Waßmann [Thu, 14 Jun 2012 09:46:01 +0000 (11:46 +0200)]
- flush dcache where appropriate
- remove bogus casts from void pointers
- use kzalloc() instead of malloc()

11 years ago- change esdhc_base to void __iomem pointer
Lothar Waßmann [Thu, 14 Jun 2012 09:44:24 +0000 (11:44 +0200)]
- change esdhc_base to void __iomem pointer
- add cd_gpio, wp_gpio

11 years agomake locally used variables static
Lothar Waßmann [Thu, 14 Jun 2012 09:43:59 +0000 (11:43 +0200)]
make locally used variables static

11 years agoUse current mxc_nand driver from mainline Linux
Lothar Waßmann [Thu, 14 Jun 2012 09:39:36 +0000 (11:39 +0200)]
Use current mxc_nand driver from mainline Linux

11 years ago- use '-x assembler-with-cpp' option to prevent dtc syntax errors
Lothar Waßmann [Thu, 14 Jun 2012 09:30:36 +0000 (11:30 +0200)]
- use '-x assembler-with-cpp' option to prevent dtc syntax errors
- make sure error messages from dtc are displayed rather than assigned to 'rc' variable
- check for empty $(LDSCRIPT) when trying to find out output format

11 years agocleanup
Lothar Waßmann [Thu, 14 Jun 2012 09:28:41 +0000 (11:28 +0200)]
cleanup

11 years agoset data register before direction register to prevent glitches when switching GPIO...
Lothar Waßmann [Thu, 14 Jun 2012 09:17:24 +0000 (11:17 +0200)]
set data register before direction register to prevent glitches when switching GPIO direction

11 years agoadd missing () around macro params
Lothar Waßmann [Thu, 14 Jun 2012 08:44:06 +0000 (10:44 +0200)]
add missing () around macro params

11 years agocleanup
Lothar Waßmann [Thu, 14 Jun 2012 08:43:22 +0000 (10:43 +0200)]
cleanup

11 years agoUse the actual code start address for relocation
Lothar Waßmann [Thu, 14 Jun 2012 08:42:49 +0000 (10:42 +0200)]
Use the actual code start address for relocation

11 years ago- enable caches
Lothar Waßmann [Thu, 14 Jun 2012 08:26:21 +0000 (10:26 +0200)]
- enable caches
- make imx_get_mac_from_fuse() overrideable from platform code
- add hw_watchdog_reset()

11 years agoFix broken timer code
Lothar Waßmann [Thu, 14 Jun 2012 08:09:37 +0000 (10:09 +0200)]
Fix broken timer code

11 years agoCombine consecutive inline asm instructions into one statement to
Lothar Waßmann [Thu, 14 Jun 2012 07:56:58 +0000 (09:56 +0200)]
Combine consecutive inline asm instructions into one statement to
prevent them from being reordered.
The GCC manual states:
| Similarly, you can't expect a sequence of volatile asm instructions
| to remain perfectly consecutive. If you want consecutive output, use a
| single asm. Also, GCC will perform some optimizations across a
| volatile asm instruction; GCC does not “forget everything” when it
| encounters a volatile asm instruction the way some other compilers do.

11 years agoAdd iomux-v3 support
Lothar Waßmann [Thu, 14 Jun 2012 06:52:55 +0000 (08:52 +0200)]
Add iomux-v3 support

11 years agoDon't clear reset reason, so that the OS can still read it
Lothar Waßmann [Thu, 14 Jun 2012 06:47:15 +0000 (08:47 +0200)]
Don't clear reset reason, so that the OS can still read it

11 years agomerged denx master branch
Lothar Waßmann [Tue, 22 May 2012 14:57:48 +0000 (16:57 +0200)]
merged denx master branch

11 years agoOMAP4/5: Change omap4_sdp, omap4_panda, omap5_evm maintainer
SRICHARAN R [Tue, 8 May 2012 19:16:35 +0000 (19:16 +0000)]
OMAP4/5: Change omap4_sdp, omap4_panda, omap5_evm maintainer

Signed-off-by: R Sricharan <r.sricharan@ti.com>
CC: Aneesh V <aneesh@ti.com>
CC: Tom Rini <trini@ti.com>
Acked-by: Aneesh V <aneesh@ti.com>
11 years agoARM: omap3: Add CONFIG_SPL_BOARD_INIT for CONFIG_SPL_MMC_SUPPORT
Tom Rini [Tue, 8 May 2012 07:29:32 +0000 (07:29 +0000)]
ARM: omap3: Add CONFIG_SPL_BOARD_INIT for CONFIG_SPL_MMC_SUPPORT

As originally reported against beagleboard we currently have the
following error message reported in SPL:

U-Boot SPL 2012.04-00020-gb8310b9-dirty (Apr 25 2012 - 18:49:57)
Texas Instruments Revision detection unimplemented
OMAP SD/MMC: 0
timed out in wait_for_bb: I2C_STAT=1000
reading u-boot.img
....

The reason for above message is that when booting from MMC, I2C needs to
be initialized to talk with the TWL4030.  On OMAP3 I2C is only
initalized in SPL if CONFIG_SPL_BOARD_INIT is set.

Cc: Thomas Weber <weber@corscience.de>
Cc: Steve Sakoman <sakoman@gmail.com>
Original patch for Beagleboard is:
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Extended to cover all other boards:
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoARM: omap3: Set SPL stack size to 8KB, image to 54KB.
Tom Rini [Tue, 8 May 2012 07:29:31 +0000 (07:29 +0000)]
ARM: omap3: Set SPL stack size to 8KB, image to 54KB.

With older toolchains it is possible to not fit entirely into the 45KB
that we had assigned to SPL.  Adjust to allow for 8KB of stack (which
should be more than required) and 54KB of text/data.

Cc: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Nagendra T S <nagendra@mistralsolutions.com>
Cc: Thomas Weber <weber@corscience.de>
Cc: Ilya Yanok <yanok@emcraft.com>
Cc: Steve Sakoman <sakoman@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
11 years agoarm, omap3: fix warm reset serial output on OMAP36xx/AM/DM37xx
Matt Porter [Mon, 7 May 2012 16:49:21 +0000 (16:49 +0000)]
arm, omap3: fix warm reset serial output on OMAP36xx/AM/DM37xx

In warm reset conditions on OMAP36xx/AM/DM37xx the rom code
incorrectly sets the DPLL4 clock input divider to /6.5 which
is an invalid value unless the input clock is 13MHz. When a JTAG
emulator is attached, a warm reset is necessary after the emulator
gains control of the process. This results in a loss of serial
output due to the invalid DPLL4 settings.

This patch fixes the issue by resetting the DPLL4 clock input
divider to /1 when the input clock is not 13MHz. AM/DM37x TRM
section 3.5.3.3.3.2.1 specifies that the /6.5 setting is only
used when the input clock is 13MHz.

Signed-off-by: Matt Porter <mporter@ti.com>
11 years agoOMAP4: Set fdt_high for OMAP4 devices to enable booting with Device Tree
Jon Hunter [Tue, 1 May 2012 10:05:08 +0000 (10:05 +0000)]
OMAP4: Set fdt_high for OMAP4 devices to enable booting with Device Tree

For OMAP4 boards, such as the panda-es, that have 1GB of memory the linux
kernel fails to locate the device tree blob on boot. The reason being is that
u-boot is copying the DT blob to the upper part of RAM when booting the kernel
and the kernel is unable to access the blob. By setting the fdt_high variable
to either 0xffffffff (to prevent the copy) or 0xac000000 (704MB boundary
of memory for OMAP4) the kernel is able to locate the DT blob and boot.

Based upon following patch by Dirk Behme set the fdt_high variable to allow
booting with device tree on OMAP4 boards.

"7e9603e i.mx6q: configs: Add fdt_high and initrd_high variables"

Cc: Sricharan R <r.sricharan@ti.com>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
11 years agoomap4: do not enable auxiliary cores
Tero Kristo [Wed, 25 Apr 2012 06:05:21 +0000 (06:05 +0000)]
omap4: do not enable auxiliary cores

Booting up these cores (dsp / ivahd / cortex-m3) is bad without
firmware running on them, and they will hang preventing any kind
of sleep transitions later on with the kernel.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: R Sricharan <r.sricharan@ti.com>
11 years agoomap4: do not enable fs-usb module
Tero Kristo [Wed, 25 Apr 2012 06:05:20 +0000 (06:05 +0000)]
omap4: do not enable fs-usb module

If this is done in the bootloader, the FS-USB will later be stuck into
intransition state, which will prevent the device from entering idle.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
11 years agoomap4: panda: disable uart2 pads during boot
Tero Kristo [Wed, 25 Apr 2012 06:05:19 +0000 (06:05 +0000)]
omap4: panda: disable uart2 pads during boot

If uart2 is enabled during boot, spurious wifi chip transmission will
hang the module and it is impossible to recover from this situation
without hard reset. This will prevent any l4_per domain idle
transitions.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
11 years agoigep00x0: change mpurate from 500 to auto
Enric Balletbo i Serra [Wed, 25 Apr 2012 02:34:31 +0000 (02:34 +0000)]
igep00x0: change mpurate from 500 to auto

This patch changes the default mpurate variable from 500 to auto on
all IGEP boards, with this the default rate is autoselected.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
11 years agoigep00x0: enable the use of a plain text file
Enric Balletbo i Serra [Wed, 25 Apr 2012 02:33:50 +0000 (02:33 +0000)]
igep00x0: enable the use of a plain text file

Based on commit cf073e49bc3502be1b48a0e3faf0cde9edbb89db for beagleboard

Using the new env import command it is possible to use plain text files instead
of script-images. Plain text files are much easier to handle.

E.g. If your boot.scr contains the following:
 -----------------------------------
setenv dvimode 1024x768-16@60
run loaduimage
run mmcboot
-----------------------------------
you could create a file named uEnv.txt and use that instead of boot.scr:
 -----------------------------------
dvimode=1024x768-16@60
uenvcmd=run loaduimage; run mmcboot
-----------------------------------
The variable uenvcmd (if existent) will be executed (using run) after uEnv.txt
was loaded. If uenvcmd doesn't exist the default boot sequence will be started,
therefore you could just use
-----------------------------------
dvimode=1024x768-16@60
-----------------------------------
as uEnv.txt because loaduimage and mmcboot is part of the default boot sequence

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
11 years agotegra2: trivially enable 13 mhz crystal frequency
Lucas Stach [Tue, 1 May 2012 12:50:05 +0000 (12:50 +0000)]
tegra2: trivially enable 13 mhz crystal frequency

This is needed for upcoming Toradex Colibri T20 upstream support.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Enable keyboard for Seaboard
Simon Glass [Tue, 17 Apr 2012 09:01:37 +0000 (09:01 +0000)]
tegra: Enable keyboard for Seaboard

This enables the standard keyboard on Seaboard.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Switch on console mux and use environment for console
Simon Glass [Tue, 17 Apr 2012 09:01:36 +0000 (09:01 +0000)]
tegra: Switch on console mux and use environment for console

All tegra boards will use these options by default.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Add tegra keyboard driver
Rakesh Iyer [Tue, 17 Apr 2012 09:01:35 +0000 (09:01 +0000)]
tegra: Add tegra keyboard driver

Add support for internal matrix keyboard controller for Nvidia Tegra
platforms. This driver uses the fdt decode function to obtain its key
codes.

Support for the Ctrl modifier is provided. The left and right ctrl keys are
dealt with in the same way.

This uses the new keyboard input library (drivers/input/input.c) to decode
keys and handle most of the common input logic. The new key matrix library
is also used to decode (row, column) key positions into key codes.

The intent is to make this driver purely about dealing with the hardware.

Key detection before the driver is loaded is supported. This key will be
picked up when the keyboard driver is initialized.

Modified by Bernie Thompson <bhthompson@chromium.org> and
Simon Glass <sjg@chromium.org> for device tree, input layer, key matrix
and various other things.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: fdt: Add keyboard definitions for Seaboard
Anton Staff [Tue, 17 Apr 2012 09:01:34 +0000 (09:01 +0000)]
tegra: fdt: Add keyboard definitions for Seaboard

Seaboard uses a QUERTY keyboard. We add key codes for this to
enable key scanning to work.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: fdt: Add keyboard controller definition
Anton Staff [Tue, 17 Apr 2012 09:01:33 +0000 (09:01 +0000)]
tegra: fdt: Add keyboard controller definition

The Tegra keyboard controller provides a simple interface to a matrix
keyboard.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Add keyboard support to funcmux
Simon Glass [Tue, 17 Apr 2012 09:01:32 +0000 (09:01 +0000)]
tegra: Add keyboard support to funcmux

Add funcmux support for the default keyboard mapping.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoinput: Add support for keyboard matrix decoding from an fdt
Bernie Thompson [Tue, 17 Apr 2012 09:01:31 +0000 (09:01 +0000)]
input: Add support for keyboard matrix decoding from an fdt

Matrix keyboards require a key map to be set up, and must also deal with
key ghosting.

Create a keyboard matrix management implementation which can be leveraged
by various keyboard drivers. This includes code to read the keymap from
the FDT and perform debouncing.

Signed-off-by: Bernie Thompson <bhthompson@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoinput: Add generic keyboard input handler
Simon Glass [Tue, 17 Apr 2012 09:01:30 +0000 (09:01 +0000)]
input: Add generic keyboard input handler

Add a module which understands converting key codes (or scan codes)
to ASCII characters. It includes FIFO support and can call back to
drivers to read new characters when its FIFO is empty.

Keycode maps are provided for un-modified, shift and ctrl keys.

The plan is to use this module where such mapping is required.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoinput: Add linux/input.h for key code support
Simon Glass [Tue, 17 Apr 2012 09:01:29 +0000 (09:01 +0000)]
input: Add linux/input.h for key code support

We want to able to decode Linux fdt keymaps, so bring part of this
enormous header file over to U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agofdt: Add fdtdec functions to read byte array
Anton Staff [Tue, 17 Apr 2012 09:01:28 +0000 (09:01 +0000)]
fdt: Add fdtdec functions to read byte array

Sometimes we don't need a full cell for each value. This provides
a simple function to read a byte array, both with and without
copying it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Enable LP0 on Seaboard
Simon Glass [Mon, 2 Apr 2012 13:19:03 +0000 (13:19 +0000)]
tegra: Enable LP0 on Seaboard

This enables LP0 to support suspend / resume on Seaboard.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: fdt: Add EMC data for Tegra2 Seaboard
Simon Glass [Thu, 5 Apr 2012 11:55:15 +0000 (11:55 +0000)]
tegra: fdt: Add EMC data for Tegra2 Seaboard

This adds timings for T20 and T25 Seaboards, using the bindings found here:

http://patchwork.ozlabs.org/patch/132928/

We supply both full speed options for normal running, and half speed options
for testing / development.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: i2c: Add function to find DVC bus
Simon Glass [Mon, 2 Apr 2012 13:19:01 +0000 (13:19 +0000)]
tegra: i2c: Add function to find DVC bus

Add tegra_i2c_get_dvc_bus_num() to obtain the I2C bus number of DVC bus.
This allows us to talk to the PMU.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agofdt: tegra: Add EMC node to device tree
Simon Glass [Mon, 2 Apr 2012 13:19:00 +0000 (13:19 +0000)]
fdt: tegra: Add EMC node to device tree

Add a definition of the memory controller node according to the bindings
here:

http://patchwork.ozlabs.org/patch/132928/

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Add EMC settings for Seaboard
Jimmy Zhang [Tue, 10 Apr 2012 05:17:06 +0000 (05:17 +0000)]
tegra: Add EMC settings for Seaboard

Set Seaboard to optimal memory settings based on the SOC in use (T20 or T25).

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Turn off power detect in board init
Wei Ni [Mon, 2 Apr 2012 13:18:58 +0000 (13:18 +0000)]
tegra: Turn off power detect in board init

Tegra core power rail has leakage voltage around 0.2V while system in
suspend mode. The source of the leakage should be coming from PMC power
detect logic for IO rails power detection.
That can be disabled by writing a '0' to PWR_DET_LATCH followed by writing '0'
to PWR_DET (APBDEV_PMC_PWR_DET_0).

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Set up warmboot code on Nvidia boards
Simon Glass [Mon, 2 Apr 2012 13:18:57 +0000 (13:18 +0000)]
tegra: Set up warmboot code on Nvidia boards

Call the function to put warmboot boot in a suitable place for resume.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Setup PMC scratch info from ap20 setup
Yen Lin [Mon, 2 Apr 2012 13:18:56 +0000 (13:18 +0000)]
tegra: Setup PMC scratch info from ap20 setup

Save SDRAM parameters into the warmboot scratch registers

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Yen Lin <yelin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Add warmboot implementation
Yen Lin [Tue, 10 Apr 2012 05:17:02 +0000 (05:17 +0000)]
tegra: Add warmboot implementation

Add code to set up the warm boot area in the Tegra CPU ready for a
resume after suspend.

Signed-off-by: Yen Lin <yelin@nvidia.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Set up PMU for Nvidia boards
Simon Glass [Mon, 2 Apr 2012 13:18:54 +0000 (13:18 +0000)]
tegra: Set up PMU for Nvidia boards

Adjust PMU to permit maximum frequency operation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Add PMU to manage power supplies
Jimmy Zhang [Mon, 2 Apr 2012 13:18:53 +0000 (13:18 +0000)]
tegra: Add PMU to manage power supplies

Power supplies must be adjusted in line with clock frequency. This code
provides a simple routine to set the voltage to allow operation at maximum
frequency.

- Split PMU code into separate TPS6586X driver

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Add EMC support for optimal memory timings
Jimmy Zhang [Mon, 2 Apr 2012 13:18:52 +0000 (13:18 +0000)]
tegra: Add EMC support for optimal memory timings

Add support for setting up the memory controller parameters. Boards
can set up an appropriate table in the device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Add header file for APB_MISC register
Simon Glass [Mon, 2 Apr 2012 13:18:51 +0000 (13:18 +0000)]
tegra: Add header file for APB_MISC register

Add a basic header file for this register, to be filled in as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Add tegra_get_chip_type() to detect SKU
Simon Glass [Mon, 2 Apr 2012 13:18:50 +0000 (13:18 +0000)]
tegra: Add tegra_get_chip_type() to detect SKU

We want to know which type of chip we are running on - the Tegra
family has several SKUs. This can be determined by reading a
fuse register, so add this function to ap20.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Add flow, gp_padctl, fuse, sdram headers
Yen Lin [Mon, 2 Apr 2012 13:18:49 +0000 (13:18 +0000)]
tegra: Add flow, gp_padctl, fuse, sdram headers

These headers provide access to additional Tegra features.

flow - start/stop CPUs
sdram - parameters for SDRAM
fuse - access to on-chip fuses / security settings
gp_padctl - pad control and general purpose registers

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Yen Lin <yelin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Add crypto library for warmboot code
Yen Lin [Mon, 2 Apr 2012 13:18:48 +0000 (13:18 +0000)]
tegra: Add crypto library for warmboot code

Provides an interface to aes.c for the warmboot code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Yen Lin <yelin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Add functions to access low-level Osc/PLL details
Simon Glass [Mon, 2 Apr 2012 13:18:47 +0000 (13:18 +0000)]
tegra: Add functions to access low-level Osc/PLL details

Add clock_ll_read_pll() to read PLL parameters and clock_get_osc_bypass()
to find out if the Oscillator is bypassed. These are needed by warmboot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: Move ap20.h header into arch location
Simon Glass [Mon, 2 Apr 2012 13:18:46 +0000 (13:18 +0000)]
tegra: Move ap20.h header into arch location

We want to include this from board code, so move the header into
an easily-accessible location.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoAdd AES crypto library
Yen Lin [Thu, 5 Apr 2012 11:54:58 +0000 (11:54 +0000)]
Add AES crypto library

Add support for AES using an implementation from Karl Malbrain.
This offers small code size (around 5KB on ARM) and supports 128-bit
AES only.

Signed-off-by: Yen Lin <yelin@nvidia.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoi2c: Add TPS6586X driver
Simon Glass [Mon, 2 Apr 2012 13:18:44 +0000 (13:18 +0000)]
i2c: Add TPS6586X driver

This power management chip supports battery charging and a large number
of power supplies. This initial driver only provides the ability to adjust
the two synchronous buck converters SM0 and SM1 in a stepwise manner.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoAdd abs() macro to return absolute value
Simon Glass [Thu, 10 May 2012 11:37:35 +0000 (11:37 +0000)]
Add abs() macro to return absolute value

This macro is generally useful to make it available in common.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Acked-by: Tom Rini <trini@ti.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
11 years agofdt: Add function to return next compatible subnode
Simon Glass [Mon, 2 Apr 2012 13:18:42 +0000 (13:18 +0000)]
fdt: Add function to return next compatible subnode

We need to iterate through subnodes of a parent, looking only at
compatible nodes. Add a utility function to do this for us.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agofdt: Add function to locate an array in the device tree
Simon Glass [Mon, 2 Apr 2012 13:18:41 +0000 (13:18 +0000)]
fdt: Add function to locate an array in the device tree

fdtdec_locate_array() locates an integer array but does not copy it. This
saves the caller having to allocated wasted space.

Access to array elements should be through the fdt32_to_cpu() macro.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoi.MX28: Avoid redefining serial_put[cs]()
Marek Vasut [Tue, 1 May 2012 11:09:53 +0000 (11:09 +0000)]
i.MX28: Avoid redefining serial_put[cs]()

Do not define serial_putc() and serial_puts() calls if
CONFIG_SPL_SERIAL_SUPPORT is set.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoi.MX28: Check if WP detection is implemented at all
Marek Vasut [Tue, 1 May 2012 11:09:52 +0000 (11:09 +0000)]
i.MX28: Check if WP detection is implemented at all

If the WP function is NULL, simply assume the card is always RW.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoi.MX28: Add battery boot components to SPL
Marek Vasut [Tue, 1 May 2012 11:09:51 +0000 (11:09 +0000)]
i.MX28: Add battery boot components to SPL

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
11 years agoi.MX28: Reorder battery status functions in SPL
Marek Vasut [Tue, 1 May 2012 11:09:50 +0000 (11:09 +0000)]
i.MX28: Reorder battery status functions in SPL

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
11 years agoi.MX28: Add LRADC init to i.MX28 SPL
Marek Vasut [Tue, 1 May 2012 11:09:49 +0000 (11:09 +0000)]
i.MX28: Add LRADC init to i.MX28 SPL

This code is part of battery boot support for i.MX28.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
11 years agoi.MX28: Add LRADC register definitions
Marek Vasut [Tue, 1 May 2012 11:09:48 +0000 (11:09 +0000)]
i.MX28: Add LRADC register definitions

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
11 years agoi.MX28: Shut down the LCD controller before reset
Marek Vasut [Tue, 1 May 2012 11:09:47 +0000 (11:09 +0000)]
i.MX28: Shut down the LCD controller before reset

If the LCD controller is on before the CPU goes into reset, the traffic on LCDIF
data pins interferes with the BootROM's boot mode sampling. So shut the
controller down.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
11 years agoi.MX28: Add LCDIF register definitions
Marek Vasut [Tue, 1 May 2012 11:09:46 +0000 (11:09 +0000)]
i.MX28: Add LCDIF register definitions

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
11 years agoi.MX28: Implement boot pads sampling and reporting
Marek Vasut [Tue, 1 May 2012 11:09:45 +0000 (11:09 +0000)]
i.MX28: Implement boot pads sampling and reporting

This patch implements code that samples i.MX28 boot pads and reports boot mode
accordingly.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
11 years agoi.MX28: Improve passing of data from SPL to U-Boot
Marek Vasut [Tue, 1 May 2012 11:09:44 +0000 (11:09 +0000)]
i.MX28: Improve passing of data from SPL to U-Boot

Pass memory size from SPL via structure located in SRAM instead of SCRATCH
registers. This allows passing more data about boot from SPL to U-Boot, like the
boot mode pads configuration.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
11 years agoM28EVK: Add SD update command
Marek Vasut [Tue, 1 May 2012 11:09:43 +0000 (11:09 +0000)]
M28EVK: Add SD update command

Add "update_sd_firmware" command to easily reload the SD card of
m28evk kit. This comes handy when the board boots from SD card.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
11 years agoM28EVK: Implement support for new board V2.0
Marek Vasut [Tue, 1 May 2012 11:09:42 +0000 (11:09 +0000)]
M28EVK: Implement support for new board V2.0

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
11 years agoFEC: Abstract out register setup
Marek Vasut [Tue, 1 May 2012 11:09:41 +0000 (11:09 +0000)]
FEC: Abstract out register setup

Abstract out common register setup. This also configured r_cntrl
to correct value at registration time.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
11 years agoMX5: PAD_CTL_DRV_VOT_LOW and PAD_CTL_DRV_VOT_HIGH exchanged
Stefano Babic [Wed, 9 May 2012 10:07:31 +0000 (12:07 +0200)]
MX5: PAD_CTL_DRV_VOT_LOW and PAD_CTL_DRV_VOT_HIGH exchanged

After an update to the MX51 reference manual (Rev. 5), the
values of the PAD_CTL_DRV_VOT_LOW and PAD_CTL_DRV_VOT_HIGH
are now clearly wrong:

"Bit 13:
High / Low Output Voltage Range. This bit selects the output voltage mode for
SD2_CMD. 0 High output voltage mode
1 Low output voltage mode"

The values are currently negated in code - fixed.

Reported-by: David Jander <david.jander@protonic.nl>
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Marek Vasut <marek.vasut@gmail.com>
CC: David Jander <david.jander@protonic.nl>
Acked-by: David Jander <david.jander@protonic.nl>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
11 years agoi.MX28: Add delay after CPU bypass is cleared
Marek Vasut [Fri, 4 May 2012 01:32:50 +0000 (01:32 +0000)]
i.MX28: Add delay after CPU bypass is cleared

This solves issues when larger amount of DRAM is used, like 256MB.
Behave the same in case of CPU bypass as we do in case of EMI
bypass, but wait 15 ms. We need to wait until the clock domain
stabilizes.

This issue seemed to have been caused by not waiting after frobbing
with the CPU bypass, it was unrelated to memory, but had a direct
impact, causing trouble. This was yet another X-File of the
imx-bootlets, sigh. The conclusion is, trying a semi-random delay
(there is delay after the EMI bypass change), the issue is fixed.

Another possible explanation is that we do not do the "simple memory
test" FSL does in their imx-bootlets (1000 R/W cycles to/from piece of
the memory, while also outputing something on the serial port). This
might have caused the similar delay in the imx-bootlets and therefore
they didn't need to add this explicitly.

For now, this seems good fix enough, but to me, whole that memory
init code in imx-bootlets is completely flunked and it'd need deeper
investigation.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
11 years agospi: mxs: Allow other chip selects to work
Fabio Estevam [Mon, 23 Apr 2012 08:30:50 +0000 (08:30 +0000)]
spi: mxs: Allow other chip selects to work

MXS SSP controller may have up to three chip selects per port: SS0, SS1 and SS2.

Currently only SS0 is supported in the mxs_spi driver.

Allow all the three chip select to work by selecting the desired one
in bits 20 and 21 of the HW_SSP_CTRL0 register.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
11 years agospi: mxs: Introduce spi_cs_is_valid()
Fabio Estevam [Mon, 23 Apr 2012 08:30:49 +0000 (08:30 +0000)]
spi: mxs: Introduce spi_cs_is_valid()

Introduce spi_cs_is_valid() for validating spi bus and chip select numbers.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
11 years agomx53loco: Remove unneeded gpio_set_value()
Fabio Estevam [Mon, 7 May 2012 10:42:57 +0000 (10:42 +0000)]
mx53loco: Remove unneeded gpio_set_value()

There is no need to set the VBUS power enable to 0 first and then to 1.

Set it to 1 in the gpio_direction_output() function.

While at it, use the standard naming convention for the GPIO comment.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agomx53loco: Add CONFIG_REVISION_TAG
Fabio Estevam [Tue, 8 May 2012 03:40:49 +0000 (03:40 +0000)]
mx53loco: Add CONFIG_REVISION_TAG

FSL 2.6.35 kernel assumes that the bootloader passes the CONFIG_REVISION_TAG information.

The kernel uses this data to distinguish between Dialog versus mc34708 based boards,
and also to distinguish between revA and revB of the mc34708 based boards.

Suggested-by: Yu Li <yk@magniel.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agomx53loco: Turn on VUSB regulator
Fabio Estevam [Mon, 7 May 2012 10:26:00 +0000 (10:26 +0000)]
mx53loco: Turn on VUSB regulator

On the mx53loco board with mc34708 PMIC it is necessary to turn on VUSB regulator
so that the mx53 USBH1 PHY receives the 3.3V voltage.

Tested by inserting a USB pen drive in the upper USB slot (USBH1) and then issued the
commands:

usb start

usb info

,which correctly detected and printed the USB pen drive information.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <r64343@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agomx53loco: Add mc34708 support and set mx53 frequency at 1GHz
Fabio Estevam [Mon, 7 May 2012 10:25:59 +0000 (10:25 +0000)]
mx53loco: Add mc34708 support and set mx53 frequency at 1GHz

Add mc34708 support and set mx53 core frequency at its maximum value of 1GHz.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <r64343@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agopmic: dialog: Avoid name conflicts
Fabio Estevam [Mon, 7 May 2012 10:25:58 +0000 (10:25 +0000)]
pmic: dialog: Avoid name conflicts

As mx53loco board has two variants: one with Dialog PMIC and another with FSL MC34708 PMIC,
we need to be able to build both drivers.

Change pmic_init() and PMIC_NUM_OF_REGS names to avoid build conflicts when both drivers are present.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoimx: Add u-boot.imx as target for ARM9 i.MX SOCs
Timo Ketola [Wed, 18 Apr 2012 22:55:35 +0000 (22:55 +0000)]
imx: Add u-boot.imx as target for ARM9 i.MX SOCs

Signed-off-by: Timo Ketola <timo@exertus.fi>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoi.MX2: Include asm/types.h in arch-mx25/imx-regs.h
Timo Ketola [Wed, 18 Apr 2012 22:55:34 +0000 (22:55 +0000)]
i.MX2: Include asm/types.h in arch-mx25/imx-regs.h

types.h must be included in imx-regs.h if one wants to include
imx-regs.h in a board configuration file. That for one's part is
necessary, if one wants to use addresses defined in imx-regs.h.

For example, fsl_esdhc.c needs CONFIG_SYS_FSL_ESDHC_ADDR defined and
a proper thing is to define it with IMX_MMC_SDHCx_BASE in board
configuration file. This patch fixes the build in that case.

Signed-off-by: Timo Ketola <timo@exertus.fi>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoimx: usb: There is no such register
Timo Ketola [Wed, 18 Apr 2012 22:55:33 +0000 (22:55 +0000)]
imx: usb: There is no such register

The reference manual of i.MX25 (nor i.MX31) does not define such
register. This seems to access read only UH2_CAPLENGTH register (if
CONFIG_MXC_USB_PORT is zero).

Signed-off-by: Timo Ketola <timo@exertus.fi>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoi.MX25: usb: Set PORTSCx register
Timo Ketola [Wed, 18 Apr 2012 22:55:32 +0000 (22:55 +0000)]
i.MX25: usb: Set PORTSCx register

The USB controller in i.MX25 has a PORTSCx registers which should be
set. In this regard it is similar to the controller in i.MX31. As this
file is compiled only with i.MX25 and -31, #ifdef check can be removed.

Signed-off-by: Timo Ketola <timo@exertus.fi>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoimx: nand: Support flash based BBT
Timo Ketola [Wed, 18 Apr 2012 22:55:31 +0000 (22:55 +0000)]
imx: nand: Support flash based BBT

Signed-off-by: Timo Ketola <timo@exertus.fi>
Acked-by: Scott Wood <scottwood@freescale.com>
11 years agoi.MX25: This architecture has a GPIO4 too
Timo Ketola [Wed, 18 Apr 2012 22:55:29 +0000 (22:55 +0000)]
i.MX25: This architecture has a GPIO4 too

Signed-off-by: Timo Ketola <timo@exertus.fi>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoi.MX25: esdhc: Add mxc_get_clock infrastructure
Timo Ketola [Wed, 18 Apr 2012 22:55:28 +0000 (22:55 +0000)]
i.MX25: esdhc: Add mxc_get_clock infrastructure

Defining CONFIG_FSL_ESDHC brings in a call to get_clocks, so let's
implement get_clocks function. This is how it seems to be implemented
elsewhere.

Signed-off-by: Timo Ketola <timo@exertus.fi>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoi.MX6: mx6q_sabrelite: add SATA bindings
Eric Nelson [Tue, 1 May 2012 09:55:11 +0000 (09:55 +0000)]
i.MX6: mx6q_sabrelite: add SATA bindings

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: stefano Babic <sbabic@denx.de>
11 years agoi.MX6: add enable_sata_clock()
Eric Nelson [Tue, 27 Mar 2012 09:52:21 +0000 (09:52 +0000)]
i.MX6: add enable_sata_clock()

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>