oweals/u-boot.git
7 years agonds32: Support AG101P serial DM.
rick [Mon, 17 Apr 2017 06:41:58 +0000 (14:41 +0800)]
nds32: Support AG101P serial DM.

Support AG101P serial device tree flow.

Signed-off-by: rick <rick@andestech.com>
7 years agoARM: rmobile: salvator-x: Add R8A7796 support
Marek Vasut [Sat, 13 May 2017 13:57:53 +0000 (15:57 +0200)]
ARM: rmobile: salvator-x: Add R8A7796 support

Add minor ifdeffery and default board config for the Salvator-XS board
with R8A7796 M3 SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: salvator-x: Rename the defconfig to match the SoC
Marek Vasut [Sat, 13 May 2017 13:57:52 +0000 (15:57 +0200)]
ARM: rmobile: salvator-x: Rename the defconfig to match the SoC

Rename the salvator-x_defconfig to r8a7795_salvator-x_defconfig in
preparation for the r8a7796 support on salvator-x board.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: salvator-x: Enable SCIF2 clock
Marek Vasut [Sat, 13 May 2017 13:57:51 +0000 (15:57 +0200)]
ARM: rmobile: salvator-x: Enable SCIF2 clock

There are two UARTs on the board, so enable the clock for the
second one as well.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: salvator-x: Count all DRAM in all slots
Marek Vasut [Sat, 13 May 2017 13:57:50 +0000 (15:57 +0200)]
ARM: rmobile: salvator-x: Count all DRAM in all slots

Instead of counting only the DRAM in the first slot, count
all the DRAM in all slots and report it accordingly.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: salvator-x: Add USB support
Marek Vasut [Sat, 13 May 2017 13:57:49 +0000 (15:57 +0200)]
ARM: rmobile: salvator-x: Add USB support

Add support for the EHCI USB.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: salvator-x: Add DVFS and PMIC support
Marek Vasut [Sat, 13 May 2017 13:57:48 +0000 (15:57 +0200)]
ARM: rmobile: salvator-x: Add DVFS and PMIC support

Add support for rebooting the board using the ROHM BD9571MWV I2C PMIC,
but keep the CPU reboot option as a fallback.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: salvator-x: Add RAVB ethernet support
Marek Vasut [Sat, 13 May 2017 13:57:47 +0000 (15:57 +0200)]
ARM: rmobile: salvator-x: Add RAVB ethernet support

Add support for the AVB ethernet on the Salvator-X board.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: salvator-x: Add SD support
Marek Vasut [Sat, 13 May 2017 13:57:46 +0000 (15:57 +0200)]
ARM: rmobile: salvator-x: Add SD support

Add support for the SD card slots on the Salvator-X board.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: salvator-x: Adjust UART clock
Marek Vasut [Sat, 13 May 2017 13:57:45 +0000 (15:57 +0200)]
ARM: rmobile: salvator-x: Adjust UART clock

The UART uses internal SCIF clock except on R8A7795 H3 WS1.0 .
Use the internal clock and ignore the early version of the chip.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: salvator-x: Zap redefined DECLARE_GLOBAL_DATA_PTR
Marek Vasut [Sat, 13 May 2017 13:57:44 +0000 (15:57 +0200)]
ARM: rmobile: salvator-x: Zap redefined DECLARE_GLOBAL_DATA_PTR

The macro is used twice in the salvator-x board file, drop one.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: salvator-x: Set default device tree
Marek Vasut [Sat, 13 May 2017 13:57:43 +0000 (15:57 +0200)]
ARM: rmobile: salvator-x: Set default device tree

Set default device tree file in the salvator-x_defconfig
and use it in the environment.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: salvator-x: Move OF_LIBFDT and CMD_FDT to board config
Marek Vasut [Sat, 13 May 2017 13:57:42 +0000 (15:57 +0200)]
ARM: rmobile: salvator-x: Move OF_LIBFDT and CMD_FDT to board config

Move these two Kconfig symbols to the salvator-x_defconfig.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: salvator-x: Use BIT() macro in board file
Marek Vasut [Sat, 13 May 2017 13:57:41 +0000 (15:57 +0200)]
ARM: rmobile: salvator-x: Use BIT() macro in board file

