Commit Graph

25375 Commits

Author SHA1 Message Date
Thomas Chou
8645071006 nios2: divide nios2-io.h into each specific drivers and remove it
The nios2-io.h defines hardware registers and bits of several FPGA
IP cores. It could be divided in to the specific drivers, including
altera timer, altera sysid, altera uart and altera jtag uart. The
altera pio and altera spi drivers use their own hardware definitions.
The removal of nios2-io.h will help modularity and maintenance.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2014-08-30 17:48:43 +08:00
Thomas Chou
ef3cc8112c nios2: remove epled driver
The epled driver was replaced by altera_pio and gpio_led.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2014-08-30 17:48:43 +08:00
Tom Rini
6defdc0b55 Merge branch 'master' of git://git.denx.de/u-boot-ti 2014-08-29 13:47:42 -04:00
Tom Rini
8f005b3918 Merge git://git.denx.de/u-boot-usb 2014-08-29 11:15:18 -04:00
Tom Rini
7f14fb20f8 Merge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze 2014-08-29 11:07:35 -04:00
Tom Rini
5ddc329341 Merge branch 'master' of git://git.denx.de/u-boot-tegra 2014-08-29 11:07:10 -04:00
Tom Rini
5a1095a830 Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2014-08-29 11:06:51 -04:00
Tom Rini
6af857c50d Merge branch 'master' of http://git.denx.de/u-boot-sunxi 2014-08-29 11:06:26 -04:00
Stephen Warren
74c0d756de usb: hub: don't check CONNECTION in hub_port_reset()
One specific USB 3.0 device behaves strangely when reset by
usb_new_device()'s call to hub_port_reset(). For some reason, the device
appears to briefly drop off the bus when this second bus reset is
executed, yet if we retry this loop, it'll eventually come back after
another two resets.

If USB bus reset is executed over and over within usb_new_device()'s call
to hub_port_reset(), I see the following sequence of results, which
repeats as long as you want:

1) STAT_C_CONNECTION = 1 STAT_CONNECTION = 0  USB_PORT_STAT_ENABLE 0
2) STAT_C_CONNECTION = 1 STAT_CONNECTION = 1  USB_PORT_STAT_ENABLE 0
3) STAT_C_CONNECTION = 1 STAT_CONNECTION = 1  USB_PORT_STAT_ENABLE 1

The device in question is a SanDisk Ultra USB 3.0 16GB memory stick with
USB VID/PID 0x0781/0x5581.

In order to allow this device to work with U-Boot, ignore the
{C_,}CONNECTION bits in the status/change registers, and only use the
ENABLE bit to determine if the reset was successful.

To be honest, extensive investigation has failed to determine why this
problem occurs. I'd love to know! I don't know if it's caused by:
* A HW bug in the device
* A HW bug in the Tegra USB controller
* A SW bug in the U-Boot Tegra USB driver
* A SW bug in the U-Boot USB core

