Commit Graph

13147 Commits

Author SHA1 Message Date
Bin Meng 377a069643 input: Change LED state bits to conform i8042 compatible keyboard
When sending LED update command to an i8042 compatible keyboard,
bit1 is 'Num Lock' and bit2 is 'Caps Lock' in the data byte. But
input library defines bit1 as 'Caps Lock' and bit2 as 'Num Lock'.
This causes a wrong LED to be set on an i8042 compatible keyboard.
Change the LED state bits to be i8042 compatible, and change the
keyboard flags as well.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-11-19 20:13:42 -07:00
Simon Glass 91f815450f input: Convert 'keyboard' driver to use input library
This has duplicated scan code tables and logic. We can use the input
library to implement most of the features here.

This needs testing. The only supported board appears to be TQM5200.
Unfortunately no maintainer is listed for this board.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-11-19 20:13:41 -07:00
Simon Glass dcbf825714 input: Convert i8042 to driver model
Adjust this driver to support driver model. The only users are x86 boards
so this should be safe.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:41 -07:00
Simon Glass 51a8a72dc5 Drop CONFIG_ISA_KEYBOARD
This option is mentioned but does not do anything. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:41 -07:00
Simon Glass 6b44ae6b06 x86: Add an i8042 device for boards that have it
Some boards have an i8042 device. Enable the driver for all x86 boards, and
add a device tree node for those which may have this keyboard.

Also adjust the configuration so that i8042 is always separate from the VGA,
and rename the stdin driver accordingly. With this commit the keyboard will
not work, but it is fixed in the next commit.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:41 -07:00
Simon Glass 3b5f6f5001 input: Allow updating of keyboard LEDs
Add a function which returns a new keyboard LED value when the LEDs need
updating.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:41 -07:00
Simon Glass b1d7a1875e input: Support the German keymap
Add support for the German keymap, taken from i8042.c. This can be selected
when the input library it initialised.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:41 -07:00
Thomas Chou 9961a0b6fb sandbox: add a sandbox timer and basic test
Add a sandbox timer which get time from host os and a basic
test.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-11-19 20:13:41 -07:00
Simon Glass 0b186c0825 input: Allow repeat filtering to be disabled
Generally the input library handles processing of a list of scanned keys.
Repeated keys need to be generated based on a timer in this case, since all
that is provided is a list of keys current depressed.

Keyboards which do their own scanning will resend codes when they want to
inject a repeating key. Provide a function which tells the input library to
accept repeating keys and not to try to second-guess the caller.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:40 -07:00
Simon Glass 3a85e4362a input: Add a function to add a keycode to the existing set
Most keyboards can be scanned to produce a list of the keycodes which are
depressed. With the i8042 keyboard this scanning is done internally and
only the processed results are returned.

In this case, when a key is pressed, a 'make' code is sent. When the key
is released a 'break' code is sent. This means that the driver needs to
keep track of which keys are pressed. It also means that any protocol error
can lead to stuck keys.

In order to support this type of keyboard, add a function when can be used
to provide a single keycode and either add it to the list of what is pressed
or remove it from the list. Then the normal input_send_keycodes() function
can be used to actually do the decoding work.

Add debugging to display the ASCII characters written to the input queue
also.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:40 -07:00
Simon Glass 7fe0933c58 video: Drop unused console functions
CONFIG_CONSOLE_CURSOR, CONFIG_SYS_CONSOLE_BLINK_COUNT and
CONFIG_CONSOLE_TIME are not used by any board. The implementation is not
great and stands in the way of a refactor of i8042. Drop these for now.
They can be re-introduced quite easily later, perhaps with driver-model
real-time-clock (RTC) support.

When reintroducing, it might be useful to make a few changes:
- Blink time would be more useful than blink count
- The confusing #ifdefs should be avoided
- The time functions should support driver model
- It would be best keyed off console_tstc() or some similar idle loop
    rather than a particular input driver (i8042 in this case)

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:40 -07:00
Simon Glass f77f5e9be7 dm: tegra: Convert keyboard driver to driver model
Adjust the tegra keyboard driver to support driver model, using the new
uclass. Make this the default for all Tegra boards so that those that use
a keyboard will build correctly with this driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-11-19 20:13:40 -07:00
Simon Glass 745009c4d0 cros_ec: Use udevice instead of cros_ec_dev for keyboard functions
In preparation for converting the cros_ec keyboard driver to driver model,
adjust the cros_ec functions it will use to use a normal struct udevice.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-11-19 20:13:40 -07:00
Simon Glass 66877b0f5f input: Add the keycode translation tables separately
Require the caller to add the keycode translation tables separately so that
it can select which ones to use. In a later patch we will add the option to
add German tables.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:40 -07:00
Simon Glass c9cac4cdce input: Add a device pointer to the input config
The read_keys() method in input is passed a struct input_config. Add a
device pointer there so that we can find out the device that is referred
to with driver model.

