1
0
Fork 0
Commit Graph

28177 Commits (5d1c17e9a5803af9c65966e469437735ac29659e)

Author SHA1 Message Date
Simon Glass 5d1c17e9a5 dm: gpio: Mark the old GPIO API deprecated
Add a deprecation notice to each function so that it is more obvious that we
are moving GPIOs to driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-29 17:09:51 -07:00
Simon Glass 3669e0e759 dm: gpio: Add better functions to request GPIOs
At present U-Boot sort-of supports the standard way of reading GPIOs from
device tree nodes, but the support is incomplete, a bit clunky and only
works for GPIO bindings where #gpio-cells is 2.

Add new functions to request GPIOs, taking full account of the device
tree binding. These permit requesting a GPIO with a simple call like:

   gpio_request_by_name(dev, "cd-gpios", 0, &desc, GPIOD_IS_IN);

This will request the GPIO, looking at the device's node which might be
this, for example:

   cd-gpios = <&gpio TEGRA_GPIO(B, 3) GPIO_ACTIVE_LOW>;

The GPIO will be set to input mode in this case and polarity will be
honoured by the GPIO calls.

It is also possible to request and free a list of GPIOs.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-29 17:09:51 -07:00
Simon Glass 0dac4d51f5 dm: gpio: Add a driver GPIO translation method
Only the GPIO driver knows about the full GPIO device tree binding used by
a device. Add a method to allow the driver to provide this information to the
uclass, including the GPIO offset within the device and flags such as the
polarity.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-29 17:09:50 -07:00
Simon Glass ae7123f876 dm: gpio: Add a native driver model API
So far driver model's GPIO uclass just implements the existing GPIO API.
This has some limitations:

- it requires manual device tree munging to support GPIOs in device tree
    (fdtdec_get_gpio() and friends)
- it does not understand polarity
- it is somewhat slower since we must scan for the GPIO device each time
- Global GPIO numbering can change if other GPIO drivers are probed
- it requires extra steps to set the GPIO direction and value

The new functions have a dm_ prefix where necessary to avoid name conflicts
but we can remove that when it is no-longer needed. The new struct gpio_desc
holds all required information about the GPIO. For now this is intended to
be stored by the client requesting the GPIO, but in future it might be
brought into the uclass in some way.

With these changes the old GPIO API still works, and uses the driver model
API underneath.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-29 17:09:50 -07:00
Simon Glass 57068a7aeb dm: fdt: Add a function to decode phandles with arguments
For GPIOs and other functions we want to look up a phandle and then decode
a list of arguments for that phandle. Each phandle can have a different
number of arguments, specified by a property in the target node. This is
the "#gpio-cells" property for GPIOs.

Add a function to provide this feature, taken modified from Linux 3.18.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-29 17:09:50 -07:00
Simon Glass 5cfc662c49 dm: tegra: Bring in GPIO device tree binding
At present the tegra GPIO driver does not fully support the existing device
tree binding, but add the binding file to cover the existing partial support.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-29 17:09:50 -07:00
Simon Glass 35ea1bfde3 dm: exynos: Bring in GPIO device tree binding
At present the exynos GPIO driver does not fully support the existing device
tree binding, but add the binding file to cover the existing partial support.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-29 17:09:50 -07:00
Simon Glass 9f4cd0200c dm: gpio: Bring in GPIO device tree binding
Add the binding file that we are about to support.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-29 17:09:50 -07:00
Masahiro Yamada 0365ffcc0b generic-board: show model name in board_init_f() too
The common/board_r.c has show_model_r() to display the model name
if the DTB has a "model" property.  It sounds useful to have a similar
function in common/board_f.c too because most of the boards show
their board name before relocation.

