Commit Graph

43341 Commits

Author SHA1 Message Date
xypron.glpk@gmx.de
9b57e252ff env: correct sign for error code
Error codes should be negative.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2017-05-12 08:37:16 -04:00
Lokesh Vutla
878d885620 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>
2017-05-12 08:37:15 -04:00
Lokesh Vutla
01fe1199d6 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>
2017-05-12 08:37:15 -04:00
Lokesh Vutla
fbd6295da4 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>
2017-05-12 08:37:14 -04:00
Lokesh Vutla
0650798824 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>
2017-05-12 08:37:13 -04:00
Lokesh Vutla
59041a5084 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>
2017-05-12 08:37:12 -04:00
Lokesh Vutla
c187dd685a configs: convert CONFIG_SYS_MPUCLK to Kconfig
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-05-12 08:37:11 -04:00
B, Ravi
66928afb6b 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>
2017-05-12 08:37:09 -04:00
B, Ravi
1b19cbdbf7 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>
2017-05-12 08:37:09 -04:00
Vikas Manocha
624b7101ee 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>
2017-05-12 08:37:08 -04:00
Vikas Manocha
33b78476d2 stm32: use armv7m MPU configuration support
Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2017-05-12 08:37:07 -04:00
Vikas Manocha
96b61ab15c 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>
2017-05-12 08:37:06 -04:00
Vikas Manocha
df951c4039 armv7m: correct mpu region size define for 8MB size
Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2017-05-12 08:37:05 -04:00
Vikas Manocha
4098d2061f 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>
2017-05-12 08:36:52 -04:00
Vikas Manocha
a0ee014f1b 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>
2017-05-12 08:19:14 -04:00
Lokesh Vutla
a292eb6702 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>
2017-05-11 22:21:29 -04:00
Lokesh Vutla
238205f1b3 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>
2017-05-11 22:21:29 -04:00
Lokesh Vutla
4548bc8d0a am33xx: Provide platform data for mmc
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-05-11 22:21:28 -04:00
Lokesh Vutla
3a517fdc2b 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>
2017-05-11 22:21:28 -04:00
Lokesh Vutla
cbcb170164 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>
2017-05-11 22:21:28 -04:00
Lokesh Vutla
2558c04906 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>
2017-05-11 22:21:27 -04:00
Lokesh Vutla
a52cf086ac 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>
2017-05-11 22:21:27 -04:00
James Balean
46f51dc9c7 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>
2017-05-11 22:21:26 -04:00
B, Ravi
6e7585bb64 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]
2017-05-11 22:21:26 -04:00
B, Ravi
984a3c8777 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>
2017-05-11 22:04:26 -04:00
B, Ravi
907fef6cc7 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>
2017-05-11 22:04:25 -04:00
Lokesh Vutla
86282798b0 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>
2017-05-11 22:03:41 -04:00
Lokesh Vutla
15eb1d43bf 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>
2017-05-11 22:03:41 -04:00
Philipp Tomsich
e938ef1f07 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>
2017-05-11 22:03:40 -04:00
Philipp Tomsich
f222b36751 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>
2017-05-11 22:03:40 -04:00
Philipp Tomsich
2bac55bc16 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>
2017-05-11 22:03:39 -04:00
Simon Glass
6775a8208e 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>
2017-05-11 22:03:39 -04:00
Simon Glass
f97cae9575 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>
2017-05-11 22:03:38 -04:00
Alex Deymo
88b6329cce 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>
2017-05-11 22:03:37 -04:00
Alex Deymo
210a7176ee 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>
2017-05-11 22:03:37 -04:00
nicolas.le.bayon@st.com
b1f2a17c78 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>
2017-05-11 22:03:36 -04:00
Tom Rini
1f5541c881 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.
2017-05-10 17:40:11 -04:00
Tom Rini
102d86552a Merge branch 'master' of git://git.denx.de/u-boot-mips 2017-05-10 15:50:21 -04:00
Eric Gao
2085de57f3 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>
2017-05-10 13:37:22 -06:00
Eric Gao
9b534ba001 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>
2017-05-10 13:37:22 -06:00
Eric Gao
9115425f56 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>
2017-05-10 13:37:22 -06:00
Eric Gao
df8fe99cf2 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>
2017-05-10 13:37:22 -06:00
Eric Gao
028d684901 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>
2017-05-10 13:37:22 -06:00
Eric Gao
c34bd8b820 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>
2017-05-10 13:37:22 -06:00
Eric Gao
8aed0d7751 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>
2017-05-10 13:37:22 -06:00
Eric Gao
9f819931e0 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>
2017-05-10 13:37:22 -06:00
Eric Gao
e07e5bde7c 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>
2017-05-10 13:37:22 -06:00
Eric Gao
1c3984041c rockchip: video: Add mipi driver support for rockchip soc
Add basic driver for mipi display on rockchip soc platform.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
2017-05-10 13:37:22 -06:00
Eric Gao
858f6368af rockchip: include: grf: Add GRF register declaration for mipi dsi
Add GRF register declaration for mipi dsi.

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>
2017-05-10 13:37:22 -06:00
Jacob Chen
453c5a927c power: rk808: rename to rk8xx
Since this driver can be used for rk8xx series pmic,
let's rename rk808 to rk8xx, to make it clear.

Configs parts are done by sed -i "s/RK808/RK8XX/g" `grep RK808 -lr ./`

Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>
2017-05-10 13:37:22 -06:00