]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
8 years agox86: Convert minnowmax to use CONFIG_DM_NET
Simon Glass [Tue, 11 Aug 2015 04:02:53 +0000 (22:02 -0600)]
x86: Convert minnowmax to use CONFIG_DM_NET

Move to driver model for networking on minnowmax.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Convert minnowmax to use CONFIG_DM_USB
Simon Glass [Tue, 11 Aug 2015 04:02:52 +0000 (22:02 -0600)]
x86: Convert minnowmax to use CONFIG_DM_USB

Move to driver model for USB on minnowmax.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoRevert "dm: pci: Allow scan bridge child devices before relocation"
Simon Glass [Tue, 11 Aug 2015 02:54:52 +0000 (20:54 -0600)]
Revert "dm: pci: Allow scan bridge child devices before relocation"

This reverts commit df189d9ba3f8fd1bc67e3c0c3c4ace16cd065ee1.

Unfortunately this commit breaks chromebook_link because it adds lots of PCI devices
before relocation and there is not enough pre-reloc malloc() memory.

Rathar then increase this memory, revert for now until we figure this out.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Switch to using generic global_data setup
Simon Glass [Tue, 11 Aug 2015 02:44:32 +0000 (20:44 -0600)]
x86: Switch to using generic global_data setup

There is quite a bit of assembler code that can be removed if we use the
generic global_data setup. Less arch-specific code makes it easier to add
new features and maintain the start-up code.

Drop the unneeded code and adjust the hooks in board_f.c to cope.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Move the GDT into global_data
Simon Glass [Tue, 11 Aug 2015 02:44:31 +0000 (20:44 -0600)]
x86: Move the GDT into global_data

Rather than keeping track of the Global Descriptor Table in its own memory
we may as well put it in global_data with everything else. As a first step,
stop using the separately allocated GDT.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoAllow arch-specific setting of global_data in board_init_f_mem()
Simon Glass [Tue, 11 Aug 2015 02:44:30 +0000 (20:44 -0600)]
Allow arch-specific setting of global_data in board_init_f_mem()

At present we have a simple assignment to gd. With some archs this is
implemented as a register or through some other means; a simple assignment
does not suit in all cases.

Change this to a function and add documentation to describe how this all
works.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <yorksun@freescale.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoAlign global_data to a 16-byte boundary
Simon Glass [Tue, 11 Aug 2015 02:44:29 +0000 (20:44 -0600)]
Align global_data to a 16-byte boundary

Some archs like to have larger alignment for their global data. Use 16 bytes
which suits all current archs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agocm5200: fix FAT function prototypes
Stephen Warren [Sun, 9 Aug 2015 17:25:00 +0000 (11:25 -0600)]
cm5200: fix FAT function prototypes

Remove FAT function prototypes from the cm5200 firmware update code, and
include the relevant headers instead.

This exposes the fact that the custom prototyoe for do_fat_read() in
this file was incorrect. Rather than simply fixing the call-site, replace
do_fat_read() with fat_exists(). This removes the only use of
do_fat_read() outside of the FAT code.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
8 years agoAdd missing part of: "power: pmic: pfuze100 support driver model"
Peng Fan [Fri, 14 Aug 2015 09:36:16 +0000 (11:36 +0200)]
Add missing part of: "power: pmic: pfuze100 support driver model"

This part of mentioned commit, was missed by my mistake during the rebase.
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Original commit message:
power: pmic: pfuze100 support driver model

1. Support driver model for pfuze100.
2. Introduce a new Kconfig entry DM_PMIC_PFUZE100 for pfuze100
3. This driver intends to support PF100, PF200 and PF3000, so add
   the device id into the udevice_id array.
4. Rename PMIC_NUM_OF_REGS macro to PFUZE100_NUM_OF_REGS.

Change-Id: I4fc88414f3c0285f9648e47ec7aed60addeccc4d
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Remove init_gd() function
Simon Glass [Tue, 11 Aug 2015 02:44:28 +0000 (20:44 -0600)]
x86: Remove init_gd() function

This is declared but no-longer exists. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: baytrail: Support running as an EFI payload
Simon Glass [Mon, 10 Aug 2015 13:05:12 +0000 (07:05 -0600)]
x86: baytrail: Support running as an EFI payload

We should not fiddle with interrupts or the FSP when running as an EFI
payload. Detect this and skip this code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: baytrail: Tidy up interrupt and FSP init
Simon Glass [Mon, 10 Aug 2015 13:05:10 +0000 (07:05 -0600)]
x86: baytrail: Tidy up interrupt and FSP init

We should signal to the FSP that PCI enumeration is complete. Perform this
task in a suitable place.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Allow pirq_init() to return an error
Simon Glass [Mon, 10 Aug 2015 13:05:08 +0000 (07:05 -0600)]
x86: Allow pirq_init() to return an error

This function can fail. In this case we should return the error rather than
swallowing it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Split out fsp_init_phase_pci() code into a new function
Simon Glass [Mon, 10 Aug 2015 13:05:07 +0000 (07:05 -0600)]
x86: Split out fsp_init_phase_pci() code into a new function

This code may be useful for boards that use driver model for PCI.

Note: It would be better to have driver model automatically call this
function somehow. However for now it is probably safer to have it under
board control.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Tidy up the PIRQ routing code a little
Simon Glass [Mon, 10 Aug 2015 13:05:06 +0000 (07:05 -0600)]
x86: Tidy up the PIRQ routing code a little

This code could use a little tightening up. There is some repetition and
an odd use of fdtdec_get_int_array().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Re-order efi-x86_defconfig
Simon Glass [Mon, 10 Aug 2015 13:05:05 +0000 (07:05 -0600)]
x86: Re-order efi-x86_defconfig

