oweals/u-boot.git
9 years agosunxi: axp: Remove non driver-model support from the axp gpio code
Hans de Goede [Sun, 26 Apr 2015 09:19:37 +0000 (11:19 +0200)]
sunxi: axp: Remove non driver-model support from the axp gpio code

Now that all sunxi boards are using driver-model for gpio (*), we can remove
the non driver-model support from the axp gpio code, and the glue to call
into the axp gpio code from the sunxi_gpio non driver-model code.

*) For the regular u-boot build, SPL still uses non driver-model gpio for
now, but the SPL never uses axp gpios support and we were already not building
axp-gpio support for the SPL.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: emac: Remove non driver-model code
Hans de Goede [Thu, 23 Apr 2015 16:47:47 +0000 (18:47 +0200)]
sunxi: emac: Remove non driver-model code

All sunxi boards now use the driver-model, so remove the non driver-model
code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Move all boards to the driver-model
Hans de Goede [Wed, 15 Apr 2015 18:46:48 +0000 (20:46 +0200)]
sunxi: Move all boards to the driver-model

Now that we've everything prepared for it remove the DM settings from the
defconfig(s) and simply always set them for sunxi.

This makes all sunxi boards allways use the driver model for gpios and
ethernet, and allows us to move over more bits to the driver-model without
the need to introduce #ifdef-ery for boards which are not yet using DM.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: dts: Add a CONFIG_DEFAULT_DEVICE_TREE setting to all sunxi boards
Hans de Goede [Sat, 18 Apr 2015 21:32:23 +0000 (23:32 +0200)]
sunxi: dts: Add a CONFIG_DEFAULT_DEVICE_TREE setting to all sunxi boards

This is a preparation patch for switching all sunxi boards over to using
the driver model.

Note that rather then defining both CONFIG_DEFAULT_DEVICE_TREE (for u-boot)
and CONFIG_FDTFILE (for the kernel), this commit simply replaces all
CONFIG_FDTFILE defconfig settings with CONFIG_DEFAULT_DEVICE_TREE and
uses CONFIG_DEFAULT_DEVICE_TREE for setting the default fdtfile env value
in sunxi-common.h .

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: dts: Add minimal dts files for board which lack a dts sofar
Hans de Goede [Thu, 23 Apr 2015 15:04:19 +0000 (17:04 +0200)]
sunxi: dts: Add minimal dts files for board which lack a dts sofar

u-boot has support for a number of boards for which a dts file still needs
to be written, add minimal dts files for these boards so that we can switch
them over to driver-model / fdt.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agosunxi: dts: Add dts files which have been submitted but not yet merged upstream
Hans de Goede [Thu, 23 Apr 2015 12:27:01 +0000 (14:27 +0200)]
sunxi: dts: Add dts files which have been submitted but not yet merged upstream

We need dts files for all boards we support, so bring in a few unmerged ones,
these will be replaced with the upstream merged versions the next time we
sync dts files.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: dts: Sync all dts files with upstream kernel
Hans de Goede [Wed, 15 Apr 2015 17:03:49 +0000 (19:03 +0200)]
sunxi: dts: Sync all dts files with upstream kernel

Bring all the sunxi dts files (and update existing ones) from
mripard/sunxi/dt-for-4.1 (which will be merged into upstream master any
day now). This is necessary so that we can move all sunxi boards over to
the driver model.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: emac: Add driver model support
Hans de Goede [Sun, 19 Apr 2015 09:48:19 +0000 (11:48 +0200)]
sunxi: emac: Add driver model support

Modify the sunxi-emac eth driver to support driver model.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Stefan Roese <sr@denx.de>
9 years agosunxi: emac: Rename DMA_CPU_TRRESHOLD to EMAC_RX_BUFSIZE
Hans de Goede [Sat, 25 Apr 2015 11:46:28 +0000 (13:46 +0200)]
sunxi: emac: Rename DMA_CPU_TRRESHOLD to EMAC_RX_BUFSIZE

Besides being spelled wrong, the DMA_CPU_TRRESHOLD define actually has
nothing to do with DMA as we only use mmio fifo access. Rename it to
EMAC_RX_BUFSIZE to properly reflect what it does.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Stefan Roese <sr@denx.de>
9 years agosunxi: emac: Prepare for driver-model support
Hans de Goede [Sat, 18 Apr 2015 12:44:38 +0000 (14:44 +0200)]
sunxi: emac: Prepare for driver-model support

Split all the core functionality out into functions taking a
struct emac_eth_dev *priv argument as preparation for adding driver-model
support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Stefan Roese <sr@denx.de>
9 years agosunxi: emac: port to phylib
Hans de Goede [Thu, 16 Apr 2015 19:47:06 +0000 (21:47 +0200)]
sunxi: emac: port to phylib

This is a preparation-patch for adding device-model support to the emac
driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Stefan Roese <sr@denx.de>
9 years agosunxi: gmac: Move sunxi_gmac_initialize proto out of netdev.h
Hans de Goede [Wed, 22 Apr 2015 15:55:10 +0000 (17:55 +0200)]
sunxi: gmac: Move sunxi_gmac_initialize proto out of netdev.h

