platform/kernel/u-boot.git
7 years agoconfigs: omapl138_lcdk: dont disable fat write
Sekhar Nori [Tue, 6 Jun 2017 11:41:53 +0000 (17:11 +0530)]
configs: omapl138_lcdk: dont disable fat write

CONFIG_FAT_WRITE is imply'ed when CONFIG_CMD_FAT
is selected (see CONFIG_TI_COMMON_CMD_OPTIONS).

Dont disable it in defconfig so the imply takes
effect and 'fatwrite' is available for users.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoarmv8: Support loading 32-bit OS which is not in the form of FIT
Alison Wang [Tue, 6 Jun 2017 07:32:40 +0000 (15:32 +0800)]
armv8: Support loading 32-bit OS which is not in the form of FIT

As only FIT image is supported now, this patch is to support loading
32-bit uImage, dtb and rootfs separately.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoboard: mpl: pci: Fix checkpatch.pl
Chakra Divi [Mon, 5 Jun 2017 17:39:30 +0000 (23:09 +0530)]
board: mpl: pci: Fix checkpatch.pl

Fixed checkpatch.pl errors/warnings in board/mpl/common/pci.c

Signed-off-by: Chakra Divi <chakra@openedev.com>
7 years agoigep0020: Enable DISTRO_DEFAULTS on IGEPv2 platforms
Enric Balletbo i Serra [Mon, 5 Jun 2017 17:27:23 +0000 (19:27 +0200)]
igep0020: Enable DISTRO_DEFAULTS on IGEPv2 platforms

Like commit 3337e3af5d3d this enables suitable commands needed for booting
general purpose Linux distribution. This is required for example if we want
to use PXE or DHCP as default boot targets, symbols no longer enabled by
config_distro_defaults.h.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
7 years agoboard: ti: am572x-evm: Update pinmux using latest PMT
Lokesh Vutla [Mon, 5 Jun 2017 09:18:17 +0000 (14:48 +0530)]
board: ti: am572x-evm: Update pinmux using latest PMT

Update the board pinmux for AM572x-evm using latest PMT[1] and the
board files named am572x_gp_evm_A3a_sr2p0 and am572x_gp_evm_A2b_sr1p1
that were autogenerated on 30th January, 2017 by
"Ahmad Rashed <a-rashed@ti.com>" and "Tom Johnson <thjohnson@ti.com>".

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoboard: ti: am571x-idk: Update pinmux using latest PMT
Lokesh Vutla [Mon, 5 Jun 2017 09:18:16 +0000 (14:48 +0530)]
board: ti: am571x-idk: Update pinmux using latest PMT

Update the board pinmux for AM571x-IDK board using latest PMT[1] and the
board files named am571x_idk_v1p3b_sr2p0 that were autogenerated on
23rd March, 2017 by "Ahmad Rashed <a-rashed@ti.com>" and
"Tom Johnson <thjohnson@ti.com>".

[1] https://dev.ti.com/pinmux/app.html#/default/

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoboard: ti: am572x-idk: Update pinmux using latest PMT
Lokesh Vutla [Mon, 5 Jun 2017 09:18:15 +0000 (14:48 +0530)]
board: ti: am572x-idk: Update pinmux using latest PMT

Update the board pinmux for AM572x-IDK board using latest PMT[1] and the
board files named am572x_idk_v1p3b_sr2p0 that were autogenerated on
30th January, 2017 by "Ahmad Rashed <a-rashed@ti.com>" and
"Tom Johnson <thjohnson@ti.com>".

[1] https://dev.ti.com/pinmux/app.html#/default/

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoKconfig: Add description for CMD_POWEROFF
Michal Simek [Mon, 5 Jun 2017 06:28:17 +0000 (08:28 +0200)]
Kconfig: Add description for CMD_POWEROFF

Add poweroff description to Kconfig to make it selectable
via menuconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarmv7m: Disable D-cache when booting nommu(ARMv7M) Linux kernel
tnishinaga.dev@gmail.com [Sun, 4 Jun 2017 16:18:08 +0000 (01:18 +0900)]
armv7m: Disable D-cache when booting nommu(ARMv7M) Linux kernel

Disable D-Cache is required when booting nommu Linux kernel.
(please see Linux kernel source "arch/arm/kernel/head-nommu.S")

U-Boot is enabled D-cache and I-Cache at startup.
However, it does not disable D-Cache before
booting nommu Linux kernel.
Therefore, I call dcache_disable()
when the CPU is ARMv7M to fix this problem.

Signed-off-by: Toshifumi NISHINAGA <tnishinaga.dev@gmail.com>
7 years agoarm: omap: Unify get_device_type() function
Semen Protsenko [Fri, 2 Jun 2017 15:00:00 +0000 (18:00 +0300)]
arm: omap: Unify get_device_type() function

Refactor OMAP3/4/5 code so that we have only one get_device_type()
function for all platforms.

Details:
 - Add ctrl variable for AM33xx and OMAP3 platforms (like it's done for
   OMAP4/5), so we can obtain status register in common way
 - For now ctrl structure for AM33xx/OMAP3 contains only status register
   address
 - Run hw_data_init() in order to assign ctrl to proper structure
 - Remove DEVICE_MASK and DEVICE_GP definitions as they are not used
   (DEVICE_TYPE_MASK and GP_DEVICE are used instead)
 - Guard structs in omap_common.h with #ifdefs, because otherwise
   including omap_common.h on non-omap4/5 board files breaks compilation