Use savedefconfig to get this file into the correct order.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: pci: Add a way to iterate through all PCI devices
Simon Glass [Mon, 10 Aug 2015 13:05:04 +0000 (07:05 -0600)]
dm: pci: Add a way to iterate through all PCI devices

These functions allow iteration through all PCI devices including bridges.
The children of each PCI bus are returned in turn. This can be useful for
configuring, checking or enumerating all the devices.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: pci: Provide friendly config access functions
Simon Glass [Mon, 10 Aug 2015 13:05:03 +0000 (07:05 -0600)]
dm: pci: Provide friendly config access functions

At present there are no PCI functions which allow access to PCI
configuration using a struct udevice. This is a sad situation for driver
model as it makes use of PCI harder. Add these functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: fsp: Do not assert VPD_IMAGE_REV when DEBUG
Bin Meng [Sat, 8 Aug 2015 14:01:23 +0000 (22:01 +0800)]
x86: fsp: Do not assert VPD_IMAGE_REV when DEBUG

When using different release version of Intel FSP, the VPD_IMAGE_REV
is different (ie: BayTrail Gold 3 is 0x0303 while Gold 4 is 0x0304).
Remove the asserting of this so that U-Boot does not hang in a debug
build.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agox86: baytrail: Configure FSP UPD from device tree
Andrew Bradford [Fri, 7 Aug 2015 12:36:35 +0000 (08:36 -0400)]
x86: baytrail: Configure FSP UPD from device tree

Allow for configuration of FSP UPD from the device tree which will
override any settings which the FSP was built with itself.

Modify the MinnowMax and BayleyBay boards to transfer sensible UPD
settings from the Intel FSPv4 Gold release to the respective dts files,
with the condition that the memory-down parameters for MinnowMax are
also used.

Signed-off-by: Andrew Bradford <andrew.bradford@kodakalaris.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Removed fsp,mrc-debug-msg and fsp,enable-xhci for minnowmax, bayleybay
Fixed lines >80col
Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agox86: baytrail: Add all IDE/SATA PCI device IDs
Bin Meng [Thu, 6 Aug 2015 09:36:01 +0000 (02:36 -0700)]
x86: baytrail: Add all IDE/SATA PCI device IDs

The BayTrail SoC has 4 different PCI devices IDs regarding to IDE
and AHCI. Add these IDs in pci_ids.h and also add the other SATA
ID in the Bayley Bay and MinnowMax board configuration header.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
8 years agocommon: Display >=4GiB memory bank size
Bin Meng [Thu, 6 Aug 2015 08:31:20 +0000 (01:31 -0700)]
common: Display >=4GiB memory bank size

bd->bi_dram[] has both start address and size defined as 32-bit,
which is not the case on some platforms where >=4GiB memory bank
is used. Change them to support such memory banks.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
8 years agosunxi: Display: Add support for eDP panels connected via an anx9804 bridge
Hans de Goede [Sat, 8 Aug 2015 14:13:53 +0000 (16:13 +0200)]
sunxi: Display: Add support for eDP panels connected via an anx9804 bridge

Add support for 4 1.62G lane eDP panels connected via an anx9804 bridge,
such as found on the Colombus devkit.

While at it also fix the wrong indentation of the SSD2828 Kconfig help text
in board/sunxi/Kconfig.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agovideo: Add support for the ANX9804 parallel lcd to dp bridge chip
Hans de Goede [Sat, 8 Aug 2015 14:03:29 +0000 (16:03 +0200)]
video: Add support for the ANX9804 parallel lcd to dp bridge chip

Add support for the ANX9804 bridge chip, which can take pixel data coming
from a parallel LCD interface and translate it on the fly into a DP
interface for driving eDP TFT displays. It uses I2C for configuration.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
8 years agosun6i: display: Add support for using the mipi pll as lcd clock source
Hans de Goede [Sat, 8 Aug 2015 12:08:21 +0000 (14:08 +0200)]
sun6i: display: Add support for using the mipi pll as lcd clock source

Add support for using the mipi pll as lcd clock source, this is
necessary for getting higher dotclocks with lcd panels.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Anatolij Gustschin <agust@denx.de>
8 years agosun6i: clock: Add support for the mipi pll
Hans de Goede [Sat, 8 Aug 2015 12:05:35 +0000 (14:05 +0200)]
sun6i: clock: Add support for the mipi pll

Add support for the mipi pll, this is necessary for getting higher dotclocks
with lcd panels.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: clock: Add clock_get_pll3() helper function
Hans de Goede [Sat, 8 Aug 2015 10:36:44 +0000 (12:36 +0200)]
sunxi: clock: Add clock_get_pll3() helper function

Add a helper function to get the pll3 clock rate.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: gpio: Add support for the gpio banks which are part of the R-io cluster
Hans de Goede [Thu, 6 Aug 2015 18:10:20 +0000 (20:10 +0200)]
sunxi: gpio: Add support for the gpio banks which are part of the R-io cluster

sun6i and later have a couple of io-blocks which are shared between the
main CPU core and the "R" cpu which is small embedded cpu which can be
active while the main system is suspended.

These gpio banks sit at a different mmio address then the normal banks,
and have a separate devicetree node and compatible, this adds support for
these banks to the sunxi-gpio code when built with device-model support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: Fix gmac not working on the Colombus board
Hans de Goede [Thu, 6 Aug 2015 13:39:05 +0000 (15:39 +0200)]
sunxi: Fix gmac not working on the Colombus board