Once all drivers are converted we can update the input structure to use
driver model instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:40 -07:00
Simon Glass e84421d8f3 dm: input: Create a keyboard uclass
Add a uclass for keyboard input, mirroring the existing stdio methods.
This is enabled by a new CONFIG_DM_KEYBOARD option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:39 -07:00
Simon Glass 34ab37eef5 dm: usb: Add support for USB keyboards with driver model
Switch USB keyboards over to use driver model instead of scanning with the
horrible usb_get_dev_index() function. This involves creating a new uclass
for keyboards, although so far there is no API.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-11-19 20:13:39 -07:00
Tom Rini 9ef671c9d4 Merge branch 'master' of git://git.denx.de/u-boot-spi 2015-11-19 13:27:26 -05:00
Michal Simek f3bd72801a zynq: sdhci: Define max clock by macro
zc1571 with silicon can operate on 200MHz maximum frequency. Setup this
frequency by default and fix setting for ep108.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-19 14:03:05 +01:00
Nathan Rossi 66eef1e780 tools: zynqimage: Add Xilinx Zynq boot header generation to mkimage
As with other platforms vendors love to create their own boot header
formats. Xilinx is no different and for the Zynq platform/SoC there
exists the "boot.bin" which is read by the platforms bootrom. This
format is described to a useful extent within the Xilinx Zynq TRM.

This implementation adds support for the 'zynqimage' to mkimage. The
implementation only considers the most common boot header which is
un-encrypted and packed directly after the boot header itself (no
XIP, etc.). However this implementation does take into consideration the
other fields of the header for image dumping use cases (vector table and
register initialization).

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-19 13:09:21 +01:00
Michal Simek bf146325a3 ARM64: zynqmp: Enable TI phy by default
Enable TI phy for Xilinx ZynqMP platform.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-19 13:09:21 +01:00
Edgar E. Iglesias 721aed7912 net: phy: Add support for Texas Instruments DP83867
Code is taken from Linux kernel driver (v4.2).

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-11-19 13:09:21 +01:00
Michal Simek 8741c490f9 ARM: zynq: Choose boot image based on OF_SEPARATE macro
OF_CONTROL is enabled by default for all Zynq boards.
The difference between two boot images is done by OF_SEPARATE
or OF_EMBED macros.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-11-19 12:57:48 +01:00
Valentin Longchamp 5411988242 powerpc/83xx: add support for kmtegr1 board
This board uses the same CPU (8309) as VECT1. The memory however is
different since it has NAND Flash, the NOR Flash partitioning is
different and of course the FPGAs as well.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Christoph Dietrich <christoph.dietrich@keymile.com>
2015-11-18 15:28:58 -05:00
Valentin Longchamp 38467df5d6 km8309: change the default QE_FW address
It should be after the u-boot reserved sectors and before the env
sectors, since the solution used for kmvect1 (tell the linker to put the
firmware into the u-boot produced binary, at the end of the area) should
be the exception.

The #define is only "conditional" so that we can still support kmvect1.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:57 -05:00
Valentin Longchamp 68005ea655 km83xx: use CONFIG_ENV_ADDR for the newenv env command
The hardcoded value are bad, since the address could change between
different boards.

Furthermore, the relevant #defines are set only if #undefined here, so
that they can be changed by some boards if required.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:57 -05:00
Valentin Longchamp 22554ba1c9 powerpc/km8360: fix the ODT parameters for CS0
The ODT parameters for km8360 set the ODT_WR_ACS bit in u-boot KM-2011.09
that is used in the release bootpackage for kmcoge5ne. During the
transition from the kmeter1 to km8360 this was changed to
ODT_RD_ONLY_CURRENT, which is uncorrect and causes faulty RAM accesses at
low temperatures.

This is now changed to ODT_WR_ONLY_CURRENT which is the equivalent of
ODT_WR_ACS.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:56 -05:00
Valentin Longchamp fd70858d05 powerpc/km8309: define CONFIG_SYS_DDRCDR
For consistency with all the other km83xx plaforms, this should also be
defined for km8309. The same settings as for km8321 are taken.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:56 -05:00
Valentin Longchamp d4bd2ca2aa powerpc/km8321: define CONFIG_SYS_DDRCDR
On the km8321 boards is CONFIG_SYS_DDRCDR not defined, which leads to
the DDRCDR not being configured at startup and still containing the
reset value.