netdev.h should not be included in driver-model enabled builds (doing so
causes compiler warnings about struct eth_driver not being declared), but
we do use sunxi_gmac_initialize in the driver-model case, so move it out of
netdev.h .

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: axp: Add driver-model support to the axp_gpio code
Hans de Goede [Wed, 22 Apr 2015 09:31:22 +0000 (11:31 +0200)]
sunxi: axp: Add driver-model support to the axp_gpio code

Add driver-model support to the axp_gpio code, note that this needs a small
tweak to the driver-model version of sunxi_name_to_gpio to deal with the
vbus detect and enable pins which are not standard numbered gpios.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: axp: Move axp gpio code to a separate axpi-gpio driver
Hans de Goede [Sat, 25 Apr 2015 15:25:14 +0000 (17:25 +0200)]
sunxi: axp: Move axp gpio code to a separate axpi-gpio driver

Move the axp-gpio code out of the drivers/power/axp*.c code, and into
a new separate axpi-gpio driver.

This change drops supports for the gpio3 pin on the axp209, as that requires
special handling, and no boards are using it.

Besides cleaning things up by moving the code to a separate driver, as
a bonus this change also adds support for the (non vusb) gpio pins on the
axp221 and the gpio pins on the axp152.

The new axp-gpio driver gets its own Kconfig option, and is only enabled
on boards which need it. Besides that it only gets enabled in the regular
u-boot build and not for the SPL as we never need it in the SPL.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: axp: Add support for i2c based PMICs to the pmic-bus helpers
Hans de Goede [Sat, 25 Apr 2015 20:18:09 +0000 (22:18 +0200)]
sunxi: axp: Add support for i2c based PMICs to the pmic-bus helpers

Add support for the axp152 and axp209 PMICs to the pmic register access
helpers. This is a preparation patch for moving the axp gpio code to a
separate gpio driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: axp: Move axp pmic register helpers to a separate file
Hans de Goede [Sat, 25 Apr 2015 12:07:37 +0000 (14:07 +0200)]
sunxi: axp: Move axp pmic register helpers to a separate file

Move the register helpers used to access the registers via p2wi resp.
rsb bus on the otherwise identical axp221 and axp223 pmics to a separate
file, so that they can be used by the upcoming standalone axp gpio driver
too.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: axp: Change axp_gpio_foo prototypes to match gpio uclass ops
Hans de Goede [Wed, 22 Apr 2015 14:27:01 +0000 (16:27 +0200)]
sunxi: axp: Change axp_gpio_foo prototypes to match gpio uclass ops

Change the axp_gpio_foo function prototypes to match the gpio uclass op
prototypes, this is a preparation patch for moving the axp gpio code to
a separate driver-model gpio driver.

Note that the ugly calls with a NULL udev pointer in drivers/gpio/sunxi_gpio.c
this adds are removed in a later patch.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: gpio: Build sunxi_name_to_gpio_bank for driver-model code too
Hans de Goede [Wed, 22 Apr 2015 15:59:01 +0000 (17:59 +0200)]
sunxi: gpio: Build sunxi_name_to_gpio_bank for driver-model code too

When doing a driver-model enabled build we still need sunxi_name_to_gpio_bank
(for now) for the mmc pinmux code in board/sunxi/board.c, so build it for
driver-model enabled builds too.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: gpio: Add compatible strings for all supported SoCs
Hans de Goede [Wed, 22 Apr 2015 09:29:38 +0000 (11:29 +0200)]
sunxi: gpio: Add compatible strings for all supported SoCs

We want to use driver-model/fdt with other model SoCs too, so add
compatible strings for the other SoCs to the dm sunxi gpio code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: gpio: Add temporary implementation of name_to_gpio()
Simon Glass [Sat, 18 Apr 2015 17:33:43 +0000 (11:33 -0600)]
sunxi: gpio: Add temporary implementation of name_to_gpio()

Until sunxi moves to device tree (e.g. for USB) we need to convert named
GPIOs to numbers. Add a function to do this.

This fixes the USB / EHCI support not working on the LinkSprite pcDuino3
(which uses devicemodel).

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: gpio: Rename GPIOs to include a 'P' prefix
Simon Glass [Sat, 18 Apr 2015 17:33:44 +0000 (11:33 -0600)]
sunxi: gpio: Rename GPIOs to include a 'P' prefix

By convention, sunxi GPIOs are named PA1, PA2 instead of A1, A2. Change
the driver model GPIO driver for sunxi to use these names.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosunxi: soft-i2c: Fix gpio handling to work with the driver-model
Hans de Goede [Thu, 23 Apr 2015 21:23:50 +0000 (23:23 +0200)]
sunxi: soft-i2c: Fix gpio handling to work with the driver-model

i2c_init_board() gets called before the driver-model (gpio) code is
initialized, so move the setup of the soft-i2c pins out of i2c_init_board()
and into board_init(), at which time the driver-model setup has been done.