The phy is using a RGMII interface, which we need to specify in our
board-config, and the dts needs a gmac section (the dts changes have
also been submitted to the kernel).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: display: Disable HDMI support on A13 based tablets
Hans de Goede [Thu, 6 Aug 2015 11:06:50 +0000 (13:06 +0200)]
sunxi: display: Disable HDMI support on A13 based tablets

The sun5i die has a hdmi encoder onboard, but the A13 package does not
route this to the outside, disable hdmi support on A13 based boards.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: display: Enable composite video support on more boards
Hans de Goede [Wed, 5 Aug 2015 15:05:29 +0000 (17:05 +0200)]
sunxi: display: Enable composite video support on more boards

Enable composite video support on all boards which have a composite video
out connector (either cinch or jack).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: Add support for the Auxtek-T003 HDMI stick
Hans de Goede [Wed, 5 Aug 2015 15:50:03 +0000 (17:50 +0200)]
sunxi: Add support for the Auxtek-T003 HDMI stick

The Auxtek-T003 HDMI stick is an A10s based HDMI stick with USB wifi,
and composite video out support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: dts: Sync with kernel
Hans de Goede [Wed, 5 Aug 2015 15:39:14 +0000 (17:39 +0200)]
sunxi: dts: Sync with kernel

Sync the sunxi dts files with the changes queued up for kernel-4.3 in
mripard's sunxi/dt-for-4.3 branch.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: display: Fix composite video out on sun5i
Hans de Goede [Thu, 6 Aug 2015 10:08:33 +0000 (12:08 +0200)]
sunxi: display: Fix composite video out on sun5i

The tv-encoder on sun5i is slightly different compared to the one on
sun4i/sun7i.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosunxi: display: Add overscan correction
Hans de Goede [Tue, 4 Aug 2015 22:06:47 +0000 (00:06 +0200)]
sunxi: display: Add overscan correction

Add support for making the visual area of the framebuffer smaller and
drawing a black border around it. This is intended for use with
overscanning monitors (esp. with composite video out), to avoid part
of the picture being invisible.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Anatolij Gustschin <agust@denx.de>
8 years agocfbconsole: Add support for stride != width
Hans de Goede [Tue, 4 Aug 2015 10:15:39 +0000 (12:15 +0200)]
cfbconsole: Add support for stride != width

cfbconsole currently assumes that the width and stride of the framebuffer
are the same, in most places where stride matters it uses a VIDEO_LINE_LEN
helper macro.

This commit changes the few places not using VIDEO_LINE_LEN to also use
VIDEO_LINE_LEN, and protects the default VIDEO_LINE_LEN with a #ifndef
guard, allowing the boards config.h to override and, and thus support
cases where stride != width.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
8 years agocfbconsole: Remove width argument from the logo functions
Hans de Goede [Tue, 4 Aug 2015 10:21:40 +0000 (12:21 +0200)]
cfbconsole: Remove width argument from the logo functions

The passed in width is always VIDEO_COLS. This is a preparation patch
for adding stride != width support to the cfbconsole code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
8 years agoARM: tegra: represent RAM in 1 or 2 banks
Stephen Warren [Fri, 7 Aug 2015 22:12:45 +0000 (16:12 -0600)]
ARM: tegra: represent RAM in 1 or 2 banks

Represent all available RAM in either one or two banks. The first bank
describes any RAM below 4GB. The second bank describes any RAM above 4GB.

This split is driven by the following requirements:
- The NVIDIA L4T kernel requires separate entries in the DT /memory/reg
  property for memory below and above the 4GB boundary. The layout of that
  DT property is directly driven by the entries in the U-Boot bank array.
- On systems with RAM beyond a physical address of 4GB, the potential
  existence of a carve-out at the end of RAM below 4GB can only be
  represented using multiple banks, since usable RAM is not contiguous.

While making this change, add a lot more comments re: how and why RAM is
represented in banks, and implement a few more "semantic" functions that
define (and perhaps later detect at run-time) the size of any carve-out.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: query_sdram_size() cleanup
Stephen Warren [Fri, 7 Aug 2015 22:12:44 +0000 (16:12 -0600)]
ARM: tegra: query_sdram_size() cleanup

The return value of query_sdram_size() is assigned directly to
gd->ram_size in dram_init(). Adjust the return type to match the field
it's assigned to. This has the beneficial effect that on 64-bit systems,
the return value can correctly represent large RAM sizes over 4GB.

For similar reasons, change the type of variable size_bytes in the same
way.

query_sdram_size() would previously clip the detected RAM size to at most
just under 4GB in all cases, since on 32-bit systems, larger values could
not be represented. Disable this feature on 64-bit systems since the
representation restriction does not exist.

On 64-bit systems, never call get_ram_size() to validate the detected/
calculated RAM size. On any system with a secure OS/... carve-out, RAM
may not have a single contiguous usable area, and this can confuse
get_ram_size(). Ideally, we'd make this call conditional upon some other
flag that indicates specifically that a carve-out is actually in use. At
present, building for a 64-bit system is the best indication we have of
this fact. In fact, the call to get_ram_size() is not useful by the time
U-Boot runs on any system, since U-Boot (and potentially much other early
boot software) always runs from RAM on Tegra, so any mistakes in memory
controller register programming will already have manifested themselves
and prevented U-Boot from running to this point. In the future, we may
simply delete the call to get_ram_size() in all cases.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: move kernel_addr_r on T210
Stephen Warren [Fri, 7 Aug 2015 22:12:43 +0000 (16:12 -0600)]
ARM: tegra: move kernel_addr_r on T210