The required settings for our km8321 hardware designs are different than
the reset value and must be set with CONFIG_SYS_DDRCDR, that is used
by mpc83xx's cpu_init_f function at early CPU initialization.

The important settings are the DDR2 internal voltage level and the
half-strength "drivers".

In our case where the DRAM chips are soldered on board and the routing
for these signals under control, half-strength is sufficient as a few
measurements done in the lasts have shown. Since all the hardware
qualification tests have been performed with half strength, the nominal
strength settings are removed in favor of the default reset half
strength settings.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:55 -05:00
Holger Brunck bbd94a0b49 km/powerpc: move open firmware defines to km-powerpc.h
We use the same settings for open firmware defines on all our powerpc
targets, so move them from the CPU specific headers to the common
powerpc header.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:54 -05:00
Holger Brunck d6d864768f km/powerpc: increase space for kernel imange and FDT blob
128kByte and 3,986MB may be in the future too little for kernel the fdt
blob respectively the kernel image. So increase the reserved areas here,
we have the space for this.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:53 -05:00
Christoph Dietrich c1e121e4bd powerpc/83xx: add support for kmtepr2 board
This board is similar to TUXX1, but it has differend FPGAs.

Signed-off-by: Christoph Dietrich <christoph.dietrich@keymile.com>
Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:51 -05:00
Valentin Longchamp c6d32dfd99 km: update the boot script to check for a DTB
If a DTB is found with cramfsls, the bootscript continues as expected.
If none is found, the cramfsloadfdt and boot subbootcmds are updated to
not load the DTB from cramfs and not pass it to the kernel. The kernel
thus must have an appended DTB otherwise the boot will fail.

This is required for the km_kirkwood boards that must support .esw where
the DTB sometimes is appended (for backwards compatibility) and sometimes
is passed correctly (as we do now for all newer boards).

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2015-11-18 15:28:50 -05:00
Holger Brunck 7f70460eec km/common: stop u-boot only if someone press <SPACE>
To prevent u-boot to stop accidently e.g. due to line noise on the
serial line, we now use the option CONFIG_AUTOBOOT_KEYED. We choose the
<SPACE> key for this.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2015-11-18 15:28:49 -05:00
Valentin Longchamp 716e4ffe99 arm/km_kirkwood: remove KM_ENV_BUS and use CONFIG_I2C_ENV_EEPROM_BUS
KM_ENV_BUS was used for nothing else than an direct assignment to
CONFIG_I2C_ENV_EEPROM_BUS. To avoid this, directly use
CONFIG_I2C_ENV_EEPROM_BUS instead.

Patchwork: http://patchwork.ozlabs.org/patch/399411/
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 14:50:07 -05:00
robertcnelson@gmail.com dfd1bb4ec8 board/ti/am335x: add support for BeagleBone Green
SeeedStudio BeagleBone Green (BBG) is clone of the BeagleBone Black (BBB) minus
the HDMI port and addition of two Grove connectors (i2c2 and usart2).

This board can be identified by the 1A value after A335BNLT (BBB) in the at24 eeprom:
1A: [aa 55 33 ee 41 33 33 35  42 4e 4c 54 1a 00 00 00 |.U3.A335BNLT....|]

http://beagleboard.org/green
http://www.seeedstudio.com/wiki/Beaglebone_green

In Mainline Kernel as of:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=79a4e64c679d8a0b1037da174e4aea578c80c4e6

Patch tested on BeagleBone Black (rev C) and BeagleBone Green (production model)

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
CC: Tom Rini <trini@konsulko.com>
CC: Jason Kridner <jkridner@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-11-18 14:50:07 -05:00
Thomas Chou e4aa8edb6e common: add CMD_GPIO to Kconfig
Add CMD_GPIO to Kconfig and run tools/moveconfig.py .

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-11-18 14:50:06 -05:00
Nikita Kiryanov a1e56cf6d4 spl: mmc: add support for BOOT_DEVICE_MMC2
Currently the mmc device that SPL looks at is always mmc0, regardless
of the BOOT_DEVICE_MMCx value. This forces some boards to
implement hacks in order to boot from other mmc devices.