Buildman script was run for all OMAP boards. Result output:
    arm: (for 38/616 boards)
        all +352.5
        bss -1.4
        data +3.5
        rodata +300.0
        spl/u-boot-spl:all +284.7
        spl/u-boot-spl:data +2.2
        spl/u-boot-spl:rodata +252.0
        spl/u-boot-spl:text +30.5
        text +50.4
    (no errors to report)

Tested on AM57x EVM and BeagleBoard xM.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
[trini: Rework the guards as to not break TI81xx]
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoam33xx: Finish migration of CONFIG_AM33XX/AM43XX
Tom Rini [Fri, 9 Jun 2017 20:59:17 +0000 (16:59 -0400)]
am33xx: Finish migration of CONFIG_AM33XX/AM43XX

Almost all users of CONFIG_AM33XX/AM43XX have been migrated.  Finish
moving the last few over to Kconfig, and put all of the boards under the
appropriate Kconfig chocie now.  This board choice is non-optional, so
remove that keyword on am33xx.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agocmd/fdt: support single value replacement within an array
Hannes Schmelzer [Tue, 30 May 2017 13:05:44 +0000 (15:05 +0200)]
cmd/fdt: support single value replacement within an array

With this commit we can modify single values within an array of a dts
property.

This is useful if we have for example a pwm-backlight where we want to
modifiy the pwm frequency per u-boot script.

The pwm is described in dts like this:

backlight {
pwms = <0x0000002b 0x00000000 0x004c4b40>;
};

For changing the frequency, here the 3rd parameter, we simply type:

fdt set /backlight pwms <? ? 0x1E8480>;

For doing all this we:
- backup the property content into our 'SCRATCHPAD'
- only modify the array-cell if the new content doesn't start with '?'

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agobuildman: properly translate strings for log and err files to ASCII
Daniel Schwierzeck [Thu, 8 Jun 2017 01:07:09 +0000 (03:07 +0200)]
buildman: properly translate strings for log and err files to ASCII

The build output can still produce unicode encoded output. But in
the buildman's log and err files we only want plain ASCII characters.

To handle all situations with unicode and non-unicode output, encode
the stdout and stderr strings to UTF-8 and afterwards to ASCII with
replacing all special characters.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
7 years agobuildman: disable localized and unicode output of all build tools
Daniel Schwierzeck [Thu, 8 Jun 2017 01:07:08 +0000 (03:07 +0200)]
buildman: disable localized and unicode output of all build tools

Build tools like Make, gcc or binutils support localized output
or unicode encoded output dependent on the default system locale.
This is not useful for buildman, where we want reproducible
warning or error messages or where the output of binutils is
further processed.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
7 years agoREADME: Add instructions for chain-loading U-Boot on jerry
Simon Glass [Wed, 31 May 2017 23:57:36 +0000 (17:57 -0600)]
README: Add instructions for chain-loading U-Boot on jerry

Add instructions for chromebook_jerry.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: jerry: Disable CONFIG_CONSOLE_SCROLL_LINES
Simon Glass [Wed, 31 May 2017 23:57:35 +0000 (17:57 -0600)]
rockchip: jerry: Disable CONFIG_CONSOLE_SCROLL_LINES

The display on jerry is so fast that this option is not needed. Drop it so
that the display scrolls more smoothly.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Enable the video display banner
Simon Glass [Wed, 31 May 2017 23:57:34 +0000 (17:57 -0600)]
rockchip: Enable the video display banner

Show the U-Boot banner and board information on the video display during
boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: rk3288: Allow setting up clocks in U-Boot proper
Simon Glass [Wed, 31 May 2017 23:57:33 +0000 (17:57 -0600)]
rockchip: rk3288: Allow setting up clocks in U-Boot proper

If U-Boot is chain-loaded from a previous boot loader we must set up the
clocks the way U-Boot wants them. Add code for this. It will do nothing if
SPL has already done the job.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Init clocks again when chain-loading
Simon Glass [Wed, 31 May 2017 23:57:32 +0000 (17:57 -0600)]
rockchip: Init clocks again when chain-loading

Detect with a previous boot loader has already set up the clocks and set
them up again so that U-Boot gets what it expects.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: rk3288: Convert clock driver to use shifted masks
Simon Glass [Wed, 31 May 2017 23:57:31 +0000 (17:57 -0600)]
rockchip: rk3288: Convert clock driver to use shifted masks

Shifted masks are the standard approach with rockchip since it allows
use of the mask without shifting it each time. Update the definitions and
the driver to match.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: jerry: Add a .its file for chromium
Simon Glass [Wed, 31 May 2017 23:57:30 +0000 (17:57 -0600)]
rockchip: jerry: Add a .its file for chromium

Add a sample .its file for booting U-Boot on a jerry Chromebook.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: video: Take the vop device out of standby
Simon Glass [Wed, 31 May 2017 23:57:29 +0000 (17:57 -0600)]
rockchip: video: Take the vop device out of standby

On reset the standby bit is clear, but if U-Boot is chain-loaded from
another boot loader it may be set. Clear it before starting up video so
that it works correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Squashed in 'rockchip: video: fix taking the VOP device out of standby':
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: video: Add remove() methods
Simon Glass [Wed, 31 May 2017 23:57:28 +0000 (17:57 -0600)]
rockchip: video: Add remove() methods

Add remove() methods for EDP and VOP so that U-Boot can shut down the
video on exit. This avoids leaving DMA running while booting Linux which
can cause problems if Linux uses the frame buffer for something else.