The new value is the most likely value where the kernel wants to end up
at run-time. Selecting this value as the load address likely avoids the
need to copy the kernel image from the actual load address to the desired
load address. Note that this isn't guaranteed since the kernel may wish
to run at an arbitrary location. In that case, U-Boot will still relocate
the image according to its wishes; this change is a performance
optimization, not a hard-coding of the final image location.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: Correct logic for reading pll_misc in clock_start_pll()
Simon Glass [Mon, 10 Aug 2015 13:14:36 +0000 (07:14 -0600)]
tegra: Correct logic for reading pll_misc in clock_start_pll()

The logic for simple PLLs on T124 was broken by this commit:

  722e000c Tegra: PLL: use per-SoC pllinfo table instead of PLL_DIVM/N/P, etc.

Correct it by reading from the same pll_misc register that it writes to and
adding an entry for the DP PLL in the pllinfo table.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: Make pinmux.h standalone includible
Thierry Reding [Fri, 20 Mar 2015 12:24:22 +0000 (13:24 +0100)]
ARM: tegra: Make pinmux.h standalone includible

This header file uses type definitions (u8, u32) from linux/types.h but
doesn't include it. If includes aren't carefully ordered this can cause
build failures.

Cc: Tom Warren <twarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: nand: disable subpage writes
Marcel Ziswiler [Wed, 5 Aug 2015 22:47:13 +0000 (00:47 +0200)]
tegra: nand: disable subpage writes

Disable subpage writes as we do not provide ecc->hwctl.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoapalis/colibri_t30: fix usb dm regression
Marcel Ziswiler [Wed, 5 Aug 2015 22:47:12 +0000 (00:47 +0200)]
apalis/colibri_t30: fix usb dm regression

Unfortunately currently both Apalis T30 as well as Colibri T30 crash
upon starting USB host support. This is due to the following patch not
having taken into account that our T30 device trees were defaulting to
peripheral only mode instead of otg:

commit ddb9a502d18008e845d5a8fa03ec48630fa77fb7
dm: usb: tegra: Move most of init/uninit into a function

This patch fixes this by defaulting to otg now.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agocolibri_t20: fix reset out pin
Marcel Ziswiler [Wed, 5 Aug 2015 22:47:11 +0000 (00:47 +0200)]
colibri_t20: fix reset out pin

Make sure SODIMM pin 87 nRESET_OUT is released properly by explicitly
setting its pin mux function to GMI. This solves some issues with e.g.
USB not being fully operational on carrier boards with USB hubs
connected to reset if U-Boot got loaded via recovery mode aka rcm.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoapalis/colibri_t20/30: clean-up
Marcel Ziswiler [Wed, 5 Aug 2015 22:47:10 +0000 (00:47 +0200)]
apalis/colibri_t20/30: clean-up

Various clean-ups either in comments, order or spacing without any
functional impact:
- Add some comments in the device trees resp. reorder some parameters
  for consistency across all our modules.
- Sort some include files alphabetically (while leaving common.h on
  top of course).
- Streamline some comments in the configuration files and fix the
  spacing from using spaces to tabs.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoapalis/colibri_t20/t30: increase tftp blocksize
Max Krummenacher [Wed, 5 Aug 2015 22:47:09 +0000 (00:47 +0200)]
apalis/colibri_t20/t30: increase tftp blocksize

Enable CONFIG_IP_DEFRAG and set CONFIG_TFTP_BLOCKSIZE to 16384.
This increases the tftp download speed considerably.

While at it enable CONFIG_TFTP_TSIZE which limits the progress bar to
fifty '#' independent of the downloaded file size.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agocolibri_t20: enable ubi/ubifs support
Marcel Ziswiler [Wed, 5 Aug 2015 22:47:08 +0000 (00:47 +0200)]
colibri_t20: enable ubi/ubifs support

Now as all is in place actually enable UBI/UBIFS support to be able to
boot the Linux kernel and root file system from NAND.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agocolibri_t20: enable mtdparts support
Marcel Ziswiler [Wed, 5 Aug 2015 22:47:07 +0000 (00:47 +0200)]
colibri_t20: enable mtdparts support

Enable mtdparts aka dynamic MTD partition support.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agomtd/nand/tegra: alignment workaround
Marcel Ziswiler [Wed, 5 Aug 2015 22:47:06 +0000 (00:47 +0200)]
mtd/nand/tegra: alignment workaround

Integrate cache alignment bounce buffer to workaround issues as follows:

Loading file '/boot/zImage' to addr 0x01000000 with size 4499152 (0x0044a6d0)...
ERROR: v7_dcache_inval_range - start address is not aligned - 0x1f7f0108
ERROR: v7_dcache_inval_range - stop address is not aligned - 0x1f7f1108
Done
Kernel image @ 0x1000000 [ 0x000000 - 0x44a6d0 ]

Starting kernel ...

undefined instruction
pc : [<005ff03c>]          lr : [<0000800c>]
sp : 0144b6e8  ip : 01000188     fp : 0144a6c8
r10: 00000000  r9 : 411fc090     r8 : 00000100
r7 : 00000cfb  r6 : 0144a6d0     r5 : 00000000  r4 : 00008000
r3 : 0000000c  r2 : 00000100     r1 : 00000cfb  r0 : 00000000
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agotegra: nand: fix read_byte required for proper onfi detection
Marcel Ziswiler [Wed, 5 Aug 2015 22:47:05 +0000 (00:47 +0200)]
tegra: nand: fix read_byte required for proper onfi detection

Fix PIO read_byte() implementation not only used for the legacy READ ID
but also the PARAM command required for proper ONFI detection.

This fix is inspired by Lucas Stach's Linux Tegra NAND driver of late
(not mainline yet but getting there soon I hope).

