]> git.karo-electronics.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
9 years agokconfig: remove unneeded dependency on !SPL_BUILD
Masahiro Yamada [Tue, 24 Feb 2015 13:26:21 +0000 (22:26 +0900)]
kconfig: remove unneeded dependency on !SPL_BUILD

Now CONFIG_SPL_BUILD is not defined in Kconfig, so
"!depends on SPL_BUILD" and "if !SPL_BUILD" are redundant.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokconfig: switch to single .config configuration
Masahiro Yamada [Tue, 24 Feb 2015 13:26:20 +0000 (22:26 +0900)]
kconfig: switch to single .config configuration

When Kconfig for U-boot was examined, one of the biggest issues was
how to support multiple images (Normal, SPL, TPL).  There were
actually two options, "single .config" and "multiple .config".
After some discussions and thought experiments, I chose the latter,
i.e. to create ".config", "spl/.config", "tpl/.config" for Normal,
SPL, TPL, respectively.

It is true that the "multiple .config" strategy provided us the
maximum flexibility and helped to avoid duplicating CONFIGs among
Normal, SPL, TPL, but I have noticed some fatal problems:

[1] It is impossible to share CONFIG options across the images.
  If you change the configuration of Main image, you often have to
  adjust some SPL configurations correspondingly.  Currently, we
  cannot handle the dependencies between them.  It means one of the
  biggest advantages of Kconfig is lost.

[2] It is too painful to change both ".config" and "spl/.config".
  Sunxi guys started to work around this problem by creating a new
  configuration target.  Commit cbdd9a9737cc (sunxi: kconfig: Add
  %_felconfig rule to enable FEL build of sunxi platforms.) added
  "make *_felconfig" to enable CONFIG_SPL_FEL on both images.
  Changing the configuration of multiple images in one command is a
  generic demand.  The current implementation cannot propose any
  good solution about this.

[3] Kconfig files are getting ugly and difficult to understand.
  Commit b724bd7d6349 (dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to
  Kconfig) has sprinkled "if !SPL_BUILD" over the Kconfig files.

[4] The build system got more complicated than it should be.
  To adjust Linux-originated Kconfig to U-Boot, the helper script
  "scripts/multiconfig.sh" was introduced.  Writing a complicated
  text processor is a shell script sometimes caused problems.

Now I believe the "single .config" will serve us better.  With it,
all the problems above would go away.  Instead, we will have to add
some CONFIG_SPL_* (and CONFIG_TPL_*) options such as CONFIG_SPL_DM,
but we will not have much.  Anyway, this is what we do now in
scripts/Makefile.spl.

I admit my mistake with my apology and this commit switches to the
single .config configuration.

It is not so difficult to do that:

 - Remove unnecessary processings from scripts/multiconfig.sh
  This file will remain for a while to support the current defconfig
  format.  It will be removed after more cleanups are done.

 - Adjust some makefiles and Kconfigs

 - Add some entries to include/config_uncmd_spl.h and the new file
   scripts/Makefile.uncmd_spl.  Some CONFIG options that are not
   supported on SPL must be disabled because one .config is shared
   between SPL and U-Boot proper going forward.  I know this is not
   a beautiful solution and I think we can do better, but let's see
   how much we will have to describe them.

 - update doc/README.kconfig

More cleaning up patches will follow this.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agokconfig: Adjust ordering so that defaults work as expected
Simon Glass [Tue, 24 Feb 2015 13:26:19 +0000 (22:26 +0900)]
kconfig: Adjust ordering so that defaults work as expected

At present defaults in arch-specific Kconfig files are ignored if the
top-level item comes ahead of it in include order. This means that it is
not possible to have a U-Boot default that architectures and boards can
override. This does not seem very useful.

Move the include earlier to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agommc: fsl_esdhc: Add support for DDR mode
Volodymyr Riazantsev [Tue, 20 Jan 2015 15:16:44 +0000 (10:16 -0500)]
mmc: fsl_esdhc: Add support for DDR mode

Add support of the DDR mode for eSDHC driver.
Enable it for i.MX6 SoC family only.

Signed-off-by: Volodymyr Riazantsev <volodymyr.riazantsev@globallogic.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoARM: keystone: move SoC sources to mach-keystone
Masahiro Yamada [Fri, 20 Feb 2015 08:04:11 +0000 (17:04 +0900)]
ARM: keystone: move SoC sources to mach-keystone

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

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
9 years agoARM: orion5x: move SoC sources to mach-orion5x
Masahiro Yamada [Fri, 20 Feb 2015 08:04:09 +0000 (17:04 +0900)]
ARM: orion5x: move SoC sources to mach-orion5x

