platform/kernel/u-boot.git
7 years agoKconfig: Disable non-FIT SPL loading for TI secure devices
Andrew F. Davis [Thu, 16 Feb 2017 17:18:40 +0000 (11:18 -0600)]
Kconfig: Disable non-FIT SPL loading for TI secure devices

Non-FIT SPL image loading support should be disabled for TI secure
devices as the image handlers for those image types do not follow
our secure boot flow.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agospl: Add option to enable SPL Legacy image support
Andrew F. Davis [Thu, 16 Feb 2017 17:18:39 +0000 (11:18 -0600)]
spl: Add option to enable SPL Legacy image support

Add a Kconfig option that enables Legacy image support, this allows
boards to explicitly disable this, for instance when needed for
security reasons.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
[trini: Move to common/spl/Kconfig]
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agospl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option
Andrew F. Davis [Thu, 16 Feb 2017 17:18:38 +0000 (11:18 -0600)]
spl: Convert CONFIG_SPL_ABORT_ON_RAW_IMAGE into a positive option

CONFIG_SPL_ABORT_ON_RAW_IMAGE causes SPL to abort and move on when it
encounters RAW images, express this same functionality as a positive
option enabling support for RAW images: CONFIG_SPL_RAW_IMAGE_SUPPORT

Also move uses of this to defconfigs.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Rework Kconfig logic a little, move to common/spl/Kconfig]
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Fri, 17 Mar 2017 13:11:12 +0000 (09:11 -0400)]
Merge git://git.denx.de/u-boot-rockchip

This includes support for rk3188 from Heiko Stübner and and rk3328 from
Kever Yang.  Also included is SPL support for rk3399 and a fix for
rk3288 to get it booting again (spl_early_init()).

7 years agoARM: DT: stm32f7: add qspi pin contol node
Vikas Manocha [Sun, 12 Feb 2017 18:25:53 +0000 (10:25 -0800)]
ARM: DT: stm32f7: add qspi pin contol node

It also removes the qspi pin configuration done during the
board initialization.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agoARM: DT: stm32f7: add ethernet pin contol node
Vikas Manocha [Sun, 12 Feb 2017 18:25:52 +0000 (10:25 -0800)]
ARM: DT: stm32f7: add ethernet pin contol node

It also removes the ethernet pin configuration done during the board
initialization.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agoARM: DT: stm32f7: add pin control node for serial port pins
Vikas Manocha [Sun, 12 Feb 2017 18:25:51 +0000 (10:25 -0800)]
ARM: DT: stm32f7: add pin control node for serial port pins

And remove the uart pin configuration from board initialization.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agoARM: DT: stm32f7: add pin control device node
Vikas Manocha [Sun, 12 Feb 2017 18:25:50 +0000 (10:25 -0800)]
ARM: DT: stm32f7: add pin control device node

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agoPINCTRL: stm32f7: add pin control driver
Vikas Manocha [Sun, 12 Feb 2017 18:25:49 +0000 (10:25 -0800)]
PINCTRL: stm32f7: add pin control driver

This driver uses the same pin control binding as that of linux, binding
document of this patch is copied from linux. One addition done is for
GPIO input and output mode configuration which was missing.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agostm32f7: clk: remove usart1 clock enable from board init
Vikas Manocha [Sun, 12 Feb 2017 18:25:48 +0000 (10:25 -0800)]
stm32f7: clk: remove usart1 clock enable from board init

Before clock driver availability it was required to enable usart1 clock
for serial init but now with clock driver is taking care of usart1 clock.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agoARM: DT: stm32f7: add usart1 & clock device tree nodes
Vikas Manocha [Sun, 12 Feb 2017 18:25:47 +0000 (10:25 -0800)]
ARM: DT: stm32f7: add usart1 & clock device tree nodes

Also created alias for usart1 and specified oscillator clock for stm32f7
discovery board.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agostm32f7: serial: use clock driver to enable clock
Vikas Manocha [Sun, 12 Feb 2017 18:25:46 +0000 (10:25 -0800)]
stm32f7: serial: use clock driver to enable clock

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoclk: stm32f7: add clock driver for stm32f7 family
Vikas Manocha [Sun, 12 Feb 2017 18:25:45 +0000 (10:25 -0800)]
clk: stm32f7: add clock driver for stm32f7 family

add basic clock driver support for stm32f7 to enable clocks required by
the peripherals.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoserial: stm32f7: add device tree support
Vikas Manocha [Sun, 12 Feb 2017 18:25:44 +0000 (10:25 -0800)]
serial: stm32f7: add device tree support

This patch adds device tree support for stm32f7 serial driver & removes serial
platform data structure.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm: use common instructions applicable to armv7m & other arm archs
Vikas Manocha [Fri, 5 Feb 2016 18:43:01 +0000 (10:43 -0800)]
arm: use common instructions applicable to armv7m & other arm archs

This patch cleans the code by using instructions allowed for armv7m as well as
other Arm archs.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
7 years agoarm: Update our 'ret' assembler macro slightly
Tom Rini [Thu, 2 Mar 2017 14:59:30 +0000 (09:59 -0500)]
arm: Update our 'ret' assembler macro slightly

We only support cores that do Thumb-1 or later.  So we add a comment to
explain this and remove the architecture test.

Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Mans Rullgard <mans@mansr.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agogpt: Fix uuid string format
Vincent Tinelli [Mon, 27 Feb 2017 14:11:15 +0000 (16:11 +0200)]
gpt: Fix uuid string format