Instead of implementing the same function in both common/board_f.c
and common/board_r.c, let's split it up into common/show_board_info.c.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-01-29 17:09:49 -07:00
Masahiro Yamada 5468461d1e cmd_i2c: change variable type for 10bit addressing support
To store 10bit chip address, the variable type should not be uchar,
but uint.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher<hs@denx.de>
2015-01-29 17:09:49 -07:00
Masahiro Yamada 233e42a985 ARM: UniPhier: enable CONFIG_I2C_EEPROM
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-01-29 17:09:49 -07:00
Masahiro Yamada 3bf447655b ARM: UniPhier: enable I2C for UniPhier SoCs
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-01-29 17:09:49 -07:00
Masahiro Yamada 238bd0b8ce i2c: UniPhier: add driver for UniPhier FIFO-builtin i2c controller
This commit adds on-chip I2C driver used on newer SoCs of Panasonic
UniPhier platform.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
2015-01-29 17:09:49 -07:00
Masahiro Yamada 26f820f3f1 i2c: UniPhier: add driver for UniPhier i2c controller
This commit adds on-chip I2C driver used on some old Panasonic
UniPhier SoCs.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
2015-01-29 17:09:49 -07:00
Masahiro Yamada b6036bcd2a i2c: add CONFIG_DM_I2C to Kconfig
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
2015-01-29 17:09:48 -07:00
Bo Shen 2af13d6b62 lcd: fix console address is not initialized
This commit 904672e (lcd: refactor lcd console stuff into its
own file), which cause lcd console address is not initialized.

This patch initialize the lcd console use the default value,
will be update when splash screen is enabled.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
2015-01-28 16:58:02 -05:00
Bo Shen 2a50712eca Makefile: clean boot.bin
When build for Atmel related boards which support SPL,
it will generate boot.bin, also clean when it when do
"make clean" operation.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2015-01-28 16:58:02 -05:00
Stefan Roese e860d012c4 spl: Change printf to puts for "Unsupported boot-device"
Microblaze currently doesn't use printf in SPL. So this one line was the only
reference to it and resulted in the printf functionality to be pulled in.
Exceeding the 4k size limit. Lets change the printf back to puts so that
Microblaze is fixed again. The only drawback is that the detected boot-device
number will not be printed. But this message alone should be helpful enough
to get an idea where the boot process is broken.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
2015-01-28 16:58:01 -05:00
Tom Rini ab92da9f47 Merge branch 'master' of git://git.denx.de/u-boot-x86 2015-01-26 17:44:49 -05:00
Tom Rini aed03faa06 Merge branch 'master' of git://git.denx.de/u-boot-atmel 2015-01-26 06:42:40 -05:00
Tom Rini 306df2c824 Merge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze 2015-01-26 06:42:15 -05:00
Michal Simek a2425e6207 serial: Extend structure comments with register offset
This information help with debugging issues with uart.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-26 08:55:59 +01:00
Michal Simek 12c9e7d622 serial: zynq: Use global baudrate instead of hardcoded one
This change enables to change baudrate on command line.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-26 08:55:58 +01:00
Siva Durga Prasad Paladugu c4fa511425 ARM: zynq: Add USB lthor download protocol support
updated the zynq config to support the lthor
download protocol.
This lthor functionality helps us to load linux
images on to DDR/MMC and can boot linux using bootm.
In order to load images the user should run lthor
command run "thor_ram" from u-boot prompt and
then send the images from host using lthor utility.

Define g_dnl_bind_fixup for zynq so that correct vendor
and product ids assigned incase of DFU and lthor.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-26 08:55:58 +01:00
Siva Durga Prasad Paladugu 87f3dbdffc ARM: zynq: Enable DFU functionality in zynq
Enable DFU functionality in zynq.
This DFU functionality helps us to load linux
images on to DDR and can boot linux using bootm.
In order to load images the user should run dfu
command "dfu 0 ram 0" from u-boot prompt and then
send the images from host.