Move
arch/arm/cpu/arm926ejs/orion5x/* -> arch/arm/mach-orion5x/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
9 years agoARM: nomadik: move SoC sources to mach-nomadik
Masahiro Yamada [Fri, 20 Feb 2015 08:04:07 +0000 (17:04 +0900)]
ARM: nomadik: move SoC sources to mach-nomadik

Move
arch/arm/cpu/arm926ejs/nomadik/* -> arch/arm/mach-nomadik/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nomadik Linux Team <STN_WMM_nomadik_linux@list.st.com>
Cc: Alessandro Rubini <rubini@unipv.it>
9 years agoARM: kirkwood: move SOC sources to mach-kirkwood
Masahiro Yamada [Fri, 20 Feb 2015 08:04:06 +0000 (17:04 +0900)]
ARM: kirkwood: move SOC sources to mach-kirkwood

Move
arch/arm/cpu/arm926ejs/kirkwood/* -> arch/arm/mach-kirkwood/*

Note:
 Perhaps, can we merge arch/arm/mach-kirkwood and
 arch/arm/mvebu-common into arch/arm/mach-mvebu, like Linux?

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Stefan Roese <sr@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Luka Perkov <luka.perkov@sartura.hr>
9 years agoARM: tegra: collect SoC sources into mach-tegra
Masahiro Yamada [Fri, 20 Feb 2015 08:04:04 +0000 (17:04 +0900)]
ARM: tegra: collect SoC sources into mach-tegra

This commit moves files as follows:

 arch/arm/cpu/arm720t/tegra20/*      -> arch/arm/mach-tegra/tegra20/*
 arch/arm/cpu/arm720t/tegra30/*      -> arch/arm/mach-tegra/tegra30/*
 arch/arm/cpu/arm720t/tegra114/*     -> arch/arm/mach-tegra/tegra114/*
 arch/arm/cpu/arm720t/tegra124*      -> arch/arm/mach-tegra/tegra124/*
 arch/arm/cpu/arm720t/tegra-common/* -> arch/arm/mach-tegra/*
 arch/arm/cpu/armv7/tegra20/*        -> arch/arm/mach-tegra/tegra20/*
 arch/arm/cpu/armv7/tegra30/*        -> arch/arm/mach-tegra/tegra30/*
 arch/arm/cpu/armv7/tegra114/*       -> arch/arm/mach-tegra/tegra114/*
 arch/arm/cpu/armv7/tegra124/*       -> arch/arm/mach-tegra/tegra124/*
 arch/arm/cpu/armv7/tegra-common/*   -> arch/arm/mach-tegra/*
 arch/arm/cpu/tegra20-common/*       -> arch/arm/mach-tegra/tegra20/*
 arch/arm/cpu/tegra30-common/*       -> arch/arm/mach-tegra/tegra30/*
 arch/arm/cpu/tegra114-common/*      -> arch/arm/mach-tegra/tegra114/*
 arch/arm/cpu/tegra124-common/*      -> arch/arm/mach-tegra/tegra124/*
 arch/arm/cpu/tegra-common/*         -> arch/arm/mach-tegra/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Simon Glass <sjg@chromium.org> [ on nyan-big ]
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
9 years agodm: cros_ec: Convert to Kconfig
Simon Glass [Fri, 13 Feb 2015 19:20:47 +0000 (12:20 -0700)]
dm: cros_ec: Convert to Kconfig

Since both I2C and SPI are converted to Kconfig, we can convert cros_ec
to Kconfig for these buses.

LPC will need to wait until driver mode PCI is available.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoARM: imx6: disable bandgap self-bias after boot
Peng Fan [Thu, 15 Jan 2015 06:22:32 +0000 (14:22 +0800)]
ARM: imx6: disable bandgap self-bias after boot

The self-bias circuit is used by the bandgap during startup.
Once the bandgap has stabilized, the self-bias circuit should
be disabled for best noise performance of analog blocks.
Also this bit should be disabled before the chip enters STOP mode or
when ever the regular bandgap is disabled.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@freescale.com>
9 years agodm:gpio:mxc add DT support
Peng Fan [Tue, 10 Feb 2015 06:46:34 +0000 (14:46 +0800)]
dm:gpio:mxc add DT support

This patch add DT support for mxc gpio driver.

There are one place using CONFIG_OF_CONTROL macro.
1. The U_BOOT_DEVICES and mxc_plat array are complied out. To DT,
   platdata is alloced using calloc, so there is no need to use mxc_plat.

The following situations are tested, and all work fine:
1. with DM, without DT
2. with DM and DT
3. without DM
Since device tree has not been upstreamed, if want to test this patch.
The followings need to be done.
 + pieces of code does not gpio_request when using gpio_direction_xxx and
   etc, need to request gpio.
 + move the gpio settings from board_early_init_f to board_init
 + define CONFIG_DM ,CONFIG_DM_GPIO and CONFIG_OF_CONTROL
 + Add device tree file and do related configuration in
   `make ARCH=arm menuconfig`
These will be done in future patches by step.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm:gpio:mxc add a bank_index entry in platdata
Peng Fan [Tue, 10 Feb 2015 06:46:33 +0000 (14:46 +0800)]
dm:gpio:mxc add a bank_index entry in platdata

Add a new entry in platdata structure and intialize
bank_index in mxc_plat array.
This new entry can avoid using `plat - mxc_plat` by using
`plat->bank_index`.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agolcd: split configuration_get_cmap
Nikita Kiryanov [Tue, 3 Feb 2015 11:32:21 +0000 (13:32 +0200)]
lcd: split configuration_get_cmap

configuration_get_cmap() is multiple platform-specific functions stuffed into
one function. Split it into multiple versions, and move each version to the
appropriate driver to reduce the #ifdef complexity.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
9 years agoarm: mxs: Add debug outputs and comments to mxs SPL source files
Graeme Russ [Sun, 25 Jan 2015 01:07:51 +0000 (12:07 +1100)]
arm: mxs: Add debug outputs and comments to mxs SPL source files

It is difficult to track down fail to boot issues in the mxs SPL.
Implement the following to make it easier:
 - Add debug outputs to allow tracing of SPL progress in order to track
where failure to boot occurs. DEUBUG and CONFIG_SPL_SERIAL_SUPPORT must
be defined to enable debug output in SPL
 - Add TODO comments where it is not clear if the code is doing what it
is meant to be doing, even tough the board boots properly (these comments
refer to existing code, not to any code added by this patch)

Signed-off-by: Graeme Russ <gruss@tss-engineering.com>
9 years agofdt_support: add missing #ifdef after merge
Lothar Waßmann [Wed, 2 Sep 2015 08:42:45 +0000 (10:42 +0200)]
fdt_support: add missing #ifdef after merge

9 years agocommon/board_f: add missing #endif after merge
Lothar Waßmann [Wed, 2 Sep 2015 08:41:48 +0000 (10:41 +0200)]
common/board_f: add missing #endif after merge

9 years agoKconfig: define missing symbol SPI and make DM_SPI depend on it
Lothar Waßmann [Wed, 2 Sep 2015 08:22:54 +0000 (10:22 +0200)]
Kconfig: define missing symbol SPI and make DM_SPI depend on it

9 years agoKconfig: change CONFIG_MX* to CONFIG_SOC_MX*
Lothar Waßmann [Wed, 2 Sep 2015 08:22:00 +0000 (10:22 +0200)]
Kconfig: change CONFIG_MX* to CONFIG_SOC_MX*

9 years agomx6sabresd: Enable video interfaces in bootargs
Nikolay Dimitrov [Tue, 2 Jun 2015 15:59:34 +0000 (18:59 +0300)]
mx6sabresd: Enable video interfaces in bootargs

Generate kernel video bootargs for sabresd, based on a list of needed video
interfaces ("video_interfaces" U-Boot env-var). The order of initialization
and video settings can be fully customized.

Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg>
9 years agothermal: imx_thermal: use CPU temperature grade for trip points
Tim Harvey [Mon, 18 May 2015 13:56:47 +0000 (06:56 -0700)]
thermal: imx_thermal: use CPU temperature grade for trip points

Replace the hard-coded values for min/max/passive with values derived from
the CPU temperature grade.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: mx6: add display of CPU temperature grade in print_cpuinfo()
Tim Harvey [Mon, 18 May 2015 13:56:46 +0000 (06:56 -0700)]
imx: mx6: add display of CPU temperature grade in print_cpuinfo()

When CONFIG_IMX6_THERMAL is defined print the CPU temperature grade info
along with the current temperature.

Before:
 CPU:   Temperature 42 C

After:
 CPU:   Automotive temperature grade (-40C to 125C) at 42C
 CPU:   Industrial temperature grade (-40C to 105C) at 42C
 CPU:   Extended Commercial temperature grade (-20C to 105C) at 42C

Cc: Stefan Roese <sr@denx.de>
Cc: Eric Nelson <eric.nelson@boundarydevices.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Jon Nettleton <jon.nettleton@gmail.com>
Cc: Jason Liu <r64343@freescale.com>
Cc: Ye Li <b37916@freescale.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Cc: Peng Fan <b51431@freescale.com>
Tested-by: Nikolay Dimitrov <picmaster@mail.bg>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: mx6: add get_cpu_temp_grade to obtain cpu temperature grade from OTP
Tim Harvey [Mon, 18 May 2015 13:56:45 +0000 (06:56 -0700)]
imx: mx6: add get_cpu_temp_grade to obtain cpu temperature grade from OTP

The MX6 has a temperature grade defined by OCOTP_MEM0[7:6] which is at 0x480
in the Fusemap Description Table in the reference manual. Return this value
as well as min/max temperature based on the value.

Note that the IMX6SDLRM and the IMX6SXRM do not indicate this in the
their Fusemap Description Table however Freescale has confirmed that these
eFUSE bits match the description within the IMX6DQRM and that they will
be added to the next revision of the respective reference manuals.

This has been tested with IMX6 Automative and Industrial parts.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: mx6: display max cpu frequency in print_cpuinfo()
Tim Harvey [Mon, 18 May 2015 14:02:25 +0000 (07:02 -0700)]
imx: mx6: display max cpu frequency in print_cpuinfo()

Display the max CPU frequency as well as the current running CPU frequency
if the max CPU frequency is available and differs from the current CPU
frequency.

Before:
CPU:   Freescale i.MX6Q rev1.2 at 792 MHz

After - using an 800MHz IMX6DL (running at its max)
CPU:   Freescale i.MX6DL rev1.1 at 792 MHz

After - using a 1GHz IMX6Q (not running at its max):
CPU:   Freescale i.MX6Q rev1.2 996 MHz (running at 792 MHz)

Cc: Stefan Roese <sr@denx.de>
Cc: Eric Nelson <eric.nelson@boundarydevices.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Jon Nettleton <jon.nettleton@gmail.com>
Cc: Jason Liu <r64343@freescale.com>
Cc: Ye Li <b37916@freescale.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Cc: Peng Fan <b51431@freescale.com>
Tested-by: Nikolay Dimitrov <picmaster@mail.bg>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: mx6: add get_cpu_speed_grade_hz func to return MHz speed grade from OTP
Tim Harvey [Mon, 18 May 2015 14:02:24 +0000 (07:02 -0700)]
imx: mx6: add get_cpu_speed_grade_hz func to return MHz speed grade from OTP

The IMX6 has four different speed grades determined by eFUSE SPEED_GRADING
indicated by OCOTP_CFG3[17:16] which is at 0x440 in the Fusemap Description
Table. Return this frequency so that it can be used elsewhere.

Note that the IMX6SDLRM and the IMX6SXRM do not indicate this in the
their Fusemap Description Table however Freescale has confirmed that these
eFUSE bits match the description within the IMX6DQRM and that they will
be added to the next revision of the respective reference manuals.

These have been tested with IMX6 Quad/Solo/Dual-light 800Mhz and 1GHz grades.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agomx6: add OTP bank1 registers
Tim Harvey [Mon, 18 May 2015 13:56:44 +0000 (06:56 -0700)]
mx6: add OTP bank1 registers

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoarm: mx6: ddr: set fast-exit on DDR3 if pd_fast_exit specified
Tim Harvey [Mon, 18 May 2015 14:07:02 +0000 (07:07 -0700)]
arm: mx6: ddr: set fast-exit on DDR3 if pd_fast_exit specified

Commit fa8b7d66f49f0c7bd41467fe78f6488d8af6976a introduced fast-exit support
to the MMDC however enabling it on the DDR3 got missed. Make sure we enable
it on the DDR3 as well.

Gateworks uses Micron memory as well as Winbond in MX6. We have found in
testing that we need to enable fast-exit for Winbond stability. Gateworks
boards are currently the only boards using the MX6 SPL and enabling
fast-exit mode.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoarm/imx-common: Fix warning 'get_reset_cause' defined but not used
Prabhakar Kushwaha [Mon, 18 May 2015 11:43:52 +0000 (17:13 +0530)]
arm/imx-common: Fix warning 'get_reset_cause' defined but not used

Fix below warning
arch/arm/imx-common/cpu.c:29:14: warning: ‘get_reset_cause’ defined but
not used
 static char *get_reset_cause(void)

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
9 years agopmic: pfuze100 fix typo
Peng Fan [Mon, 18 May 2015 05:37:26 +0000 (13:37 +0800)]
pmic: pfuze100 fix typo

Change PUZE_100_SW1ABCONF to PFUZE100_SW1ABCONF

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
9 years agoimx: mx6sx enable SION for i2c pin mux
Peng Fan [Mon, 18 May 2015 05:37:25 +0000 (13:37 +0800)]
imx: mx6sx enable SION for i2c pin mux

Enable IOMUX_CONFIG_SION for all I2C pin mux settings, otherwise
we will get erros when doing i2c operations.
error log like the following:
"
wait_for_sr_state: failed sr=81 cr=a0 state=2020
i2c_init_transfer: failed for chip 0xb retry=1
"

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
9 years agoimx: marsboard: Enable thermal DM support
Nikolay Dimitrov [Sun, 17 May 2015 23:10:47 +0000 (02:10 +0300)]
imx: marsboard: Enable thermal DM support

Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg>
Conflicts:
configs/marsboard_defconfig

9 years agoimx: riotboard: Enable thermal DM support
Nikolay Dimitrov [Sun, 17 May 2015 23:10:46 +0000 (02:10 +0300)]
imx: riotboard: Enable thermal DM support

Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg>
Conflicts:
configs/riotboard_defconfig

9 years agoimx: riotboard, marsboard: Enable thermal support
Nikolay Dimitrov [Sun, 17 May 2015 23:10:45 +0000 (02:10 +0300)]
imx: riotboard, marsboard: Enable thermal support

Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg>
9 years agohummingboard: Remove unused directory
Fabio Estevam [Fri, 15 May 2015 19:10:47 +0000 (16:10 -0300)]
hummingboard: Remove unused directory

The 'mx6-microsom' directory was only used for the previous mx6solo
hummingboard support, which has been removed in favour of the SPL
version.

Remove the remaining piece of the old mx6solo hummingboard support.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
9 years agoimx: ventana: add pmic_setup to SPL
Tim Harvey [Fri, 15 May 2015 16:18:31 +0000 (09:18 -0700)]
imx: ventana: add pmic_setup to SPL

We need to do any PMIC setup in the SPL if we are to bypass U-Boot for
falcon mode.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: (cosmetic) clean up size defines for improved readability
Tim Harvey [Fri, 15 May 2015 16:17:09 +0000 (09:17 -0700)]
imx: ventana: (cosmetic) clean up size defines for improved readability

Use the SZ_1M and SZ_1K macros from linuz/sizes.h for improved readability

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: config: use MMC SPL RAW support
Tim Harvey [Fri, 15 May 2015 16:14:49 +0000 (09:14 -0700)]
imx: ventana: config: use MMC SPL RAW support

Switch to MMC RAW support for SPL. We will place the uboot.img at 69KB.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoenv_nand: use nand_spl_load_image for readenv if SPL
Tim Harvey [Thu, 14 May 2015 18:48:04 +0000 (11:48 -0700)]
env_nand: use nand_spl_load_image for readenv if SPL

The readenv() implementation of env_nand uses the mtd layer which is
unnecessary overhead in SPL when we already have a nand_spl_load_image()
function that doesn't need it. Using this instead eliminates the need
to provide a mtd_read for SPL env as well as reduces code (4KB savings in IMX6
SPL).

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Acked-by: Scott Wood <scottwood@freescale.com>
9 years agoimx: ventana: use stack relocation
Tim Harvey [Thu, 14 May 2015 13:22:07 +0000 (06:22 -0700)]
imx: ventana: use stack relocation

Certain features we desire require a larger stack than is available by using
iRAM (most notably for us, env_mmc). Relocate the stack to DRAM so that
we can use these features.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agoimx: ventana: add GSC boot watchdog disable to SPL
Tim Harvey [Sat, 9 May 2015 01:28:41 +0000 (18:28 -0700)]
imx: ventana: add GSC boot watchdog disable to SPL

If the SPL is to be used for Falcon mode then we need to make sure the SPL
disable the GSC boot watchdog.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: add gpio setup to SPL
Tim Harvey [Sat, 9 May 2015 01:28:39 +0000 (18:28 -0700)]
imx: ventana: add gpio setup to SPL

If the SPL is to be used for Falcon mode then we need to make sure it
configures basic GPIO (iomux, padconf, and default output levels).

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: use common uart and i2c setup functions in SPL
Tim Harvey [Sat, 9 May 2015 01:28:38 +0000 (18:28 -0700)]
imx: ventana: use common uart and i2c setup functions in SPL

Now that uart and i2c setup functions have been moved to common.c we can
use these and remove code duplication.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: detect pmic using i2c probe instead of board model
Tim Harvey [Sat, 9 May 2015 01:28:37 +0000 (18:28 -0700)]
imx: ventana: detect pmic using i2c probe instead of board model

Avoid requiring board-model and probe pmic by its i2c address.
This is in preparation for being able to call pmic_setup() from SPL
and not need board type.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: move GSC boot watchdog disable function to gsc.c
Tim Harvey [Sat, 9 May 2015 01:28:36 +0000 (18:28 -0700)]
imx: ventana: move GSC boot watchdog disable function to gsc.c

Move the code that disables the GSC boot watchdog into gsc.c

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: split out common functions between SPL and uboot
Tim Harvey [Sat, 9 May 2015 01:28:35 +0000 (18:28 -0700)]
imx: ventana: split out common functions between SPL and uboot

Move shared functions used by both SPL and U-Boot to common.c:
 - setup_iomux_uart() and uart pad config
 - gpio pad config

In the process also moved the following to common.c in preparation for
calling it from the SPL:
 - split i2c setup into a shared function
 - move pmic init to setup_pmic() function to call directly from
   power_init_board()
 - split gpio setup into early (iomux and default pin config)
   and late (output configuration based on env)

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: default msata/pci mux to pci before PCI enumeration
Tim Harvey [Sat, 9 May 2015 01:28:34 +0000 (18:28 -0700)]
imx: ventana: default msata/pci mux to pci before PCI enumeration

PCI enumeration occurs early, before we fully configure our GPIO's. Make
sure we steer the MSATA/PCI mux to PCI in board_init to ensure PCI is
selected before enumeration.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: fix pcie reset for GW522x
Tim Harvey [Sat, 9 May 2015 01:28:33 +0000 (18:28 -0700)]
imx: ventana: fix pcie reset for GW522x

The re-assignment of pcie_rst gpio for GW522x needs to occur earlier, before
the PCI subsystem calls the toggle funciton.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: config: enable Thermal support
Tim Harvey [Sat, 9 May 2015 01:28:30 +0000 (18:28 -0700)]
imx: ventana: config: enable Thermal support

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: enable DM_SERIAL
Tim Harvey [Sat, 9 May 2015 01:28:29 +0000 (18:28 -0700)]
imx: ventana: enable DM_SERIAL

mxc_serial supports DM so lets use it.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: register gpio's with gpio_request
Tim Harvey [Sat, 9 May 2015 01:28:28 +0000 (18:28 -0700)]
imx: ventana: register gpio's with gpio_request

Prior to using a gpio a call to gpio_request() should be called to register
it with the gpio subsystem.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: config: enable driver model
Tim Harvey [Sat, 9 May 2015 01:28:27 +0000 (18:28 -0700)]
imx: ventana: config: enable driver model

Enable U-Boot Driver Model (DM).

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: config: enable gpio command
Tim Harvey [Sat, 9 May 2015 01:28:26 +0000 (18:28 -0700)]
imx: ventana: config: enable gpio command

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: display SPL boot device
Tim Harvey [Sat, 9 May 2015 01:28:25 +0000 (18:28 -0700)]
imx: ventana: display SPL boot device

Display what device the SPL will fetch uboot.img from

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoimx: ventana: set dtype env var to boot media
Tim Harvey [Sat, 9 May 2015 01:28:24 +0000 (18:28 -0700)]
imx: ventana: set dtype env var to boot media

Bootscripts for some distro's such as Android can benefit from knowing
what boot media its script was loaded from.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
9 years agoarm: mx6: ddr3: Remove dead code
Nikolay Dimitrov [Fri, 8 May 2015 10:06:50 +0000 (13:06 +0300)]
arm: mx6: ddr3: Remove dead code

imx6 mmdc supports data rates up to 1066 MT/s, so remove the code handling
higher data rates.

Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg>
9 years agoi2c, mxc: rework i2c base address names for different SoCs
Heiko Schocher [Wed, 13 May 2015 05:53:20 +0000 (07:53 +0200)]
i2c, mxc: rework i2c base address names for different SoCs

rework and unify i2c address names for different SoCs, which
use the mxc_i2c driver.

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agoarm, imx6, i2c: add I2C4 for MX6DL
Heiko Schocher [Wed, 13 May 2015 05:50:47 +0000 (07:50 +0200)]
arm, imx6, i2c: add I2C4 for MX6DL

add I2C4 modul for MX6DL based boards.

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agomx6: Set shared override bit in PL310 AUX_CTRL register
Fabio Estevam [Wed, 11 Mar 2015 20:12:12 +0000 (17:12 -0300)]
mx6: Set shared override bit in PL310 AUX_CTRL register

Having bit 22 cleared in the PL310 Auxiliary Control register (shared
attribute override enable) has the side effect of transforming Normal
Shared Non-cacheable reads into Cacheable no-allocate reads.

Coherent DMA buffers in Linux always have a Cacheable alias via the
kernel linear mapping and the processor can speculatively load cache
lines into the PL310 controller. With bit 22 cleared, Non-cacheable
reads would unexpectedly hit such cache lines leading to buffer
corruption.

This was inspired by a patch from Catalin Marinas [1] and also from recent
discussions in the linux-arm-kernel list [2] where Russell King and Rob Herring
suggested that bootloaders should initialize the cache.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2010-November/031810.html
[2] https://lkml.org/lkml/2015/2/20/199

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
9 years agotbs2910: add CONFIG_SUPPORT_EMMC_BOOT
Soeren Moch [Tue, 5 May 2015 21:09:21 +0000 (23:09 +0200)]
tbs2910: add CONFIG_SUPPORT_EMMC_BOOT

Add emmc boot partition commands to be able to select the boot partition.

Signed-off-by: Soeren Moch <smoch@web.de>
9 years agotbs2910: use default CONFIG_SYS_PBSIZE
Soeren Moch [Tue, 5 May 2015 21:09:20 +0000 (23:09 +0200)]
tbs2910: use default CONFIG_SYS_PBSIZE

Since there is a default CONFIG_SYS_PBSIZE definition in config_fallbacks.h,
this setting is no longer required in board configurations.

Signed-off-by: Soeren Moch <smoch@web.de>
9 years agotbs2910: only enable vga output for stdout/stderr when hdmi detected
Soeren Moch [Tue, 5 May 2015 21:09:19 +0000 (23:09 +0200)]
tbs2910: only enable vga output for stdout/stderr when hdmi detected

Only enable graphical output for stdout/stderr (and a usb keyboard for stdin)
when a hdmi device is detected.
Serial console is always enabled for stdin/stdout/stderr.

Signed-off-by: Soeren Moch <smoch@web.de>
9 years agotbs2910: support for usb otg host mode
Soeren Moch [Tue, 5 May 2015 21:09:18 +0000 (23:09 +0200)]
tbs2910: support for usb otg host mode

Add support for USB OTG host mode. Only high speed devices supported so far
(e.g. usb 2.0 hub required to connect a keyboard).

Signed-off-by: Soeren Moch <smoch@web.de>
9 years agowarp: README: Fix typo
Fabio Estevam [Tue, 12 May 2015 16:19:06 +0000 (13:19 -0300)]
warp: README: Fix typo

Fix the spelling of 'successful'.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoimx: ventana: fix boot to SD
Tim Harvey [Wed, 6 May 2015 20:16:56 +0000 (13:16 -0700)]
imx: ventana: fix boot to SD

This fixes a regression caused by e25fbe3fe531029dc7b100ea4c79dbc802e17fc2
(gw_ventana: Move the DCD settings to spl code)

The clock gating must be setup prior to calling arch_cpu_init(). Without this
booting to SD (directly via eFuse or via bmode) will hang.

Cc: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoimx: dek_blob: Add explicit include for mapmem
Ulises Cardenas [Mon, 4 May 2015 14:53:28 +0000 (09:53 -0500)]
imx: dek_blob: Add explicit include for mapmem

 Boards such as imx6q_sabresd might not have mapmem.h as part of
 their common library. This causes a build error if the DEK blob
 command is enabled.

 Fix: make explicit the include of mapmem.h

Signed-off-by: Ulises Cardenas <Ulises.Cardenas@freescale.com>
Reviewed-by: Ruchika Gupta <Ruchika.gupta@freescale.com>
9 years agobugfix i.mx6 pwm: prevent overflow of period_c * duty_ns
Brecht Neyrinck [Wed, 6 May 2015 07:57:48 +0000 (09:57 +0200)]
bugfix i.mx6 pwm: prevent overflow of period_c * duty_ns

Prevent overflow by casting duty_ns to ull first. This bug came up when trying to create a 200 Hz PWM

Signed-off-by: Brecht Neyrinck <bnrn@psicontrol.com>
Acked-by: Heiko Schocher<hs@denx.de>
9 years agomx6cuboxi: Mention Cubox-i in the README
Fabio Estevam [Fri, 24 Apr 2015 18:48:45 +0000 (15:48 -0300)]
mx6cuboxi: Mention Cubox-i in the README

Cubox-i boards are also supported, so update the README file.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9 years agohummingboard: Remove mx6solo specific support
Fabio Estevam [Fri, 24 Apr 2015 18:53:24 +0000 (15:53 -0300)]
hummingboard: Remove mx6solo specific support

Hummingboard dual, dual-lite and solo are now supported via SPL mechanism.

Remove the previous hummingboard support, which does not use SPL and supported
only the solo variant.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9 years agomx6cuboxi: Skip usb initialization when booting without HDMI
Fabio Estevam [Mon, 4 May 2015 16:31:24 +0000 (13:31 -0300)]
mx6cuboxi: Skip usb initialization when booting without HDMI

Starting USB initialization is useful for those who use Cuboxi/Hummingboard
with HDMI and USB keyboard.

However, when booting without a HDMI connection we can skip the usb
initialization, which makes the boot faster.

Signed-off-by: Jon Nettleton <jon.nettleton@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9 years agomx6cuboxi: Pull down PAD_ENET_RXD0/RXD1
Fabio Estevam [Mon, 4 May 2015 14:22:56 +0000 (11:22 -0300)]
mx6cuboxi: Pull down PAD_ENET_RXD0/RXD1

Configure PAD_ENET_RXD0/RXD1 pads as pull down because these pads are directly
connected to the Atheros 8035/8030 although they should be functional
only in the RMII mode - 8030.

Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-By: Vagrant Cascadian <vagrant@aikidev.net>
9 years agomx6cuboxi: Fix Ethernet PHY detection problem
Fabio Estevam [Mon, 4 May 2015 14:22:55 +0000 (11:22 -0300)]
mx6cuboxi: Fix Ethernet PHY detection problem

mx6cuboxi sometimes fails to recognize the Ethernet PHY:

Net:   Phy 0 not found

The explanation for this behavior comes from from Rabeeh Khoury:

"The LED_ACT pin on the carrier-one boards had a pull down that
forces the phy address to 0x0; where on CuBox-i and the production
HummingBoard that pin is connected directly to LED that depending
on the pull down strength of the LED it might be sampled as '0' or '1' thus
the phy address might appear as either address 0x0 or 0x4."

"This is AR8035 implementation; in reset stage the LED pin is configured as
input, and pull up/down does matter. In this case it configures the PHY
address.

After reset is deasserted the same LED pin becomes output and then
according to the previous pull/up it should be active high/low"

One way to properly fix this behavior is to place external pull-up/down
resistors in the LED line, but from a software standpoint we can fix it
by telling phy_find_by_mask() to scan the PHY at addresses
0x0 and 0x4.

Reported-by: Vagrant Cascadian <vagrant@aikidev.net>
Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-By: Vagrant Cascadian <vagrant@aikidev.net>
9 years agologos: Add Solidrun's logo
Fabio Estevam [Thu, 30 Apr 2015 01:28:12 +0000 (22:28 -0300)]
logos: Add Solidrun's logo

Let Solidrun's logo appear on Cuboxi and Hummingboard by default.

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: Allow HDMI and USB keyboard to be stdout/stdin
Fabio Estevam [Thu, 30 Apr 2015 01:28:11 +0000 (22:28 -0300)]
mx6cuboxi: Allow HDMI and USB keyboard to be stdout/stdin

There are users of Cuboxi and Hummingboard that use these boards without
connecting them to a USB/serial adapter.

Allow such usage by allowing the HDMI port to act as stdout and USB keyboard
as stdin.

The serial console still also works as stdin/stdout.

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>
Tested-by: Vagrant Cascadian <vagrant@aikidev.net>
9 years agomx6cuboxi: Add USB host support
Fabio Estevam [Thu, 30 Apr 2015 01:28:10 +0000 (22:28 -0300)]
mx6cuboxi: Add USB host support

Enable USB Host1 port.

Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-By: Vagrant Cascadian <vagrant@aikidev.net>
9 years agomx6cuboxi: Add HDMI output support
Fabio Estevam [Thu, 30 Apr 2015 01:28:09 +0000 (22:28 -0300)]
mx6cuboxi: Add HDMI output support

Add HDMI output using PLL5 as the source for the IPU clocks,
and accurate VESA timings.

These settings are based on the patch from Soeren Moch <smoch@web.de>
submitted for the tbs2910 mx6 based board.

It allows the display to work properly at 1024x768@60.

This should make the hdmi output signal compatible with most if not all
modern displays.

Signed-off-by: Jon Nettleton <jon.nettleton@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Tom Rini <trini@konsulko.com>
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>
Tested-by: Vagrant Cascadian <vagrant@aikidev.net>
9 years agoFix mxc_hab documenation
Ulises Cardenas [Mon, 20 Apr 2015 18:47:58 +0000 (13:47 -0500)]
Fix mxc_hab documenation

It is necessary to modify the configuration file for the target
board. It wasn't well documented that to enable any of the secure
boot modes, it is required to add CONFIG_SECURE_BOOT to the board
configuration file.

Also, fixed a typo in the encrypted boot section.

Signed-off-by: Ulises Cardenas <Ulises.Cardenas@freescale.com>
9 years agoarm: mx6: Clamp MMDC and DDR3 clocks for timing calculations
Nikolay Dimitrov [Wed, 22 Apr 2015 15:37:31 +0000 (18:37 +0300)]
arm: mx6: Clamp MMDC and DDR3 clocks for timing calculations

This is proposal for clamping the MMDC/DDR3 clocks to the maximum supported
frequencies as per imx6 SOC models, and for dynamically calculating valid
clock value based on mem_speed.

Currently the code uses impossible values for mem_speed (1333, 1600 MT/s) for
calculating the DDR timings, and uses fixed clock (528 or 400 MHz) which
doesn't take into account DDR3 memory limitations.

Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Eric Nelson <eric.nelson@boundarydevices.com>
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 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 agounzip: add gzwrite command to write compressed image to block device
Eric Nelson [Sun, 15 Feb 2015 23:16:07 +0000 (16:16 -0700)]
unzip: add gzwrite command to write compressed image to block device

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

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

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

Initial filesystem images are generally highly compressible.

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

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agoARM: cm_fx6: use "select" instead of default value in defconfig
Masahiro Yamada [Tue, 31 Mar 2015 03:48:02 +0000 (12:48 +0900)]
ARM: cm_fx6: use "select" instead of default value in defconfig

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoARM: mx6: use "select" instead of default value in defconfig
Masahiro Yamada [Tue, 31 Mar 2015 03:47:58 +0000 (12:47 +0900)]
ARM: mx6: use "select" instead of default value in defconfig

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoRevert "embestmx6boards: convert to use config_distro_bootcmd.h"
Otavio Salvador [Thu, 23 Apr 2015 01:26:00 +0000 (22:26 -0300)]
Revert "embestmx6boards: convert to use config_distro_bootcmd.h"

This reverts commit c86efd85e99464f5dfe69b6477f9b0dfd7691063.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
9 years agomx6sabresd: Remove uneeded ifdef
Fabio Estevam [Fri, 17 Apr 2015 01:11:48 +0000 (22:11 -0300)]
mx6sabresd: Remove uneeded ifdef

RTT_NOM_120OHM is not defined, so remove its ifdef.

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

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

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

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

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

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

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

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

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

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-By: Markus Niebel <Markus.Niebel@tq-group.com>