Make SPL take into account the correct mmc device.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-11-18 14:50:05 -05:00
Nikita Kiryanov 7b9e980e87 arm: mx6: cm-fx6: define fallback boot devices for spl
Use spl alternate boot device feature to define fallback to
the main boot device as it is defined by hardware.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2015-11-18 14:50:05 -05:00
Nikita Kiryanov 36afd45136 spl: change return values of spl_*_load_image()
Make spl_*_load_image() functions return a value instead of
hanging if a problem is encountered. This enables main spl code
to make the decision whether to hang or not, thus preparing
it to support alternative boot devices.

Some boot devices (namely nand and spi) do not hang on error.
Instead, they return normally and SPL proceeds to boot the
contents of the load address. This is considered a bug and
is rectified by hanging on error for these devices as well.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Ian Campbell <ijc@hellion.org.uk>
Cc: Hans De Goede <hdegoede@redhat.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Jagan Teki <jteki@openedev.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-11-18 14:50:02 -05:00
Kipisz, Steven 74cc8b097d board: ti: beagle_x15: Rename to indicate support for TI am57xx evms
BeagleBoard X15 (http://beagleboard.org/x15) support in u-boot does
actually support two different platform configuration offered by
TI. In addition to BeagleBoard X15, it also supports the TMDXEVM5728
(or more commonly known as AM5728-evm).

Information about the TI AM57xx EVM can be found here
http://www.ti.com/tool/tmdxevm5728

The EVM configuration is 1-1 compatible with BeagleBoard X15 with the
additional support for mPCIe, mSATA, LCD, touchscreen, Camera, push
button and TI's wlink8 offering.

Hence, we rename the beagle_x15 directory to am57xx to support TI
EVMs that use the AM57xx processor. By doing this we have common code
reuse. This sets the stage to have a common u-boot image solution for
multiple TI EVMs such as that already done for am335x and am437x. This
sets the stage for upcoming multiple TI EVMs that share the same code
base.

NOTE: Commit eae7ae1853 ("am437x: Add am57xx_evm_defconfig using
CONFIG_DM") introduced DT support for beagle_x15 under am57xx_evm
platform name. However, this ignored the potential confusion arising for
users as a result. To prevent this, existing beagle_x15_defconfig is
renamed as am57xx_evm_nodt_defconfig to denote that this is the "non
device tree" configuration for the same platform. We still retain
am57xx-beagle-x15.dts at this point, since we just require the common
minimum dts.

As a result of this change, users should expect changes in build
procedures('make am57xx_evm_nodt_defconfig' instead of 'make
beagle_x15_defconfig'). Hopefully, this would be a one-time change.

Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
Signed-off-by: Schuyler Patton <spatton@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
2015-11-18 08:47:03 -05:00
Tom Rini fe524569d4 Merge git://git.denx.de/u-boot-marvell 2015-11-17 17:57:32 -05:00
Luka Perkov 6a26748c5e arm: kirkwood: ib62x0: drop duplicate defines from CONFIG_SYS_MVFS
These options were already defined in mv-common.h file.

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
2015-11-17 23:41:41 +01:00
Luka Perkov 6d559637d5 arm: kirkwood: ib62x0: drop dev CONFIG_OF_LIBFDT
It is already defined in included mv-common.h file.

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
2015-11-17 23:41:41 +01:00
Luka Perkov ab71ece505 arm: kirkwood: ib62x0: make use of defconfig
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
2015-11-17 23:41:41 +01:00
Luka Perkov e19f42c3eb arm: kirkwood: ib62x0: drop CONFIG_CMD_ENV define
The CONFIG_CMD_ENV is enabled by default so we can safely remove it.

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
2015-11-17 23:41:41 +01:00
Luka Perkov bd4c1d3e96 arm: kirkwood: ib62x0: build u-boot.kwb
Avoid double typing in the shell and build u-boot.kwb when running "make" only.

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
2015-11-17 23:41:41 +01:00
Luka Perkov f9edf38fa7 arm: kirkwood: ib62x0: drop CONFIG_MACH_TYPE
Mainline kernel for this device has only support for device tree. We can safely
drop this legacy code.

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
2015-11-17 23:41:41 +01:00
Quentin Armitage 38c0e864d3 arm: kirkwood: Move common definitions into common file
Create include/configs/mv-plug-common.h for common definitions
for Sheevaplug, Guruplug and Dreamplug. This will make it easier
to ensure the built u-boots stay in track with each other

Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
2015-11-17 23:41:41 +01:00
Quentin Armitage 310866b2e8 arm: kirkwood: Remove duplicate definition from dreamplug.h
CONFIG_DISPLAY_CPUINFO is already defined in mv-common.h

Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
2015-11-17 23:41:41 +01:00