Also add proper error checking and properly request the gpios as that is
mandatory with the driver-model.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: display: Fix gpio handling to work with the driver-model
Hans de Goede [Wed, 22 Apr 2015 15:45:59 +0000 (17:45 +0200)]
sunxi: display: Fix gpio handling to work with the driver-model

The driver-model gpio functions may return another value then -1 as error,
make the sunxi display code properly handle this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: usbc: Fix vbus gpio handling to work with the driver-model
Hans de Goede [Wed, 22 Apr 2015 15:39:59 +0000 (17:39 +0200)]
sunxi: usbc: Fix vbus gpio handling to work with the driver-model

The driver-model gpio functions may return another value then -1 as error,
make the sunxi usbc properly handle this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: mmc: Fix card-detect gpio handling to work with the driver-model
Hans de Goede [Wed, 22 Apr 2015 15:03:17 +0000 (17:03 +0200)]
sunxi: mmc: Fix card-detect gpio handling to work with the driver-model

The driver-model gpio functions may return another value then -1 as error,
make the sunxi mmc code properly handle this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Do not build i2c support when we've no i2c controllers
Hans de Goede [Thu, 23 Apr 2015 15:47:22 +0000 (17:47 +0200)]
sunxi: Do not build i2c support when we've no i2c controllers

This fixes the following errors being printed during boot:

Error, wrong i2c adapter 0 max 0 possible
Error, wrong i2c adapter 0 max 0 possible

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Add Ippo_q8h_v1_2_a33_1024x600 defconfig
Hans de Goede [Tue, 7 Apr 2015 07:06:39 +0000 (09:06 +0200)]
sunxi: Add Ippo_q8h_v1_2_a33_1024x600 defconfig

Add a defconfig for generic 7" tablets using the Ippo q8h v1.2 pcb,
with an A33 SoC (the pcb can take an A23 or an A33), and a 1024x600 LCD.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Add softwinner astar mid756 A33 tablet board defconfig
Vishnu Patekar [Sun, 1 Mar 2015 18:24:48 +0000 (23:54 +0530)]
sunxi: Add softwinner astar mid756 A33 tablet board defconfig

The Astar MID756 is a 7" tablet using the A33 SoC with a 800x480 LCD screen,
512M RAM, 8G ROM and integrated sdio wifi.

Also see: http://linux-sunxi.org/Softwinner_astar-rda

Signed-off-by: Vishnu Patekar <vishnupatekar0510@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Add basic A33 basic support
Vishnu Patekar [Sun, 1 Mar 2015 18:17:48 +0000 (23:47 +0530)]
sunxi: Add basic A33 basic support

Enable full support for the A33 SoC including display, otg-usb, etc.

Signed-off-by: Vishnu Patekar <vishnupatekar0510@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Add a33 dram init code
Vishnu Patekar [Sun, 1 Mar 2015 18:19:39 +0000 (23:49 +0530)]
sunxi: Add a33 dram init code

Based on Allwinner dram init code from the a33 bsp:
https://github.com/allwinner-zh/bootloader/blob/master/basic_loader/bsp/bsp_for_a33/init_dram/mctl_hal.c

Initial u-boot port by Vishnu Patekar, major cleanup / rewrite by
Hans de Goede.

Signed-off-by: Vishnu Patekar <vishnupatekar0510@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Add support for A33 PLL11 (second DRAM pll)
Hans de Goede [Sun, 12 Apr 2015 09:46:41 +0000 (11:46 +0200)]
sunxi: Add support for A33 PLL11 (second DRAM pll)

Add support for the new second DRAM PLL found on the A33 SoC.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: s/sun8i/sun8i_a23/
Hans de Goede [Mon, 6 Apr 2015 18:55:39 +0000 (20:55 +0200)]
sunxi: s/sun8i/sun8i_a23/

This is a preparation patch for adding A33 support, which will have a
mach name of sun8i-a33.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Introduce a hidden SUNXI_GEN_SUNxI Kconfig bool
Hans de Goede [Mon, 6 Apr 2015 18:33:34 +0000 (20:33 +0200)]
sunxi: Introduce a hidden SUNXI_GEN_SUNxI Kconfig bool

sun6i and newer (derived) SoCs such as the sun8i-a23, sun8i-a33 and sun9i
have a various things in common, like having separate ahb reset control
registers, the SID living inside the pmic, custom pmic busses, new style
watchdog, etc.

This commit introduces a new hidden SUNXI_GEN_SUN6I Kconfig bool which can be
used to check for these features avoiding the need for an ever growing list
of "#if defined CONFIG_MACH_SUN?I" conditionals as we add support for more
"new style" sunxi SoCs.

Note that this commit changes the behavior of the gmac and hdmi code for
sun8i and the upcoming sun9i devices. This does not matter as sun8i does
not have gmac nor hdmi, and sun9i has new hardware-blocks for these so
the old code will not work there.

Also this is intentional as if a sun8i / sun9i variant which does use the
old hwblocks shows up then the GEN_SUN6I code paths will be the right ones
to use.