Change GPT UUID string format from UUID to GUID per specification.

Signed-off-by: Vincent Tinelli <vincent.tinelli@intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agocmd: itest: correct calculus for long format
Sebastien Colleur [Fri, 10 Feb 2017 12:59:15 +0000 (15:59 +0300)]
cmd: itest: correct calculus for long format

itest shell command doesn't work correctly in long format when
doing comparaison due to wrong mask value calculus that overflow
on 32 bits values.

Signed-off-by: Sebastien Colleur <sebastienx.colleur@intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoconfigs: move CMD_MD5SUM definition to defconfigs
Andre Przywara [Wed, 15 Mar 2017 01:19:07 +0000 (01:19 +0000)]
configs: move CMD_MD5SUM definition to defconfigs

Boards with an apparent need for the md5sum command had the connected
config symbol defined in their board header file.
Move this over to the respective defconfig files now that md5sum is
configured via Kconfig.
(This is a manual effort, which differs from moveconfig.py, not sure
who is right here. Boards except sandbox loose the md5sum command with
moveconfig.py, though it was explicitly mentioned in their config.h's)

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: migrate stih410-b2260]
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoKconfig: define MD5 dependency for FIT support
Andre Przywara [Wed, 15 Mar 2017 01:19:06 +0000 (01:19 +0000)]
Kconfig: define MD5 dependency for FIT support

FIT images require MD5 support to verify image checksums. So far this
was expressed by defining a CPP symbol in image.h. Since MD5 is now a
first class Kconfig citizen, express that in Kconfig instead.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoKconfig: introduce md5sum command selection
Andre Przywara [Wed, 15 Mar 2017 01:19:05 +0000 (01:19 +0000)]
Kconfig: introduce md5sum command selection

So far CONFIG_MD5SUM would need to be set by a board's include file.
Since the command is really generic, move it over to Kconfig to allow
it to be defined by either a board's defconfig, menuconfig or some
config snippet merged via mergeconfig.sh.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agokirkwood: remove get_random_hex() and MD5 dependency
Andre Przywara [Wed, 15 Mar 2017 01:19:04 +0000 (01:19 +0000)]
kirkwood: remove get_random_hex() and MD5 dependency

