oweals/u-boot.git
7 years agosunxi: video: Split out TVE code
Jernej Skrabec [Wed, 10 May 2017 16:46:28 +0000 (18:46 +0200)]
sunxi: video: Split out TVE code

Newer SoCs use same TV encoder unit. Split it out so it can be reused
with new DM video driver.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agovideo: bmp: rename CONFIG_BMP_24BMP to CONFIG_BMP_24BPP
Philipp Tomsich [Fri, 5 May 2017 19:48:30 +0000 (21:48 +0200)]
video: bmp: rename CONFIG_BMP_24BMP to CONFIG_BMP_24BPP

Due to a typo, the 24 bit-per-pixel configuration ends in 24BMP
instead of 24BPP. This change renames it throughout the source tree
for consistency and to make moving these options into Kconfig easier
and less error-prone.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
7 years agorockchip: video: introduce VIDEO_DW_HDMI and select for Rockchip HDMI
Philipp Tomsich [Fri, 5 May 2017 19:48:26 +0000 (21:48 +0200)]
rockchip: video: introduce VIDEO_DW_HDMI and select for Rockchip HDMI

Instead of having drivers/video/rockchip/Kconfig point outside of its
hierarchy for dw_hdmi.o, we should use a configuration-option to
include the Designware HDMI support.

This change introduces a new config option (not to be selected via
menuconfig, but to be selected from a dependent video driver's
configuration option) that enables dw_hdmi.o and selects it whenever
the HDMI support for Rockchip SoCs is selected.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agovideo: dw_hdmi: Select HDMI mode only if monitor supports it
Jernej Skrabec [Sat, 29 Apr 2017 12:43:37 +0000 (14:43 +0200)]
video: dw_hdmi: Select HDMI mode only if monitor supports it

Some DVI monitors don't work in HDMI mode. Set it only if edid data
explicitly states that it is supported.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoedid: Add HDMI flag to timing info
Jernej Skrabec [Sat, 29 Apr 2017 12:43:36 +0000 (14:43 +0200)]
edid: Add HDMI flag to timing info

Some DVI monitors don't show anything in HDMI mode since audio stream
confuses them. To solve this situation, this commit adds HDMI flag in
timing data and sets it accordingly during edid parsing.

First existence of extension block is checked. If it exists and it is
CEA861 extension, then data blocks are checked for presence of HDMI
vendor specific data block. If it is present, HDMI flag is set.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoedid: Set timings flags according to edid
Jernej Skrabec [Sat, 29 Apr 2017 12:43:35 +0000 (14:43 +0200)]
edid: Set timings flags according to edid

Timing flags are never set, so they may contain garbage. Since some
drivers check them, video output may be broken on those drivers.