For completeness this also adds a SUNXI_GEN_SUN4I bool for A10/A13/A20.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: usbc: Remove unused irq field
Hans de Goede [Mon, 6 Apr 2015 18:17:46 +0000 (20:17 +0200)]
sunxi: usbc: Remove unused irq field

We do not use irqs in u-boot so remove the unused irq field, and all the
 #ifdef-ery around the irq initialization.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Also set Auxiliary Ctl SMP bit in SPL
Hans de Goede [Mon, 6 Apr 2015 18:16:36 +0000 (20:16 +0200)]
sunxi: Also set Auxiliary Ctl SMP bit in SPL

There is no reason not to and this make the #ifdef-ery easier to read.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun7i: Remove duplicate call to psci_arch_init
Jan Kiszka [Tue, 21 Apr 2015 05:18:25 +0000 (07:18 +0200)]
sun7i: Remove duplicate call to psci_arch_init

This is already invoked a few cycles later in monitor mode by
_secure_monitor (_sunxi_cpu_entry calls _do_nonsec_entry which triggers
_secure_monitor via smc #0). Drop it here, it serves no purpose.

CC: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoMerge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Wed, 29 Apr 2015 10:46:33 +0000 (06:46 -0400)]
Merge branch 'zynq' of git://denx.de/git/u-boot-microblaze