It also makes it clear what is needed to shut down video.

While we are here, make rkvop_enable() static.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
Squashed in 'rockchip: video: fix taking the VOP device out of standby':
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: rk3288: Add error debugging to veyron_init()
Simon Glass [Wed, 31 May 2017 23:57:27 +0000 (17:57 -0600)]
rockchip: rk3288: Add error debugging to veyron_init()

Add a debug() statement so we can see when something goes wrong with the
regulator.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Fix regualtor typo in veyron
Simon Glass [Wed, 31 May 2017 23:57:26 +0000 (17:57 -0600)]
rockchip: Fix regualtor typo in veyron

This typo doesn't actually cause any problems, but is wrong. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Setup default PWM flags
Simon Glass [Wed, 31 May 2017 23:57:25 +0000 (17:57 -0600)]
rockchip: Setup default PWM flags

At present if the

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 874ee59 (rockchip: pwm: implement pwm_set_invert())

7 years agoREADME: Add instructions for chain-loading U-Boot
Simon Glass [Wed, 31 May 2017 23:57:24 +0000 (17:57 -0600)]
README: Add instructions for chain-loading U-Boot

Most Chromebooks support chain-loading U-Boot but instructions are
somewhat scattered. Add a README to hold this information within the
U-Boot tree. Also add the standard developer keys to simplify the
instructions, since they are small.

For now this only supports nyan-big.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agotegra: nyan-big: Add a .its file for chromium
Simon Glass [Wed, 31 May 2017 23:57:23 +0000 (17:57 -0600)]
tegra: nyan-big: Add a .its file for chromium

Add a sample .its file for booting U-Boot on a nyan-big Chromebook.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agotegra: clock: Avoid a divide-by-zero error
Simon Glass [Wed, 31 May 2017 23:57:22 +0000 (17:57 -0600)]
tegra: clock: Avoid a divide-by-zero error

The clock fix-up for tegra is still present in the code. It causes a
divide-by-zero bug after relocation when chain-loading U-Boot from
coreboot. Fix this by adding a check.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 7468676 (ARM: tegra: fix clock_get_periph_rate() for UART clocks)

7 years agotegra: Enable CP15 init
Simon Glass [Wed, 31 May 2017 23:57:21 +0000 (17:57 -0600)]
tegra: Enable CP15 init

At present CP15 init is disabled on tegra. Use the correct option so that
this init is performed on boot. This enables the instruction cache, for
example, which is critical to the machine running at full speed.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agotegra: video: Don't power up the SOR twice
Simon Glass [Wed, 31 May 2017 23:57:20 +0000 (17:57 -0600)]
tegra: video: Don't power up the SOR twice

If U-Boot is the secondary boot loader, or has been run from itself, the
SOR may already be powered up. Powering it up again causes a hang, so
detect this situation and skip it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
7 years agotegra: nyan-big: Enable the dhrystone benchmark
Simon Glass [Wed, 31 May 2017 23:57:19 +0000 (17:57 -0600)]
tegra: nyan-big: Enable the dhrystone benchmark

Enable this so we can roughly measure CPU performance. Also enable the
cache command to allow for timing.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agotegra: spi: Wait a little after setting the clocks
Simon Glass [Wed, 31 May 2017 23:57:18 +0000 (17:57 -0600)]
tegra: spi: Wait a little after setting the clocks

For devices that need a delay between SPI transactions we seem to need an
additional delay before the first one if the CPU is running at full speed.
Add this, under control of the existing setting. At present it will only
be enabled with the Chrome OS EC.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agotegra: dts: Add cros-ec SPI settings
Simon Glass [Wed, 31 May 2017 23:57:17 +0000 (17:57 -0600)]
tegra: dts: Add cros-ec SPI settings

At present the interrupt does not work and the SPI bus runs much less
quickly than it should. Add settings to fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agotegra: Init clocks even when SPL did not run
Simon Glass [Wed, 31 May 2017 23:57:16 +0000 (17:57 -0600)]
tegra: Init clocks even when SPL did not run

At present early clock init happens in SPL. If SPL did not run (because
for example U-Boot is chain-loaded from another boot loader) then the
clocks are not set as U-Boot expects.

Add a function to detect this and call the early clock init in U-Boot
proper.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agopower: regulator: Add more debugging and fix a missing newline
Simon Glass [Wed, 31 May 2017 23:57:15 +0000 (17:57 -0600)]
power: regulator: Add more debugging and fix a missing newline

This file does not report a few possible errors and one message is missing
a newline. Fix these.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agoarm: Disable LPAE if not enabled
Simon Glass [Wed, 31 May 2017 23:57:14 +0000 (17:57 -0600)]
arm: Disable LPAE if not enabled

If CONFIG_ARMV7_LPAE is not defined we should make sure that the feature
is disabled. This can happen if U-Boot is chain-loaded from another boot
loader which does enable LPAE.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoarm: Don't try to support CONFIG_ARMV7_LPAE on ARMv4T
Simon Glass [Wed, 31 May 2017 23:57:13 +0000 (17:57 -0600)]
arm: Don't try to support CONFIG_ARMV7_LPAE on ARMv4T

At present if CONFIG_ARMV7_LPAE is defined then mmu_setup() will use
instructions which are invalid on ARMv4T. This happens on Tegra since it
has an ARMv4T boot CPU. Add a check for the architecture version to allow
the code to be built. It will not actually be executed by the boot CPU,
but needs to compile.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoarm: Rename HCTR to HTCR
Simon Glass [Wed, 31 May 2017 23:57:12 +0000 (17:57 -0600)]
arm: Rename HCTR to HTCR