Cosmetic change, replace (1 << (n)) with BIT(n) .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Allow R8A7796 Salvator-X configuration
Marek Vasut [Sat, 13 May 2017 13:57:40 +0000 (15:57 +0200)]
ARM: rmobile: Allow R8A7796 Salvator-X configuration

The Salvator-X can have both H3 and M3 CPU on it, drop the
select R8A7795 to allow both configurations.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Add R8A7796 support
Marek Vasut [Sat, 13 May 2017 13:57:39 +0000 (15:57 +0200)]
ARM: rmobile: Add R8A7796 support

Add Kconfig entry for the R8A7796 RCar M3 SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Handle R8A7796 r1.1 in the PRR code
Marek Vasut [Sat, 13 May 2017 13:57:38 +0000 (15:57 +0200)]
ARM: rmobile: Handle R8A7796 r1.1 in the PRR code

The R8A7796 r1.1 reports itself as r2.0 , add quirk into the
PRR code to fix this report.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Add R8A7796 into the CPU table
Marek Vasut [Sat, 13 May 2017 13:57:37 +0000 (15:57 +0200)]
ARM: rmobile: Add R8A7796 into the CPU table

Add entry for the R8A7796 RCar M3 SoC into the CPU info table.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Add R8A7795 into the CPU table
Marek Vasut [Sat, 13 May 2017 13:57:36 +0000 (15:57 +0200)]
ARM: rmobile: Add R8A7795 into the CPU table

Add entry for the R8A7795 RCar H3 SoC into the CPU info table.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Make the Gen3 SoC configurable
Marek Vasut [Sat, 13 May 2017 13:57:35 +0000 (15:57 +0200)]
ARM: rmobile: Make the Gen3 SoC configurable

Allow selecting the Gen3 SoC in preparation for RCar M3 .
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Update link address to match latest BL2
Marek Vasut [Sat, 13 May 2017 13:57:34 +0000 (15:57 +0200)]
ARM: rmobile: Update link address to match latest BL2

Update the CONFIG_SYS_TEXT_BASE to match BL2 Rev.1.0.9 and newer,
which loads the U-Boot to 0x50000000 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Zap RCAR_GEN3_EXTRAM_BOOT
Marek Vasut [Sat, 13 May 2017 13:57:33 +0000 (15:57 +0200)]
ARM: rmobile: Zap RCAR_GEN3_EXTRAM_BOOT

This Kconfig option is not used on any board, so drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Import R8A7796 PFC and GPIO tables
Marek Vasut [Sat, 13 May 2017 13:57:32 +0000 (15:57 +0200)]
ARM: rmobile: Import R8A7796 PFC and GPIO tables

Import the R8A7796 PFC and GPIO tables from the latest 3.5.3 release
from Renesas .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Update R8A7795 PFC and GPIO tables
Marek Vasut [Sat, 13 May 2017 13:57:31 +0000 (15:57 +0200)]
ARM: rmobile: Update R8A7795 PFC and GPIO tables

Sync the PFC and GPIO tables with the latest 3.5.3 release from
Renesas . This adds ES2.0 support.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoserial: sh: Add r8a7796 support
Hiroyuki Yokoyama [Sat, 13 May 2017 13:55:26 +0000 (15:55 +0200)]
serial: sh: Add r8a7796 support

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agonet: ravb: Add Renesas Ethernet RAVB driver
Marek Vasut [Sat, 13 May 2017 13:54:28 +0000 (15:54 +0200)]
net: ravb: Add Renesas Ethernet RAVB driver

Add driver for the Renesas Ethernet AVB block found in RCar H3/M3.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Based on work of:
Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Takeshi Kihara <takeshi.kihara.df@renesas.com>
Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>

7 years agogpio: rcar_gen3: Fix GPIO read support
Kouei Abe [Sat, 13 May 2017 13:48:04 +0000 (15:48 +0200)]
gpio: rcar_gen3: Fix GPIO read support

