]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
11 years agocall enable_mmc0_pin_mux() from SPL code only
Lothar Waßmann [Wed, 1 Aug 2012 09:41:50 +0000 (11:41 +0200)]
call enable_mmc0_pin_mux() from SPL code only

11 years agofix bogus timer overflow handling
Lothar Waßmann [Wed, 1 Aug 2012 09:41:02 +0000 (11:41 +0200)]
fix bogus timer overflow handling

11 years agoAdd watchdog_reset to download loop; wait for download indefinitely
Lothar Waßmann [Wed, 1 Aug 2012 09:40:25 +0000 (11:40 +0200)]
Add watchdog_reset to download loop; wait for download indefinitely

11 years agoRemove bogus check for NAND_MODE_HW_ECC
Lothar Waßmann [Wed, 1 Aug 2012 09:39:03 +0000 (11:39 +0200)]
Remove bogus check for NAND_MODE_HW_ECC

11 years agofix Obiwan error in save_boot_params() checking for NON_SECURE_SRAM_START
Lothar Waßmann [Wed, 1 Aug 2012 09:32:37 +0000 (11:32 +0200)]
fix Obiwan error in save_boot_params() checking for NON_SECURE_SRAM_START

11 years agoremove redundant initialization and type casts
Lothar Waßmann [Wed, 1 Aug 2012 09:31:42 +0000 (11:31 +0200)]
remove redundant initialization and type casts

11 years agoforce omap_bootmode to live in .data section to end up in internal RAM
Lothar Waßmann [Wed, 1 Aug 2012 09:30:22 +0000 (11:30 +0200)]
force omap_bootmode to live in .data section to end up in internal RAM

11 years agoAdd DA8xx FB support for AM33xx
Lothar Waßmann [Wed, 1 Aug 2012 09:18:53 +0000 (11:18 +0200)]
Add DA8xx FB support for AM33xx

11 years agoAdd cpsw ethernet driver
Lothar Waßmann [Wed, 1 Aug 2012 07:24:37 +0000 (09:24 +0200)]
Add cpsw ethernet driver

11 years agoAdd AM33xx GPIO driver
Lothar Waßmann [Wed, 1 Aug 2012 07:23:46 +0000 (09:23 +0200)]
Add AM33xx GPIO driver

11 years agoAM33xx NAND driver
Lothar Waßmann [Wed, 1 Aug 2012 07:22:49 +0000 (09:22 +0200)]
AM33xx NAND driver

11 years agoAdd support for DDR3 memory
Lothar Waßmann [Wed, 1 Aug 2012 07:20:04 +0000 (09:20 +0200)]
Add support for DDR3 memory

11 years agoshow clk rates in print_cpuinfo()
Lothar Waßmann [Mon, 30 Jul 2012 07:20:07 +0000 (09:20 +0200)]
show clk rates in print_cpuinfo()

11 years agodefine some missing base addresses; declare lcdc_clk_rate()
Lothar Waßmann [Mon, 30 Jul 2012 07:19:23 +0000 (09:19 +0200)]
define some missing base addresses; declare lcdc_clk_rate()

11 years agouse separate struct for dt_regs
Lothar Waßmann [Mon, 30 Jul 2012 07:17:28 +0000 (09:17 +0200)]
use separate struct for dt_regs

11 years agoMoved clk rate display to print_cpu_info()
Lothar Waßmann [Mon, 30 Jul 2012 07:15:12 +0000 (09:15 +0200)]
Moved clk rate display to print_cpu_info()

11 years agocleanup
Lothar Waßmann [Mon, 30 Jul 2012 06:57:30 +0000 (08:57 +0200)]
cleanup

11 years agocleanup; add disp pll setup
Lothar Waßmann [Mon, 30 Jul 2012 06:56:54 +0000 (08:56 +0200)]
cleanup; add disp pll setup

11 years agoAdd hw_watchdog_reset(); clear reset flags on SW reset
Lothar Waßmann [Mon, 30 Jul 2012 06:55:41 +0000 (08:55 +0200)]
Add hw_watchdog_reset(); clear reset flags on SW reset

11 years agoswapped files emif4.c and ddr.c
Lothar Waßmann [Tue, 17 Jul 2012 09:11:05 +0000 (11:11 +0200)]
swapped files emif4.c and ddr.c

11 years agoAdded missing file for IIM support KARO-2012-06-19
Lothar Waßmann [Tue, 19 Jun 2012 14:56:49 +0000 (16:56 +0200)]
Added missing file for IIM support

11 years agoAdded IIM support
Lothar Waßmann [Tue, 19 Jun 2012 14:54:50 +0000 (16:54 +0200)]
Added IIM support

11 years agoReworked board_eth_init()
Lothar Waßmann [Tue, 19 Jun 2012 14:10:31 +0000 (16:10 +0200)]
Reworked board_eth_init()

11 years agoadd support for TX51-60x*
Lothar Waßmann [Mon, 18 Jun 2012 11:27:25 +0000 (13:27 +0200)]
add support for TX51-60x*

11 years ago- initialize some more vital pads
Lothar Waßmann [Mon, 18 Jun 2012 11:24:01 +0000 (13:24 +0200)]
- initialize some more vital pads
- switch off unneeded clocks in board_early_init_f()
- introduce another bogus delay to make board_eth_init() work reliably
- print exact module name

11 years agoRemove CONFIG_TX51_80x*
Lothar Waßmann [Mon, 18 Jun 2012 11:22:55 +0000 (13:22 +0200)]
Remove CONFIG_TX51_80x*

11 years ago- include config.h for config options set via boards.cfg
Lothar Waßmann [Mon, 18 Jun 2012 11:14:41 +0000 (13:14 +0200)]
- include config.h for config options set via boards.cfg
- remove CONFIG_TX51_80x*
- add support for TX51-6x

11 years agoSupport autoprobing PHY
Lothar Waßmann [Mon, 18 Jun 2012 11:12:55 +0000 (13:12 +0200)]
Support autoprobing PHY

11 years agoDon't create PHY device when no valid PHY ID was found
Lothar Waßmann [Mon, 18 Jun 2012 11:01:52 +0000 (13:01 +0200)]
Don't create PHY device when no valid PHY ID was found

11 years agoAdded README for TX51 modules
Lothar Waßmann [Fri, 15 Jun 2012 11:07:24 +0000 (13:07 +0200)]
Added README for TX51 modules

11 years agoMerge branch 'karo-tx28' into karo-tx51
Lothar Waßmann [Fri, 15 Jun 2012 09:43:19 +0000 (11:43 +0200)]
Merge branch 'karo-tx28' into karo-tx51

11 years agoUpdated README.KARO
Lothar Waßmann [Fri, 15 Jun 2012 09:42:17 +0000 (11:42 +0200)]
Updated README.KARO

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>