This appears to be a typo. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoarm: arm720t: Support CONFIG_SKIP_LOWLEVEL_INIT_ONLY
Simon Glass [Wed, 31 May 2017 23:57:11 +0000 (17:57 -0600)]
arm: arm720t: Support CONFIG_SKIP_LOWLEVEL_INIT_ONLY

This option allows skipping the call to lowlevel() while still performing
CP15 init. Support this on ARM720T so it can be used with Tegra.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodavinci: omapl138_lcdk: fix tXSNR DDR2 timing value
Sekhar Nori [Fri, 2 Jun 2017 12:37:12 +0000 (18:07 +0530)]
davinci: omapl138_lcdk: fix tXSNR DDR2 timing value

As per the datasheet[1] available for DDR2 part on board
the OMAP-L138 LCDK, the tXSNR (exit self refresh to a
non-read command) is 137.5 ns. This corresponds to a
value of 20 to be written to T_XSNR register field of
OMAP-L138's DDR configuration. The DDR2 is at 150 MHz.

Fix this. The correct value also appears on the initialization
scripts (called CCS GEL files) available on TI's wiki pages[2]

[1] http://www.samsung.com/global/business/semiconductor/file/product/ds_k4t1gxx4qf_rev12-0.pdf
[2] http://processors.wiki.ti.com/index.php/L138/C6748_Development_Kit_(LCDK)#CCS_XML_.26_GEL_Files

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agocmd: jffs2: Rename command ls to fsls
Siva Durga Prasad Paladugu [Tue, 30 May 2017 12:18:55 +0000 (14:18 +0200)]
cmd: jffs2: Rename command ls to fsls

Rename command ls to fsls as its conflicting with
generic file systesm command ls and this is causing
compilation failure as below, if both are enabled
and this patch fixes it.