This patch fixes to read the GPIO status after confirming the
INOUT setting.

Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com>
Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Tom Rini <trini@konsulko.com>
7 years agonet: usb: mcs7830: fix non-DM ingress path
Uri Mashiach [Sun, 21 May 2017 14:00:52 +0000 (17:00 +0300)]
net: usb: mcs7830: fix non-DM ingress path

The mcs7830_recv() (non-DM) function discards good packets and tries to
process "bad" packets due to incorrect test condition.
Fix the condition and return the proper value as described in function
doc.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
7 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Thu, 18 May 2017 21:17:45 +0000 (17:17 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

7 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Thu, 18 May 2017 21:17:42 +0000 (17:17 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

7 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Thu, 18 May 2017 21:17:39 +0000 (17:17 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

7 years agoARM: dts: am335x-evm: disable mmc3
Jean-Jacques Hiblot [Wed, 17 May 2017 19:22:55 +0000 (21:22 +0200)]
ARM: dts: am335x-evm: disable mmc3

SDIO is not supported in u-boot, there is no point in enabling mmc3.
For this purpose, add u-boot specific dtsi that this will be included
automatically while building the dtb.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoscripts/Makefile.lib: Always have ...-u-boot.dtsi be able to override
Tom Rini [Wed, 17 May 2017 18:06:08 +0000 (14:06 -0400)]
scripts/Makefile.lib: Always have ...-u-boot.dtsi be able to override

The intention of having a -u-boot.dtsi file is to be able to make
changes to the provided upstream dts files as well as to be able to add
nodes.  Change the logic for adding the file from making it the last
included file at the top of the dts to being included at the end of the
file.

Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-imx
Stefano Babic [Thu, 18 May 2017 09:53:27 +0000 (11:53 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-imx

Signed-off-by: Stefano Babic <sbabic@denx.de>
7 years agoarm: socfpga: Enable build for Arria 10
Ley Foon Tan [Tue, 25 Apr 2017 18:44:48 +0000 (02:44 +0800)]
arm: socfpga: Enable build for Arria 10

Update Kconfig and Makefile to enable Arria 10.
Clean up Makefile and sorting *.o alphanumerically.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: socfpga: Add board files for the Arria10
Ley Foon Tan [Tue, 25 Apr 2017 18:44:47 +0000 (02:44 +0800)]
arm: socfpga: Add board files for the Arria10

Add support for the Arria10 SoCDK.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: socfpga: Add config and defconfig for Arria 10
Ley Foon Tan [Tue, 25 Apr 2017 18:44:46 +0000 (02:44 +0800)]
arm: socfpga: Add config and defconfig for Arria 10

Add config and defconfig for the Arria10 and update socfpga_common.h.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: socfpga: Add SPL support for Arria 10
Ley Foon Tan [Tue, 25 Apr 2017 18:44:45 +0000 (02:44 +0800)]
arm: socfpga: Add SPL support for Arria 10

Add SPL support for Arria 10.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: dts: Add dts and dtsi for Arria 10
Ley Foon Tan [Tue, 25 Apr 2017 18:44:44 +0000 (02:44 +0800)]
arm: dts: Add dts and dtsi for Arria 10

Device tree files for Arria 10

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: socfpga: Add misc support for Arria 10
Ley Foon Tan [Tue, 25 Apr 2017 18:44:43 +0000 (02:44 +0800)]
arm: socfpga: Add misc support for Arria 10

Add misc support for Arria 10.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: socfpga: Add pinmux for Arria 10
Ley Foon Tan [Tue, 25 Apr 2017 18:44:42 +0000 (02:44 +0800)]
arm: socfpga: Add pinmux for Arria 10

Add pinmux support for Arria 10.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: socfpga: Add sdram header file for Arria 10
Ley Foon Tan [Tue, 25 Apr 2017 18:44:41 +0000 (02:44 +0800)]
arm: socfpga: Add sdram header file for Arria 10

Add sdram header file for Arria 10.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: socfpga: Add system manager for Arria 10
Ley Foon Tan [Tue, 25 Apr 2017 18:44:40 +0000 (02:44 +0800)]
arm: socfpga: Add system manager for Arria 10

Add system manager register struct and macros for Arria 10.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: socfpga: Add clock driver for Arria 10
Ley Foon Tan [Tue, 25 Apr 2017 18:44:39 +0000 (02:44 +0800)]
arm: socfpga: Add clock driver for Arria 10

Add clock driver support for Arria 10.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: socfpga: Add reset driver support for Arria 10
Ley Foon Tan [Tue, 25 Apr 2017 18:44:38 +0000 (02:44 +0800)]
arm: socfpga: Add reset driver support for Arria 10

Add reset driver support for Arria 10.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: socfpga: Add A10 macros
Ley Foon Tan [Tue, 25 Apr 2017 18:44:37 +0000 (02:44 +0800)]
arm: socfpga: Add A10 macros

Add i2c, timer and other A10 macros.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: socfpga: Restructure misc driver
Ley Foon Tan [Tue, 25 Apr 2017 18:44:36 +0000 (02:44 +0800)]
arm: socfpga: Restructure misc driver

Restructure misc driver in the preparation to support A10.
Move the Gen5 specific code to gen5 file.

Change all uint32_t_to u32.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: socfpga: Restructure system manager
Ley Foon Tan [Tue, 25 Apr 2017 18:44:35 +0000 (02:44 +0800)]
arm: socfpga: Restructure system manager

Restructure system manager in the preparation to support A10.
No functional change.

Change uint32_t to u32.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: socfpga: Restructure reset manager driver
Ley Foon Tan [Tue, 25 Apr 2017 18:44:34 +0000 (02:44 +0800)]
arm: socfpga: Restructure reset manager driver

Restructure reset manager driver in the preparation to support A10.
Move the Gen5 specific code to gen5 files.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agoarm: socfpga: Restructure clock manager driver
Ley Foon Tan [Tue, 25 Apr 2017 18:44:33 +0000 (02:44 +0800)]
arm: socfpga: Restructure clock manager driver

Restructure clock manager driver in the preparation to support A10.
Move the Gen5 specific code to _gen5 files.

- Change all uint32_t to u32 and change to use macro BIT(n) for bit shift.
- Check return value from wait_for_bit(). So change return type to int for
  cm_write_with_phase() and cm_basic_init().

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
7 years agousb: lpc32xx: add i2c DM support
Liam Beguin [Wed, 17 May 2017 17:01:15 +0000 (13:01 -0400)]
usb: lpc32xx: add i2c DM support

Add DM support for i2c functions.

Signed-off-by: Liam Beguin <lbeguin@tycoint.com>
Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agopinctrl: imx: fix memory leak
Peng Fan [Thu, 11 May 2017 09:34:14 +0000 (17:34 +0800)]
pinctrl: imx: fix memory leak

Each time set_state is called, a new piece memory will
be allocated for pin_data, but not freed, this will
incur memory leak.

When error, the devm API could not free memory automatically.
So need call devm_kfree when error.

Issue reported by Coverity

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefan Agner <stefan.agner@toradex.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agoimx: mx7dsabresd: fix secure config after switching to DM
Stefano Babic [Thu, 18 May 2017 08:37:01 +0000 (10:37 +0200)]
imx: mx7dsabresd: fix secure config after switching to DM

mx7dsabresd_secure_defconfig was not updated after moving to DM.

Signed-off-by: Stefano Babic <sbabic@denx.de>
7 years agoimx: mx7dsabresd: switch to DM USB
Peng Fan [Thu, 13 Apr 2017 06:09:59 +0000 (14:09 +0800)]
imx: mx7dsabresd: switch to DM USB

Switch to use DM USB.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoimx: mx7dsabresd: reset ENET_RST_B
Peng Fan [Thu, 13 Apr 2017 06:09:58 +0000 (14:09 +0800)]
imx: mx7dsabresd: reset ENET_RST_B

Reset ENET_RST_B to make ENET function stable.
Since DM_GPIO enabled, we use "gpio_spi@0_5" which corresponds
to ENET_RST_B.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agoimx: mx7dsabresd: enable more DM drivers
Peng Fan [Thu, 13 Apr 2017 06:09:57 +0000 (14:09 +0800)]
imx: mx7dsabresd: enable more DM drivers

Enable more DM drivers. The imx I2C/MMC DM drivers needs DM_GPIO
enabled. The 74x164 drivers needs SOFT_SPI and DM_GPIO enabled.
So needs to enable them together.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agogpio: 74x164: make oe-pins optional
Peng Fan [Thu, 13 Apr 2017 06:09:56 +0000 (14:09 +0800)]
gpio: 74x164: make oe-pins optional

Make oe-pins optional because some boards have fixed it to enable.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agospi: kconfig: add soft spi Kconfig entry
Peng Fan [Thu, 13 Apr 2017 06:09:55 +0000 (14:09 +0800)]
spi: kconfig: add soft spi Kconfig entry

Add the Kconfig entry for SOFT_SPI which uses gpio to simulate the
SPI signals. We use it for accessing 74x164 on some i.MX boards.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Jagan Teki <jagan@openedev.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agoarm: dts: imx7d-sdb: add usdhc support
Peng Fan [Thu, 13 Apr 2017 06:09:54 +0000 (14:09 +0800)]
arm: dts: imx7d-sdb: add usdhc support

Add usdhc support

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoarm: dts: imx7d-sdb: add i2c support
Peng Fan [Thu, 13 Apr 2017 06:09:53 +0000 (14:09 +0800)]
arm: dts: imx7d-sdb: add i2c support

Add i2c support.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agoarm: dts: imx7d-sdb: add regulator node for usb and mmc
Peng Fan [Thu, 13 Apr 2017 06:09:52 +0000 (14:09 +0800)]
arm: dts: imx7d-sdb: add regulator node for usb and mmc

Add regulator node for usb and mmc.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agoarm: dts: imx7d-sdb: add spi gpio node
Peng Fan [Thu, 13 Apr 2017 06:09:51 +0000 (14:09 +0800)]
arm: dts: imx7d-sdb: add spi gpio node

Add spi gpio node for 74LV595.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agoarm: dts: imx7d-sdb add basic dts
Peng Fan [Thu, 13 Apr 2017 06:09:50 +0000 (14:09 +0800)]
arm: dts: imx7d-sdb add basic dts

Add basic dts for i.MX7D-SDB board.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agoarm: dts: imx7: sync with Linux
Peng Fan [Thu, 13 Apr 2017 06:09:49 +0000 (14:09 +0800)]
arm: dts: imx7: sync with Linux

Sync with Linux commit 308ac756("Merge tag 'gpio-v4.11-3'").

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefan Agner <stefan.agner@toradex.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
7 years agoimx: ventana: update imx wdog external reset dt property
Tim Harvey [Mon, 15 May 2017 17:05:07 +0000 (10:05 -0700)]
imx: ventana: update imx wdog external reset dt property

Early backports of the imx wdog external reset feature occured before the
property was accepted upstream and used 'ext-reset-output' instead of
'fsl,ext-reset-output'. In order to support older kernels remove both
properties.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
7 years agoimx: ventana: fix GW520x external watchdog dt update
Tim Harvey [Mon, 15 May 2017 17:05:06 +0000 (10:05 -0700)]
imx: ventana: fix GW520x external watchdog dt update

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
7 years agomx6sabresd: Remove non-SPL targets
Fabio Estevam [Sun, 14 May 2017 23:00:24 +0000 (20:00 -0300)]
mx6sabresd: Remove non-SPL targets

Now that mx6sabresd_spl_defconfig can be used to boot all
mx6sabresd variants, the non-SPL targets can be safely removed.

Signed-off-by: Fabio Estevam <fabio.estvam@nxp.com>
7 years agomx6sabresd: Add SPL support for the mx6dl variant
Fabio Estevam [Fri, 12 May 2017 15:45:24 +0000 (12:45 -0300)]
mx6sabresd: Add SPL support for the mx6dl variant

Add support for the mx6dlsabresd board in SPL.

Retrieved the DCD table from:
board/freescale/mx6sabresd/mx6dlsabresd.cfg
(NXP U-Boot branch imx_v2015.04_4.1.15_1.0.0_ga)

Flashed SPL and u-boot.img to an SD card and could successfully boot it
on mx6q, mx6qp and mx6dl sabresd boards.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agomx6sabresd: Prepare for supporting MX6DL
Fabio Estevam [Fri, 12 May 2017 15:45:23 +0000 (12:45 -0300)]
mx6sabresd: Prepare for supporting MX6DL

Currently only MX6Q/QP sabresd boards are supported in SPL.

In order to also support MX6DL we need to convert to using
IOMUX_PADS and SETUP_IOMUX_PADS macros.

Other than that move the <asm/arch/mx6-ddr.h> header inclusion to the
SPL code block in order to avoid build error.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agoengicam: common: Move board_late_init
Jagan Teki [Sat, 6 May 2017 21:13:15 +0000 (02:43 +0530)]
engicam: common: Move board_late_init

Move board_late_init into common area from supported boards.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoengicam: common: Move common board code
Jagan Teki [Sat, 6 May 2017 21:13:14 +0000 (02:43 +0530)]
engicam: common: Move common board code

Move possible common board code into common area
from supported boards.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agogeam6/isiot: Move the spl code common
Jagan Teki [Sat, 6 May 2017 21:13:13 +0000 (02:43 +0530)]
geam6/isiot: Move the spl code common

SPL code for geam6 and isiot are same, so
move them in common area.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoicorem6[_rqs]: Move the spl code common
Jagan Teki [Sat, 6 May 2017 21:13:12 +0000 (02:43 +0530)]
icorem6[_rqs]: Move the spl code common

SPL code for icorem6 and icorem6_rqs are same, so
move them in common area.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoi.MX6UL: isiot: Add SETUP_IOMUX_PADS
Jagan Teki [Sat, 6 May 2017 21:13:11 +0000 (02:43 +0530)]
i.MX6UL: isiot: Add SETUP_IOMUX_PADS

Add generic SETUP_IOMUX_PADS function, for imx6ul mux pads
and use them in Is.IoT board.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoisiot: Fix to use usdhc2_pads for mmc2
Jagan Teki [Sat, 6 May 2017 21:13:10 +0000 (02:43 +0530)]
isiot: Fix to use usdhc2_pads for mmc2

mmc2 in Is.IoT using usdhc1_pads instead usdhc2_pads,
so update the same.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoi.MX6UL: geam6ul: Add SETUP_IOMUX_PADS
Jagan Teki [Sat, 6 May 2017 21:13:09 +0000 (02:43 +0530)]
i.MX6UL: geam6ul: Add SETUP_IOMUX_PADS

Add generic SETUP_IOMUX_PADS function, for imx6ul mux pads.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoicorem6: Use drive strength macros
Jagan Teki [Sat, 6 May 2017 21:13:08 +0000 (02:43 +0530)]
icorem6: Use drive strength macros

Use driver strength macros instead of hex numbers.
- IMX6DQ_DRIVE_STRENGTH - 0x30
- IMX6SDL_DRIVE_STRENGTH - 0x28

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoicorem6: Use proper iomux_ddr_regs drive strength values
Jagan Teki [Sat, 6 May 2017 21:13:07 +0000 (02:43 +0530)]
icorem6: Use proper iomux_ddr_regs drive strength values

Usually the drive strength values for DQ and SDL are 0x30 and
0x28 respectively, update them accordingly.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoengicam: Move uart mux init to SPL
Jagan Teki [Sat, 6 May 2017 21:13:06 +0000 (02:43 +0530)]
engicam: Move uart mux init to SPL

Since, u-boot handle fdt through uart so move the UART code
to SPL instead make it to global area.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoicorem6: Make SPL to pick suitable fdt
Jagan Teki [Sat, 6 May 2017 21:13:05 +0000 (02:43 +0530)]
icorem6: Make SPL to pick suitable fdt

SPL FIT is able to pick the suitable fdt file for u-boot,
so add that function through board_fit_config_name_match.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoengicam: Set fdt_file env during run-time
Jagan Teki [Sat, 6 May 2017 21:13:04 +0000 (02:43 +0530)]
engicam: Set fdt_file env during run-time

Set fdt_file env variable during board_late_init

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agogeam6ul: Add mmc_late_init
Jagan Teki [Sat, 6 May 2017 21:13:03 +0000 (02:43 +0530)]
geam6ul: Add mmc_late_init

Let the runtime code can set the mmcdev and mmcroot based
on the devno using mmc_get_env_dev instead of defining
separately in build-time configs using mmc_late_init func.

Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agogeam6ul: Add modeboot env via board_late_init
Jagan Teki [Sat, 6 May 2017 21:13:02 +0000 (02:43 +0530)]
geam6ul: Add modeboot env via board_late_init

Add runtime, modeboot env which is setting mmcboot, or
nandboot based on the bootdevice so-that conditional
macros b/w MMC and NAND for CONFIG_BOOTCOMMAND should
be avoided in config files.

Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoicorem6: Add mmc_late_init
Jagan Teki [Sat, 6 May 2017 21:13:01 +0000 (02:43 +0530)]
icorem6: Add mmc_late_init

Let the runtime code can set the mmcdev and mmcroot based
on the devno using mmc_get_env_dev instead of defining
separately in build-time configs using mmc_late_init func.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoicorem6: Add modeboot env via board_late_init
Jagan Teki [Sat, 6 May 2017 21:13:00 +0000 (02:43 +0530)]
icorem6: Add modeboot env via board_late_init

Add runtime, modeboot env which is setting mmcboot, or
nandboot based on the bootdevice so-that conditional
macros b/w MMC and NAND for CONFIG_BOOTCOMMAND should
be avoided in config files.

Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoimx-common: rdc-sema: correct return value
Peng Fan [Fri, 21 Apr 2017 08:56:50 +0000 (16:56 +0800)]
imx-common: rdc-sema: correct return value

When unlock, if caller is not the sema owner,
return -EACCES, not 1.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agothermal: imx: fix calculation
Peng Fan [Tue, 18 Apr 2017 12:41:53 +0000 (20:41 +0800)]
thermal: imx: fix calculation

Fix calculation. do_div can not handle negative values.
Use div_s64_rem to handle the calculation.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agoimx: thermal: update imx6 thermal driver according new equation
Peng Fan [Tue, 18 Apr 2017 12:41:52 +0000 (20:41 +0800)]
imx: thermal: update imx6 thermal driver according new equation

>From IC guys:
"
After a thorough accuracy study of the Temp sense circuit,
we found that with our current equation, an average part can
read 7 degrees lower than a known forced temperature.
We also found out that the standard variance was around 2C;
which is the tightest distribution that we could create.
We need to change the temp sense equation to center the average
part around the target temperature.
"

New equation:
Tmeas = (Nmeas - n1) / slope + t1 + offset
n1= fused room count
t1= 25
offset=3.580661
slope= 0.4148468 – 0.0015423*n1

According the new equation, update the thermal driver.
c1 and c2 changed to u64 type and update comments.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agoimx-common: timer: clean up
Peng Fan [Wed, 19 Apr 2017 09:05:55 +0000 (17:05 +0800)]
imx-common: timer: clean up

Drop the unneeded code. lib/time.c use timebase_l/h.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
7 years agomx25pdk: Add fuse API support
Fabio Estevam [Mon, 17 Apr 2017 22:29:05 +0000 (19:29 -0300)]
mx25pdk: Add fuse API support

Select CONFIG_FSL_IIM and CONFIG_CMD_FUSE so that the fuse API can
be used.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agonet: fec_mxc: specify the registered eth index by dev_id
Andy Duan [Mon, 10 Apr 2017 11:44:35 +0000 (19:44 +0800)]
net: fec_mxc: specify the registered eth index by dev_id

Specify the registered eth index by dev_id.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
7 years agonet: fec_mxc: avoid transfer dev_id -1 to get mac address from fuse
Andy Duan [Mon, 10 Apr 2017 11:44:34 +0000 (19:44 +0800)]
net: fec_mxc: avoid transfer dev_id -1 to get mac address from fuse

Avoid transfer parameter dev_id value with "-1" to .fec_get_hwaddr(),
it should transfer fec->dev_id to get mac address from fuse.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Stefano Babic <sbabic@denx.de>
7 years agonet: fec: do not access reserved register for i.MX6ULL
Peng Fan [Mon, 10 Apr 2017 11:44:33 +0000 (19:44 +0800)]
net: fec: do not access reserved register for i.MX6ULL

The MIB RAM and FIFO receive start register does not exist on
i.MX6ULL. Accessing these register will cause enet not work well or
cause system report fault.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
7 years agoMerge git://git.denx.de/u-boot-uniphier
Tom Rini [Wed, 17 May 2017 18:13:58 +0000 (14:13 -0400)]
Merge git://git.denx.de/u-boot-uniphier

- Add workaround code to make LD20 SoC boot from ARM Trusted Firmware
- Sync DT with Linux to fix DTC warnings
- Add new SoC support code
- Misc fix, updates

7 years agoMerge git://git.denx.de/u-boot-x86
Tom Rini [Wed, 17 May 2017 18:13:16 +0000 (14:13 -0400)]
Merge git://git.denx.de/u-boot-x86

7 years agosunxi: Move maintainership for Pine64
Andre Przywara [Wed, 26 Apr 2017 00:32:52 +0000 (01:32 +0100)]
sunxi: Move maintainership for Pine64

After speaking to Hans at FOSDEM, he is fine with transferring the
maintainership of the Pine64 boards over to me.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: update Pine64 README
Andre Przywara [Wed, 26 Apr 2017 00:32:51 +0000 (01:32 +0100)]
sunxi: update Pine64 README

With the DRAM init code and the SPL's ability to load the ATF binary as
well, we can now officially get rid of the boot0 boot method, which
involed a closed-source proprietary blob to be used.
Rework the Pine64 README file to document how to build the firmware.
Also since these instructions now cover more boards, rename the
file to README.sunxi64 to reflect this.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: use SPL header DT name for FIT board matching
Andre Przywara [Wed, 26 Apr 2017 00:32:50 +0000 (01:32 +0100)]
sunxi: use SPL header DT name for FIT board matching

Now that we can store a DT name in the SPL header, use this string (if
available) when finding the right DT blob to load for U-Boot proper.
This allows a generic U-Boot (proper) image to be combined with a bunch
of supported DTs, with just the SPL (possibly only that string) to be
different.
Eventually this string can be written after the build process by some
firmware update tool.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: Store the device tree name in the SPL header
Siarhei Siamashka [Wed, 26 Apr 2017 00:32:49 +0000 (01:32 +0100)]
sunxi: Store the device tree name in the SPL header

This patch updates the mksunxiboot tool to optionally add
the default device tree name string to the SPL header. This
information can be used by the firmware upgrade tools to
protect users from harming themselves by trying to upgrade
to an incompatible bootloader.

The primary use case here is a non-removable bootable media
(such as NAND, eMMC or SPI flash), which already may have
a properly working, but a little bit outdated bootloader
installed. For example, the user may download or build a
new U-Boot image for "Cubieboard", and then attemept to
install it on a "Cubieboard2" hardware by mistake as a
replacement for the already existing bootloader. If this
happens, the flash programming tool can identify this
problem and warn the user.

The size of the SPL header is also increased from 64 bytes
to 96 bytes to provide enough space for the device tree name
string.
[Andre: split patch to remove OF_LIST hash feature]

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
7 years agosunxi: enable automatic FIT build for 64-bit SoCs
Andre Przywara [Wed, 26 Apr 2017 00:32:48 +0000 (01:32 +0100)]
sunxi: enable automatic FIT build for 64-bit SoCs

The Allwinner SoCs with 64-bit cores use an ARM Trusted Firmware binary,
which needs to be loaded alongside U-Boot proper.
Set the respective Kconfig options to let them select this feature and
also automatically build the FIT image.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
[Rename Kconfig path to arch/arm/mach-sunxi/Kconfig]
Signed-off-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>