The malloc size has been increased to match the DFU
buffer requirements.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-26 08:55:58 +01:00
Siva Durga Prasad Paladugu f20b37f353 ARM: zynq: provide config option to select emio
Dont send always emio value as zero for zynq_gem_initialize
send it based on config.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-26 08:55:58 +01:00
Michal Simek dd1c351ffe ARM: zynq: Group ethernet configuration options together
No functional chagnes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-26 08:55:58 +01:00
Michal Simek e9d69c1c71 ARM: zynq: Use CMD_FS_GENERIC
Based on:
"am335x_evm: Enable CMD_EXT4 and CMD_FS_GENERIC, add bootpart to env"
(sha1: 73a27a84e5)

Fix filesystem specific commands for loading.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-26 08:55:58 +01:00
Michal Simek 5a82d53c78 ARM: zynq: Show board information by default
Show board information in bootlog and enable it by default.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-26 08:55:57 +01:00
Michal Simek c8eac66bae ARM: zynq: List qspi, smc and nand baseaddresses
Add missing addresses to the list.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-26 08:55:57 +01:00
Michal Simek 63e3cea515 ARM: zynq: List nand, qspi and jtag boot modes
Use full boot mode list in SPL.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-26 08:55:57 +01:00
Siva Durga Prasad Paladugu f60c6fbbc6 ARM: zynq: slcr: Dont modify the reserved bits
Set only the 0-3 bits of the FPGA_RST_CTRL register
as other bits should not be set to 1.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-26 08:55:57 +01:00
Michal Simek 3ad87ca182 ARM: zynq: ddrc: Setup half of memory only for ECC case
Setup half of memory from ram_size for ECC case.
All the time the same board can be configured
with or without ECC. Based on ECC case detection
use half of memory with the same configuration.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-26 08:55:57 +01:00
Michal Simek 555c7c066f ARM: zynq: Remove empty line
Trivial patch.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-26 08:55:57 +01:00
Michal Simek c08cfc2d2c ARM: zynq: Enable the Neon instructions
Added the lowlevel_init to enable the Neon instructions.

Initially the u-boot was causing undefined instruction
exception if loaded through tcl, and working fine if loaded
through FSBL. The exception was causing in convertion formula
of given time to ticks. It was because, the Neon instructions
were disabled and hence causing the undefined exception. In
FSBL case, the FSBL was enabling the Neon instructions. Hence,
added the lowlevel_init to enable the Neon instructions.

Also enable neon instructions for non-xilinx toolchain.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Acked-by: Radhey Shyam Pandey <radheys@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-26 08:55:31 +01:00
Tom Rini 03cae7261e Merge branch 'master' of git://git.denx.de/u-boot-marvell 2015-01-25 19:05:40 -05:00
Gerald Kerma 361b3d8613 marvell: kirkwood: guruplug refresh for newer kernel
Refresh for newer kernel.
Prepare ENV settings for sheevaplugs to be OpenWRT ready.

    +----------+
    | UBOOT    | >> 896 Kb (7x128)  = uboot
    +----------+
    | ENV      | >> 128 Kb          = uboot_env
    +----------+
    | ROOT(FS) | >> 511 Mb @ 1 Mb   = root -> rootfs (ubifs)
    +----------+

With (CC) TRUNK OpenWRT build (QUICK HOWTO) :

    <INTERRUPT>
    Marvell>> nand erase.part root
    Marvell>> ubi part root
    Marvell>> ubi remove rootfs
    Marvell>> ubi create rootfs
    Marvell>> usb reset
    Marvell>> fatload usb 2:1 0x800000 guruplug/openwrt/openwrt-kirkwood-guruplug-rootfs.ubifs
    Marvell>> ubi write 0x800000 rootfs ${filesize}
    Marvell>> reset

Changes in v1:
- ADD generic board define
- ADD FDT support
- ADD HUSH interpreter
- Define new NAND partition mapping

