Commit Graph

22193 Commits

Author SHA1 Message Date
Fabio Estevam
e113fd1972 mx6: soc: Clear the LDO ramp values up prior to setting the LDO voltages
Since ROM may modify the LDO ramp up time according to fuse setting,
it is safer to reset the ramp up field to its default value of 00:

00: 64 cycles of 24MHz clock;
01: 128 cycles of 24MHz clock;
02: 256 cycles of 24MHz clock;
03: 512 cycles of 24MHz clock;

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Jason Liu <r64343@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-01-02 17:16:50 +01:00
Fabio Estevam
fc740648bd mx6: soc: Staticize set_vddsoc()
set_vddsoc() is not used anywhere else, so make it static.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-01-02 17:16:50 +01:00
Fabio Estevam
5dc64ab730 mx6sabre_common.h: Add CONFIG_CMD_FUSE support
Add CONFIG_CMD_FUSE option, so that the fuse API can be used.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2014-01-02 17:16:50 +01:00
Fabio Estevam
6f3bef9e30 doc: README.fuse: Add an example on how to use the fuse API on mx6q
When using the fuse API in U-boot user must calculate the 'bank' and 'word'
values.

Provide a real example on how to calculate such values for the mx6q.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2014-01-02 17:16:50 +01:00
Stefano Babic
f5514e47c4 MX6: fix sata compilation for i.MX6
Commit 164d984661 breaks
board with SATA support, because sata is not compiled.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2013-12-19 11:04:33 +01:00
Frank Li
ebaf6b26bc imx6: fix random hang when download by usb
ROM did not invalidate L1 cache when download by usb
Need invalidate L1 cache before enable cache

Signed-off-by: Huang yongcai <b20788@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
2013-12-17 18:48:45 +01:00
Marek Vasut
5b5a82eb70 ARM: mxs: tools: Fix errno handling in strtoul() invocation
According to NOTE in strtoul(3), the errno must be zeroed before strtoul()
is called. Zero the errno. The NOTE reads as such:

  Since strtoul() can legitimately return 0 or ULONG_MAX (ULLONG_MAX for
  strtoull()) on both success and failure, the calling program should set
  errno  to  0  before the call, and then determine if an error occurred
  by checking whether errno has a nonzero value after the call.

This issue was detected on Fedora 19 with glibc 2.17 .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
2013-12-17 18:38:43 +01:00
Fabio Estevam
119e990986 mx6sabresd: Fix LVDS width and color format
mx6sabresd boards have a 18-bit LVDS data width and the correct color format
is RGB666.

Suggested-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-12-17 18:38:42 +01:00
Fabio Estevam
be4ab3dd05 mx6sabresd: Allow probing HSYNC, VSYNC and DISP_CLK signals
HSYNC, VSYNC and DISP_CLK are very useful display signals for debugging.

Configure them as active pins.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-12-17 18:38:42 +01:00
Fabio Estevam
89cfd0f575 mx6: clock: Fix the calculation of PLL_ENET frequency
According to the mx6 quad reference manual, the DIV_SELECT field of register
CCM_ANALOG_PLL_ENETn has the following meaning:

"Controls the frequency of the ethernet reference clock.
- 00 - 25MHz
- 01 - 50MHz
- 10 - 100MHz
- 11 - 125MHz"

Current logic does not handle the 25MHz case correctly, so fix it.

Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-12-17 18:38:42 +01:00
Marek Vasut
502a710f5b ARM: mx53: video: Add IPUv3 LCD support for M53EVK
This patch adds support for the AMPIRE 800x480 LCD panel that is available
for M53EVK.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2013-12-17 18:38:42 +01:00
Liu Ying
1230743731 MX6 SabreSD: Use readl() to read the CCM_CCGR3 register
Align with the context to use readl() to read the CCM_CCGR3
register with memory barrier instead of __raw_readl().

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-12-17 18:38:42 +01:00
Eric Nelson
02824dc786 ARM: mx6: Update non-Freescale boards to include CPU errata.
The CPU errata expressed in include/configs/mx6_common.h apply
to all i.MX6DQ and i.MX6DLS parts.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefan Roese <sr@denx.de>
2013-12-17 18:38:42 +01:00
Fabio Estevam
0159995841 configs: imx: Remove CONFIG_SYS_SPD_BUS_NUM option
According to the README:

"- CONFIG_SYS_SPD_BUS_NUM
		If SPD EEPROM is on an I2C bus other than the first
		one, specify here. Note that the value must resolve
		to something your driver can deal with."

There is no SPD EEPROM on the imx boards, so ged rid of this option.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2013-12-17 18:38:42 +01:00
Giuseppe Pagano
98d0122924 udoo: Add SATA support on uDoo Board.
Add SATA support on uDoo Board.