9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Wed, 29 Apr 2015 10:46:03 +0000 (06:46 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-microblaze

9 years agoARM: zynq: rename CONFIG_ZYNQ to CONFIG_ARCH_ZYNQ
Masahiro Yamada [Mon, 16 Mar 2015 07:43:24 +0000 (16:43 +0900)]
ARM: zynq: rename CONFIG_ZYNQ to CONFIG_ARCH_ZYNQ

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: move SoC headers to mach-zynq/include/mach
Masahiro Yamada [Mon, 16 Mar 2015 07:43:23 +0000 (16:43 +0900)]
ARM: zynq: move SoC headers to mach-zynq/include/mach

Move arch/arm/include/asm/arch-zynq/*
  -> arch/arm/mach-zynq/include/mach/*

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: move SoC sources to mach-zynq
Masahiro Yamada [Mon, 16 Mar 2015 07:43:22 +0000 (16:43 +0900)]
ARM: zynq: move SoC sources to mach-zynq

Move arch/arm/cpu/armv7/zynq/* -> arch/arm/mach-zynq/*

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: pass "-mfpu=neon" only to lowlevel_init.S
Masahiro Yamada [Mon, 16 Mar 2015 07:43:21 +0000 (16:43 +0900)]
ARM: zynq: pass "-mfpu=neon" only to lowlevel_init.S

The comment line in arch/arm/cpu/armv7/zynq/config.mk says that
the option "-mfpu=neon" is necessary for compiling lowlevel_init.S.
We do not have to give it to all the source files.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: Enable SDHCI0 options
Michal Simek [Wed, 15 Apr 2015 13:21:37 +0000 (15:21 +0200)]
zynqmp: Enable SDHCI0 options

Enable SDHCI0 for zynqmp.
Add empty gpio.h because of sdhci requirement.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: Enable FS_GENERIC option
Siva Durga Prasad Paladugu [Fri, 13 Mar 2015 12:13:49 +0000 (17:43 +0530)]
zynqmp: Enable FS_GENERIC option

Provide an option to write filesystem independend commands.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: Add SPI driver support for ZynqMP
Siva Durga Prasad Paladugu [Wed, 15 Apr 2015 06:18:48 +0000 (11:48 +0530)]
zynqmp: Add SPI driver support for ZynqMP

Added the SPI driver support for ZynqMP
The controller is same as zynq SPI controller

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
9 years agozynqmp: i2c: Enable i2c driver for zynqMP
Siva Durga Prasad Paladugu [Tue, 3 Mar 2015 09:31:44 +0000 (15:01 +0530)]
zynqmp: i2c: Enable i2c driver for zynqMP

Enable the i2c driver for ZynqMP
Also enable the eeprom for read and writes
to eeprom on ZynqMP
ZynqMP uses the same i2c controller as in Zynq

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: Add support for EMMC bootmode
Michal Simek [Wed, 15 Apr 2015 13:02:28 +0000 (15:02 +0200)]
zynqmp: Add support for EMMC bootmode

Add support for EMMC bootmode.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: Add support for emulation platform - Veloce
Michal Simek [Wed, 15 Apr 2015 12:59:19 +0000 (14:59 +0200)]
zynqmp: Add support for emulation platform - Veloce

Add support for Veloce - zynqmp emulation platform.
Platform doesn't support SDHCI.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynq: timer: Fix wrong timer calculation
Siva Durga Prasad Paladugu [Mon, 13 Apr 2015 05:27:04 +0000 (10:57 +0530)]
zynq: timer: Fix wrong timer calculation

Fix wrong timer calculation in get_timer_masked incase of
overflow.
This fixes the issue of getting wrong time from get_timer()
calls.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: sdhci: Remove the quirk SDHCI_QUIRK_NO_CD
Siva Durga Prasad Paladugu [Tue, 8 Jul 2014 10:01:04 +0000 (15:31 +0530)]
zynqmp: sdhci: Remove the quirk SDHCI_QUIRK_NO_CD

Remove the quirk SDHCI_QUIRK_NO_CD as it is not
required.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynqmp: Add support for R5 sw loading
Michal Simek [Wed, 15 Apr 2015 11:36:40 +0000 (13:36 +0200)]
zynqmp: Add support for R5 sw loading

Add support for loading sw for R5 with enabling for zynqmp.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
9 years agozynqmp: caches: Enable dcache for zynqmp
Siva Durga Prasad Paladugu [Sat, 6 Dec 2014 07:27:51 +0000 (12:57 +0530)]
zynqmp: caches: Enable dcache for zynqmp

Define the mmu table till 2MB granularity
enable dcaches for zynqmp.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynq: slcr: Disable all level shifters
Siva Durga Prasad Paladugu [Mon, 2 Mar 2015 10:33:46 +0000 (16:03 +0530)]
zynq: slcr: Disable all level shifters

Disable all level shifters before enabling
the PS-to-PL level shifters as it would
be good to disable all level shifters before
enabling the PS-to-PL in order to ensure that
it is in proper state

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynq: drop legacy ps7_init.c/h support
Masahiro Yamada [Tue, 14 Apr 2015 07:50:50 +0000 (16:50 +0900)]
ARM: zynq: drop legacy ps7_init.c/h support

We are about to change the location for ps7_init files, breaking the
current work-flows.  It is good time to drop the legacy ps7_init.c/h
support.

Going forward, please use ps7_init_gpl.c/h all the time.
If you are still using old Xilinx tools that are only able to
generate ps7_init.c/h, rename them into ps7_init_gpl.c/h.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Suggested-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynq: Add Zynq PicoZed board support
Nathan Rossi [Tue, 14 Apr 2015 04:58:10 +0000 (14:58 +1000)]
zynq: Add Zynq PicoZed board support

The PicoZed is a System-on-Module board which is marketed as part of
the ZedBoard/MicroZed/etc. collection. It includes a Zynq-7000
processor.

This patch adds support that covers all the variants of the PicoZed
including the SKUs with Z7010/Z7020 and Z7015/Z7030 Zynq chips. This
patch set however only covers support for the System-on-Module and does
not cover any extra components that are available on carrier boards
(except those that are fanned out of the module itself).

More information on this board, its variants and available carrier
boards is available at: http://zedboard.org/product/picozed

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoserial: zynq: Add support for slow emulation platform
Michal Simek [Wed, 15 Apr 2015 11:05:06 +0000 (13:05 +0200)]
serial: zynq: Add support for slow emulation platform

On slow platforms not all baudrate setting is valid.
Check it directly in the driver and setup maximum possible
frequency.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agozynq: Enable GPIO driver and GPIO commands
Michal Simek [Wed, 25 Mar 2015 12:35:04 +0000 (13:35 +0100)]
zynq: Enable GPIO driver and GPIO commands

Enable GPIO driver and GPIO commands.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agogpio: add Xilinx Zynq PS GPIO driver
Andrea Scian [Fri, 20 Mar 2015 15:00:25 +0000 (16:00 +0100)]
gpio: add Xilinx Zynq PS GPIO driver

Most of the code is taken (and adapted) from Linux kernel driver.

Just add CONFIG_ZYNQ_GPIO to you config to enable it

Signed-off-by: Andrea Scian <andrea.scian@dave.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agomicroblaze: Fix EMAC Lite initialization
Nathan Rossi [Tue, 14 Apr 2015 06:16:39 +0000 (16:16 +1000)]
microblaze: Fix EMAC Lite initialization

It is possible for CONFIG_XILINX_EMACLITE to be defined without
XILINX_EMACLITE_BASEADDR being defined as the EMAC Lite driver support
OF init. Check that the driver is enabled and the base address is
available before initializing with a static base address.

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-socfpga
Tom Rini [Wed, 29 Apr 2015 00:48:43 +0000 (20:48 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-socfpga

9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-dm
Tom Rini [Tue, 28 Apr 2015 23:37:20 +0000 (19:37 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-dm

9 years agodm: core: Correct bug introduced in uclass_first/next_device()
Simon Glass [Sat, 25 Apr 2015 04:33:07 +0000 (22:33 -0600)]
dm: core: Correct bug introduced in uclass_first/next_device()

These functions now rely on uclass_find_first/next_device() and assume that
they will either return failure (-ve error code) or a device. In fact,
coming to the end of a list is not considered failure and they return 0
in that case.

The logic to deal with this was replaced in commit acb9ca2a with just using
uclass_get_device_tail(). Add back the missing logic. This bug was
caught by unit tests but since they were broken for other reasons at the
time, this was not noticed.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoserial: ns16550: Remove hard-coded baud_divisor setting
Axel Lin [Sat, 25 Apr 2015 02:53:14 +0000 (10:53 +0800)]
serial: ns16550: Remove hard-coded baud_divisor setting

This was accidentally added by commit dd0b0122bacc
"serial: ns16550: Add an option to specify the debug UART register shift".
Remove it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: core: drop device removal error path correctly
Masahiro Yamada [Fri, 24 Apr 2015 08:28:40 +0000 (17:28 +0900)]
dm: core: drop device removal error path correctly

Trivial bug fix for commit 5a87c4174d18 (dm: core: Drop device
removal error path when not supported).

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Tue, 28 Apr 2015 16:15:13 +0000 (12:15 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Tue, 28 Apr 2015 11:28:43 +0000 (07:28 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

9 years agosf: Fix to compute proper sector_size
Jagannadha Sutradharudu Teki [Mon, 27 Apr 2015 15:34:15 +0000 (21:04 +0530)]
sf: Fix to compute proper sector_size

Upto now flash sector_size is assigned from params which isn't
necessarily a sector size from vendor, so based on the SECT_*
flags from flash_params the erase_size will compute and it will
become the sector_size finally.

Bug report (from Bin Meng):
=> sf probe
SF: Detected SST25VF016B with page size 256 Bytes, erase size 4 KiB,
total 2 MiB, mapped at ffe00000

=> sf erase 0 +100
SF: 65536 bytes @ 0x0 Erased: OK

Signed-off-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Reported-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
9 years agodm: sf: Make SST flash write op work again
Bin Meng [Fri, 24 Apr 2015 11:51:10 +0000 (19:51 +0800)]
dm: sf: Make SST flash write op work again

With SPI flash moving to driver model, commit fbb0991 "dm: Convert
spi_flash_probe() and 'sf probe' to use driver model" ignored the
SST flash-specific write op (byte program & word program), which
actually broke the SST flash from wroking.

This commit makes SST flash work again under driver model, by adding
SST flash-specific handling in the spi_flash_std_write().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
9 years agodm: sf: Save flash flags to struct spi_flash
Bin Meng [Tue, 28 Apr 2015 07:59:54 +0000 (13:29 +0530)]
dm: sf: Save flash flags to struct spi_flash

Add a new member 'flags' in struct spi_flash to store the flash flags
during spi_flash_validate_params().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
9 years agospi: omap3: Fix timeout handling
David Dueck [Wed, 1 Apr 2015 12:20:24 +0000 (14:20 +0200)]
spi: omap3: Fix timeout handling

The timeout value is never reset during the transfer. This means that when
transferring more data we eventually trigger the timeout.

This was reported on the mailing list:
"Spansion SPI flash read timeout with AM335x"

Signed-off-by: David Dueck <davidcdueck@googlemail.com>
CC: Tom Rini <trini@konsulko.com>
CC: Stefan Roese <sr@denx.de>
CC: Andy Pont <andy.pont@sdcsystems.com>
Tested-by: David Dueck <davidcdueck@googlemail.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
9 years agomx6cuboxi: Load the correct 'fdtfile' variable
Fabio Estevam [Sat, 25 Apr 2015 21:47:21 +0000 (18:47 -0300)]
mx6cuboxi: Load the correct 'fdtfile' variable

Instead of hardcoding the 'fdtfile' variable, let's detect the SoC and
board variant on the fly and change the dtb name.

Based on the scheme done on am335x board.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-By: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agomx6cuboxi: Use more standard namings for fdt variables
Fabio Estevam [Sat, 25 Apr 2015 21:47:20 +0000 (18:47 -0300)]
mx6cuboxi: Use more standard namings for fdt variables

README file suggests to use 'fdtfile' for the dtb file name and
'fdt_addr_r' for the dtb address in RAM, so do as suggested.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agomx6cuboxi: Differentiate Cubox-i and Hummingboard
Fabio Estevam [Sat, 25 Apr 2015 21:47:19 +0000 (18:47 -0300)]
mx6cuboxi: Differentiate Cubox-i and Hummingboard

Introduce is_hummingboard() function that reads GPIOs that can distinguish
between Cubox-i and Hummingboard.

Print the board name accordingly.

Based on a patch from Rabeeh Khoury.

Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agomx6cuboxi: Introduce multi-SoC support
Fabio Estevam [Sat, 25 Apr 2015 21:47:18 +0000 (18:47 -0300)]
mx6cuboxi: Introduce multi-SoC support

Cubox-i and Hummingboard support several MX6 SoCs: mx6solo, mx6dual-lite,
mx6dual and mx6quad. Add support for the different SoC/memory sizes
combinations.

DDR initialization values were extracted from Solid-run internal U-boot.

Tested on a CuBox-i4Pro, HummingBoard-i2eX and HummingBoard-i1.

Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agomx6cuboxi: Prepare for multi SoC support
Fabio Estevam [Sat, 25 Apr 2015 21:47:17 +0000 (18:47 -0300)]
mx6cuboxi: Prepare for multi SoC support

Cubox-i and Hummingboard support several MX6 SoCs: mx6solo, mx6dual-lite,
mx6dual and mx6quad.

Use IOMUX_PADS() macro in order to prepare for the multi-SoC support.
Also pass 'MX6QDL' in the defconfig to indicate it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agomx6cuboxi: Fix the defconfig name
Fabio Estevam [Sat, 25 Apr 2015 21:47:16 +0000 (18:47 -0300)]
mx6cuboxi: Fix the defconfig name

The correct name of the defconfig file is 'mx6cuboxi_defconfig'.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agosocfpga: implement arria V socdk SPI flash config in dts
Pavel Machek [Sat, 25 Apr 2015 19:36:16 +0000 (21:36 +0200)]
socfpga: implement arria V socdk SPI flash config in dts

Arria V SocDK has same QSPI and SPI flash configuration as Socrates. Add
support for it.

Signed-off-by: Pavel Machek <pavel@denx.de>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-fdt
Tom Rini [Fri, 24 Apr 2015 19:07:19 +0000 (15:07 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-fdt

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Fri, 24 Apr 2015 17:44:28 +0000 (13:44 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Fri, 24 Apr 2015 17:43:24 +0000 (13:43 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq

9 years agoMIPS: implement device-tree handover to Linux kernel
Daniel Schwierzeck [Sun, 22 Feb 2015 15:58:30 +0000 (16:58 +0100)]
MIPS: implement device-tree handover to Linux kernel

Add device-tree handover to Linux kernel conforming with MIPS UHI [1].
Register $a0 will be set to the reserved value -2. The address of
the device-tree blob will be stored as KSEG0 address in $a1. $a2 and
$a3 are set to zero.

[1] http://prplfoundation.org/wiki/MIPS_documentation

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
9 years agofdt: Fix handling of paths with options in them
Hans de Goede [Mon, 20 Apr 2015 09:13:37 +0000 (11:13 +0200)]
fdt: Fix handling of paths with options in them

After syncing the sunxi dts files with the upstream kernel dm/fdt sunxi
builds would no longer boot.

The problem is that stdout-path is now set like this in the upstream dts
files: stdout-path = "serial0:115200n8". The use of options in of-paths,
either after an alias name, or after a full path, e.g. stdout-path =
"/soc@01c00000/serial@01c28000:115200", is standard of usage, but something
which the u-boot dts code so far did not handle.

This commit fixes this, adding support for both path formats.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agosocfpga: implement socdk SPI flash config in dts
Pavel Machek [Thu, 23 Apr 2015 07:14:01 +0000 (09:14 +0200)]
socfpga: implement socdk SPI flash config in dts

SocDK has same QSPI and SPI flash configuration as Socrates. Add
support for it.

Signed-off-by: Pavel Machek <pavel@denx.de>
9 years agoarmv8/fsl-lsch3: Implement workaround for I2C erratum A009203
York Sun [Mon, 23 Mar 2015 17:41:35 +0000 (10:41 -0700)]
armv8/fsl-lsch3: Implement workaround for I2C erratum A009203

This erratum requires setting GLITCH_EN bit in debug register to
enable digital filter to improve clock stability.

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Heiko Schocher <hs@denx.de>
9 years agols2085a: esdhc: Add esdhc support for ls2085a
Yangbo Lu [Sat, 21 Mar 2015 02:28:31 +0000 (19:28 -0700)]
ls2085a: esdhc: Add esdhc support for ls2085a

This patch adds esdhc support for ls2085a.

Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
9 years agoarmv8/ls2085ardb: Enable NAND SPL support
Scott Wood [Tue, 24 Mar 2015 20:25:03 +0000 (13:25 -0700)]
armv8/ls2085ardb: Enable NAND SPL support

Enable NAND boot support using SPL framework. To boot from
NAND, either use DIP switches on board, or "qixis_reset nand"
command. Details of forming NAND image can be found in README.

Signed-off-by: Scott Wood <scottwood@freescale.com>
[York Sun: Remove +S from defconfig after commit 252ed872]
Signed-off-by: York Sun <yorksun@freescale.com>
9 years agofreescale/qixis: Add support for booting from NAND
Scott Wood [Sat, 21 Mar 2015 02:28:29 +0000 (19:28 -0700)]
freescale/qixis: Add support for booting from NAND

Use "qixis_reset nand" to reset the board to boot from NAND.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
9 years agoarmv8/ls2085aqds: NAND boot support
Scott Wood [Tue, 24 Mar 2015 20:25:02 +0000 (13:25 -0700)]
armv8/ls2085aqds: NAND boot support

This adds NAND boot support for LS2085AQDS, using SPL framework.
Details of forming NAND image can be found in README.

Signed-off-by: Scott Wood <scottwood@freescale.com>
[York Sun: Remove +S from defconfig after commit 252ed872]
Signed-off-by: York Sun <yorksun@freescale.com>
9 years agodriver/ifc: Add 64KB page support
Jaiprakash Singh [Sat, 21 Mar 2015 02:28:27 +0000 (19:28 -0700)]
driver/ifc: Add 64KB page support

IFC has two register pages.Till IFC version 1.4 each
register page is 4KB each.But IFC ver 2.0 register page
size is 64KB each.IFC regiters structure is break into
two viz FCM and RUNTIME.FCM(Flash control machine) registers
are defined in PAGE0 and controls IFC generic functionality.
RUNTIME registers are defined in PAGE1 and controls NAND and
GPCM funcinality.

FCM and RUNTIME structures defination is common for IFC
version 1.4 and 2.0.

Signed-off-by: Jaiprakash Singh <b44839@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
9 years agoboard/ls2085qds: Add support ethernet
Prabhakar Kushwaha [Sat, 21 Mar 2015 02:28:26 +0000 (19:28 -0700)]
board/ls2085qds: Add support ethernet

Add support of ethernet:
 - eth.c: mapping lane to slot for (0x2A, 0x07)
 - ls2085a.c: To enable/disable dpmac and get link type

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
9 years agoMerge branch 'buildman' of git://git.denx.de/u-boot-x86
Tom Rini [Thu, 23 Apr 2015 18:56:47 +0000 (14:56 -0400)]
Merge branch 'buildman' of git://git.denx.de/u-boot-x86

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-dm
Tom Rini [Thu, 23 Apr 2015 17:53:09 +0000 (13:53 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-dm

9 years agocolibri_vf: Enable USB support for Colibri Vybrid
Sanchayan Maity [Fri, 17 Apr 2015 13:26:42 +0000 (18:56 +0530)]
colibri_vf: Enable USB support for Colibri Vybrid

Enable USB support on Toradex Colibri Vybrid Modules.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
9 years agousb: host: Add ehci-vf USB driver for ARM Vybrid SoC's
Sanchayan Maity [Wed, 15 Apr 2015 10:54:27 +0000 (16:24 +0530)]
usb: host: Add ehci-vf USB driver for ARM Vybrid SoC's

This driver adds support for the USB peripheral on Freescale Vybrid
SoC's.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
9 years agoARM: vf610: Initial integration for Colibri VF50/VF61
Sanchayan Maity [Wed, 15 Apr 2015 10:54:26 +0000 (16:24 +0530)]
ARM: vf610: Initial integration for Colibri VF50/VF61

This adds initial support for Colibri VF50/VF61 based on Freescale
Vybrid SoC.

- CPU clocked at 396/500 MHz
- DDR3 at 396MHz
  - for VF50, use PLL2 as memory clock (synchronous mode)
  - for VF61, use PLL1 as memory clock (asynchronous mode)
- Console on UART0 (Colibri UART_A)
- Ethernet on FEC1
- PLL5 based RMII clocking (E.g. No external crystal)
- UART_A and UART_C I/O muxing
- Boot from NAND by default

Tested on Colibri VF50/VF61 booting using serial loader over UART.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
Acked-by: Stefan Agner <stefan@agner.ch>
9 years agoARM: vf610: Enable caches
Stefan Agner [Wed, 15 Apr 2015 10:54:25 +0000 (16:24 +0530)]
ARM: vf610: Enable caches

Enables caches which provides a rather huge speedup of the boot loader.
Also mark the on-chip RAM as cachable since this is the area U-Boot runs
from.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
9 years agoARM: vf610: Add SoC and CPU type detection
Sanchayan Maity [Wed, 15 Apr 2015 10:54:24 +0000 (16:24 +0530)]
ARM: vf610: Add SoC and CPU type detection

Vybrid product family consists of several rather similar SoC which
can be determined by softare during boot time. This allows use of
variable ${soc} for Linux device tree files. Detect VF5xx CPU's by
reading the CPU count register. We can determine the second number
of the CPU type (VF6x0) which indicates the presence of a L2 cache.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
9 years agoARM: vf610: Enable external 32KHz oscillator
Stefan Agner [Wed, 15 Apr 2015 10:54:23 +0000 (16:24 +0530)]
ARM: vf610: Enable external 32KHz oscillator

Enable the SCSC (Slow Clock Source Controller) and select the external
32KHz oscillator. This improves the accuracy of the RTC.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
9 years agoARM: vf610: Move DDR3 initialization to imx-common
Sanchayan Maity [Wed, 15 Apr 2015 10:54:22 +0000 (16:24 +0530)]
ARM: vf610: Move DDR3 initialization to imx-common

In order to avoid code duplication, move the DDR3 initialization to the
common place under imx-common. Currently ROW_DIFF and COL_DIFF can be
chosen from the board file. The JEDEC timings are specified using a
common ddr3_jedec_timings structure.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
9 years agocmd, nand: add more info to "nand info"
Heiko Schocher [Sun, 12 Apr 2015 08:18:09 +0000 (10:18 +0200)]
cmd, nand: add more info to "nand info"

add subpagesize, nand options and bbt options to the
"nand info" output.

=> nand info

Device 0: nand0, sector size 256 KiB
  Page size       4096 b
  OOB size         256 b
  Erase size    262144 b
  subpagesize     4096 b
  options     0x     200
  bbt options 0x    8000

Signed-off-by: Heiko Schocher <hs@denx.de>