Initialize them to 0 and check for few common flags.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Sat, 13 May 2017 20:45:35 +0000 (16:45 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

7 years agodavinci: omapl138_lcdk: switch to using TI_COMMON_CMD_OPTIONS
Sekhar Nori [Thu, 11 May 2017 14:44:22 +0000 (20:14 +0530)]
davinci: omapl138_lcdk: switch to using TI_COMMON_CMD_OPTIONS

Now that we support using TI_COMMON_CMD_OPTIONS,
we dont have to enable a number of commands explicitly
in the defconfig if we enable TI_COMMON_CMD_OPTIONS.

Enable TI_COMMON_CMD_OPTIONS and regenerate the defconfig
using "make savedefconfig".

CMD_GPIO has been kept disabled because there is no GPIO
support (yet) on OMAP-L138 LCDK.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agodavinci: omapl138_lcdk: add support for TI_COMMON_CMD_OPTIONS
Sekhar Nori [Thu, 11 May 2017 14:44:21 +0000 (20:14 +0530)]
davinci: omapl138_lcdk: add support for TI_COMMON_CMD_OPTIONS

OMAP-L138 LCDK board can benefit from using the commonly
used commands enabled by TI_COMMON_CMD_OPTIONS.

Source the relevant Kconfig file so TI_COMMON_CMD_OPTIONS
can be enabled for OMAP-L138 LCDK board in a future patch.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agonet: Disable the format-extra-args warning
Tom Rini [Wed, 10 May 2017 19:26:06 +0000 (15:26 -0400)]
net: Disable the format-extra-args warning

We will see warnings such as:
net/eth_common.c:57:61: warning: data argument not used by format string [-Wformat-extra-args]
        sprintf(enetvar, index ? "%s%daddr" : "%saddr", base_name, index);
                                              ~~~~~~~~             ^
With clang.  In this case we do not want to re-write our code to be less
compact as the above is intentional and readable.  Add a comment above
the disabling so that it's clear why we want that warning off.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agotpm: Fix comparison of unsigned expression warning
Tom Rini [Wed, 10 May 2017 19:20:18 +0000 (15:20 -0400)]
tpm: Fix comparison of unsigned expression warning

The function tpm_xfer returns int so make 'err' be int rather than
uint32_t so that we can catch an error condition.  Reported by
clang-3.8.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agogpio-uclass.c: Fix comparison of unsigned expression warning
Tom Rini [Wed, 10 May 2017 19:20:15 +0000 (15:20 -0400)]
gpio-uclass.c: Fix comparison of unsigned expression warning

We declare that gpio_base (which is the base for counting gpios, not an
address) is unsigned.  Therefore the comparison with >= 0 is always
true.  As the desire is to allow for this base number to be 0, we can
just drop this check.  Reported by clang-3.8.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agocmd/led.c: Remove unnecessary check on 'cmd' value
Tom Rini [Wed, 10 May 2017 19:20:14 +0000 (15:20 -0400)]
cmd/led.c: Remove unnecessary check on 'cmd' value

We first check that if argc is less than 2 we return CMD_RET_USAGE.  We
then see if argc is greater than 2 and if so call get_led_cmd() to set
'cmd' and otherwise set it to LEDST_COUNT (which will always be positive
as it's an enum with 0 already assigned).  Therefore the test on if cmd
is less than 0 will always be false and simply be omitted.  Reported by
clang-3.8.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agocmd/io.c: Fix comparison of unsigned expression warning
Tom Rini [Wed, 10 May 2017 19:20:13 +0000 (15:20 -0400)]
cmd/io.c: Fix comparison of unsigned expression warning

The function cmd_get_data_size() returns an int and not unsigned.  So we
should assign it to an int rather than unsigned so that we can later
compare the return value.  Reported by clang-3.8.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agocmd/bdinfo.c: Fix unused function warning
Tom Rini [Wed, 10 May 2017 19:20:12 +0000 (15:20 -0400)]
cmd/bdinfo.c: Fix unused function warning

On most architectures we do not call print_std_bdinfo() so mark it with
__maybe_unused.  Reported by clang-3.8.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoKconfig: Drop CONFIG_EMAC_MDIO_PHY_NUM
Tom Rini [Wed, 10 May 2017 19:20:11 +0000 (15:20 -0400)]
Kconfig: Drop CONFIG_EMAC_MDIO_PHY_NUM

This particular macro hasn't been used in the code for some time, remove
these references that were missed.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agotools/genboardscfg.py: Make 'Supported' as known status
Lokesh Vutla [Wed, 10 May 2017 10:49:52 +0000 (16:19 +0530)]
tools/genboardscfg.py: Make 'Supported' as known status

As per MAINTAINERS[1] file description, 'Supported' is
a valid status for a board. But buildman thinks 'Maintained'
is the only valid state and complains about boards with 'Supported'
status. Update buildman to accept 'Supported' as valid state.

[1] http://git.denx.de/?p=u-boot.git;a=blob;f=MAINTAINERS;h=0962b47bf9057b22e93624e070c0204b893790dc;hb=HEAD#l10

Reported-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoasm-generic: global_data: change timebase_l/h to unsigned int
Peng Fan [Tue, 9 May 2017 02:32:03 +0000 (10:32 +0800)]
asm-generic: global_data: change timebase_l/h to unsigned int

Change type of timebase_l/h to unsigned int.
>From lib/time.c: ((uint64_t)gd->timebase_h << 32) | gd->timebase_l;
This piece code is based on that timebase_h and timebase_l are
32bits width, so change the type to unsigned int.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Eddie Cai <eddie.cai.linux@gmail.com>
Cc: Jagan Teki <jteki@openedev.com>
Cc: York Sun <york.sun@nxp.com>
Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm: change tbu/l type to unsigned int
Peng Fan [Tue, 9 May 2017 02:32:02 +0000 (10:32 +0800)]
arm: change tbu/l type to unsigned int

Change tbu/l type to unsigned int.
>From the timer file for arm,
"(((unsigned long long)gd->arch.tbu) << 32) | gd->arch.tbl;" is used,
This piece code is based on tbu/tbl is 32bits, so change the type to
unsigned int.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
7 years agom5253demo: Fix static variable in non-static inline function warning
Tom Rini [Tue, 9 May 2017 02:14:35 +0000 (22:14 -0400)]
m5253demo: Fix static variable in non-static inline function warning

The function 'spin_wheel' is declared as inline, but not static and thus
we see warnings that 'w' and 'p' are declared static in a non-static
inline function.  Correct this by marking spin_wheel as static inline.

Cc: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agocommon: Only build cli_readline.o for CMDLINE on non-SPL
Tom Rini [Tue, 9 May 2017 02:14:34 +0000 (22:14 -0400)]
common: Only build cli_readline.o for CMDLINE on non-SPL

With gcc-6 and later we may get a warning such as:
.../common/cli_readline.c:20:21: warning: ‘tab_seq’ defined but not used [-Wunused-const-variable=]
 static const char   tab_seq[] = "        "; /* used to expand TABs */
                     ^~~~~~~
.../common/cli_readline.c:19:19: warning: ‘erase_seq’ defined but not used [-Wunused-const-variable=]
 static const char erase_seq[] = "\b \b"; /* erase sequence */
                   ^~~~~~~~~

Because in SPL we're normally not doing interactive commands anyhow, so
lets just not compile this at all in SPL.  This also means that we need
to correct the logic (and comment) about what the drivers/ddr/fsl/ and
CONFIG_FSL_DDR_INTERACTIVE requires and this will be included in SPL
there.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agonet: uli526x: Fix unknown storage size error
Tom Rini [Tue, 9 May 2017 02:14:33 +0000 (22:14 -0400)]
net: uli526x: Fix unknown storage size error

The variable netdev_ethtool_ops is not referenced, drop it.  However
with gcc-6 or later we fail to even compile as we do not have the
required struct definition in U-Boot.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agonet: phy: mv88e61xx: Fix uninitialized variable warning
Tom Rini [Tue, 9 May 2017 02:14:32 +0000 (22:14 -0400)]
net: phy: mv88e61xx: Fix uninitialized variable warning

The variable 'res' may be unused uninitialized if our call to
mv88e61xx_port_read (register read) fails and we goto the error
handling section.  In this case we set 'res' to -EIO to indicate why we
failed.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Chris Packham <judge.packham@gmail.com>
Cc: Kevin Smith <kevin.smith@elecsyscorp.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agonet: eepro100: Fix unused variable warning
Tom Rini [Tue, 9 May 2017 02:14:31 +0000 (22:14 -0400)]
net: eepro100: Fix unused variable warning

The variable i82557_config_cmd is never referenced, drop.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agovideo: ld9040: Fix unused variable warnings
Tom Rini [Tue, 9 May 2017 02:14:30 +0000 (22:14 -0400)]
video: ld9040: Fix unused variable warnings

The variables SEQ_SWRESET, SEQ_ELVSS_ON, SEQ_TEMP_SWIRE, SEQ_APON and
SEQ_SLPIN are unreferenced, drop.

Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agocolibri_imx7: Fix unused variable warning
Tom Rini [Tue, 9 May 2017 02:14:29 +0000 (22:14 -0400)]
colibri_imx7: Fix unused variable warning

The variable usdhc3_emmc_pads is never referenced, drop.

Cc: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoapalis_imx6: Fix unused variable warning
Tom Rini [Tue, 9 May 2017 02:14:28 +0000 (22:14 -0400)]
apalis_imx6: Fix unused variable warning

The variable vga_pads is never referenced, drop.

Cc: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agopcm058: Fix unused variable warnings
Tom Rini [Tue, 9 May 2017 02:14:27 +0000 (22:14 -0400)]
pcm058: Fix unused variable warnings

The variable nfc_pads is only referenced when CONFIG_CMD_NAND is set,
add a gaurd.  The variable gpio_pads is never referenced, drop it.  The
variable usdhc4_pads are only referenced when we do not have
CONFIG_CMD_NAND set and we are not doing an SPL build, modify the
existing guard.

Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
7 years agogdsys: P1022: Fix unused variable warnings
Tom Rini [Tue, 9 May 2017 02:14:26 +0000 (22:14 -0400)]
gdsys: P1022: Fix unused variable warnings

The variables prg_stage2_prepare, prg_stage2_success and prg_stage_fail
are only referenced when CCDM_SECOND_STAGE is set, move these to be by
the existing guard.

Cc: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agogw_ventana: Fix unused variable warnings
Tom Rini [Tue, 9 May 2017 02:14:25 +0000 (22:14 -0400)]
gw_ventana: Fix unused variable warnings

The variable nfc_pads is only referenced when CONFIG_CMD_NAND is set,
move the existing guard and drop a now redundant comment.  The variable
gwproto_gpio_pads is never referenced, remove it.

Cc: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agomx6ul_14x14_evk: Fix unused variable warning
Tom Rini [Tue, 9 May 2017 02:14:24 +0000 (22:14 -0400)]
mx6ul_14x14_evk: Fix unused variable warning

The variable usdhc1_pads is only referenced during SPL builds, add a guard.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
7 years agomx6slevk: Fix unused variable warning
Tom Rini [Tue, 9 May 2017 02:14:23 +0000 (22:14 -0400)]
mx6slevk: Fix unused variable warning

The variable usdhc1_pads is only referenced during SPL builds, add a
guard.

Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
7 years agocgtqmx6eval: Fix unused variable warning
Tom Rini [Tue, 9 May 2017 02:14:22 +0000 (22:14 -0400)]
cgtqmx6eval: Fix unused variable warning

The variable usdhc2_pads is only referenced during SPL builds, add a guard.

Cc: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoot1200: Fix unused variable warning
Tom Rini [Tue, 9 May 2017 02:14:21 +0000 (22:14 -0400)]
ot1200: Fix unused variable warning

The variable pwm_pad is never referenced, drop.

Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
7 years agork3036: Fix unused variable warning
Tom Rini [Tue, 9 May 2017 02:14:20 +0000 (22:14 -0400)]
rk3036: Fix unused variable warning

The variable grf is only referenced if EARLY_DEBUG is defined so move the
declaration to be under the existing guard.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agosocrates: Fix a misleading indentation warning
Tom Rini [Tue, 9 May 2017 02:14:19 +0000 (22:14 -0400)]
socrates: Fix a misleading indentation warning

With gcc-6 and later we see a warning about the fact that we have a
construct of "if (test);\n\tstatement".  Upon reviewing the code, the
intention here is as the compiler suggests, we only want to execute the
indented statement if the test was true.

Cc: Sergei Poselenov <sposelenov@emcraft.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agocommon: env: remove superfluous assignment
xypron.glpk@gmx.de [Mon, 8 May 2017 19:43:43 +0000 (21:43 +0200)]
common: env: remove superfluous assignment

The value assigned to variable 'value' is never used.

The problem was indicated by clang scan-build.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
7 years agotools: kwbimage fix build with OpenSSL 1.1.x
Jelle van der Waa [Mon, 8 May 2017 19:31:20 +0000 (21:31 +0200)]
tools: kwbimage fix build with OpenSSL 1.1.x

The rsa_st struct has been made opaque in 1.1.x, add forward compatible
code to access the n, e, d members of rsa_struct.

EVP_MD_CTX_cleanup has been removed in 1.1.x and EVP_MD_CTX_reset should be
called to reinitialise an already created structure.

Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
7 years agorsa: Fix build with OpenSSL 1.1.x
Jelle van der Waa [Mon, 8 May 2017 19:31:19 +0000 (21:31 +0200)]
rsa: Fix build with OpenSSL 1.1.x

The rsa_st struct has been made opaque in 1.1.x, add forward compatible
code to access the n, e, d members of rsa_struct.

EVP_MD_CTX_cleanup has been removed in 1.1.x and EVP_MD_CTX_reset should be
called to reinitialise an already created structure.

7 years agonet/arp: remove superfluous assignments
xypron.glpk@gmx.de [Mon, 8 May 2017 19:24:28 +0000 (21:24 +0200)]
net/arp: remove superfluous assignments

The value of variable pkt is never used.

The problem was indicated by clang scan-build.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
7 years agolib/slre: remove superfluous assignment
xypron.glpk@gmx.de [Mon, 8 May 2017 19:13:43 +0000 (21:13 +0200)]
lib/slre: remove superfluous assignment

The value assigned to saved_offset is never used.

The problem was indicated by clang scan-build.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
7 years agopci: avoid memory leak
xypron.glpk@gmx.de [Mon, 8 May 2017 18:40:16 +0000 (20:40 +0200)]
pci: avoid memory leak

strdup uses malloc to allocate memory for str.
If we cannot bind to the generic driver we should release
the memory.

The problem was indicated by clang scan-build.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoenv: avoid possible NULL pointer access
xypron.glpk@gmx.de [Mon, 8 May 2017 18:23:54 +0000 (20:23 +0200)]
env: avoid possible NULL pointer access

env_attr_lookup call env_attr_walk with
callback = regex_callback.

In env_attr_walk
attributes = strchr(entry_cpy, ENV_ATTR_SEP)
will return NULL if ENV_ATTR_SEP is not found.

In the aftermath regex_callback may call
strlen(attributes)
with a NULL value which will lead to a failure.

The problem was indicated by scan-clam.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
7 years agoenv: correct sign for error code
xypron.glpk@gmx.de [Mon, 8 May 2017 17:30:58 +0000 (19:30 +0200)]
env: correct sign for error code

Error codes should be negative.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
7 years agoarm: amx3xx: Add support for early debug
Lokesh Vutla [Fri, 5 May 2017 08:15:28 +0000 (13:45 +0530)]
arm: amx3xx: Add support for early debug

For early debug, the following configs needs to be enabled:

CONFIG_DEBUG_UART=y
CONFIG_DEBUG_UART_OMAP=y
CONFIG_DEBUG_UART_BASE=0x44e09000
CONFIG_DEBUG_UART_CLOCK=48000000
CONFIG_DEBUG_UART_SHIFT=2
CONFIG_DEBUG_UART_ANNOUNCE=y

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoarm: omap5+: Add support for early debug
Lokesh Vutla [Fri, 5 May 2017 08:15:27 +0000 (13:45 +0530)]
arm: omap5+: Add support for early debug

For early debug, the following configs needs to be enabled:

CONFIG_DEBUG_UART=y
CONFIG_DEBUG_UART_OMAP=y
CONFIG_DEBUG_UART_CLOCK=48000000
CONFIG_DEBUG_UART_SHIFT=2
CONFIG_DEBUG_UART_ANNOUNCE=y

For DRA7xx:
CONFIG_DEBUG_UART_BASE=0x4806a000

For AM57xx:
CONFIG_DEBUG_UART_BASE=0x48020000

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoarm: am33xx: Add support for mulitiple PLL input frequencies
Lokesh Vutla [Fri, 5 May 2017 07:29:10 +0000 (12:59 +0530)]
arm: am33xx: Add support for mulitiple PLL input frequencies

am335x supports various sysclk frequencies which can be determined
using sysboot pins. PLLs should be configures based on this
sysclk frequency. Add PLL configurations for all supported
frequencies.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoboard: am335x: Introduce scale_vcores
Lokesh Vutla [Fri, 5 May 2017 07:29:09 +0000 (12:59 +0530)]
board: am335x: Introduce scale_vcores

Update voltages before programming plls.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoarm: am33xx: Fix MPU opp selection
Lokesh Vutla [Fri, 5 May 2017 07:29:08 +0000 (12:59 +0530)]
arm: am33xx: Fix MPU opp selection

Update MPU frequencies and voltages as per the latest
DM[1] dated: OCT 2011 Revised APRIL 2016, Section 5.4.
Below is the consolidated data:

MPU values for PG 2.0 and later(Package ZCZ and ZCE):

 -------------------------------------------------------
| |   ZCZ |   ZCE |
|-------------------------------------------------------|
| | VDD[V]   | ARM [MHz] | VDD[V]   | ARM [MHz]  |
|-------|----------|------------|----------|------------|
| NITRO |  1.325   |   1000     |   NA     |    NA      |
|-------|----------|------------|----------|------------|
| TURBO |   1.26   |    800 |   NA     |    NA      |
|-------|----------|------------|----------|------------|
|OPP120 |   1.20   |    720     |   NA     |    NA      |
|-------|----------|------------|----------|------------|
|OPP100 |   1.10   |    600     |   1.10   |    600     |
|-------|----------|------------|----------|------------|
| OPP50 |   0.95   |    300     |   0.95   |    300     |
 -------------------------------------------------------

There is no eFuse blown on PG1.0 Silicons due to which there is
no way to detect the maximum frequencies supported. So default
to OPP100 for which both frequency and voltages are common on both
the packages.

[1] http://www.ti.com/lit/ds/symlink/am3356.pdf

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoconfigs: convert CONFIG_SYS_MPUCLK to Kconfig
Lokesh Vutla [Fri, 5 May 2017 07:29:07 +0000 (12:59 +0530)]
configs: convert CONFIG_SYS_MPUCLK to Kconfig

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agocommon: dfu: ignore reset for spl-dfu
B, Ravi [Thu, 4 May 2017 10:15:29 +0000 (15:45 +0530)]
common: dfu: ignore reset for spl-dfu

The SPL-DFU feature enable to load and
execute u-boot from RAM over usb from
PC using dfu-util.
Hence dfu-reset should not be issued
when dfu-util -R switch is issued.

Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agospl: Kconfig: dfu: spl-dfu depends on SPL_RAM_SUPPORT
B, Ravi [Thu, 4 May 2017 10:15:28 +0000 (15:45 +0530)]
spl: Kconfig: dfu: spl-dfu depends on SPL_RAM_SUPPORT

Since SPL_DFU_SUPPORT is depends on SPL_RAM_SUPPORT,
hence select SPL_DFU_SUPPORT only when
SPL_RAM_SUPPORT is chosen.

Signed-off-by: Ravi Babu <ravibabu@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agostm32f7: configure mpu valid for f7 family
Vikas Manocha [Wed, 3 May 2017 23:38:57 +0000 (16:38 -0700)]
stm32f7: configure mpu valid for f7 family

This configuration should be valid for all F7 family devices in general.
Here is the regions info:

- Region0 : 4GB   : cacheable & executable.
- Region1 : 512MB : text area : strogly ordered & executable.
- Region2 : 512MB : peripherals : device memory & non-executable.
- Region3 : 512MB : peripherals : device memory & non-executable.
- Region4 : 512MB : cortexM area: strongly ordered & non-executable.

Higher region number overrides the lower region configuration.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agostm32: use armv7m MPU configuration support
Vikas Manocha [Wed, 3 May 2017 23:38:56 +0000 (16:38 -0700)]
stm32: use armv7m MPU configuration support

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agoarmv7m: add MPU configuration support
Vikas Manocha [Wed, 3 May 2017 23:38:55 +0000 (16:38 -0700)]
armv7m: add MPU configuration support

Cortex-M archs support option memory protection unit (MPU). MPU is used
to set the memory types, attributes, access permissions for different regions,
cache policies of the device.

e.g. using MPU it is possible to configure memory region as device memory
or strongly ordered, memory attributes like execute never, cache policies
like write-back or write-through.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agoarmv7m: correct mpu region size define for 8MB size
Vikas Manocha [Wed, 3 May 2017 23:38:54 +0000 (16:38 -0700)]
armv7m: correct mpu region size define for 8MB size

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agoarvm7m: add cleanup before linux booting
Vikas Manocha [Wed, 3 May 2017 22:48:26 +0000 (15:48 -0700)]
arvm7m: add cleanup before linux booting

Data cache memory needs to be disabled before handing over control to
linux kernel. This patch populates the cleanup_before_linux stub.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
7 years agoarmv7m: cache: add flush & invalidate all dcache
Vikas Manocha [Wed, 3 May 2017 22:48:25 +0000 (15:48 -0700)]
armv7m: cache: add flush & invalidate all dcache

Add functionality to flush & invalidate all the dcache using the
prototype declared in common header file.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
[trini: Add dummy functions for the not-enabled case]
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoboston: Enable CONFIG_DISTRO_DEFAULTS in defconfigs
Paul Burton [Sun, 30 Apr 2017 19:22:44 +0000 (21:22 +0200)]
boston: Enable CONFIG_DISTRO_DEFAULTS in defconfigs

CONFIG_DISTRO_DEFAULTS selects a number of things we want for Boston
defconfigs & generally describes what we want - to be able to boot an
arbitrary Linux distribution. Enable it in order to shorten the
defconfigs & to automatically keep up with any changes in the choice of
Kconfig symbols selected.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboston: Bump CONFIG_SYS_BOOTM_LEN to 64MiB
Paul Burton [Sun, 30 Apr 2017 19:22:43 +0000 (21:22 +0200)]
boston: Bump CONFIG_SYS_BOOTM_LEN to 64MiB

The default value of CONFIG_SYS_BOOTM_LEN is too small for typical
boston Linux kernels. Increase the limit to 64MB, which covers current
kernels with plenty of breathing room.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboston: Setup memory ranges in FDT provided to Linux
Paul Burton [Sun, 30 Apr 2017 19:22:42 +0000 (21:22 +0200)]
boston: Setup memory ranges in FDT provided to Linux

The boston memory map isn't suited to the simple "all memory starting
from 0" approach that the MIPS arch_fixup_fdt() implementation takes.
Instead we need to indicate the first 256MiB of DDR from 0 and the rest
from 0x90000000. Implement ft_board_setup to do that.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboston: Move CM GCRs away from flash
Paul Burton [Sun, 30 Apr 2017 19:22:41 +0000 (21:22 +0200)]
boston: Move CM GCRs away from flash

Move the MIPS Coherence Manager (CM) Global Configuration Registers
(GCRs) away from the region of the physical address space which the
Boston board's parallel flash is found in, such that we can access all
of flash without clobbering GCRs.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoMIPS: Make CM GCR base configurable
Paul Burton [Fri, 12 May 2017 11:26:11 +0000 (13:26 +0200)]
MIPS: Make CM GCR base configurable

Without adding a prompt for CONFIG_MIPS_CM_BASE, Kconfig doesn't allow
defconfigs to set it. Provide the prompt in order to allow for that.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomips: bmips: add missing SFR NeufBox 4 config
Álvaro Fernández Rojas [Thu, 11 May 2017 09:01:30 +0000 (11:01 +0200)]
mips: bmips: add missing SFR NeufBox 4 config

Fixes commit a186d26, which missed including SFR NeufBox config from bmips

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agodm: ram: remove unneeded brcm,bcm63268-mc id
Álvaro Fernández Rojas [Thu, 11 May 2017 09:01:29 +0000 (11:01 +0200)]
dm: ram: remove unneeded brcm,bcm63268-mc id

brcm,bcm63268.dtsi uses brcm,bcm6328-mc instead of brcm,bcm63268-mc

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agomips: bmips: bcm63268: fix brcm, bcm6328-mc size
Álvaro Fernández Rojas [Thu, 11 May 2017 09:01:28 +0000 (11:01 +0200)]
mips: bmips: bcm63268: fix brcm, bcm6328-mc size

Shrink brcm,bcm6328-mc size to avoid overlapping with other controllers

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agomips: bmips: bcm6328: fix brcm, bcm6328-mc size
Álvaro Fernández Rojas [Thu, 11 May 2017 09:01:27 +0000 (11:01 +0200)]
mips: bmips: bcm6328: fix brcm, bcm6328-mc size

Shrink brcm,bcm6328-mc size to avoid overlapping with other controllers

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agomips: bmips: bcm6358: fix brcm, bcm6358-mc size
Álvaro Fernández Rojas [Thu, 11 May 2017 09:01:26 +0000 (11:01 +0200)]
mips: bmips: bcm6358: fix brcm, bcm6358-mc size

Shrink brcm,bcm6358-mc size to avoid overlapping with other controllers

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
7 years agoarm: am335x: Enable tiny printf in SPL
Lokesh Vutla [Wed, 26 Apr 2017 08:07:10 +0000 (13:37 +0530)]
arm: am335x: Enable tiny printf in SPL

am335x_evm SPL is very close to its limit in SRAM space.
Switch to use tiny printf to reclaim some size.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoconfigs: am335x_evm: Enable SPL_DM
Lokesh Vutla [Wed, 26 Apr 2017 08:07:09 +0000 (13:37 +0530)]
configs: am335x_evm: Enable SPL_DM

Enable SPL_DM on all AM335x based TI platforms.

http://patchwork.ozlabs.org/patch/751300/
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoam33xx: Provide platform data for mmc
Lokesh Vutla [Wed, 26 Apr 2017 08:07:08 +0000 (13:37 +0530)]
am33xx: Provide platform data for mmc

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoconfigs: am335x_evm: Use omap2 generic spl load script
Lokesh Vutla [Wed, 26 Apr 2017 08:07:07 +0000 (13:37 +0530)]
configs: am335x_evm: Use omap2 generic spl load script

No reason to use a separate load script for am33xx than using
omap-common load script.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agodm: mmc: omap_hsmmc: Add pre-reloc flag to the driver
Lokesh Vutla [Wed, 26 Apr 2017 08:07:06 +0000 (13:37 +0530)]
dm: mmc: omap_hsmmc: Add pre-reloc flag to the driver

For platforms that don't use device tree in SPL the only
way to mark this driver as 'required by relocation' is
with the DM_FLAG_PRE_RELOC flag. Add this to ensure that
the driver is bound.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agodm: mmc: omap_hsmmc: Update to support of-platdata
Lokesh Vutla [Wed, 26 Apr 2017 08:07:05 +0000 (13:37 +0530)]
dm: mmc: omap_hsmmc: Update to support of-platdata

This is to aid platforms that uses OF_PLATDATA.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoserial: omap: Support debug UART
Lokesh Vutla [Sat, 22 Apr 2017 10:27:25 +0000 (15:57 +0530)]
serial: omap: Support debug UART

Add debug UART functions to permit omap specific ns16550 to
provide an early debug UART. This is mostly in common with
DEBUG_UART_NS16550 except for Mode definition register which
is required for selecting UART mode(16x auto-baud or 13x mode).

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoAdd 16-bit single register pin controller support
James Balean [Wed, 19 Apr 2017 02:06:35 +0000 (21:06 -0500)]
Add 16-bit single register pin controller support

Enables the pinctrl-single driver to support 16-bit registers. Only
32-bit registers were supported previously. Reduced width registers are
required for some platforms, such as OMAP.

Signed-off-by: James Balean <james@balean.com.au>
Cc: Felix Brack <fb@ltec.ch>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Felix Brack <fb@ltec.ch>
Tested-by: Felix Brack <fb@ltec.ch>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboot: fdt: Perform arch_fixup_fdt() on the given device tree for falcon boot
B, Ravi [Tue, 18 Apr 2017 11:57:27 +0000 (17:27 +0530)]
boot: fdt: Perform arch_fixup_fdt() on the given device tree for falcon boot

In single stage bootmode or falcon boot mode, the SPL shall update the
device tree that we load with the normal fixups done via
arch_fixup_fdt(), when possible (ie we have enough information in this
restricted environment to be able to do that still).  This will include
for example updating them memory nodes.

Signed-off-by: Ravi Babu <ravibabu@ti.com>
[trini: Reword commit message]

7 years agospl: fdt: support for fdt fixup for falcon boot
B, Ravi [Tue, 18 Apr 2017 11:57:26 +0000 (17:27 +0530)]
spl: fdt: support for fdt fixup for falcon boot

Adding support for fdt fixup to update the
memory node in device tree for falcon boot.

This is needed for single stage or falcon
bootmode, to pass memory configuration to
kernel through DT memory node.

Signed-off-by: Ravi Babu <ravibabu@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
7 years agoqspi: dra7xx: enable qspi-boot for dra7x paltform
B, Ravi [Tue, 18 Apr 2017 11:57:25 +0000 (17:27 +0530)]
qspi: dra7xx: enable qspi-boot for dra7x paltform

Enables qspi boot configuration for dra7xx platform.

Signed-off-by: Ravi Babu <ravibabu@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
7 years agoarch: arm: omap: Declare size of ddr very early
Lokesh Vutla [Tue, 18 Apr 2017 11:57:24 +0000 (17:27 +0530)]
arch: arm: omap: Declare size of ddr very early

Declare the size of ddr very early in spl, so that this can be
used to enable cache.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
7 years agospl: reorder the assignment of board info to global data
Lokesh Vutla [Tue, 18 Apr 2017 11:57:23 +0000 (17:27 +0530)]
spl: reorder the assignment of board info to global data

Move the assignment of board info to global data a bit early which is
safe,
so that ram details can be used to enable caches.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agospl: Makefile: include /config in the (reduced) FDT used by the SPL stage
Philipp Tomsich [Mon, 17 Apr 2017 15:45:13 +0000 (17:45 +0200)]
spl: Makefile: include /config in the (reduced) FDT used by the SPL stage

When OF control is enabled for the SPL stage, nodes are removed from
the DTB to reduce its size. While /chosen is kept, /config is removed.

There's no reason why /chosen should be kept over /config (and as we
would like to put properties into /config that control the SPL stage),
we add '/config' to the list of nodes to be retained for the SPL stage.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agodoc: document /config/u-boot, spl-payload-offset property
Philipp Tomsich [Mon, 17 Apr 2017 15:45:12 +0000 (17:45 +0200)]
doc: document /config/u-boot, spl-payload-offset property

This adds documentation on the u-boot,spl-payload-offset property
(which overrides CONFIG_SYS_SPI_U_BOOT_OFFS during the SPI loading in
the SPL stage, if present).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agospl: spi: override CONFIG_SYS_SPI_U_BOOT_OFFS via /config-property
Philipp Tomsich [Mon, 17 Apr 2017 15:45:11 +0000 (17:45 +0200)]
spl: spi: override CONFIG_SYS_SPI_U_BOOT_OFFS via /config-property

For the RK3399-Q7, we need some flexibility (depending on the feature
set we include in the SPL stage and how large our SPI flash is) in
positioning the SPL payload (i.e. the FIT image containing U-Boot, ATF
and the M0 payload) in our SPI flash.

To avoid having to deal with this through different U-Boot images, we
introduce a the '/config/u-boot,spl-payload-offset' property node
allow it to override the default setting.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agoarm: Support cache invalidate
Simon Glass [Wed, 5 Apr 2017 23:53:18 +0000 (17:53 -0600)]
arm: Support cache invalidate

At present there is not operation to invalidate a cache range. This seems
to be needed to fill out the cache operations. Add an implementation based
on the flush operation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: York Sun <york.sun@nxp.com>
7 years agoarm: Correct signature for get_ticks()
Simon Glass [Wed, 5 Apr 2017 23:53:17 +0000 (17:53 -0600)]
arm: Correct signature for get_ticks()

This should be uint64_t to match its definition in common.h. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodisk: Return the partition number in part_get_info_by_name()
Alex Deymo [Sun, 2 Apr 2017 08:49:50 +0000 (01:49 -0700)]
disk: Return the partition number in part_get_info_by_name()

Similar to what blk_get_device_part_str() does, this patch makes
part_get_info_by_name() return the partition number in case of a match.
This is useful when the partition number is needed and not just the
descriptor.

Signed-off-by: Alex Deymo <deymo@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoimage: Update include/android_image.h
Alex Deymo [Sun, 2 Apr 2017 08:49:47 +0000 (01:49 -0700)]
image: Update include/android_image.h

Update the Android image header format to the latest version published
in AOSP. The original code moved to a new repository, so this patch also
updates the reference to that path.

Signed-off-by: Alex Deymo <deymo@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agousb: gadget: avoid variable name clipping in cb_getvar
nicolas.le.bayon@st.com [Tue, 9 May 2017 15:58:36 +0000 (15:58 +0000)]
usb: gadget: avoid variable name clipping in cb_getvar

Hi,

A kind reminder to look at this patch (already reviewed by Marek and acked by Lukasz), and if possible to put it in the next pull list, or the one after is timing is too short.

Thanks in advance for your time

Best Regards
Nicolas

-----Original Message-----
From: Nicolas LE BAYON
Sent: mardi 25 avril 2017 10:18
To: Nicolas LE BAYON <nicolas.le.bayon@st.com>; u-boot@lists.denx.de; lukma@denx.de; marex@denx.de
Cc: nlebayon@gmail.com; Patrice CHOTARD <patrice.chotard@st.com>; Jean-philippe ROMAIN <jean-philippe.romain@st.com>
Subject: [U-Boot][PATCH v7] usb: gadget: avoid variable name clipping in cb_getvar

From: Nicolas Le Bayon <nicolas.le.bayon@st.com>

Instead of using a fixed-size array to store variable name, preferring a dynamic allocation treats correctly all variable name lengths.
Variable names are growing through releases and features. By this way, name clipping is prevented.

Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Lukasz Majewski <lukma@denx.de>
7 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Wed, 10 May 2017 21:40:11 +0000 (17:40 -0400)]
Merge git://git.denx.de/u-boot-rockchip