Signed-off-by: Gerald Kerma <dreagle@doukki.net>
2015-01-26 00:25:29 +01:00
Luka Perkov d4d8f1b726 kirkwood: sheevaplug: add CONFIG_SYS_GENERIC_BOARD define
Signed-off-by: Luka Perkov <luka@openwrt.org>
Acked-by: Stefan Roese <sr@denx.de>
CC: Prafulla Wadaskar <prafulla@marvell.com>
2015-01-25 23:56:16 +01:00
Luka Perkov 604a0dd64e kirkwood: pogo_e02: add CONFIG_SYS_GENERIC_BOARD define
Signed-off-by: Luka Perkov <luka@openwrt.org>
Acked-by: Stefan Roese <sr@denx.de>
CC: Prafulla Wadaskar <prafulla@marvell.com>
2015-01-25 23:56:16 +01:00
Luka Perkov 92ca8bda41 kirkwood: iconnect: add CONFIG_SYS_GENERIC_BOARD define
Signed-off-by: Luka Perkov <luka@openwrt.org>
Acked-by: Stefan Roese <sr@denx.de>
CC: Prafulla Wadaskar <prafulla@marvell.com>
2015-01-25 23:56:16 +01:00
Luka Perkov 15155b49ad kirkwood: goflexhome: add CONFIG_SYS_GENERIC_BOARD define
Signed-off-by: Luka Perkov <luka@openwrt.org>
Acked-by: Stefan Roese <sr@denx.de>
CC: Prafulla Wadaskar <prafulla@marvell.com>
2015-01-25 23:56:16 +01:00
Luka Perkov 6054b153a5 kirkwood: dockstar: add CONFIG_SYS_GENERIC_BOARD define
Signed-off-by: Luka Perkov <luka@openwrt.org>
Acked-by: Stefan Roese <sr@denx.de>
CC: Prafulla Wadaskar <prafulla@marvell.com>
2015-01-25 23:56:16 +01:00
Luka Perkov c147ff9df1 kirkwood: ib62x0: add CONFIG_SYS_GENERIC_BOARD define
Signed-off-by: Luka Perkov <luka@openwrt.org>
Acked-by: Stefan Roese <sr@denx.de>
CC: Prafulla Wadaskar <prafulla@marvell.com>
2015-01-25 23:56:16 +01:00
Luka Perkov 62d1e990d9 ARM: kirkwood: fix cpu info for 6282 device id
Signed-off-by: Luka Perkov <luka@openwrt.org>
Acked-By: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Stefan Roese <sr@denx.de>
2015-01-25 23:56:15 +01:00
Luka Perkov 5aa2297da7 kirkwood: define empty CONFIG_MVGBE_PORTS by default
Each board with defines it's own set of values. If we do not define
CONFIG_MVGBE_PORTS we will hit following error:

mvgbe.c: In function 'mvgbe_initialize':
mvgbe.c:700:34: error: 'CONFIG_MVGBE_PORTS' undeclared (first use in this function)
  u8 used_ports[MAX_MVGBE_DEVS] = CONFIG_MVGBE_PORTS;

This patch fixes above described problem.

Signed-off-by: Luka Perkov <luka@openwrt.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
2015-01-25 23:56:15 +01:00
Luka Perkov 49413ea3f5 cosmetic: kirkwood: style fixes in kwbimage.cfg files
When diffing through the changes only the relevant changes
should be displayed.

Signed-off-by: Luka Perkov <luka@openwrt.org>
Acked-by: Stefan Roese <sr@denx.de>
2015-01-25 23:56:09 +01:00
tang yuantian 41ba57d0c7 fsl/ls1021qds: Add deep sleep support
Add deep sleep support on Freescale LS1021QDS platform.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
[York Sun: Fix conflict in fdt.c]
Reviewed-by: York Sun <yorksun@freescale.com>
2015-01-24 09:12:32 -06:00
Simon Glass e43ade3749 x86: config: chromebook_link: Enable environment
Enable an environment area.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-01-24 06:13:46 -07:00
Simon Glass 380ab5cc27 x86: ivybridge: Drop the Kconfig MRC cache information
This is now stored in the device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-24 06:13:46 -07:00
Simon Glass 069f5481ba x86: config: Enable hook for saving MRC configuration
Add a hook to ensure that this information is saved.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-01-24 06:13:45 -07:00