I vaguely remember that those commands are special on 16-bit bus NAND
(e.g. always return 8-bit data regardless) and later Linux MTD fixed/
changed the way this is handled which in turn broke once U-Boot pulled
that in. Basically instead of doing PIO read regular DMA block read is
now used which this patch actually fixes.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agocolibri_t20: disable PMIC sleep mode on low supply voltage
Marcel Ziswiler [Wed, 5 Aug 2015 22:47:04 +0000 (00:47 +0200)]
colibri_t20: disable PMIC sleep mode on low supply voltage

The Colibri T20's PMIC enters a sleep mode on low supply voltage < 3.0V
±2.5% (2.92...3.08V). Rising the main supply voltage again does not
bring it back to regular operation. Not even a full reset does bring
the module back. A full power cycle was required to reboot the system.
A long positive pulse on the PMICs resume pin also reboots the system
but this pin is only accessible as a test point on the module.

This patch configures the PMIC through I2C to not enter this sleep mode
plus force it to normal state upon sleep request exit should this ever
happen.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agocolibri_t20: add i2c support
Marcel Ziswiler [Wed, 5 Aug 2015 22:47:03 +0000 (00:47 +0200)]
colibri_t20: add i2c support

Add I2C support in order to subsequently allow disabling the PMIC sleep
mode on low supply voltage.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agocolibri_t20: add lcd display support
Marcel Ziswiler [Wed, 5 Aug 2015 22:47:02 +0000 (00:47 +0200)]
colibri_t20: add lcd display support

Add LCD display support defaulting to VESA VGA resolution. Different
resolutions configurable via device tree.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agocolibri_t20: fix device-tree compatible node
Marcel Ziswiler [Wed, 5 Aug 2015 22:47:01 +0000 (00:47 +0200)]
colibri_t20: fix device-tree compatible node

Use toradex,colibri_t20 as the device-tree compatible node value rather
than toradex,t20 in accordance to our Apalis/Colibri T30 products.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoapalis/colibri_t20/t30: integrate recovery mode detection
Marcel Ziswiler [Wed, 5 Aug 2015 22:47:00 +0000 (00:47 +0200)]
apalis/colibri_t20/t30: integrate recovery mode detection

Allow detecting whether or not U-Boot was launched through the
recovery mode of the resp. NVIDIA SoC.

Make use of a board specific arch_misc_init() and enable the same via
CONFIG_ARCH_MISC_INIT configuration option.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: allow reading recovery mode boot type
Marcel Ziswiler [Wed, 5 Aug 2015 22:46:59 +0000 (00:46 +0200)]
ARM: tegra: allow reading recovery mode boot type

Add defines to allow reading recovery mode (RCM) boot type from the boot
information table (BIT) written by the boot ROM (BR) to the IRAM.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: allow custom usb manufacturer/product/vendor ids/strings
Marcel Ziswiler [Wed, 5 Aug 2015 22:46:58 +0000 (00:46 +0200)]
ARM: tegra: allow custom usb manufacturer/product/vendor ids/strings

Allow for optional custom USB gadget manufacturer/product/vendor
IDs/strings to be specified.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agonet: lpc32xx: eth buffers base config
Sylvain Lemieux [Mon, 27 Jul 2015 17:37:40 +0000 (13:37 -0400)]
net: lpc32xx: eth buffers base config

Add support to specify the Ethernet buffer base address;
if none are supply by the board, the default value is use (from existing code).

Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agologos: add Toradex logo
Stefan Agner [Wed, 5 Aug 2015 15:17:01 +0000 (17:17 +0200)]
logos: add Toradex logo

Use the boot loader splash screen from WinCE which matches our
wallpapers position wise. Although the logo is an 8-bit indexed BMP as
well colours looked odd at first in U-Boot. After converting to full
RGB palette and converting back to an indexed BMP using imagemagick
the Logo showed up properly.

$ convert tools/logos/toradex-rgb.bmp -type Palette -colors 256 \
-compress none -verbose BMP3:tools/logos/toradex.bmp

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
8 years agoimage-fdt.c: store returned error value
Max Krummenacher [Wed, 5 Aug 2015 15:17:03 +0000 (17:17 +0200)]
image-fdt.c: store returned error value

This fixes the following warning (and the runtime error reporting):
../common/image-fdt.c:491:4: warning: 'fdt_ret' may be used
uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agocolibri_vf: remove spurious new line
Marcel Ziswiler [Wed, 5 Aug 2015 15:17:02 +0000 (17:17 +0200)]
colibri_vf: remove spurious new line

Remove spurious new line in configuration file.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
8 years agogeneric-board: allow showing custom board info
Marcel Ziswiler [Wed, 5 Aug 2015 15:17:00 +0000 (17:17 +0200)]
generic-board: allow showing custom board info

Allow showing custom board info from a checkboard() function being
implemented if CONFIG_CUSTOM_BOARDINFO is specified.  Previously the
device tree model was always displayed not taking any
CONFIG_CUSTOM_BOARDINFO into account.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agofs/fs.c: read up to EOF when len would read past EOF
Max Krummenacher [Wed, 5 Aug 2015 15:16:58 +0000 (17:16 +0200)]
fs/fs.c: read up to EOF when len would read past EOF

http://lists.denx.de/pipermail/u-boot/2012-September/134347.html
allows for reading files in chunks from the shell.

When this feature is used to read past the end of a file an error
was returned instead of returning the bytes read up to the end of
file. Thus the following fails in the shell:

offset = 0
len = chunksize
do
read file, offset, len
write data
until bytes_read < len

The patch changes the behaviour to printing an informational
message and returning the actual read number of bytes aka read(2)
behaviour for convenient use in U-Boot scripts.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
8 years agoconfigs: ti_armv7_keystone2: increase size reserved for initrd
Vitaly Andrianov [Tue, 4 Aug 2015 15:16:16 +0000 (11:16 -0400)]
configs: ti_armv7_keystone2: increase size reserved for initrd