Signed-off-by: Giuseppe Pagano <giuseppe.pagano@seco.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
2013-12-17 18:14:21 +01:00
Giuseppe Pagano
164d984661 nitrogen6x: Move setup_sata to common part
Move setup_sata function definition from platform file nitrogen6x.c
to arch/arm/imx-common/sata.c to avoid code duplication.

Signed-off-by: Giuseppe Pagano <giuseppe.pagano@seco.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
CC: Eric Nelson <eric.nelson@boundarydevices.com>
2013-12-17 18:12:14 +01:00
Eric Nelson
b47abc36aa i.MX6 (DQ/DLS): use macros for mux and pad declarations
This allows the use of either or both declarations from
the files mx6q_pins.h and mx6dl_pins.h.

All board files should include <asm/arch/mx6-pins.h>
with one of the following defined in boards.cfg
    MX6Q   - for boards targeting i.MX6Q or i.MX6D
    MX6DL  - for boards targeting i.MX6DL
    MX6S   - for boards targeting i.MX6S
    MX6QDL - for boards that support any of the above with
             run-time detection

Pad declarations will be MX6_PAD_x for single-variant boards
and MX6Q_PAD_x and MX6DL_PAD_x for boards supporting both
processor classes.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2013-12-17 17:12:34 +01:00
Fabio Estevam
570aa2fac3 imx: Explicitly pass the I2C bus number in pmic_init()
The pmic_init() function has the I2C or SPI bus number that is connected to the
PMIC.

Instead of passing I2C_PMIC, explicitly pass the I2C bus number via I2C_x
definition.

The motivation for doing this is to avoid people just doing a copy and paste
of I2C_PMIC into their board file when another I2C bus is actually used to
interface to their PMIC.

This also makes more obvious which is the I2C bus connected to the PMIC, without
having to search in the source code for the meaning of the 'I2C_PMIC' number.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2013-12-17 16:54:16 +01:00
Giuseppe Pagano
db6801dec3 udoo: Fix watchdog during kernel boot.
uDoo uses APX823-31W5 watchdog chip. Timeout is about 1.2 seconds.
To disabled watchdog during kernel boot, WDI pin of that chip needs to be
in "high impedance" state. I.mx6 gpio configuration does not contemplate
tristate, so pin is set as input in high impedance.

Signed-off-by: Giuseppe Pagano <giuseppe.pagano@seco.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
2013-11-28 09:08:42 +01:00
Giuseppe Pagano
078813d21d udoo: Add ethernet support (FEC + Micrel KSZ9031).
Add Ethernet and networking support on uDoo board (FEC +phy Micrel KSZ9031).
Ethernet speed is currently limited to 10/100Mbps.

Signed-off-by: Giuseppe Pagano <giuseppe.pagano@seco.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
2013-11-28 08:28:54 +01:00
Giuseppe Pagano
953ab736af udoo: Move and optimize platform register setting.
Previous uDoo configuration adopts register settings for DDR3, clock, muxing,
etc. taken from Nitrogen6x. uDoo schematics is rather different from that board,
and it needs customized setting for most of the registers.
All this changes can be considered atomical since it is part of initial support
of the board.

Patch changes uDoo configuration files path to a specific one, and adopt
optimized value for every configured register.

Signed-off-by: Giuseppe Pagano <giuseppe.pagano@seco.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
2013-11-28 08:28:54 +01:00
Fabio Estevam
8bfa9c692e mx6sabresd: Add SPI NOR support
mx6sabre board has a m25p32 SPI NOR connected to ECSPI1 port.

Add support for it.

This patch allows the SPI NOR flash to be succesfully detected:

=> sf probe
SF: Detected M25P32 with page size 256 Bytes, erase size 64 KiB, total 4 MiB

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-11-28 08:28:53 +01:00
Fabio Estevam
b48e3b0410 mx6sabresd: Fix wrong colors in LVDS splash
Currently HDMI splash screen is selected by default on mx6sabresd boards.

As LVDS is also enabled, this causes incorrect colors to be displayed im the
LVDS panel.

Fix this by selecting the LVDS panel as the default splash output and only keep
HDMI or LVDS turned on at the same time.

Acked-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-11-28 08:28:53 +01:00
Fabio Estevam
839f4d4e87 power: power_fsl: Pass p->bus in the same way for SPI and I2C cases
There is no need to pass p->bus differently when the PMIC is connected via SPI
or via I2C.