Commit 19a5944fcd62 ("mvgbe: remove setting of ethaddr within the
driver") removed the usage of get_random_hex() from the mvgbe driver
about six years ago. However the prototype of that function survived
till today in some kirkwood header file.
Remove that prototype and the CONFIG_MD5 dependency triggered by that.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
7 years agoarm: imx6: tqma6: add support for TQMa6DL variant
Markus Niebel [Tue, 28 Feb 2017 15:37:33 +0000 (16:37 +0100)]
arm: imx6: tqma6: add support for TQMa6DL variant

This adds support for TQMa6DL using i.MX6DL and 1GiB DRAM
Since The module will use the same devicetree, we patch
the ram size in ft_board_setup.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
7 years agoarm: imx6: tqma6: use CONFIG_TQM6x for SOM specific settings
Markus Niebel [Tue, 28 Feb 2017 15:37:32 +0000 (16:37 +0100)]
arm: imx6: tqma6: use CONFIG_TQM6x for SOM specific settings

We have a Kconfig name for the module types. Let's Use it.
Some feature selections and configurations are based on the
module. Module selection selects the CPU type.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
7 years agoi.MX6Q: isiot: Switch the mmc env based on devno
Jagan Teki [Fri, 24 Feb 2017 10:15:26 +0000 (15:45 +0530)]
i.MX6Q: isiot: Switch the mmc env based on devno

Add board_mmc_get_env_dev

Switch the mmc env based on the mmc devno, instead of separately
defining a config item in include/configs using board_mmc_get_env_dev
- devno 0: sd/esd
- devno 1: mmc/emmc

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.MX6Q: icorem6_rqs: Add mmc_late_init
Jagan Teki [Fri, 24 Feb 2017 10:15:25 +0000 (15:45 +0530)]
i.MX6Q: icorem6_rqs: 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 agoi.MX6Q: icorem6_rqs: Add modeboot env via board_late_init
Jagan Teki [Fri, 24 Feb 2017 10:15:24 +0000 (15:45 +0530)]
i.MX6Q: icorem6_rqs: Add modeboot env via board_late_init

Add runtime, modeboot env which is setting mmcboot based
on the bootdevice so-that conditional macros for MMC via
CONFIG_BOOTCOMMAND should be avoided in config files.

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 agoimx6: icorem6_rqs: Add eMMC boot support
Jagan Teki [Fri, 24 Feb 2017 10:15:23 +0000 (15:45 +0530)]
imx6: icorem6_rqs: Add eMMC boot support

Boot from eMMC:
--------------
U-Boot SPL 2017.01-00318-g8e243f8 (Jan 26 2017 - 11:53:21)
Trying to boot from MMC2

U-Boot 2017.01-00318-g8e243f8 (Jan 26 2017 - 11:53:21 +0100)

CPU:   Freescale i.MX6D rev1.2 at 792 MHz
Reset cause: POR
Model: Engicam i.CoreM6 Quad/Dual RQS Starter Kit
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc1(part 0) is current device
Net:   No ethernet found.
Hit any key to stop autoboot:  0
Booting from mmc ...
switch to partitions #0, OK
mmc1(part 0) is current device

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 agomx6: tqma6: clear enet clk sel for mba6
Markus Niebel [Fri, 3 Feb 2017 15:25:02 +0000 (16:25 +0100)]
mx6: tqma6: clear enet clk sel for mba6

we have external ref clock from phy.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
7 years agoimx6: tqma6: adjust ethernet phy reset delay
Markus Niebel [Fri, 3 Feb 2017 15:25:01 +0000 (16:25 +0100)]
imx6: tqma6: adjust ethernet phy reset delay

fix the reset delay which was to short

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
7 years agoimx6: tqma6: disable spi CS unused in U-Boot
Markus Niebel [Fri, 3 Feb 2017 15:25:00 +0000 (16:25 +0100)]
imx6: tqma6: disable spi CS unused in U-Boot

Since the CS are not in use, do not map them. User of starterkit
mainboard is free to use them otherwise. When using these pins later
in the OS for instance as GPIO IRQ pin, they need to be input.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
7 years agoimx6: tqma6: use lower driver stength for I2C pins
Markus Niebel [Fri, 3 Feb 2017 15:24:59 +0000 (16:24 +0100)]
imx6: tqma6: use lower driver stength for I2C pins

The current driver stength is too high, leading to spec violations
on the falling edge. Fix it with values from HW

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
7 years agoimx6: tqma6: implement power_init_board
Markus Niebel [Fri, 3 Feb 2017 15:24:58 +0000 (16:24 +0100)]
imx6: tqma6: implement power_init_board

PMIC implements proper I2C bus switching,
implement power_init_board instead handling in
board_late_init.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
7 years agoimx6: icorem6_rqs: Update SPL board boot order for eMMC
Jagan Teki [Fri, 24 Feb 2017 10:15:22 +0000 (15:45 +0530)]
imx6: icorem6_rqs: Update SPL board boot order for eMMC

SPL mmc device index is get based on the boot device, like
- BOOT_DEVICE_MMC1 for mmc device 0
- BOOT_DEVICE_MMC2 for mmc device 1

Currently BOOT_DEVICE_MMC1 is setting both SD/eSD and MMC/eMMC
boot devices in i.MX, So u-boot is loading from mmc device 0 even
"if the board booting from SD/eSD or MMC/eMMC"

So, this patch set BOOT_DEVICE_MMC2 for MMC/eMMC so for MMC/eMMC
the u-boot is loading from mmc device 1 and the board file need to
take care if the board have different mmc device order intialization.

Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoarm: dts: imx6qdl-icore-rqs: Add eMMC node
Jagan Teki [Fri, 24 Feb 2017 10:15:21 +0000 (15:45 +0530)]
arm: dts: imx6qdl-icore-rqs: Add eMMC node

Add usdhc4 node, which is eMMC for Engicam i.CoreM6 RQS modules.

eMMC Log:
--------
icorem6qdl-rqs> mmc dev 1
switch to partitions #0, OK
mmc1(part 0) is current device
icorem6qdl-rqs> mmcinfo
Device: FSL_SDHC
Manufacturer ID: fe
OEM: 14e
Name: MMC04
Tran Speed: 52000000
Rd Block Len: 512
MMC version 4.4.1
High Capacity: Yes
Capacity: 3.5 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 4 MiB
User Capacity: 3.5 GiB
Boot Capacity: 16 MiB ENH
RPMB Capacity: 128 KiB ENH

Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoi.MX6UL: isiot: Switch the mmc env based on devno
Jagan Teki [Fri, 24 Feb 2017 10:15:20 +0000 (15:45 +0530)]
i.MX6UL: isiot: Switch the mmc env based on devno

Add board_mmc_get_env_dev

Switch the mmc env based on the mmc devno, instead of separately
defining a config item in include/configs using board_mmc_get_env_dev
- devno 0: sd/esd
- devno 1: mmc/emmc

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 mmc_late_init
Jagan Teki [Fri, 24 Feb 2017 10:15:19 +0000 (15:45 +0530)]
i.MX6UL: isiot: 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>
Reviewed by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoi.MX6UL: isiot: Add modeboot env via board_late_init
Jagan Teki [Fri, 24 Feb 2017 10:15:18 +0000 (15:45 +0530)]
i.MX6UL: isiot: 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>
Reviewed by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoi.MX6UL: isiot: Add eMMC boot support
Jagan Teki [Fri, 24 Feb 2017 10:15:17 +0000 (15:45 +0530)]
i.MX6UL: isiot: Add eMMC boot support

Boot from eMMC:
--------------
U-Boot SPL 2017.01-00314-gd0cd9cd-dirty (Jan 25 2017 - 13:25:27)
Trying to boot from MMC2

U-Boot 2017.01-00314-gd0cd9cd-dirty (Jan 25 2017 - 13:25:27 +0100)

CPU:   Freescale i.MX6UL rev1.1 528 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 36C
Reset cause: POR
Model: Engicam Is.IoT MX6UL eMMC Starterkit
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc1(part 0) is current device

Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoimx6: isiotmx6ul: Update SPL board boot order for eMMC
Jagan Teki [Fri, 24 Feb 2017 10:15:16 +0000 (15:45 +0530)]
imx6: isiotmx6ul: Update SPL board boot order for eMMC

SPL mmc device index is get based on the boot device, like
- BOOT_DEVICE_MMC1 for mmc device 0
- BOOT_DEVICE_MMC2 for mmc device 1

Currently BOOT_DEVICE_MMC1 is setting both SD/eSD and MMC/eMMC
boot devices in i.MX, So u-boot is loading from mmc device 0 even
"if the board booting from SD/eSD or MMC/eMMC"

So, this patch set BOOT_DEVICE_MMC2 for MMC/eMMC so for MMC/eMMC
the u-boot is loading from mmc device 1 and the board file need to
take care if the board have different mmc device order intialization.

Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoimx6: Add src_base structure define macro
Jagan Teki [Fri, 24 Feb 2017 10:15:15 +0000 (15:45 +0530)]
imx6: Add src_base structure define macro

Instead of initializing 'struct src' to SRC_BASE_ADDR on
every function better to have global define macro.

Reviewed by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@openedev.com>
7 years agoimx: Use IMX6_BMODE_* macros instead of numericals
Jagan Teki [Fri, 24 Feb 2017 10:15:14 +0000 (15:45 +0530)]
imx: Use IMX6_BMODE_* macros instead of numericals

Use meaningful macros IMX6_BMODE_*, instead of numerical
number in boot mode detection code.

Cc: Tim Harvey <tharvey@gateworks.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@openedev.com>
7 years agoimx: spl: Update NAND bootmode detection bit
Jagan Teki [Fri, 24 Feb 2017 10:15:13 +0000 (15:45 +0530)]
imx: spl: Update NAND bootmode detection bit

BOOT_CFG1[7:4] the NAND boot mode selection is done
only when BOOT_CFG1[7] is 1 hence update the NAND
boot mode detection bit case. This information available
on Table 8-11. NAND Boot eFUSE Descriptions, from IMX6DQRM.

Cc: Tim Harvey <tharvey@gateworks.com>
Reviewed by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@openedev.com>
7 years agoimx6: Add imx6_src_get_boot_mode
Jagan Teki [Fri, 24 Feb 2017 10:15:12 +0000 (15:45 +0530)]
imx6: Add imx6_src_get_boot_mode

For i.MX6, the bootmode determine code is part of spl_boot_device,
but there is might be a possibility for other part the code need to
check the desired boot mode for adding new functionalities like
modeboot env variable, or changing boot order etc.

So introduced imx6_src_get_boot_mode which actually reading the
boot mode register for desired modes.

More cleanup will be add in future patches.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
7 years agoi.MX6: engicam: Include dts files under MAINTAINERS
Jagan Teki [Fri, 24 Feb 2017 10:03:02 +0000 (15:33 +0530)]
i.MX6: engicam: Include dts files under MAINTAINERS

dts files related to i.MX6 engicam boards are maintined
under board, so include them under board/engicam/*/MAINTAINERS

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 agoimx6ul: isiotmx6ul: Enable I2C support
Jagan Teki [Fri, 24 Feb 2017 10:03:01 +0000 (15:33 +0530)]
imx6ul: isiotmx6ul: Enable I2C support

Enable I2C support for Engicam Is.IoT NAND module.

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 agoimx6: isiotmx6ul: Add nandboot env support
Jagan Teki [Fri, 24 Feb 2017 10:03:00 +0000 (15:33 +0530)]
imx6: isiotmx6ul: Add nandboot env support

Add config options for booting Linux from NAND in UBI format.

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 agoimx6: isiotmx6ul: Add NAND support
Jagan Teki [Fri, 24 Feb 2017 10:02:59 +0000 (15:32 +0530)]
imx6: isiotmx6ul: Add NAND support

Add NAND support for Engicam Is.IoT MX6UL 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 agoimx6: isiotmx6ul: Add FEC support
Jagan Teki [Fri, 24 Feb 2017 10:02:58 +0000 (15:32 +0530)]
imx6: isiotmx6ul: Add FEC support

Add FEC support for Engicam Is.IoT MX6UL module.

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 agoarm: dts: imx6ul-isiot: Add FEC node
Jagan Teki [Fri, 24 Feb 2017 10:02:57 +0000 (15:32 +0530)]
arm: dts: imx6ul-isiot: Add FEC node

Add FEC node for Engicam Is.IoT MX6UL module.

Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoimx6: isiotmx6ul: Add I2C support
Jagan Teki [Fri, 24 Feb 2017 10:02:56 +0000 (15:32 +0530)]
imx6: isiotmx6ul: Add I2C support

Add I2C support for Engicam Is.IoT MX6UL module.

isiotmx6ul> i2c bus
Bus 0:  i2c@021a0000
Bus 1:  i2c@021a4000
isiotmx6ul> i2c dev 0
Setting bus to 0
isiotmx6ul> i2c dev
Current bus is 0
isiotmx6ul> i2c speed 100000
Setting bus speed to 100000 Hz
isiotmx6ul> i2c probe
Valid chip addresses: 00 2C 44 78
isiotmx6ul> i2c md 2C 0xff
00ff: 00 00 00 00 0f f0 01 64 ff ff 00 00 00 00 00 00    .......d........

Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoarm: dts: imx6ul-isiot: Add I2C nodes
Jagan Teki [Fri, 24 Feb 2017 10:02:55 +0000 (15:32 +0530)]
arm: dts: imx6ul-isiot: Add I2C nodes

Add I2C nodes for Engicam Is.IoT MX6UL module.

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 agoarm: imx6ul: Add Engicam Is.IoT MX6UL Starter Kit initial support
Jagan Teki [Fri, 24 Feb 2017 10:02:54 +0000 (15:32 +0530)]
arm: imx6ul: Add Engicam Is.IoT MX6UL Starter Kit initial support

Boot from MMC:
-------------
U-Boot SPL 2017.01-rc2-gba3c151-dirty (Jan 02 2017 - 16:59:33)
Trying to boot from MMC1

U-Boot 2017.01-rc2-gba3c151-dirty (Jan 02 2017 - 16:59:33 +0100)

CPU:   Freescale i.MX6UL rev1.1 528 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 33C
Reset cause: POR
Model: Engicam Is.IoT MX6UL Starterkit
DRAM:  512 MiB
MMC:   FSL_SDHC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   CPU Net Initialization Failed
No ethernet found.
Hit any key to stop autoboot:  0
isiotmx6ul>

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 agoconfigs: imx6: Don't define USDHC2_BASE_ADDR
Jagan Teki [Fri, 24 Feb 2017 10:02:53 +0000 (15:32 +0530)]
configs: imx6: Don't define USDHC2_BASE_ADDR

USDHC base address will assigned by SPL using fsl_esdhc_initialize
and u-boot with devicetree, hence no remove base address assignment
in config files.

Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoimx: mx7ulp_evk: enable mmc/regulator support
Peng Fan [Wed, 22 Feb 2017 08:21:57 +0000 (16:21 +0800)]
imx: mx7ulp_evk: enable mmc/regulator support

Enable MMC support.
The fsl sdhc driver needs regulator to enable power, so enable
regulator support.

And bootcmd and more env.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agoimx: imx7ulp: add EVK board support
Peng Fan [Wed, 22 Feb 2017 08:21:56 +0000 (16:21 +0800)]
imx: imx7ulp: add EVK board support

Add EVK board support.
Add the evk dts file.

LOG:
U-Boot 2017.03-rc2-00038-gab86c1d (Feb 22 2017 - 15:59:58 +0800)

CPU:   Freescale i.MX7ULP rev1.0 at 500 MHz
Reset cause: POR
Boot mode: Dual boot
Model: NXP i.MX7ULP EVK
DRAM:  1 GiB
MMC:   FSL_SDHC: 0
In:    serial@402D0000
Out:   serial@402D0000
Err:   serial@402D0000
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agommc: fsl_esdhc: support i.MX7ULP
Peng Fan [Wed, 22 Feb 2017 08:21:55 +0000 (16:21 +0800)]
mmc: fsl_esdhc: support i.MX7ULP

Add compatible property for i.MX7ULP.
Add a weak init_usdhc_clk function, i.MX7ULP use this to init the clock.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by : Stefano Babic <sbabic@denx.de>

7 years agoarm: dts: add i.MX7ULP dtsi file
Peng Fan [Wed, 22 Feb 2017 08:21:54 +0000 (16:21 +0800)]
arm: dts: add i.MX7ULP dtsi file

Add i.MX7ULP dtsi file.
Add clock and pinfun header files.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agomx7ulp: Add HAB boot support
Peng Fan [Wed, 22 Feb 2017 08:21:53 +0000 (16:21 +0800)]
mx7ulp: Add HAB boot support

Add CAAM clock functions, SEC_CONFIG[1] fuse checking, and default CSF
size for HAB support boot on mx7ulp.

Users need to uncomment the CONFIG_SECURE_BOOT in mx7ulp_evk.h to build
secure uboot.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by : Stefano Babic <sbabic@denx.de>

7 years agoserial: lpuart: add i.MX7ULP support
Peng Fan [Wed, 22 Feb 2017 08:21:52 +0000 (16:21 +0800)]
serial: lpuart: add i.MX7ULP support

Add i.MX7ULP support.
The buadrate calculation on i.MX7ULP is different,so add a new setbrg
function for i.MX7ULP.
Add a enum lpuart_devtype for runtime check for different platforms.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Shaohui Xie <Shaohui.Xie@nxp.com>
Cc: Alison Wang <b18965@freescale.com>
7 years agoserial: lpuart: restructure lpuart driver
Peng Fan [Wed, 22 Feb 2017 08:21:51 +0000 (16:21 +0800)]
serial: lpuart: restructure lpuart driver

Drop CONFIG_LPUART_32B_REG.
Move the register structure to a common file include/fsl_lpuart.h
Define lpuart_serial_platdata structure which includes the reg base and flags.
For 32Bit register access, use lpuart_read32/lpuart_write32 which handles
big/little endian.
For 8Bit register access, still use the orignal code.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by : Stefano Babic <sbabic@denx.de>
Cc: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Shaohui Xie <Shaohui.Xie@nxp.com>
Cc: Alison Wang <b18965@freescale.com>
7 years agoi2c: lpi2c: add lpi2c driver for i.MX7ULP
Peng Fan [Fri, 24 Feb 2017 01:54:18 +0000 (09:54 +0800)]
i2c: lpi2c: add lpi2c driver for i.MX7ULP

Add lpi2c driver for i.MX7ULP.
Need to enable the two options to use this driver:
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_IMX_LPI2C=y

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Heiko Schocher <hs@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
7 years agopinctrl: Add i.MX7ULP pinctrl driver
Peng Fan [Wed, 22 Feb 2017 08:21:49 +0000 (16:21 +0800)]
pinctrl: Add i.MX7ULP pinctrl driver

Add i.MX7ULP pinctrl driver.
Select CONFIG_PINCTRL_IMX7ULP to use this driver.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by : Stefano Babic <sbabic@denx.de>

7 years agowdog: Add the watchdog driver for MX7ULP.
Ye Li [Wed, 22 Feb 2017 08:21:48 +0000 (16:21 +0800)]
wdog: Add the watchdog driver for MX7ULP.

This driver implements the HW WATCHDOG functions. Which needs
to set CONFIG_HW_WATCHDOG to use them. This is disabled by default for
mx7ulp.

Use watchdog for reset cpu. Implement this in the driver.
Need to define CONFIG_ULP_WATCHDOG to build it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agomx7ulp: Add iomux pins header file
Ye Li [Wed, 22 Feb 2017 08:21:47 +0000 (16:21 +0800)]
mx7ulp: Add iomux pins header file

Add the iomux pins header file from iomux tool team. Change the IOMUXC0 pins
to add IOMUX_CONFIG_MPORTS flags.

Note: The IOMUXC0 offset provided in this file is from 0xD000, this is not
aligned with IOMUXC0 base address. We have adjusted the IOMUXC0 base address
to aligin with it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agomxc_ocotp: Update driver to support OCOTP controller on i.MX7ULP
Peng Fan [Wed, 22 Feb 2017 08:21:46 +0000 (16:21 +0800)]
mxc_ocotp: Update driver to support OCOTP controller on i.MX7ULP

Update the mxc_ocotp driver to support i.MX7ULP.
The read/write sequence has some changes due to
PDN and OUT_STATUS registers added and TIME register is
removed. Also update the bank size and number.

Add is_mx7ulp macro in sys_proto.h

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by : Stefano Babic <sbabic@denx.de>

7 years agogpio: Add Rapid GPIO2P driver for i.MX7ULP
Peng Fan [Wed, 22 Feb 2017 08:21:45 +0000 (16:21 +0800)]
gpio: Add Rapid GPIO2P driver for i.MX7ULP

Add the imx_rgpio2p driver for Rapid GPIO2P controllers on i.MX7ULP.
Have added all ports on RGPIO2P_0 and RGPIO2P_1.

The configurations CONFIG_IMX_RGPIO2P and CONFIG_DM_GPIO must be set
to y to enable the drivers.

To use the GPIO function, the IBE and OBE needs to set in IOMUXC.
We did not set the bits in driver, but leave them to IOMUXC settings
of the GPIO pins. User should use IMX_GPIO_NR to generate the GPIO number
for gpio APIs access.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by : Stefano Babic <sbabic@denx.de>

7 years agoimx: mx7ulp: Implement the clock functions for i2c driver
Ye Li [Wed, 22 Feb 2017 08:21:44 +0000 (16:21 +0800)]
imx: mx7ulp: Implement the clock functions for i2c driver

Implement the i2c clock enable and get function for mx7ulp. These
functions are required by imx_lpi2c driver.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
7 years agoimx: mx7ulp: Add soc level initialization codes and functions
Peng Fan [Wed, 22 Feb 2017 08:21:43 +0000 (16:21 +0800)]
imx: mx7ulp: Add soc level initialization codes and functions

Implement soc level functions to get cpu rev, reset cause, enable cache,
etc. We will disable the wdog and init clocks in s_init at very early u-boot
phase.

Since the we are seeking the way to get chip id for mx7ulp, the get_cpu_rev
is hard coded to a fixed value. This may change in future.

Reuse some code in imx-common.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agoimx: mx7ulp: Add clock framework and functions
Peng Fan [Wed, 22 Feb 2017 08:21:42 +0000 (16:21 +0800)]
imx: mx7ulp: Add clock framework and functions

Add a clock framework to support SCG1/PCC2/PCC3 for A7 to support get/set
clock source, divider, clock rate and parent source.
Users need to include pcc.h to use the APIs to for peripherals clock. Each
peripheral clock is defined in enum pcc_clk type.

SCG relevants APIs are defined in scg.h which supports clock rate get, PLL/PFD
enablement and settings, and all SCG clock initialization. User need use enum
scg_clk to access each clock source.

In clock.c, we initialize necessary clocks at u-boot s_init and implement the
clock functions used by driver modules to operate clocks dynamically.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agoimx: mx7ulp: add iomux driver to support IOMUXC0 and IOMUXC1
Peng Fan [Wed, 22 Feb 2017 08:21:41 +0000 (16:21 +0800)]
imx: mx7ulp: add iomux driver to support IOMUXC0 and IOMUXC1

Add a new driver under ULP directory to support its IOMUXC
controllers. The ULP has two IOMUXC, the IOMUXC0 is used
for M4 domain, while IOMUXC1 is for A7. We set IOMUXC1 as
the default IOMUX in this driver. Any pins in IOMUXC0 needs
to configure with IOMUX_CONFIG_MPORTS in its mux_mode field.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by : Stefano Babic <sbabic@denx.de>

7 years agoimx: mx7ulp: add registers header file
Peng Fan [Wed, 22 Feb 2017 08:21:40 +0000 (16:21 +0800)]
imx: mx7ulp: add registers header file

Add imx-regs.h for i.MX7ULP registers addresses definitions and some
registers structures.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by : Stefano Babic <sbabic@denx.de>

7 years agoimx: mx7ulp: Add mx7ulp to Kconfig
Peng Fan [Wed, 22 Feb 2017 08:21:39 +0000 (16:21 +0800)]
imx: mx7ulp: Add mx7ulp to Kconfig

i.MX7ULP is a new series SoC which has different architecture
from previous i.MX platforms. Create a new cpu folder for it,
and add it to Kconfig.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by : Stefano Babic <sbabic@denx.de>

7 years agorockchip: video: Remove CSC initialization (HDMI)
Jernej Skrabec [Wed, 8 Mar 2017 23:34:38 +0000 (00:34 +0100)]
rockchip: video: Remove CSC initialization (HDMI)

Despite the comment in the code, CSC unit is never used. According to
the only public description of DW HDMI controller (i.MX6 manual), CSC
unit is bypassed in MC_FLOWCTRL register and then actually powered
down in MC_CLKDIS register.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: video: Fix HDMI audio clocks
Jernej Skrabec [Wed, 8 Mar 2017 23:34:37 +0000 (00:34 +0100)]
rockchip: video: Fix HDMI audio clocks

Function hdmi_lookup_n_cts() is feed with clock in Hz, which gets
compared with clocks in kHz. Fix that by converting all clocks to Hz.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: config: enable the USB host for rk3288 based board
Eddie Cai [Tue, 7 Mar 2017 04:47:07 +0000 (12:47 +0800)]
rockchip: config: enable the USB host for rk3288 based board

RK3288 using the dwc2 USB host controller, enable it and other usb host
funtion like storage and ethernet.

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: dts: tinker: add usb host power supply node
Eddie Cai [Tue, 7 Mar 2017 04:46:00 +0000 (12:46 +0800)]
rockchip: dts: tinker: add usb host power supply node

Tinker board have a usb host. add dts node to provide power supply.

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: rk3036: dts: bind usb vbus-supply source
Kever Yang [Mon, 6 Mar 2017 12:36:37 +0000 (20:36 +0800)]
rockchip: rk3036: dts: bind usb vbus-supply source

Bind usb host and otg vbus to its source.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: rk3188: drop CONFIG_SYS_NO_FLASH
Heiko Stübner [Thu, 23 Feb 2017 16:30:40 +0000 (17:30 +0100)]
rockchip: rk3188: drop CONFIG_SYS_NO_FLASH

Commit e856bdcfb492 ("flash: complete CONFIG_SYS_NO_FLASH move with renaming")
obsoleted the CONFIG_SYS_NO_FLASH option, which still is in our
rk3188_common.h header, resulting in warnings like
    The following new ad-hoc CONFIG options were detected:
    CONFIG_SYS_NO_FLASH

So also drop it from the rk3188 header.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agodm: Return actual bools in dm_fdt_pre_reloc
Heiko Stübner [Thu, 23 Feb 2017 16:30:38 +0000 (17:30 +0100)]
dm: Return actual bools in dm_fdt_pre_reloc

Documentation says that we're returning true/false, not 1/0 so adapt
the function to return actual booleans.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: configs: Enable networking support on rk3288 boards
Jacob Chen [Thu, 23 Feb 2017 06:20:17 +0000 (14:20 +0800)]
rockchip: configs: Enable networking support on rk3288 boards

At current, only firefly and rock2 have network enabled.
Let's enable other boards.

Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agoARM: dts: rockchip: enable gmac for rk3288 boards
Jacob Chen [Thu, 23 Feb 2017 06:20:16 +0000 (14:20 +0800)]
ARM: dts: rockchip: enable gmac for rk3288 boards

Enable gmac interface for rk3288 board dts.
use "okay" not "ok"

Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agodts: rk3036: add sdmmc for rk3036
Eddie Cai [Mon, 20 Feb 2017 06:03:01 +0000 (14:03 +0800)]
dts: rk3036: add sdmmc for rk3036

rk3036 support sdmmc, add dts node to support it.

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agodts: rk3399: add mmc alias for rk3399
Eddie Cai [Mon, 20 Feb 2017 06:02:37 +0000 (14:02 +0800)]
dts: rk3399: add mmc alias for rk3399

add mmc alias for rk3399

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: rk3328: add defconfig for evb-rk3328
Kever Yang [Thu, 23 Feb 2017 07:37:56 +0000 (15:37 +0800)]
rockchip: rk3328: add defconfig for evb-rk3328

Enable board config for evb-rk3328.
SDcard and eMMC boot is OK in this initial version,
USB and EMAC function is not available now, will comes later.

Signed-off-by: William Zhang <william.zhang@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: rk3328: add evb-rk3328 support
Kever Yang [Thu, 23 Feb 2017 07:37:55 +0000 (15:37 +0800)]
rockchip: rk3328: add evb-rk3328 support

evb-rk3328 is an evb from Rockchip based on rk3328 SoC:
- 2 USB2.0 Host port;
- 1 USB3.0 Host port;
- 1 HDMI port;
- 2 10/100M eth port;
- 2GB ddr;
- 16GB eMMC;
- UART to USB debug port;

Signed-off-by: William Zhang <william.zhang@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: rk3328: add sysreset driver
Kever Yang [Thu, 23 Feb 2017 07:37:54 +0000 (15:37 +0800)]
rockchip: rk3328: add sysreset driver

Add rk3328 sysreset driver.

Signed-off-by: William Zhang <william.zhang@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: rk3328: add pinctrl driver
Kever Yang [Thu, 23 Feb 2017 07:37:53 +0000 (15:37 +0800)]
rockchip: rk3328: add pinctrl driver

Add rk3328 pinctrl driver and grf/iomux structure definition.

Signed-off-by: William Zhang <william.zhang@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: rk3328: add clock driver
Kever Yang [Thu, 23 Feb 2017 07:37:52 +0000 (15:37 +0800)]
rockchip: rk3328: add clock driver

Add rk3328 clock driver and cru structure definition.

Signed-off-by: William Zhang <william.zhang@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
7 years agorockchip: rk3328: add soc basic support
Kever Yang [Thu, 23 Feb 2017 07:37:51 +0000 (15:37 +0800)]
rockchip: rk3328: add soc basic support

RK3328 is a SoC from Rockchip with quad-core Cortex-A53 CPU.
It supports two USB2.0 EHCI ports. Other interfaces are very
much like RK3288, the DRAM are 32bit width address and support
address from 0 to 4GB-16MB range.

Signed-off-by: William Zhang <william.zhang@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Add empty arch/arm/mach-rockchip/rk3328/Kconfig to avoid build error:
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: rk3328: add device tree file
Kever Yang [Thu, 23 Feb 2017 07:37:50 +0000 (15:37 +0800)]
rockchip: rk3328: add device tree file

Add dts binding header for rk3328, files origin from kernel.

Signed-off-by: William Zhang <william.zhang@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: config: rk3399: enable SPL config for evb-rk3399
Kever Yang [Wed, 22 Feb 2017 08:56:38 +0000 (16:56 +0800)]
rockchip: config: rk3399: enable SPL config for evb-rk3399

Enable all the CONFIGs which need by SPL.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Added rockchip tag:
Drop CONFIG_ROCKCHIP_DWMMC for now due to build error:
Move changes to arch/arm/mach-rockchip/Kconfig to this patch:
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: arm64: rk3399: add SPL support
Kever Yang [Thu, 23 Feb 2017 08:09:05 +0000 (16:09 +0800)]
rockchip: arm64: rk3399: add SPL support

Add SPL support for rk3399, default with of-platdata enabled.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Drop Kconfig changes to fix build error:
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: dts: rk3399: update for spl require driver
Kever Yang [Wed, 22 Feb 2017 08:56:36 +0000 (16:56 +0800)]
rockchip: dts: rk3399: update for spl require driver

Add syscon and dmc node, and 'u-boot,dm-pre-reloc' option for
required driver.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Added rockchip tag:
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: arm64: rk3399: add ddr controller driver
Kever Yang [Wed, 22 Feb 2017 08:56:35 +0000 (16:56 +0800)]
rockchip: arm64: rk3399: add ddr controller driver

RK3399 support DDR3, LPDDR3, DDR4 sdram, this patch is porting from
coreboot, support 4GB lpddr3 in this version.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Added rockchip: tag:
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: tinker: configs: use correct mmc instance as boot target device
Eddie Cai [Mon, 20 Feb 2017 03:08:16 +0000 (11:08 +0800)]
rockchip: tinker: configs: use correct mmc instance as boot target device

We are using wrong mmc instance as boot target device now. below Jaehoon Chung's
patch use mmc alias which correct it. That make tinker board can not find mmc
device. So give it correct mmc device instance.

        commit 02ad33aa3a84821c8d9a6c4f167f143f6248b084
        Author: Jaehoon Chung <jh80.chung@samsung.com>
        Date:   Thu Feb 2 13:41:14 2017 +0900

            mmc: mmc-uclass: use the fixed devnum with alias node

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: firefly: configs: remove config_spl_of_platdata
Jacob Chen [Wed, 15 Feb 2017 03:06:00 +0000 (11:06 +0800)]
rockchip: firefly: configs: remove config_spl_of_platdata

We should remove config_spl_of_platdata to build u-boot-spl-dtb.bin rather than u-boot-spl-nodtb.bin
since we use spl_back_to_brom.

I miss it because i forget to clean build-dir..

Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: rk3188: Add main, spl and tpl boards
Heiko Stübner [Sat, 18 Feb 2017 18:46:38 +0000 (19:46 +0100)]
rockchip: rk3188: Add main, spl and tpl boards

The rk3188 needs 3 U-Boot stages: a tpl living in 1KB of sram, a spl
the resides in the rest of the sram and loads the regular U-Boot living
in regular ram.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
7 years agorockchip: rk3188: Add sdram driver
Heiko Stübner [Sat, 18 Feb 2017 18:46:37 +0000 (19:46 +0100)]
rockchip: rk3188: Add sdram driver

The sdram controller blocks are very similar to the rk3288 in utilizing
memory scheduler, Designware uPCTL and Designware PUBL blocks, only
limited to one bank instead of two.

There are some minimal differences when setting up the ram, so it gets
a separate driver for the rk3188 but reuses the driver structs, as there
is no need to define the same again.

More optimization can happen when the modelling of the controller parts
in the dts actually follow the hardware layout hopefully at some point
in the future.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
7 years agorockchip: rk3188: Add core support
Heiko Stübner [Sat, 18 Feb 2017 18:46:36 +0000 (19:46 +0100)]
rockchip: rk3188: Add core support

Add the core architecture code for the rk3188.
It doesn't support the SPL yet, as because of some
unknown error it doesn't start yet.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
Drop these defines from rk3188_common.h
   CONFIG_GENERIC_MMC, CONFIG_BOUNCE_BUFFER, CONFIG_DOS_PARTITION
   CONFIG_PARTITION_UUIDS, CONFIG_CMD_PART:
Signed-off-by: Simon Glass <sjg@chromium.org>