9MB reserved for initrd is not enough for default ramfs used for keystone
devices, which is ~33MB. This patch increases the size up to 80MB.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
8 years agoconfigs: ti_armv7_keystone2: fix initrd address at args_ramfs
Vitaly Andrianov [Tue, 4 Aug 2015 15:16:15 +0000 (11:16 -0400)]
configs: ti_armv7_keystone2: fix initrd address at args_ramfs

This patch set the correct initrd address to much rdaddr, which used at
get_fs_ramfs commad.

Fixes: 3e97f0b63c8e ("configs: ti_armv7_keystone2: switch addresses
to generic addresses")

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
8 years agocommon/lcd_console: fix console/logo regression
Marcel Ziswiler [Tue, 4 Aug 2015 13:49:50 +0000 (15:49 +0200)]
common/lcd_console: fix console/logo regression

The following commit changed the order of the column vs. row parameter
to the lcd_init_console() function but missed actually changing it as
well the second time it is called from lcd_clear() which resulted in a
garbled text console which this patch fixes.

commit 604c7d4a5a3cf70949f6e6094bf0d52ee3b4804d
common/lcd_console: introduce display/framebuffer rotation

Tested on Colibri T20 with my latest assortment of tegra
fixes/enhancements patch set.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agokconfig: add config option for shell prompt
Nikita Kiryanov [Mon, 3 Aug 2015 09:36:58 +0000 (12:36 +0300)]
kconfig: add config option for shell prompt

Add option to set shell prompt string from menuconfig and migrate
boards globally.

The migration is done as follows:
- Boards that explicitly and unconditionally set CONFIG_SYS_PROMPT had the
  entry moved to their defconfig files.
- Boards that defined some kind of #ifdef logic which selects the
  CONFIG_SYS_PROMPT (for example qemu-mips) got an #undef CONFIG_SYS_PROMPT
  right before the #ifdef logic and were left alone.
- This change forces CONFIG_SYS_PROMPT to be a per board decision, and thus
  CONFIG_SYS_PROMPT was removed from all <soc>_common.h and <arch>_common.h
  files. This results in a streamlined default value across platforms, and
  includes the following files: spear-common, sunxi-common, mv-common,
  ti_armv7_common, tegra-common, at91-sama5_common, and zynq-common.
- Boards that relied on <arch/soc>_common.h values of CONFIG_SYS_PROMPT were
  not updated in their respective defconfig files under the assumption that
  since they did not explicitly define a value, they're fine with whatever
  the default is.
- On the other hand, boards that relied on a value defined in some
  <boards>_common.h file such as woodburn_common, rpi-common,
  bur_am335x_common, ls2085a_common, siemens_am33x_common, and
  omap3_evm_common, had their values moved to the respective defconfig files.
- The define V_PROMPT was removed, since it is not used anywhere except for
  assigning a value for CONFIG_SYS_PROMPT.

Cc: Tom Rini <trini@konsulko.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
[trini: Add spring, sniper, smartweb to conversion]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agommc_spi: Big-endian support
Yoshinori Sato [Mon, 1 Jun 2015 06:22:37 +0000 (15:22 +0900)]
mmc_spi: Big-endian support

Currently implement always swap for big-endian value.
So doesn't work big-endian environment.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
8 years agodw_mmc: Calculate dwmmc FIFO threshold size if not provided
Simon Glass [Fri, 7 Aug 2015 02:16:29 +0000 (20:16 -0600)]
dw_mmc: Calculate dwmmc FIFO threshold size if not provided

We can calculate this. Add code to do this if it is not provided.

panto: prefix changed to dw_mmc to make things easier to grep

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
8 years agoARM: drop "optional" from target select in favor of ARCH_VERSATILE
Masahiro Yamada [Sat, 1 Aug 2015 07:39:13 +0000 (16:39 +0900)]
ARM: drop "optional" from target select in favor of ARCH_VERSATILE

Since commit a26cd04920dc ("arch: Make board selection choices
optional"), Kconfig could create such an insane .config file that
no SoC/board is selected.

This is now a real problem for Buildroot, for example.
(http://lists.busybox.net/pipermail/buildroot/2015-July/135125.html)

This commit drops the "optional" from the ARM target select menu
in favor of "Versatile family".

Rationale:
 - Historically, Linux chose versatile_defconfig as the default
   of ARM defconfig. (arch/arm/Makefile of Linux describes:
   KBUILD_DEFCONFIG := versatile_defconfig)

 - It was published by ARM Ltd.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agodra7xx: Add dra72_evm_defconfig using CONFIG_DM
Tom Rini [Fri, 31 Jul 2015 23:55:12 +0000 (19:55 -0400)]
dra7xx: Add dra72_evm_defconfig using CONFIG_DM

- Import various DT files for DRA7 / DR72x / dra72-evm from Linux Kernel
  v4.1
- Add config file for this board, enable DM and DM_GPIO

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agodra7xx: Move CONS_INDEX to Kconfig and enable CONFIG_SPL_STACK_ADDR
Tom Rini [Fri, 31 Jul 2015 23:55:11 +0000 (19:55 -0400)]
dra7xx: Move CONS_INDEX to Kconfig and enable CONFIG_SPL_STACK_ADDR

- Move the CONS_INDEX selection out of CONFIG_SYS_EXTRA_OPTIONS and
  into Kconfig proper.
- While in here, enable CONFIG_SPL_STACK_ADDR

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoARM: SPL: Use CONFIG_SPL_DM not CONFIG_DM
Tom Rini [Fri, 31 Jul 2015 23:55:10 +0000 (19:55 -0400)]
ARM: SPL: Use CONFIG_SPL_DM not CONFIG_DM

We now have the CONFIG_SPL_DM for code within SPL to toggle caring about
DM or not.  Without this change platforms that do enable CONFIG_DM but
not CONFIG_SPL_DM may be broken (such as OMAP5).

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agogpio: omap: Drop 'method' parameter
Tom Rini [Fri, 31 Jul 2015 23:55:09 +0000 (19:55 -0400)]
gpio: omap: Drop 'method' parameter

The "method" parameter was part of the original port of the driver from
the kernel.  At some point this may have been added to allow for future
differentiation (as omap1 and omap2 have different GPIO IP blocks, so
this wasn't an unreasonable thing to do).  At this point however it's
just extra overhead, so drop.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoam33xx: Update DT files, add am335x_gp_evm_config target
Tom Rini [Fri, 31 Jul 2015 23:55:08 +0000 (19:55 -0400)]
am33xx: Update DT files, add am335x_gp_evm_config target

- Re-sync DT files for am33xx with Linux Kernel v4.1
- Include DT file now for the "AM335x GP EVM" and build target for it,
  via device tree and DM.
- We only need to provide platform data for UART when OF_CONTROL isn't
  also enabled really.  We can just push GPIO to coming from DT

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarm: am437x: Introduce new board cm-t43
Nikita Kiryanov [Thu, 30 Jul 2015 20:56:23 +0000 (23:56 +0300)]
arm: am437x: Introduce new board cm-t43

Add initial support for CM-T43, an AM437x based SoM.
This support includes: serial, MMC/eMMC, NAND, USB, ETH, I2C, GPIO, DRAM
detection.

Cc: Tom Rini <trini@konsulko.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agogpio: am43xx: expand gpio support
Nikita Kiryanov [Thu, 30 Jul 2015 20:56:22 +0000 (23:56 +0300)]
gpio: am43xx: expand gpio support

AM43XX SoCs support up to 192 GPIO signals.
Make this amount available to the driver.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agommc: omap_hsmmc: enable 8bit interface for eMMC for AM43xx
Nikita Kiryanov [Thu, 30 Jul 2015 20:56:21 +0000 (23:56 +0300)]
mmc: omap_hsmmc: enable 8bit interface for eMMC for AM43xx

Enable 8bit interface on HSMMC2 for am43xx to support 8bit eMMC chips.

Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agommc: omap_hsmmc: enable proper CMD(DAT) lines reset procedure for am43xx
Nikita Kiryanov [Thu, 30 Jul 2015 20:56:20 +0000 (23:56 +0300)]
mmc: omap_hsmmc: enable proper CMD(DAT) lines reset procedure for am43xx

The CMD(DAT) lines reset procedure described in the OMAP4(AM335x,
OMAP5, DRA7xx) TRMs is also necessary for AM43XX. Enable it in the
driver.

Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agoarm: am43xx: enable spi clock
Nikita Kiryanov [Thu, 30 Jul 2015 20:56:19 +0000 (23:56 +0300)]
arm: am43xx: enable spi clock

Add spi clock to the list of am43xx basic clocks to make the SPI
subsystem available on am43xx systems.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agospi: omap3_spi: add am43xx support to omap3_spi
Nikita Kiryanov [Thu, 30 Jul 2015 20:56:18 +0000 (23:56 +0300)]
spi: omap3_spi: add am43xx support to omap3_spi

Add support for AM43XX to the omap3_spi driver.

Cc: Jagan Teki <jteki@openedev.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agoARM64: hikey: Add a README for this board.
Peter Griffin [Thu, 30 Jul 2015 17:55:24 +0000 (18:55 +0100)]
ARM64: hikey: Add a README for this board.

To help others with compiling and flashing ATF and u-boot add
a README for this board.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
8 years agoARM64: hikey: hi6220: Add u-boot support for the 96boards CE HiKey board.
Peter Griffin [Thu, 30 Jul 2015 17:55:23 +0000 (18:55 +0100)]
ARM64: hikey: hi6220: Add u-boot support for the 96boards CE HiKey board.

HiKey is the first 96boards consumer edition compliant board. It features a hi6220
SoC which has eight ARM A53 cpu's.

This initial port adds support for: -
1) Serial
2) eMMC / SD card
3) USB
4) GPIO