This issue only occurs when the device's USB3 pins are attached to the
host; if only the USB2 pins are connected the issue does not occur. The
USB3 controller on Tegra is in reset, so is not actively communicating
with the device at all - a USB3 analyzer confirms this. Slightly
unplugging the device (so the USB3 pins don't contact) or using a USB2
cable or hub as an intermediary avoids the problem. For some reason,
the Linux kernel (either on the same Tegra board, or on an x86 host)
has no issue with the device, and I observe no disconnections during
reset.

This change won't affect any USB device that already works, since such
devices could not currently be triggering the error return this patch
removes, or they wouldn't be working currently.

However, this patch is quite reliable in practice, hence I hope it's
acceptable to solve the problem.

The only potential fallout I can see from this patch is:

* A broken device that triggers C_CONNECTION/!CONNECTION now causes the
  loop in hub_port_reset() to run multiple times. If it never succeeds,
  this will cause "usb start" to take roughly 1s extra to execute.

* If the user unplugs a device while hub_port_reset() is executing, and
  very quickly swaps in a new device, hub_port_reset() might succeed on
  the new device. This would mean that any information cached about the
  original device (from the descriptor read in usb_new_device(), which
  simply caches the max packet size) might be invalid, which would cause
  problems talking to the new device. However, without this change, the
  new device wouldn't work anyway, so this is probably not much of a
  loss.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2014-08-29 11:27:43 +02:00
Marek Vasut
97b9eb9e6a usb: Handle -ENODEV from usb_lowlevel_init()
As we support both Host and Device mode operation, an OTG controller
can return -ENODEV on a port which it found to be in Device mode during
Host mode scan for devices. In case -ENODEV is returned, print that the
port is not available and continue instead of screaming a bloody error
message.

Signed-off-by: Marek Vasut <marex@denx.de>
2014-08-29 11:27:42 +02:00
Masahiro Yamada
d1b60d3407 README.kconfig: document backward compatibility "make *_config"
Commit 3ff291f371
(kconfig: convert Kconfig helper script into a shell script)
restored "<board>_config" target for backward compatibility.
It should be documented.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
2014-08-28 17:18:49 -04:00
Masahiro Yamada
2134342e57 tools/genboardscfg.py: change shebang into /usr/bin/env python2
This tool only works on python 2 (python 2.6 or lator).

Change the shebang to make sure the script is run by python 2
and clearly say the supported version in the comment block.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-08-28 17:18:49 -04:00
Stefan Roese
5a834c1f9e net: cpsw: am335x: Drop constant link checking from rx/tx path's
We noticed on the DXR2 platform (AM335x with a SMSC LAN9303 switch connected
to the CPSW MAC) that the network performance in U-Boot is quite poor. Only
when the transfer is started without a cable connected, and the cable is
plugged after the first timeout "T" occured, an increased in performance
can be seen. Debugging has revealed, that the cpsw driver has constant
link checking builtin into the rx and tx functions. This results in the
bad performance and seems to be unnecessary. The link has already been
checked in the init function, before the transfer is started. This usually
is sufficient.

BTW: I have seen no other network driver in U-Boot so far, that constantly
checks for link in the rx / tx functions.

The performance numbers on the DXR2 board are:

0.56 MiB/s	cpsw_check_link() in rx and tx path
0.87 MiB/s	cpsw_check_link() only in tx path
1.0  MiB/s	cpsw_check_link() only in rx path
2.7  MiB/s	no cpsw_check_link() in rx and tx path

So with this patch the network performance on DXR2 increases from 0.56
to 2.7 MiB/s (nearly 5 times as fast).

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Samuel Egli <samuel.egli@siemens.com>
Tested-by: Heiko Schocher <hs@denx.de>
Cc: Vladimir Koutny <vladimir.koutny@streamunlimited.com>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Cc: Tom Rini <trini@ti.com>
2014-08-28 17:18:49 -04:00
Masahiro Yamada
9a65cb7ffe tools/genboardscfg.py: improve performance
I guess some developers are already getting sick of this tool
because it generally takes a few minites to generate the boards.cfg
on a reasonable computer.

The idea popped up on my mind was to skip Makefiles and
to run script/kconfig/conf directly.
This tool should become about 4 times faster.
You might still not be satisfied, but better than doing nothing.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-08-28 17:18:49 -04:00
Masahiro Yamada
d1bf4afda6 tools/genboardscfg.py: check if the boards.cfg is up to date
It looks silly to regenerate the boards.cfg even when it is
already up to date.

The tool should exit with doing nothing if the boards.cfg is newer
than any of defconfig, Kconfig and MAINTAINERS files.

Specify -f (--force) option to get the boards.cfg regenerated
regardless its time stamp.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-08-28 17:18:49 -04:00
Masahiro Yamada
79d45d32bc tools/genboardscfg.py: fix minor problems on termination
This tool deletes the incomplete boards.cfg
if it encounters an error or is is terminated by the user.

I notice some problems even though they rarely happen.

[1] The boards.cfg is removed if the program is terminated
during __gen_boards_cfg() function but before boards.cfg
is actually touched.  In this case, the previous boards.cfg
should be kept as it is.

[2] If an error occurs while deleting the incomplete boards.cfg,
the program throws another exception.  This hides the privious
exception and we will not be able to know the real cause.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-08-28 17:18:49 -04:00
Masahiro Yamada
d6538d22de tools/genboardscfg.py: wait for unfinished subprocesses before error-out
When an error occurs or the program is terminated by the user
on the way, the destructer __del__ of class Slot is invoked and
the work directories are removed.

We have to make sure there are no subprocesses (in this case,
"make O=<work_dir> ...") using the work directories before
removing them.  Otherwise the subprocess spits a bunch of error
messages possibly causing more problems.  Perhaps some users
may get upset to see too many error messages.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-08-28 17:18:48 -04:00
Masahiro Yamada
13246f4861 tools/genboardscfg.py: be tolerant of insane Kconfig
The tools/genboardscfg.py expects all the Kconfig and defconfig are
written correctly.  Imagine someone accidentally has broken a board.
Error-out just for one broken board is annoying for the other
developers.  Let the tool skip insane boards and continue processing.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-08-28 17:18:48 -04:00
Masahiro Yamada
b8828e8ff3 tools/genboardscfg.py: be tolerant of missing MAINTAINERS
tools/genboardscfg.py expects all the boards have MAINTAINERS.
If someone adds a new board but misses to add its MAINTAINERS file,
tools/genboardscfg.py fails to generate the boards.cfg file.
It is annoying for the other developers.

This commit allows tools/genboardscfg.py to display warning messages
and continue processing even if some MAINTAINERS files are missing
or have broken formats.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-08-28 17:18:48 -04:00
Masahiro Yamada
04b43f3273 tools/genboardscfg.py: ignore defconfigs starting with a dot
Kconfig in U-Boot creates a temporary file configs/.tmp_defconfig
during processing "make <board>_defconfig".  The temporary file
might be left over for some reasons.

Just in case, tools/genboardscfg.py should make sure to
not read such garbage files.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-08-28 17:18:48 -04:00
Simon Glass
dfe6f4d684 Correct sandbox filesystem commands in FIT image test
The host filesystem name has changed, so update the tests. The tests now
run again correctly:

$ make O=b/sandbox sandbox_defconfig all
...
$ test/image/test-fit.py -u b/sandbox/u-boot
FIT Tests

=========
Kernel load
Kernel + FDT load
Kernel + FDT + Ramdisk load

Tests passed
Caveat: this is only a sanity check - test coverage is poor

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-08-28 17:18:48 -04:00
Simon Glass
fe20a81a68 Fix test failure caused by bad handling of ramdisk
Commit e3a5bbce broke the FIT image tests by not loading a ramdisk even if
a load address is provided in the FIT. The rationale was that a load address
of 0 should be considered to mean 'do not load'.

Add a new load operation which supports this feature, so that the ramdisk
will be loaded if a non-zero load address is provided.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-08-28 17:18:48 -04:00
Masahiro Yamada
4a8ed8e248 kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE
Copy the Kconfig option from "init/Kconfig" of Linux v3.16 tag
and adjust the help document.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-08-28 17:18:48 -04:00
Masahiro Yamada
a6f47d2434 scripts: refetch scripts/setlocalversion from Linux 3.16
Now we have CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO
in Kconfig so we can use scripts/setlocalversion without
any adjustment.  Copy it from Linux 3.16 as is.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-08-28 17:18:48 -04:00
Masahiro Yamada
e91c3c332b kconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO
Copy Kconfig options from "init/Kconfig" of Linux v3.16 tag
and adjust some parts of the help document.

Move CONFIG_SPL, CONFIG_TPL, ... etc. to "Boot images" menu.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-08-28 17:18:48 -04:00
Masahiro Yamada
390f7035d3 buildman: run genboardscfg.py all the time
This commit makes sure boards.cfg is up to date before starting
the build tests.  tools/genboardscfg.py exits immediately printing
"boards.cfg is up to date. Nothing to do." when boards.cfg is
already new.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-08-28 17:18:48 -04:00
Masahiro Yamada
94ab8f411c MAKEALL: run genboardscfg.py all the time
This commit makes sure boards.cfg is up to date before starting
the build tests.  tools/genboardscfg.py exits immediately printing
"boards.cfg is up to date. Nothing to do." when boards.cfg is
already new.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-08-28 17:18:48 -04:00
Masahiro Yamada
9c2d60c378 tools/genboardscfg.py: fix a bug of MAINTAINERS handling
This patch fixes a minor problem:
If a block without "F:   configs/*_defconfig" is followed by another
block with "F:   configs/*_defconfig", the maintainers from the
former block are squashed into the latter.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-08-28 17:18:48 -04:00
Łukasz Majewski
124c599875 samsung: s5p_goni: fix: Add missing definitions for G_DNL_UMS gadget
The commit (SHA1: 8fc171318e) reintroduced correct values for vendor and
product IDs required for UMS gadget to work properly either at Windows or
Linux.

This data was missing for GONI target, so this commit corrects this mistake.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
2014-08-28 13:47:34 -04:00
Tom Rini
3e1b36bd58 Merge branch 'master' of git://git.denx.de/u-boot-arm 2014-08-28 13:03:25 -04:00
Tom Rini
f91df8ca17 Merge branch 'patman' of http://git.denx.de/u-boot-x86 2014-08-28 11:49:12 -04:00
Simon Glass
042a732cf5 patman: Support the 'reverse' option for 'git log'
This option is currently not supported, but needs to be, for buildman to
operate as expected.

Reported-by: York Sun <yorksun@freescale.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-08-28 07:56:19 -07:00
Heiko Schocher
4e67c57125 mtd,ubi,ubifs: sync with linux v3.15
snyc with linux v3.15:

commit 1860e379875dfe7271c649058aeddffe5afd9d0d
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Jun 8 11:19:54 2014 -0700

    Linux 3.15

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@ti.com>
2014-08-25 19:25:56 -04:00
Heiko Schocher
ddf7bcfa6c mtd, ubi, ubifs: update for the sync with linux v3.14
while playing with the new mtd/ubi/ubifs sync, found some
small updates for it:

- add del_mtd_partition() to include/linux/mtd/mtd
- mtd: add a debug_printf
- remove some not used functions

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@ti.com>
2014-08-25 19:25:56 -04:00
Heiko Schocher
ff94bc40af mtd, ubi, ubifs: resync with Linux-3.14
resync ubi subsystem with linux:

commit 455c6fdbd219161bd09b1165f11699d6d73de11c
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Mar 30 20:40:15 2014 -0700

    Linux 3.14

A nice side effect of this, is we introduce UBI Fastmap support
to U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Joerg Krause <jkrause@posteo.de>
2014-08-25 19:25:55 -04:00
Heiko Schocher
0c06db5983 lib, linux: move linux specific defines to linux/compat.h
- move linux specific defines from usb and video code
  into linux/compat.h
- move common linux specific defines from include/ubi_uboot.h
  to linux/compat.h
- add for new mtd/ubi/ubifs sync new needed linux specific
  defines to linux/compat.h

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
[trini: Add spin_lock_irqsave/spin_unlock_irqrestore dummies from
usb/lin_gadet_compat.h]
Signed-off-by: Tom Rini <trini@ti.com>
2014-08-25 19:25:03 -04:00
Heiko Schocher
cc96c9a79c linux include: add ERR_CAST
add missing ERR_CAST to linux/err.h as it is needed for ubi/ubifs support

Signed-off-by: Heiko Schocher <hs@denx.de>
2014-08-25 17:02:33 -04:00
Heiko Schocher
c068d44aac lib, list_sort: add list_sort from linux 3.14
from linux 3.14:

commit 455c6fdbd219161bd09b1165f11699d6d73de11c
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Mar 30 20:40:15 2014 -0700

    Linux 3.14

Needed for the MTD/UBI/UBIFS resync

Just copied the files from Linux, and added in the c-file
the "#define __UBOOT__" for adding U-Boot special code. In
this case we use this just for adding including U-Boot
headers.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@ti.com>
2014-08-25 17:02:33 -04:00
Heiko Schocher
9dd228b5e7 lib, rbtree: resync with Linux-3.14
resync with linux:

commit 455c6fdbd219161bd09b1165f11699d6d73de11c
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Mar 30 20:40:15 2014 -0700

    Linux 3.14

Needed for the MTD/UBI/UBIFS resync

Just copied the files from Linux, changed the license file header,
and add in the c-file:

+#define __UBOOT__
 #include <linux/rbtree_augmented.h>
+#ifndef __UBOOT__
 #include <linux/export.h>
+#else
+#include <ubi_uboot.h>
+#endif

so, it compiles for U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@ti.com>
2014-08-25 17:02:33 -04:00
Matwey V. Kornilov
b640b460f5 pcm051: use ti_am335x_common.h config
Include general configs/ti_am335x_common.h and drop redundant #defines.

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
2014-08-25 14:19:13 -04:00
Lokesh Vutla
7b92252370 ARM: DRA: Enable VTT regulator
DRA7 evm REV G and later boards uses a vtt regulator for DDR3 termination
and this is controlled by gpio7_11. Configuring gpio7_11.
The pad A22(offset 0x3b4) is used by gpio7_11 on REV G and later boards,
and left unused on previous boards, so it is safe enough to enable gpio
on all DRA7 boards.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2014-08-25 10:48:13 -04:00
Tom Rini
1286b7f6ca am335x_evm: Convert CONFIG_CONS_INDEX into a menu choice
- Drop CONFIG_SERIAL[1-6] and use CONFIG_CONS_INDEX tests instead
- Add choice and help text to board/ti/am335x/Kconfig
- Correct comment about IDK in board/ti/am335x/mux.c
- Remove am335x_evm_uart* defconfig files as they're just variations
  on a config option now.

Signed-off-by: Tom Rini <trini@ti.com>
2014-08-25 10:48:13 -04:00
Dmitry Lifshitz
bbfb286b8a cm-t54: convert to generic board
Use generic board setup functions by defining
CONFIG_SYS_GENERIC_BOARD.

Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
2014-08-25 10:48:13 -04:00
Dmitry Lifshitz
e1c9895c8f cm-t54: fix eMMC boot mode check
Boot from eMMC boot partition corresponds to BOOT_DEVICE_MMC2
omap_bootmode, while BOOT_DEVICE_MMC2_2 corresponds to the user
data partition boot.

Fix mmc_get_env_part() boot mode check to use a correct value.

Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
2014-08-25 10:48:13 -04:00
Dmitry Lifshitz
91c9885e6d cm-t54: fix EEPROM read return value check
Fix cl_eeprom_read_mac_addr() return value check.
Fix long line codding style issue in board_init().

Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
2014-08-25 10:48:13 -04:00
Sricharan R
f2a1b93b5c ARM: DRA7: Enable software leveling for dra7
Currently hw leveling is enabled by default on DRA7/72.
But the hardware team suggested to use sw leveling as hw leveling
is not characterized and seen some test case failures.
So enabling sw leveling on all DRA7 platforms.

Signed-off-by: Sricharan R <r.sricharan@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2014-08-25 10:48:13 -04:00
Jeroen Hofstee
457baf5489 SOM: tam3517: convert to generic board
Cc: Raphael Assenat <raph@8d.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-08-25 10:48:12 -04:00
Vitaly Andrianov
61f66fd5a8 keystone2: use EFUSE_BOOTROM information to configure PLLs
This patch reads EFUSE_BOOTROM register to see the maximum supported
clock for CORE and TETRIS PLLs and configure them accordingly.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
2014-08-25 10:48:12 -04:00
pekon gupta
9352697aa0 board/ti/dra7xx: add support for parallel NOR
This patch adds support for parallel NOR device (S29GL512S10) present on J6-EVM.
The Flash device is connected to GPMC controller on chip-select[0] and accessed
as memory-mapped device. It has data-witdh=x16, capacity-64MBytes(512Mbits) and
is CFI compatible.

As multiple devices are share GPMC pins on this board, so following board
settings are required to detect NOR device:
     SW5.1 (NAND_BOOTn) = OFF (logic-1)
     SW5.2 (NOR_BOOTn)  = ON  (logic-0) /* Active-low */
     SW5.3 (eMMC_BOOTn) = OFF (logic-1)
     SW5.4 (QSPI_BOOTn) = OFF (logic-1)

And also set appropriate SYSBOOT configurations:
     SW3.1 (SYSBOOT[ 8])= ON  (logic-1) /* selects SYS_CLK1 speed */
     SW3.2 (SYSBOOT[ 9])= OFF (logic-0) /* selects SYS_CLK1 speed */
     SW3.3 (SYSBOOT[10])= ON  (logic-1) /* wait-pin monitoring = enabled */
     SW3.4 (SYSBOOT[11])= OFF (logic-0) /* device type: Non Muxed */
     SW3.5 (SYSBOOT[12])= OFF (logic-0) /* device type: Non Muxed */
     SW3.6 (SYSBOOT[13])= ON  (logic-1) /* device bus-width: 1(x16) */
     SW3.7 (SYSBOOT[14])= OFF (logic-0) /* reserved */
     SW3.8 (SYSBOOT[15])= ON  (logic-1) /* reserved */

Also, following changes are required to enable NOR Flash support in
dra7xx_evm board profile:
2014-08-25 10:48:12 -04:00
pekon gupta
54a97d2849 board/ti/dra7xx: add support for parallel NAND
This patch adds support for x16 NAND device (MT29F2G16AAD) connected to GPMC
chip-select[0] on DRA7xx EVM.
As GPMC pins are shared by multiple devices, so in addition to this patch
following board settings are required for NAND device detection [1]:

  SW5.9 (GPMC_WPN)   = OFF (logic-1)
  SW5.1 (NAND_BOOTn) = ON  (logic-0) /* Active-low */
  SW5.2 (NOR_BOOTn)  = OFF (logic-1)
  SW5.3 (eMMC_BOOTn) = OFF (logic-1)
  SW5.4 (QSPI_BOOTn) = OFF (logic-1)

And also set appropriate SYSBOOT configurations
  SW2.1 (SYSBOOT[0]) = ON  (logic-1) /* selects NAND Boot */
  SW2.2 (SYSBOOT[1]) = OFF (logic-0) /* selects NAND Boot */
  SW2.3 (SYSBOOT[2]) = OFF (logic-0) /* selects NAND Boot */
  SW2.4 (SYSBOOT[3]) = OFF (logic-0) /* selects NAND Boot */
  SW2.5 (SYSBOOT[4]) = ON  (logic-1) /* selects NAND Boot */
  SW2.6 (SYSBOOT[5]) = ON  (logic-1) /* selects NAND Boot */
  SW2.7 (SYSBOOT[6]) = OFF (logic-0) /* reserved */
  SW2.8 (SYSBOOT[7]) = OFF (logic-0) /* reserved */

  SW3.1 (SYSBOOT[ 8])= ON  (logic-1) /* selects SYS_CLK1 speed */
  SW3.2 (SYSBOOT[ 9])= OFF (logic-0) /* selects SYS_CLK1 speed */
  SW3.3 (SYSBOOT[10])= ON  (logic-1) /* wait-pin monitoring = enabled */
  SW3.4 (SYSBOOT[11])= OFF (logic-0) /* device type: Addr/Data Muxed */
  SW3.5 (SYSBOOT[12])= ON  (logic-1) /* device type: Addr/Data Muxed */
  SW3.6 (SYSBOOT[13])= ON  (logic-1) /* device bus-width: 1(x16) */
  SW3.7 (SYSBOOT[14])= OFF (logic-0) /* reserved */
  SW3.8 (SYSBOOT[15])= ON  (logic-1) /* reserved */

Following changes are required in board.cfg to enable NAND on J6-EVM:
2014-08-25 10:48:12 -04:00