Handle the both cases in the same way.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-11-27 09:39:22 +01:00
Fabio Estevam
d74b331f2f efikamx: Fix pmic_init() argument
On efikamx board the PMIC is connected via SPI interface, so it does not make
sense to pass I2C_PMIC into the pmic_init() interface.

Pass the SPI bus number via CONFIG_FSL_PMIC_BUS option instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-11-27 09:39:21 +01:00
Fabio Estevam
4e785c6ae9 mx31pdk: Fix pmic_init() argument
On mx31pdk board the PMIC is connected via SPI interface, so it does not make
sense to pass I2C_PMIC into the pmic_init() interface.

Pass the SPI bus number via CONFIG_FSL_PMIC_BUS option instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-11-27 09:39:21 +01:00
Fabio Estevam
56f9cfbb48 mx51evk: Fix pmic_init() argument
On mx51evk board the PMIC is connected via SPI interface, so it does not make
sense to pass I2C_PMIC into the pmic_init() interface.

Pass the SPI bus number via CONFIG_FSL_PMIC_BUS option instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2013-11-27 09:39:21 +01:00
Eric Nelson
3e9cbbbb2b imx-common: remove extraneous semicolon from macro
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2013-11-27 09:39:21 +01:00
Fabio Estevam
782478c181 nitrogen6x: Remove unused OCOTP options
OCOTP driver is currently selected via CONFIG_MXC_OCOTP option.

Remove the old OCOTP related options, as they are not used anymore.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Eric Nelson <eric.nelson@boundarydevices.com>
2013-11-27 09:24:16 +01:00
Marek Vasut
79e5f27b09 Net: FEC: Fix huge memory leak
The fec_halt() never free'd both RX and TX DMA descriptors that
were allocated in fec_init(), nor did it free the RX buffers.
Rework the FEC driver so that these descriptors and buffers are
allocated only once in fec_probe().

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
2013-11-21 16:32:29 +01:00
Eric Nelson
a31d3efae1 i.MX6DQ/DLS: whitespace: Align IOMUX_PAD column in declarations
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2013-11-13 10:19:51 +01:00
Eric Nelson
38d8219801 i.MX6DQ/DLS: remove unused pad declarations
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2013-11-13 10:19:51 +01:00
Eric Nelson
6001c11abc i.MX6DQ: Add Pinmux settings that are present in mainline and Dual-Lite/Solo
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2013-11-13 10:19:51 +01:00
Eric Nelson
066b2d68a0 i.MX6DQ/DLS: remove useless mux/pad declarations
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2013-11-13 10:19:50 +01:00
Eric Nelson
10fda48779 i.MX6DQ/DLS: replace pad names with their Linux kernel equivalents
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2013-11-13 10:19:50 +01:00
Stefan Roese
c2cde27d58 mx6: titanium: Move BSP code to barco board directory
Since the titanium board is not a Freescale board, move its
BSP code from the freescale board directory to the newly created
barco board directory.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Peter Korsgaard <peter.korsgaard@barco.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Peter Korsgaard <peter.korsgaard@barco.com>
2013-11-13 10:09:10 +01:00
Fabio Estevam
90fb985863 titanium: Return the error when cpu_eth_init() fails
When cpu_eth_init() fails we should not return success.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefan Roese <sr@denx.de>
2013-11-13 10:09:10 +01:00
Fabio Estevam
c243a832c8 wandboard: Return the error when cpu_eth_init() fails
When cpu_eth_init() fails we should not return success.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-11-13 10:09:09 +01:00
Fabio Estevam
cffe815a76 wandboard: Return the error immediately when ipuv3_fb_init() fails
If ipuv3_fb_init() fails, we should return the error immediately.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-11-13 10:09:09 +01:00
Michael Heimpold
ac135f6699 mxs_gpio: fix the handling in gpio_direction_output()
Setting the direction and an output value should be done by
1) set the desired output value,
2) switch to output.

If this is done in the inverse order, there can be a glitch on
the GPIO line.

This patch fixes this by using the order as described above.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Acked-by: Stefano Babic <sbabic@denx.de>
2013-11-13 10:09:09 +01:00
Fabio Estevam
85164e0c54 configs: imx: Make CONFIG_SYS_PROMPT uniform across FSL boards
There is no real benefit in adding the board name into U-boot's prompt, so
remove the custom CONFIG_SYS_PROMPT definitions so that the standard "=> "
prompt is used across FSL boards.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-11-13 10:09:09 +01:00
Samuel Egli
56eb3da43f arm, am335x: update for the siemens boards
- dxr2: define unused pins as input
- do not enable RTC32K OSC on dxr2 board
- update default environment
  - add splashpos=m,m to default environment, so splash screen is always
    centered.
  - adapt environment for bootcount feature
  - add altbootcmd to default environment