It has been tested with Arm Trusted Firmware running u-boot as the BL33 executable.

Notes:

eMMC has been tested with basic reading of eMMC partition into DDR. I have not
tested writing / erasing. Due to lack of clock control it won't be
running in the most performant high speed mode.

SD card slot has been tested for reading and booting kernels into DDR.
It is also currently configured to save the u-boot environment to the
SD card.

USB has been tested with ASIX networking adapter to tftpboot kernels
into DDR. On v2015.07-rc2 dhcp now works, and also USB mass storage
are correctly enumerated.

GPIO has been tested using gpio toggle GPIO4_1-3 to flash the LEDs.

Basic SoC datasheet can be found here: -
https://github.com/96boards/documentation/blob/master/hikey/
Hi6220V100_Multi-Mode_Application_Processor_Function_Description.pdf

Board schematic can be found here: -
https://github.com/96boards/documentation/blob/master/hikey/
96Boards-Hikey-Rev-A1.pdf

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
8 years agommc: hi6220_dw_mmc: Add hi6220 glue code for dw_mmc controller.
Peter Griffin [Thu, 30 Jul 2015 17:55:22 +0000 (18:55 +0100)]
mmc: hi6220_dw_mmc: Add hi6220 glue code for dw_mmc controller.

This patch adds the glue code for hi6220 SoC which has 2x synopsis
dw_mmc controllers. This will be used by the hikey board support
in subsequent patches.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agopmic: pmic_hi6553: Add a driver for the hi6553 pmic found on hikey board.
Peter Griffin [Thu, 30 Jul 2015 17:55:21 +0000 (18:55 +0100)]
pmic: pmic_hi6553: Add a driver for the hi6553 pmic found on hikey board.