cmd/jffs2.o:(.u_boot_list_2_cmd_2_ls+0x0):
multiple definition of `_u_boot_list_2_cmd_2_ls'
cmd/fs.o:(.u_boot_list_2_cmd_2_ls+0x0):first defined here
scripts/Makefile.build:359: recipe for target 'cmd/built-in.o'
failed
make[1]: *** [cmd/built-in.o] Error 1

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agortc: ds1337: drop "SYS" from config variables
Chris Packham [Tue, 30 May 2017 00:03:33 +0000 (12:03 +1200)]
rtc: ds1337: drop "SYS" from config variables

There is some inconsistency between uses of CONFIG_RTC_DS13xx and
CONFIG_SYS_RTC_DS13xx. Address this by dropping the "SYS" from
these variables.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agospl: stm32f7: configure for xip booting
Vikas Manocha [Sun, 28 May 2017 19:55:14 +0000 (12:55 -0700)]
spl: stm32f7: configure for xip booting

With xip booting configuration, we don't need to copy the next image
(U-Boot or linux xipimage) from flash to sdram area.

Flash memory organization is like this:
spl-U-Boot: u-boot-spl.bin  : 0x0800_0000
U-Boot : u-boot-dtb.bin : 0x0800_8000
linux : xipImage : 0x0800_8000

It is also possible to have U-Boot binary & linux binaries configured at
different addresses of flash memory like U-Boot at 0x0800_8000 & linux
xipImage at 0x0800_4000. But in any case, spl-U-Boot needs to be compiled for
U-Boot as next binary with SPL_OS_BOOT option disabled.
By default, spl is configured to boot linux xipImage.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agospl: stm32f7: add kernel boot support
Vikas Manocha [Sun, 28 May 2017 19:55:13 +0000 (12:55 -0700)]
spl: stm32f7: add kernel boot support

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agoserial: stm32f7: disable overrun
Vikas Manocha [Sun, 28 May 2017 19:55:12 +0000 (12:55 -0700)]
serial: stm32f7: disable overrun

With overrun enabled, serial port console freezes & stops receiving data with
overun error if we keep sending data.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agoSPL: Add XIP booting support
Vikas Manocha [Sun, 28 May 2017 19:55:11 +0000 (12:55 -0700)]
SPL: Add XIP booting support

Enable support for XIP (execute in place) of U-Boot or kernel image. There is
no need to copy image from flash to ram if flash supports execute in place.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Alexandru Gagniuc <alex.g@adaptrum.com>
7 years agostm32: stm32f7: add spl build support
Vikas Manocha [Sun, 28 May 2017 19:55:10 +0000 (12:55 -0700)]
stm32: stm32f7: add spl build support

This commit supports booting from stm32 internal nor flash. spl U-Boot
initializes the sdram memory, copies next image (e.g. standard U-Boot)
to sdram & then jumps to entry point.

Here are the flash memory addresses for U-Boot-spl & standard U-Boot:
- spl U-Boot : 0x0800_0000
- standard U-Boot : 0x0800_8000

To compile u-boot without spl: Remove SUPPORT_SPL configuration
(arch/arm/mach-stm32/Kconfig)

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
[trini: Rework Kconfig logic a bit]
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agorockchip: video: document externally visible functions for rk_vop
Philipp Tomsich [Fri, 2 Jun 2017 14:06:18 +0000 (16:06 +0200)]
rockchip: video: document externally visible functions for rk_vop

Documents the externally visible functions shared between the VOP
drivers for the RK3288 and RK3399.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: video: document externally visible functions for rk_hdmi
Philipp Tomsich [Fri, 2 Jun 2017 14:06:17 +0000 (16:06 +0200)]
rockchip: video: document externally visible functions for rk_hdmi

Documents the externally visible functions shared between the HDMI
drivers for the RK3288 and RK3399.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agovideo: atmel_hlcdfb: Fix misaligned cache operation warning
Wenyou Yang [Fri, 2 Jun 2017 03:29:04 +0000 (11:29 +0800)]
video: atmel_hlcdfb: Fix misaligned cache operation warning

Fix the warning,
 ---8<---
CACHE: Misaligned operation at range [3fdffff03fdffffc]
 ---<8---

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agosunxi: video: Add support for CSC and TVE to DE2 driver
Jernej Skrabec [Fri, 19 May 2017 15:41:16 +0000 (17:41 +0200)]
sunxi: video: Add support for CSC and TVE to DE2 driver

Extend DE2 driver with support for TVE driver, which will be added in
next commit. TVE unit expects data to be in YUV format, so CSC support
is also added here.

Note that HDMI driver has higher priority, so TV out is not probed if
HDMI monitor is detected.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agosunxi: Add base address for TV encoder
Jernej Skrabec [Fri, 19 May 2017 15:41:15 +0000 (17:41 +0200)]
sunxi: Add base address for TV encoder

This commit adds TVE base address for Allwinner H3 and H5 SoCs.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agosunxi: video: Rename tve.c to tve_common.c
Jernej Skrabec [Fri, 19 May 2017 15:41:14 +0000 (17:41 +0200)]
sunxi: video: Rename tve.c to tve_common.c

In order to avoid future confusion with similary named files, rename
tve.c to tve_common.c. New name better represents the fact that this file
holds code which can be and will be shared between multiple drivers.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoedid: Fix gcc 7.1 warning
Jernej Skrabec [Tue, 23 May 2017 21:05:30 +0000 (23:05 +0200)]
edid: Fix gcc 7.1 warning

This commit fixes the warning produced by gcc 7.1.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoFixup bug in PMIC TPS65217 register address definition
Brock Zheng Techyauld Ltd [Tue, 6 Jun 2017 01:06:21 +0000 (09:06 +0800)]
Fixup bug in PMIC TPS65217 register address definition

The addresses of the registers in TI TPS65217 are not continuous.
     There is a gap between ENABLE(0x16) and DEFUVLO(0x18). No 0x17
     register available.

     Fixup the enum values by adding a 'reserved' placeholder to correct
     the addresses higher than 0x17.

     Series-to: Heiko Schocher <hs@denx.de>

Signed-off-by: Brock Zheng Techyauld Ltd <yzheng@techyauld.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
7 years agopower: regulator: lp87565: add regulator support
Keerthy [Wed, 7 Jun 2017 13:38:29 +0000 (19:08 +0530)]
power: regulator: lp87565: add regulator support

The driver provides regulator set/get voltage
enable/disable functions for lp87565 family of PMICs.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agopower: pmic: lp87565: Add the basic pmic support
Keerthy [Wed, 7 Jun 2017 13:38:28 +0000 (19:08 +0530)]
power: pmic: lp87565: Add the basic pmic support

Add support to bind the regulators/child nodes with the pmic.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agodm: mmc: Avoid probing block devices in find_mmc_device()
Simon Glass [Sat, 27 May 2017 17:37:19 +0000 (11:37 -0600)]
dm: mmc: Avoid probing block devices in find_mmc_device()

We do not need to probe the block device here, so avoid doing so. The MMC
device itself must be active, but the block device can come later.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodm: mmc: Ensure that block device is probed
Simon Glass [Sat, 27 May 2017 17:37:18 +0000 (11:37 -0600)]
dm: mmc: Ensure that block device is probed

Make sure that we probe the block device before using it when reading
the environment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agodm: blk: Add a way to obtain a block device from its parent
Simon Glass [Sat, 27 May 2017 17:37:17 +0000 (11:37 -0600)]
dm: blk: Add a way to obtain a block device from its parent

Many devices support a child block device (e.g. MMC, USB). Add a
convenient way to get this device given the parent device.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoboard: ti: AM43XX: Add ddr voltage rail configuration
Keerthy [Fri, 2 Jun 2017 09:30:31 +0000 (15:00 +0530)]
board: ti: AM43XX: Add ddr voltage rail configuration

Add ddr voltage rail (dcdc3) configuration. Set the dcdc3
DDR supply to 1.35V.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agopower: pmic: tps65218: Add DCDC3 configuration
Keerthy [Fri, 2 Jun 2017 09:30:30 +0000 (15:00 +0530)]
power: pmic: tps65218: Add DCDC3 configuration

Some boards like am437x-gp-evm require dcdc3 also to be configured
as it feeds on to ddr. Hence add the capability as well.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agopower: regulator: palmas: Add smps12 dual regulator for tps65917
Keerthy [Fri, 2 Jun 2017 05:21:51 +0000 (10:51 +0530)]
power: regulator: palmas: Add smps12 dual regulator for tps65917

Add smps12 dual regulator for tps65917

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agommc: sh_sdhi: Fix Kconfig entry
Marek Vasut [Sat, 13 May 2017 13:51:14 +0000 (15:51 +0200)]
mmc: sh_sdhi: Fix Kconfig entry

The Kconfig entry depends on RMOBILE, but this was renamed
to ARCH_RMOBILE in commit 1cc95f6e1b38 (ARM: Rmobile: Rename
CONFIG_RMOBILE to CONFIG_ARCH_RMOBILE) . Fix this omission.

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: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: sh_sdhi: Add SDHI support
Kouei Abe [Sat, 13 May 2017 13:51:18 +0000 (15:51 +0200)]
mmc: sh_sdhi: Add SDHI support

R-Car Gen3 series have four SD card interfaces (SDHI0 to SDHI3),
two of which can also be used as MMC interfaces (SDHI2 and SDHI3).
This adds High-speed mode SD clock frequency between 25MHz and 50MHz,
8bit/4bit bus width, high capacity and low voltage device support.

Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: sh_sdhi: Add MMC version 5.0 support
Kouei Abe [Sat, 13 May 2017 13:51:17 +0000 (15:51 +0200)]
mmc: sh_sdhi: Add MMC version 5.0 support

Renesas SDHI SD/MMC driver did not support MMC version 5.0 devices.
This adds MMC version 5.0 device support.

Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com>
Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
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: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agommc: sh_sdhi: Add 64-bit access to sd_buf support
Kouei Abe [Sat, 13 May 2017 13:51:16 +0000 (15:51 +0200)]
mmc: sh_sdhi: Add 64-bit access to sd_buf support

Renesas SDHI SD/MMC driver has 16-bit width bus access to SD_BUF.
This adds 64-bit width bus access to SD_BUF.

Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: sh_sdhi: Set SD_INFOx interrupt mask before command starting
Kouei Abe [Sat, 13 May 2017 13:51:15 +0000 (15:51 +0200)]
mmc: sh_sdhi: Set SD_INFOx interrupt mask before command starting

When setting interrupt mask after command starting, an unintended
interrupt status sometimes occurs.

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: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agopatman: Add a functional test
Simon Glass [Mon, 29 May 2017 21:31:31 +0000 (15:31 -0600)]
patman: Add a functional test

The existing test (patman --test) only covers basic checkpatch output.
We have had some problems with unicode processing and could use test
coverage for the various tags patman supports.

Add a new functional test which runs most of the patman flow on a few
test commits and checks that the results are correct.

See the documentation in the test for a description of what it does.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agopatman: Rename 'list' variable in MakeCcFile()
Simon Glass [Mon, 29 May 2017 21:31:30 +0000 (15:31 -0600)]
patman: Rename 'list' variable in MakeCcFile()

This is not a good variable name in Python because 'list' is a type. It
shows up highlighted in some editors. Rename it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agopatman: Add a maintainer test feature to MakeCcFile()
Simon Glass [Mon, 29 May 2017 21:31:29 +0000 (15:31 -0600)]
patman: Add a maintainer test feature to MakeCcFile()

Allow the add_maintainers parameter to be a list of maintainers, thus
allowing us to simulate calling the script in tests without actually
needing it to work.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agopatman: Add unicode to test patches
Simon Glass [Mon, 29 May 2017 21:31:28 +0000 (15:31 -0600)]
patman: Add unicode to test patches

Add some unicode to the test patches to make sure that patman does the
right thing.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agopatman: Don't return the series in FixPatches()
Simon Glass [Mon, 29 May 2017 21:31:27 +0000 (15:31 -0600)]
patman: Don't return the series in FixPatches()

There is no need for this function to return the same object that was
passed in. Drop the return value.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agopatman: Don't report unicode character
Simon Glass [Mon, 29 May 2017 21:31:26 +0000 (15:31 -0600)]
patman: Don't report unicode character

Unicode characters may appear in input patches so we should not warn about
them. Drop this warning.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agopatman: Rename 'str' variable in EmailPatches()
Simon Glass [Mon, 29 May 2017 21:31:25 +0000 (15:31 -0600)]
patman: Rename 'str' variable in EmailPatches()

This is not a good variable name in Python because 'str' is a type. It
shows up highlighted in some editors. Rename it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agopatman: Don't convert input data to unicode
Simon Glass [Mon, 29 May 2017 21:31:24 +0000 (15:31 -0600)]
patman: Don't convert input data to unicode

The communication filter reads data in blocks and converts each block to
unicode (if necessary) one at a time. In the unlikely event that a unicode
character in the input spans a block this will not work. We get an error
like:

UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1022-1023:
   unexpected end of data

There is no need to change the input to unicode, so the easiest fix is to
drop this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agopatman: Adjust handling of unicode email address
Simon Glass [Mon, 29 May 2017 21:31:23 +0000 (15:31 -0600)]
patman: Adjust handling of unicode email address

Don't mess with the email address when outputting them. Just make sure
they are encoded with utf-8.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agopatman: encode CC list to UTF-8
Philipp Tomsich [Mon, 29 May 2017 21:31:22 +0000 (15:31 -0600)]
patman: encode CC list to UTF-8

This change encodes the CC list to UTF-8 to avoid failures on
maintainer-addresses that include non-ASCII characters (observed on
Debian 7.11 with Python 2.7.3).

Without this, I get the following failure:
  Traceback (most recent call last):
    File "tools/patman/patman", line 159, in <module>
      options.add_maintainers)
    File "[snip]/u-boot/tools/patman/series.py", line 234, in MakeCcFile
      print(commit.patch, ', '.join(set(list)), file=fd)
  UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 81: ordinal not in range(128)
from Heiko's email address:
  [..., u'"Heiko St\xfcbner" <heiko@sntech.de>', ...]

While with this change added this encodes to:
  "=?UTF-8?q?Heiko=20St=C3=BCbner?= <heiko@sntech.de>"

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agobuildman: Fix bloat option when 'new' only drops functions
Tom Rini [Mon, 22 May 2017 17:48:52 +0000 (13:48 -0400)]
buildman: Fix bloat option when 'new' only drops functions

In the case where a new build only decreases sizes and does not increase
any size we still want to report what functions have been dropped when
doing a bloat comparison.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agosandbox: Fix comparison of unsigned enum expression warning
Tom Rini [Sun, 14 May 2017 00:11:30 +0000 (20:11 -0400)]
sandbox: Fix comparison of unsigned enum expression warning

In os_dirent_get_typename() we are checking that type falls within the
known values of the enum os_dirent_t.  With clang-3.8 testing this value
as being >= 0 results in a warning as it will always be true.  This
assumes of course that we are only given valid data.  Given that we want
to sanity check the input, we change this to check that it falls within
the range of the first to the last entry in the given enum.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agostm32f7: remove duplicate configs
Vikas Manocha [Sun, 28 May 2017 19:55:09 +0000 (12:55 -0700)]
stm32f7: remove duplicate configs

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agospl: armv7m: to keep ARM v7M in thumb mode before booting next image
Vikas Manocha [Sun, 28 May 2017 19:55:08 +0000 (12:55 -0700)]
spl: armv7m: to keep ARM v7M in thumb mode before booting next image

On ARM v7M, the processor will return to ARM mode when executing blx
instruction with bit 0 of the address == 0. Always set it to 1 to stay in thumb
mode.

At present, it is applied only for raw U-Boot. This patch moves it to just
before booting next image. This way armv7m will be in thumb mode for any image
like raw or image with header like zImage or standard U-Boot.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agosunxi: add a defconfig for SoPine w/ official baseboard
Icenowy Zheng [Sat, 3 Jun 2017 09:10:25 +0000 (17:10 +0800)]
sunxi: add a defconfig for SoPine w/ official baseboard

The SoPine is a SoM by Pine64, with an Allwinner A64 SoC, a LPDDR3 DRAM
chip, an AXP803 PMIC, a SPI NOR Flash and a MicroSD slot. The card
detect pin of the MicroSD slot is broken, however, it doesn't matter as
the design of SoPine didn't allow hot-swapping the MicroSD card (The
MicroSD slot is at the back of the SoM, and when the SoM is installed on
the baseboard, it's nearly impossible to remove the MicroSD).

The official baseboard of it is a board with nearly the same connectors
with the original Pine64+, with the MicroUSB power jack replaced, and
at the position of MicroSD slot a eMMC module slot is added.

Add support for SoPine with the official baseboard by adding its
defconfig file. It still uses the device tree of Pine64, however, it
will change after a proper device tree of SoPine with baseboard is
accepted by Linux mainline.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
[Update board/sunxi/MAINTAINERS]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agosunxi: add LPDDR3 timing from stock boot0
Icenowy Zheng [Sat, 3 Jun 2017 09:10:24 +0000 (17:10 +0800)]
sunxi: add LPDDR3 timing from stock boot0

As we added LPDDR3 support in the former patch, we need a set of timing
info to really enable it.

Add the timing info used by stock boot0.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agosunxi: add LPDDR3 DRAM type support for DesignWare-like DRAM controller
Icenowy Zheng [Sat, 3 Jun 2017 09:10:23 +0000 (17:10 +0800)]
sunxi: add LPDDR3 DRAM type support for DesignWare-like DRAM controller

Some A64 boards (SoPine and Pinebook production batch) use LPDDR3 DRAM
chips.

Add support for LPDDR3 DRAM in the DesignWare-like DRAM controller code.

Real LPDDR3 chips' support is not added yet in this commit.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agosunxi: enable DRAM initialization and SPL for V3s SoC
Icenowy Zheng [Sat, 3 Jun 2017 09:10:22 +0000 (17:10 +0800)]
sunxi: enable DRAM initialization and SPL for V3s SoC

As we have already support for the DesignWare DRAM controller and the
integrated DDR2 chip of V3s, let's enable the SPL support for V3s.

This patch also contains the default DRAM configuration for V3s.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agosunxi: add support for V3s DRAM controller
Icenowy Zheng [Sat, 3 Jun 2017 09:10:21 +0000 (17:10 +0800)]
sunxi: add support for V3s DRAM controller

Allwinner V3s features a DRAM controller like the on in H3, but with a
DDR2 DRAM.

Add support for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agosunxi: add support for the DDR2 in V3s SoC
Icenowy Zheng [Sat, 3 Jun 2017 09:10:20 +0000 (17:10 +0800)]
sunxi: add support for the DDR2 in V3s SoC

Allwinner V3s SoC features a co-packaged DDR2 DRAM chip, which needs its
timing param.

Add support for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agosunxi: enable dual rank detection in DesignWare-like DRAM code
Icenowy Zheng [Sat, 3 Jun 2017 09:10:19 +0000 (17:10 +0800)]
sunxi: enable dual rank detection in DesignWare-like DRAM code

The DesignWare-like DRAM code used to set the controller defaultly to
single rank mode, which makes it not able to detect the second rank.

Set the default value to dual rank, thus the rank detection code can
work and finally the rank setting will be the correct value.

Currently we know little about the dual-rank on R40, and the usage
of A15 address line seems to be breaking dual-rank support. The only R40
board currently available (Sinovoip Banana Pi M2 Ultra) uses A15 rather
than dual-rank, thus we cannot do research for it. So dual rank detection
is temporarily disabled on R40.

This change is tested on a Orange Pi One (H3, single rank), a Pine64+
2GiB version (A64, single rank) , a Pinebook early prototype with DDR3
(A64, dual rank) and a SoPine with some LPDDR3 patch (A64, dual CS pins
on one chip).

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agosunxi: Add selective DRAM type and timing
Icenowy Zheng [Sat, 3 Jun 2017 09:10:18 +0000 (17:10 +0800)]
sunxi: Add selective DRAM type and timing

DRAM chip varies, and one code cannot satisfy all DRAMs.

Add options to select a timing set.

Currently only DDR3-1333 (the original set) is added into it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agosunxi: add bank detection code to H3 DRAM initialization code
Icenowy Zheng [Sat, 3 Jun 2017 09:10:17 +0000 (17:10 +0800)]
sunxi: add bank detection code to H3 DRAM initialization code

Some DDR2 DRAM have only four banks, not eight.

Add code to detect this situation.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agosunxi: add option for 16-bit DW DRAM controller
Icenowy Zheng [Sat, 3 Jun 2017 09:10:16 +0000 (17:10 +0800)]
sunxi: add option for 16-bit DW DRAM controller

Some Allwinner SoCs features a DesignWare-like controller with only 16
bit bus width.

Add support for them.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agosunxi: Rename bus-width related macros in H3 DRAM code
Icenowy Zheng [Sat, 3 Jun 2017 09:10:15 +0000 (17:10 +0800)]
sunxi: Rename bus-width related macros in H3 DRAM code

The DesignWare DRAM controller used by H3 and newer SoCs use a bit to
identify whether the DRAM is half-width.

As H3 itself come with 32-bit DRAM, the two modes of the bit used to be
named "MCTL_CR_32BIT" and "MCTL_CR_16BIT", but for SoCs with 16-bit DRAM
they're really 8-bit and 16-bit.

Rename the bit's macro, and also rename the variable name in
dram_sun8i_h3.c.

This commit do not add 16-bit DRAM controller support, but the support
will be introduced in next commit.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agosunxi: makes an invisible option for H3-like DRAM controllers
Icenowy Zheng [Sat, 3 Jun 2017 09:10:14 +0000 (17:10 +0800)]
sunxi: makes an invisible option for H3-like DRAM controllers

Allwinner SoCs after H3 (e.g. A64, H5, R40, V3s) uses a H3-like
DesignWare DRAM controller, which do not have official free DRAM
initialization code, but can use modified dram_sun8i_h3.c.

Add a invisible option for easier DRAM initialization code reuse.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agosun8i: h3: Add initial NanoPi M1 Plus support
Jagan Teki [Tue, 30 May 2017 17:41:14 +0000 (17:41 +0000)]
sun8i: h3: Add initial NanoPi M1 Plus support

NanoPi M1 Plus is designed and developed by FriendlyElec
for professionals, enterprise users, makers and hobbyists
using the Allwinner H3 SOC.

NanoPi M1 Plus key features
- Allwinner H3, Quad-core Cortex-A7@1.2GHz
- 1GB DDR3 RAM
- 8GB eMMC
- microSD slot
- 10/100/1000M Ethernet
- Serial Debug Port
- 5V 2A DC power-supply

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Thu, 8 Jun 2017 16:14:11 +0000 (12:14 -0400)]
Merge git://git.denx.de/u-boot-rockchip

Here is additional rk3368 and rk3399 support, rv1108 support,
refactoring HDMI video (brought in from Anatolij's tree to resolve
conflicts), some mkimage fixes and a few other things.

7 years agorockchip: board: puma_rk3399: enable BMP_16BPP, BMP_24BPP and BMP_32BPP
Philipp Tomsich [Wed, 31 May 2017 15:59:36 +0000 (17:59 +0200)]
rockchip: board: puma_rk3399: enable BMP_16BPP, BMP_24BPP and BMP_32BPP

With video output support for the RK3399-Q7 (Puma) available, we want
CMD_BMP enabled and the support for 16bit, 24bit and 32bit BMPs
defined.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Version-changes: 2
- enable SYS_WHITE_ON_BLACK via defconfig
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: video: rk_vop: add grf field
Philipp Tomsich [Wed, 7 Jun 2017 11:13:28 +0000 (13:13 +0200)]
rockchip: video: rk_vop: add grf field

The last set of rebases had dropped the 'grf' field from the common
rk_vop.  Add this back to un-break the build (and driver).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: video: rk3399: add HDMI TX support on the RK3399
Philipp Tomsich [Wed, 31 May 2017 15:59:34 +0000 (17:59 +0200)]
rockchip: video: rk3399: add HDMI TX support on the RK3399

This commit enables the RK3399 HDMI TX, which is very similar to the
one found on the RK3288.  As requested by Simon, this splits the HDMI
driver into a SOC-specific portion (rk3399_hdmi.c, rk3288_hdmi.c) and
a common portion (rk_hdmi.c).

Note that the I2C communication for reading the EDID works well with
the default settings, but does not with the alternate settings used on
the RK3288... this configuration aspect is reflected by the driverdata
for the RK3399 driver.

Having some sort of DTS-based configuration for the regulator
dependencies would be nice for the future, but for now we simply use
lists of regulator names (also via driverdata) that we probe.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>