- rut: SPL add early reset pulse for eth-phy, maXTouch and display
- rut: display timing aenderungen
- siemens boards: adapt for background color = white
- add boutcount feature for the siemens boards
  store the bootcount in the environment, as we have no softreset
  save registers on this hardware. Use therefore the CONFIG_BOOTCOUNT_ENV
  bootcount driver.
- change spi mode from 3 to 0 for the lcd init
- add gpio pin for lcd reset with state 0 and add mdelay
- siemens boards: use own USB id's
- add dfu serial and device number for siemens boards
  Add for the siemens boards the possibility to define in dfu mode,
  the iSerialNumber and the bcdDevice fields in the USB Device
  descriptor.
- fix upgrade mechanism based on bootcount
  Correct location of saveenv and remove not active variable.

  Add CONFIG_BOOT_RETRY_TIME and CONFIG_RESET_TO_RETRY to
  reboot board in case of empty kernel partition. Without
  these defines an empty kernel partition leads to an
  abort of boot process and one remains in u-boot prompt.

- general cleanup of dxr2, pxm2 and rut boards
  all:
   * Remove net boot from bootcmd
     Ping can cause a crash on boards without ethernet phy.
     net_nfs command is used only for development

   * Add reset at the end of bootcmd
     In order to have an immediate reset of the boot when bootcmd
     fails, add reset at the end of bootcmd.

  rut:
   * add nand_img_size

  dxr2:
   * update nand_img_size

   * ddr3 timings updated with iocontrol property that can be
     modified via eeprom. New default parameters from software
     leveling with draco ES2.

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Matthias Michel <matthias.michel@siemens.com>
Cc: Tom Rini <trini@ti.com>
2013-11-12 09:53:59 -05:00
Heiko Schocher
7a0d463f58 usb, g_dnl: make bcdDevice value configurable
add the possibility to set the bcdDevice number board specific.
Therefore the weak function g_dnl_get_board_bcd_device_number()
is introduced. Used on the siemens boards.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
2013-11-12 09:53:59 -05:00
Tom Rini
79c5c08d7c omap730p2: Remove board
Signed-off-by: Tom Rini <trini@ti.com>
2013-11-11 12:17:48 -05:00
Tom Rini
abcaa6ee2a am33xx: Make SoC bootcount driver have its own symbol
Some am33xx boards may not use the RTC block for bootcount (as it may
not be wired up for the board) and use some other facility.  So add
another symbol for the bootcount driver for the IP block.

Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
2013-11-11 12:17:35 -05:00
Igor Grinberg
ebc18afd0a cm-t35: use gpio_led driver for status led
Switch to using the generic gpio_led driver instead of the private to
cm_t35 board led implementation.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Nikita Kiryanov <nikita@compulab.co.il>
2013-11-11 12:17:06 -05:00
Andrew Bradford
e19a482fdd am335x_evm: Fix CONS_INDEX numbering
Commit f6d1f6e4a5 broke selection of UARTs
other than UART0 for am335x_evm configurations by setting CONS_INDEX to
1 for all configurations.  Revert the CONS_INDEX changes.

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
2013-11-11 12:16:30 -05:00
Matt Porter
7ab9b3d99a boards.cfg: update email address for ti814x_evm maintainer
Update my email address as ti814x_evm maintainer to save
people some frustrating bounces and non-response.

Signed-off-by: Matt Porter <matt.porter@linaro.org>
2013-11-11 12:16:30 -05:00
Heiko Schocher
16678eb40f arm, am33x: make RTC32K OSC enable configurable
As
http://www.denx.de/wiki/view/U-Boot/DesignPrinciples#2_Keep_it_Fast
states:
"Initialize devices only when they are needed within U-Boot"

enable the RTC32K OSC only, if CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is
enabled. Enable this in ti_am335x_common.h, so all boards in mainline
should work as before.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@ti.com>
2013-11-11 12:16:30 -05:00
Heiko Schocher
eda0ba38a8 bootcount: store bootcount var in environment
If no softreset save registers are found on the hardware
"bootcount" is stored in the environment. To prevent a
saveenv on all reboots, the environment variable
"upgrade_available" is introduced. If "upgrade_available" is
0, "bootcount" is always 0 therefore no need to save the
environment on u-boot boot, if "upgrade_available" is 1 "bootcount"
is incremented in the environment and environment gets written
on u-boot start.
So the Userspace Applikation must set the "upgrade_available"
and "bootcount" variable to 0 (for example with fw_setenv),
if a boot was successfully.

Signed-off-by: Heiko Schocher <hs@denx.de>
2013-11-11 12:16:28 -05:00