This adds a simple pmic driver for the hi6553 pmic which is used in
conjunction with the hi6220 SoC on the hikey board. Eventually this
driver will be updated to be a proper UCLASS PMIC driver which
can parse the voltages direct from device tree.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
8 years agohisilicon: hi6220: Add a hi6220 pinmux driver.
Peter Griffin [Thu, 30 Jul 2015 17:55:20 +0000 (18:55 +0100)]
hisilicon: hi6220: Add a hi6220 pinmux driver.

This patch adds basic pinmux support for the hi6220 SoC,
which is found on the hikey board.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
8 years agoARM: hi6220: Add register and bitfield definition header files.
Peter Griffin [Thu, 30 Jul 2015 17:55:19 +0000 (18:55 +0100)]
ARM: hi6220: Add register and bitfield definition header files.

This patch adds the header files which will be used in the subsquent
board / drivers to enable support for hi6220 hikey board.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
8 years agodm: gpio: hi6220: Add a hi6220 GPIO driver model driver.
Peter Griffin [Thu, 30 Jul 2015 17:55:18 +0000 (18:55 +0100)]
dm: gpio: hi6220: Add a hi6220 GPIO driver model driver.

This patch adds support for the GPIO perif found on hi6220
SoC.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
8 years agocommon/cmd_source.c: Fix the source command failure under 64-bit platform
Gong Qianyu [Thu, 30 Jul 2015 06:00:01 +0000 (14:00 +0800)]
common/cmd_source.c: Fix the source command failure under 64-bit platform

Modify the data pointer type from ulong* to u32*.

For arm64 type "ulong" could be 64-bit. Then in line 89 of common/cmd_source.c:
"while (*data++);" data will point to the next 64 bits each time. As the uImage
file generated by mkimage tool keeps the same data format in either 32-bit or 64-bit
platform, the difference would cause failure in 64-bit platform.

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
8 years agospl: Fix compile warning for arm64
Gong Qianyu [Thu, 30 Jul 2015 06:07:12 +0000 (14:07 +0800)]
spl: Fix compile warning for arm64

Make the cast explicit for "warning: cast to pointer from integer of different size".

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
8 years agoimx28: Fix issue with GCC 5.x
Måns Rullgård [Tue, 28 Jul 2015 13:39:49 +0000 (14:39 +0100)]
imx28: Fix issue with GCC 5.x

The semantics for non-static functions declared inline have changed in
gcc5, causing the empty functions not to be emitted as an external
symbol.

Since lowlevel_init() is only referenced from start.S, it should not be
declared inline at all.

Reported-by: Otavio Salvador <otavio@ossystems.com.br>
Tested-by: Otavio Salvador <otavio@ossystems.com.br>
[trini: Reword commit message]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoARM: keystone2: Use common definition for clk_get_rate
Lokesh Vutla [Tue, 28 Jul 2015 08:46:48 +0000 (14:16 +0530)]
ARM: keystone2: Use common definition for clk_get_rate

Since all the clocks are defined common, and has the same logic to get
the frequencies, use a common definition for for clk_get_rate().

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: keystone2: Remove unsed external clocks
Lokesh Vutla [Tue, 28 Jul 2015 08:46:47 +0000 (14:16 +0530)]
ARM: keystone2: Remove unsed external clocks

Remove unused external clocks and make a common definition
for all keystone platforms.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: keystone2: Cleanup init_pll definition
Lokesh Vutla [Tue, 28 Jul 2015 08:46:46 +0000 (14:16 +0530)]
ARM: keystone2: Cleanup init_pll definition

This is just a cosmetic change that makes
the calling of pll init code looks much cleaner.

Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: keystone2: Use common structure for PLLs
Lokesh Vutla [Tue, 28 Jul 2015 08:46:45 +0000 (14:16 +0530)]
ARM: keystone2: Use common structure for PLLs

Register Base addresses are same for PLLs in all
keystone platforms. If a PLL is not available, the corresponding
register addresses are marked as reserved.
Hence use a common definition.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: keystone2: Fix dev and arm speed detection
Lokesh Vutla [Tue, 28 Jul 2015 08:46:44 +0000 (14:16 +0530)]
ARM: keystone2: Fix dev and arm speed detection

Use common devspeed and armspeed definitions.
Also fix reading efuse bootrom register.

Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: keystone2: Cleanup PLL init code
Lokesh Vutla [Tue, 28 Jul 2015 08:46:43 +0000 (14:16 +0530)]
ARM: keystone2: Cleanup PLL init code

There are two types of PLL for all keystone platforms:
Main PLL, Secondary PLL. Instead of duplicating the same definition
for each secondary PLL, have a common function which does
initialization for both PLLs. And also add proper register
definitions.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: keystone2: Enable CONFIG_DISPLAY_CPUINFO
Lokesh Vutla [Tue, 28 Jul 2015 08:46:42 +0000 (14:16 +0530)]
ARM: keystone2: Enable CONFIG_DISPLAY_CPUINFO

Add print_cpuinfo() function and enable
CONFIG_DISPLAY_CPUINFO for keystone platforms,
so that cpu info can be displayed during boot.

Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
8 years agoARM: keystone2: Cleanup SoC detection
Lokesh Vutla [Tue, 28 Jul 2015 08:46:41 +0000 (14:16 +0530)]
ARM: keystone2: Cleanup SoC detection

Add proper register definition for JTAG ID and
cleanup cpu_is_* functions.

Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>