This adds a new firefly-rk3399 board, MIPI support for rk3399 and
rk3288, rk818 pmic support, mkimage improvements for rockchip and a few
other things.

7 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Wed, 10 May 2017 19:50:21 +0000 (15:50 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

7 years agorockchip: dts: evb_rk3288: Add mipi display support
Eric Gao [Tue, 2 May 2017 10:32:45 +0000 (18:32 +0800)]
rockchip: dts: evb_rk3288: Add mipi display support

Add mipi dsi configuration for evb-rk3288 device tree.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: rk3288: grf: Add grf define for mipi dsi
Eric Gao [Tue, 2 May 2017 10:32:43 +0000 (18:32 +0800)]
rockchip: rk3288: grf: Add grf define for mipi dsi

Add grf register define for rk3288 mipi dsi

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: defconfigs: Add mipi dsi support for rk3399 evb board
Eric Gao [Tue, 2 May 2017 10:23:57 +0000 (18:23 +0800)]
rockchip: defconfigs: Add mipi dsi support for rk3399 evb board

Add mipi dsi configs for rk3399 evb board

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: dts: Add mipi dsi support for rk3399
Eric Gao [Tue, 2 May 2017 10:23:56 +0000 (18:23 +0800)]
rockchip: dts: Add mipi dsi support for rk3399

Add dts config for mipi display, include vop, mipi controller, panel, backlight
. And Enable rk808 for lcd_3v3 in another patch.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agorockchip: board: evb_rk3399: initialize pwm0 for dispaly backlight
Eric Gao [Tue, 2 May 2017 10:23:55 +0000 (18:23 +0800)]
rockchip: board: evb_rk3399: initialize pwm0 for dispaly backlight

Enable pwm0 for display of rk3399 evb board. The PWM do not have decicated
interrupt number in dts and can not get periph_id by pinctrl framework. So
init them here.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: video: vop: Reserve enough space for mipi dispaly
Eric Gao [Tue, 2 May 2017 10:23:54 +0000 (18:23 +0800)]
rockchip: video: vop: Reserve enough space for mipi dispaly

plat->size here is used to reserve frame buffer space befor relocation.
our mipi panel use 24 bitwidth, and vop require 32bit align. So the frame
buffer size should be at least 1920*1200*32/8.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: video: vop: Set different bitwidth for different display mode
Eric Gao [Tue, 2 May 2017 10:23:53 +0000 (18:23 +0800)]
rockchip: video: vop: Set different bitwidth for different display mode

Because the bitwidth is different for different display mode, so we need
to set them according to demand.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: video: vop: Add mipi display mode for rk3399
Eric Gao [Tue, 2 May 2017 10:23:52 +0000 (18:23 +0800)]
rockchip: video: vop: Add mipi display mode for rk3399

Add mipi display mode for rk3399 vop, so that we can use mipi panel
for display.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: video: vop: Fix rk_display_init() return error
Eric Gao [Tue, 2 May 2017 10:23:51 +0000 (18:23 +0800)]
rockchip: video: vop: Fix rk_display_init() return error

It's caused by the difference of clk_set_rate function implement between
rk3288 andd rk3399.

clk_set_rate() of rk3288 return 0 in normal condition.
clk_set_rate() of rk3399 return input parameter in normal condition.

So check clk_set_rate's return value by IS_ERR_VALUE.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>