oweals/u-boot.git
7 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Wed, 30 Nov 2016 14:57:52 +0000 (09:57 -0500)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

7 years agoimx6: clock: Enable External Memory Interface [EIM] clock (eim_slow_clock)
Lukasz Majewski [Mon, 28 Nov 2016 06:18:14 +0000 (07:18 +0100)]
imx6: clock: Enable External Memory Interface [EIM] clock (eim_slow_clock)

This patch extends the imx6 clock code to enable or disable the EIM
slow clock, which in necessary when one wants to use EIM interface t
o read/write from external memory (e.g. NOR).

Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
7 years agomx6sx: Add initial support for Samtec VIN|ING 2000 board
Christoph Fritz [Tue, 29 Nov 2016 15:13:40 +0000 (16:13 +0100)]
mx6sx: Add initial support for Samtec VIN|ING 2000 board

This patch adds initial support for Samtec VIN|ING 2000 board.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
7 years agoMerge git://git.denx.de/u-boot-mpc85xx
Tom Rini [Wed, 30 Nov 2016 00:42:48 +0000 (19:42 -0500)]
Merge git://git.denx.de/u-boot-mpc85xx

7 years agotravis.yml: Add samsung and rockchip builds
Tom Rini [Tue, 29 Nov 2016 17:41:19 +0000 (12:41 -0500)]
travis.yml: Add samsung and rockchip builds

The catch-all job is failing due to time limits depending on factors out
of our control, so move Samsung and Rockchip boards into their own jobs
and then exclude them from the general ARM and AArch64 jobs.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoimx7: SPI: add suport for SPI flash in mikroBUS slot
Angus Ainslie [Fri, 11 Nov 2016 18:31:39 +0000 (11:31 -0700)]
imx7: SPI: add suport for SPI flash in mikroBUS slot

Enable the escpi3 nets attached to the mikroBUS slot
on the i.MX7 Sabre evalution board. Also enble the SPI flash
commands to work with the "flash click" board.

This is V2 of this patch with changes recommended by the maintainer

CC: Jagan Teki <jteki@openedev.com>
7 years agoarm: mx6: specify SPL padding
Stefan Agner [Tue, 15 Nov 2016 18:38:23 +0000 (10:38 -0800)]
arm: mx6: specify SPL padding

Specify standard padding for payload to 68KB. This is derived from
the maximum header size plus maximum SPL size. It matches the
already defined offset for SD/eMMC devices (69KB) too. This allows
to use the u-boot-with-spl.imx build target to generate a directly
flashable image which can be flashed using:

  dd if=u-boot-with-spl.imx of=/dev/mmcblk0 bs=512 skip=2

While the patch has been created with SD/eMMC in mind, this also
works with other boot media. The board file needs to configure the
media specific (absolute) payload offset accordingly. Especially
the IVT offset is boot media specific and can be retrieved from the
reference manual (Table 8-25. Image Vector Table Offset and Initial
Load Region Size). For NAND boot a define like this should do the
job:

 #define CONFIG_SYS_NAND_U_BOOT_OFFS (SPL_PAD_TO + 0x400)

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
7 years agomx6sx: Add initial support for UDOO Neo Board
Breno Lima [Fri, 25 Nov 2016 18:56:57 +0000 (16:56 -0200)]
mx6sx: Add initial support for UDOO Neo Board

UDOO Neo Board is a development board from Seco that has three models:
 - UDOO Neo Basic
 - UDOO Neo Basic Kick Starter
 - UDOO Neo Extended
 - UDOO Neo Full

All versions are based on the i.MX6 SoloX processor.

For more details about the UDOO Neo board, please refer to:
http://www.udoo.org/udoo-neo/

This work is based on a previous commit of Francesco Montefoschi
<francesco.monte@gmail.com>:
https://github.com/fmntf/u-boot/commit/877b71184a5105e708024f232d36aed574961844

Only tested on the UDOO Neo Full board.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agocolibri_vf: Read kernel and device tree from static UBI volumes
Sanchayan Maity [Fri, 25 Nov 2016 10:49:17 +0000 (16:19 +0530)]
colibri_vf: Read kernel and device tree from static UBI volumes

Our update scripts write the kernel and device tree in seperate
UBI volumes. This allows to use a lot less UBI/UBIFS support in
U-Boot, which should lower the risk of hitting bugs in this area.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
7 years agoARM: ts4600: add basic board support
Sebastien Bourdelin [Tue, 8 Nov 2016 17:18:07 +0000 (12:18 -0500)]
ARM: ts4600: add basic board support

This commit adds basic support including:
MMC, Serial console

Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agoboard: ge: bx50v3: add the PMIC configuration support
Ken Lin [Fri, 18 Nov 2016 17:20:54 +0000 (12:20 -0500)]
board: ge: bx50v3: add the PMIC configuration support

Change the PMIC bulk configuration from auto mode to sync mode to avoid
voltage dropout issue seen in auto mode.

Signed-off-by: Ken Lin <ken.lin@advantech.com.tw>
Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
7 years agoARM: mx6: ddr: use Kconfig for inclusion of DDR calibration routines
Eric Nelson [Sun, 30 Oct 2016 23:33:50 +0000 (16:33 -0700)]
ARM: mx6: ddr: use Kconfig for inclusion of DDR calibration routines

The DDR calibration routines are gated by conditionals for the
i.MX6DQ SOCs, but with the use of the sysinfo parameter, these
are usable on at least i.MX6SDL and i.MX6SL variants with DDR3.

Also, since only the Novena board currently uses the dynamic
DDR calibration routines, these routines waste space on other
boards using SPL.

Add a KConfig entry to allow boards to selectively include the
DDR calibration routines.

Signed-off-by: Eric Nelson <eric@nelint.com>
7 years agomx6: ddr: add routine to return DDR calibration data
Eric Nelson [Sun, 30 Oct 2016 23:33:49 +0000 (16:33 -0700)]
mx6: ddr: add routine to return DDR calibration data

Add routine mmdc_read_calibration() to return the output of DDR
calibration. This can be used for debugging or to aid in construction
of static memory configuration.

This routine will be used in a subsequent patch set adding a virtual
"mx6memcal" board, but could also be useful when gathering statistics
during an initial production run.

Signed-off-by: Eric Nelson <eric@nelint.com>
7 years agomx6: ddr: pass mx6_ddr_sysinfo to calibration routines
Eric Nelson [Sun, 30 Oct 2016 23:33:48 +0000 (16:33 -0700)]
mx6: ddr: pass mx6_ddr_sysinfo to calibration routines

The DDR calibration routines have scattered support for bus
widths other than 64-bits:

-- The mmdc_do_write_level_calibration() routine assumes the
presence of PHY1, and
-- The mmdc_do_dqs_calibration() routine tries to determine
whether one or two DDR PHYs are active by reading MDCTL.

Since a caller of these routines must have a valid struct mx6_ddr_sysinfo
for use in calling mx6_dram_cfg(), and the bus width is available in the
"dsize" field, use this structure to inform the calibration routines which
PHYs are active.

This allows the use of the DDR calibration routines on CPU variants
like i.MX6SL that only have a single MMDC port.

Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agomx6: ddr: allow 32 cycles for DQS gating calibration
Eric Nelson [Sun, 30 Oct 2016 23:33:47 +0000 (16:33 -0700)]
mx6: ddr: allow 32 cycles for DQS gating calibration

The DDR calibration code is only setting flag DG_CMP_CYC (DQS gating sample
cycle) for the first PHY.

Set the 32-cycle flag for both PHYs and clear when done so the MPDGCTRL0
output value isn't polluted with calibration artifacts.

Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agoimx: mx6: ddr: add register MPZQLP2CTL for LPDDR2
Eric Nelson [Fri, 28 Oct 2016 17:13:57 +0000 (10:13 -0700)]
imx: mx6: ddr: add register MPZQLP2CTL for LPDDR2

Add constants for the MPZQLP2CTL DDR register for both
banks to allow setting the LPDDR2 timing values in
.cfg files using a named constant instead of hex addresses
as is currently done in mx6slevk and other board files.

Signed-off-by: Eric Nelson <eric@nelint.com>
7 years agotools: imximage: display DCD block offset, length
Eric Nelson [Thu, 17 Nov 2016 00:13:41 +0000 (17:13 -0700)]
tools: imximage: display DCD block offset, length

These values can be used to sign a U-Boot image for use when
loading an image through the Serial Download Protocol (SDP).

Note that the address of 0x910000 is usable with the stock
configuration of imx_usb_loader on i.MX6 and i.MX7 SOCs:

https://github.com/boundarydevices/imx_usb_loader/blob/master/mx6_usb_work.conf#L3

Refer to the section on imx_usb_loader in this post for more
details:

https://boundarydevices.com/high-assurance-boot-hab-dummies/

Signed-off-by: Eric Nelson <eric@nelint.com>
7 years agoarm: imx: wandboard: fix compile error if CONFIG_VIDEO is deactivated
Sven Ebenfeld [Fri, 25 Nov 2016 20:42:53 +0000 (21:42 +0100)]
arm: imx: wandboard: fix compile error if CONFIG_VIDEO is deactivated

When I tried to deactivate VIDEO support for the Wandboard, it still
tried to initialize the Framebuffer and so on. That is the reason for
the added ifdefs. CONFIG_VIDEO is enabled in the configuration as default
and therefore nothing changes for the default user.

The structs mx6dl_i2c2_pad_info and mx6q_i2c2_pad_info are only available
when CONFIG_IPUV3 are set and should not be tried to access, when that
define is not defined.

Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
7 years agopwm: imx: increase support up to PWM8 for i.MX6SX
Christoph Fritz [Tue, 22 Nov 2016 11:01:28 +0000 (12:01 +0100)]
pwm: imx: increase support up to PWM8 for i.MX6SX

This patch increases supported PWMs from previously PWM4 now up to PWM8
if i.MX6SX is in use.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
7 years agotbs2910: Make Ethernet functional again
Soeren Moch [Sun, 27 Nov 2016 15:02:19 +0000 (16:02 +0100)]
tbs2910: Make Ethernet functional again

Configure the PHY to output a 125MHz clk from CLK_25M and set tx clock delay.
This patch is similar to commit 4b6035da482cccda06aeb419634f99937c9fc783
("mx6sabresd: Make Ethernet functional again").

Signed-off-by: Soeren Moch <smoch@web.de>
7 years agoimx: make ipu's di configurable
Max Krummenacher [Tue, 1 Nov 2016 14:04:21 +0000 (15:04 +0100)]
imx: make ipu's di configurable

The ipu has two display interfaces. Make the used one a parameter
in struct display_info_t instead of using unconditionally DI0.
DI0 is the default setting.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
7 years agospl: mmc: fix switch statement
Max Krummenacher [Tue, 1 Nov 2016 14:04:20 +0000 (15:04 +0100)]
spl: mmc: fix switch statement

If CONFIG_SPL_LIBCOMMON_SUPPORT is not defined there is a lone case statement
at the end of the switch leading to a compile error.
Remove the offending case statement.

| common/spl/spl_mmc.c:339:7: error: label at end of compound statement

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Marek Vasut <marex@denx.de>
7 years agoARM: mx6: add MMC2 boot device detection support in SPL
Marcin Niestroj [Fri, 21 Oct 2016 11:53:54 +0000 (13:53 +0200)]
ARM: mx6: add MMC2 boot device detection support in SPL

Check BOOT_CFG2[3:4] to determine which SD/MMC port is selected to boot
from. If MMC2 is selected return BOOT_DEVICE_MMC2. In all other cases
return BOOT_DEVICE_MMC1, as we do not have corresponding macro for MMC3
and MMC4.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot
Stefano Babic [Tue, 29 Nov 2016 15:28:28 +0000 (16:28 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot

Signed-off-by: Stefano Babic <sbabic@denx.de>
7 years agoarmv7: psci: cpu_off: flush D-Cache before disable D-Cache
Peng Fan [Tue, 22 Nov 2016 11:41:09 +0000 (19:41 +0800)]
armv7: psci: cpu_off: flush D-Cache before disable D-Cache

Before disable cache, need to first flush cache.

There maybe dirty data in D-Cache before disable D-Cache.
After disable D-Cache, the first store instructions in
psci_v7_flush_dcache_all will directly store registers
{r4-r5, r7, r9-r11, lr} to memory.
If there is dirty data before disable D-Cache,
psci_v7_flush_dcache_all will flush data to memory,
and may overwrite the memory that hold the registers
{r4-r5, r7, r9-r11, lr}.

So before disable cache, first flush D-Cache.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Hongbo Zhang <hongbo.zhang@nxp.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Tom Rini <trini@konsulko.com>
7 years agovexpress64: Juno: Change PCI buss addresses for IO to start from zero.
Liviu Dudau [Tue, 22 Nov 2016 11:19:18 +0000 (11:19 +0000)]
vexpress64: Juno: Change PCI buss addresses for IO to start from zero.

Juno uses a 1:1 mapping between CPU and PCI addresses for IO. First,
that will trip devices that cannot use more than 16 bits of addresses
for IO, second it is un-necessary as the system can handle zero-based
PCI addresses just fine.

Change the mapping to start IO bus addresses from zero.

Signed-off-by: Liviu Dudau <Liviu.Dudau@foss.arm.com>
7 years agobcm2835: Reserve the spin table in efi memory map
Alexander Graf [Wed, 2 Nov 2016 09:36:20 +0000 (10:36 +0100)]
bcm2835: Reserve the spin table in efi memory map

Firmware provides a spin table on the raspberry pi. This table shouldn't
get overwritten by payloads, so we need to mark it as reserved.

Signed-off-by: Alexander Graf <agraf@suse.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
7 years agobcm2835 video: Map frame buffer as 32bpp
Alexander Graf [Wed, 2 Nov 2016 09:36:19 +0000 (10:36 +0100)]
bcm2835 video: Map frame buffer as 32bpp

To enable working efifb support, let's map the frame buffer as 32bpp
instead of 16bpp.

Signed-off-by: Alexander Graf <agraf@suse.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
7 years agoARM: bcm283x: Implement EFI RTS reset_system
Alexander Graf [Wed, 2 Nov 2016 09:36:18 +0000 (10:36 +0100)]
ARM: bcm283x: Implement EFI RTS reset_system

The rpi has a pretty simple way of resetting the whole system. All it takes
is to poke a few registers at a well defined location in MMIO space.

This patch adds support for the EFI loader implementation to allow an OS to
reset and power off the system when we're outside of boot time.

Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agodrivers: net: keystone_net: add rgmii link type support when parsing dt
Mugunthan V N [Thu, 11 Aug 2016 14:34:03 +0000 (20:04 +0530)]
drivers: net: keystone_net: add rgmii link type support when parsing dt

Add support to detect RGMII link interface from link-interface
device tree entry. Also rename the existing link type enums so
that it provides meaningful interface like SGMII.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reported-by: Sekhar Nori <nsekhar@ti.com>
Tested-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agoARM: bcm283x: use OF_CONTROL for bcm283x
Fabian Vogt [Mon, 26 Sep 2016 12:26:51 +0000 (14:26 +0200)]
ARM: bcm283x: use OF_CONTROL for bcm283x

This patch removes use of U_BOOT_DEVICE in board/raspberrypi/rpi/rpi.c,
enables OF_CONTROL in the config and adjusts the rpi_*defconfig configs.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboard: rpi: move uart deactivation to board_init
Fabian Vogt [Mon, 26 Sep 2016 12:26:50 +0000 (14:26 +0200)]
board: rpi: move uart deactivation to board_init

When using OF_CONTROL, the disabled value of the mini UART platdata
gets reset after board_early_init_f. So move detection and disabling
to board_init and remove board_early_init_f.
This uses the first device using the mini uart driver, as this method
works reliably with different device trees or even no device tree at all.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoserial: bcm283x_mu: support disabling after initialization
Fabian Vogt [Mon, 26 Sep 2016 12:26:49 +0000 (14:26 +0200)]
serial: bcm283x_mu: support disabling after initialization

For the Raspberry Pi 3 it needs to be possible to disable the serial
device after initialization happens, as only after the GPIO device is available
it is known whether the mini uart is usable.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agofdt: adjust bcm283x device tree for u-boot
Fabian Vogt [Mon, 26 Sep 2016 12:26:48 +0000 (14:26 +0200)]
fdt: adjust bcm283x device tree for u-boot

The information currently set via platdata has to be represented in the
device tree now. bcm283x-uboot.dtsi adds the u-boot specific "skip-init"
property to the serial nodes and enables initialization in the pre-reloc phase.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agofdt: import bcm283x device tree sources from the linux kernel tree
Fabian Vogt [Mon, 26 Sep 2016 12:26:47 +0000 (14:26 +0200)]
fdt: import bcm283x device tree sources from the linux kernel tree

This patch adds device trees for the bcm283x platform to be used with
OF_CONTROL. The version 4.8-rc7 of the linux kernel was used as source.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agofdt: add dt-bindings for bcm2835
Fabian Vogt [Mon, 26 Sep 2016 12:26:46 +0000 (14:26 +0200)]
fdt: add dt-bindings for bcm2835

This patch adds dt-bindings as used by the linux kernel device trees
for the bcm283x family.

Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoserial: pl01x: expose skip_init platdata option in DT
Fabian Vogt [Mon, 26 Sep 2016 12:26:45 +0000 (14:26 +0200)]
serial: pl01x: expose skip_init platdata option in DT

To be able to represent the skip-init platdata element with OF_CONTROL,
it needs to be read from the device tree as well and put into the platform data.

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoserial: bcm283x_mu: add device tree support
Fabian Vogt [Mon, 26 Sep 2016 12:26:44 +0000 (14:26 +0200)]
serial: bcm283x_mu: add device tree support

This patch adds device tree support for the bcm283x mini-uart driver.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agogpio: bcm2835: add device tree support
Fabian Vogt [Mon, 26 Sep 2016 12:26:43 +0000 (14:26 +0200)]
gpio: bcm2835: add device tree support

This patch adds device tree support for the bcm2835 GPIO driver.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agofs/fat/fatwrite: Local variable as buffer to store dir_slot entries
Tien Fong Chee [Thu, 28 Jul 2016 06:08:56 +0000 (23:08 -0700)]
fs/fat/fatwrite: Local variable as buffer to store dir_slot entries

fill_dir_slot use get_contents_vfatname_block as a temporary buffer for
constructing a list of dir_slot entries. To save the memory and providing
correct type of memory for above usage, a local buffer with accurate size
declaration is introduced.

The local array size 640 is used because for long file name entry,
each entry use 32 bytes, one entry can store up to 13 characters.
The maximum number of entry possible is 20. So, total size is
32*20=640bytes.

Signed-off-by: Genevieve Chan <ccheauya@altera.com>
Signed-off-by: Tien Fong Chee <tfchee@altera.com>
7 years agospl: add USB Gadget config option
Stefan Agner [Mon, 21 Nov 2016 18:58:53 +0000 (10:58 -0800)]
spl: add USB Gadget config option

Introduce USB Gadget config option. This allows to combine Makefile
entries for SPL_USBETH_SUPPORT and SPL_DFU_SUPPORT.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Ravi Babu <ravibabu@ti.com>
7 years agospl: dfu: move DFU Kconfig to SPL Kconfig
Stefan Agner [Mon, 21 Nov 2016 18:58:52 +0000 (10:58 -0800)]
spl: dfu: move DFU Kconfig to SPL Kconfig

The DFU Kconfig menu entries should be part of the SPL
Kconfig file. Also avoid using the top level Makefile by
moving the config dependent build artifacts to the driver/
and driver/usb/gadget/ Makfiles.

With that, DFU can be built again in SPL if
CONFIG_SPL_DFU_SUPPORT is enabled.

Fixes: 6ad6102246d8 ("usb:gadget: Disallow DFU in SPL for now")

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
7 years agospl: add RAM boot device only if it is actually defined
Stefan Agner [Mon, 21 Nov 2016 18:58:51 +0000 (10:58 -0800)]
spl: add RAM boot device only if it is actually defined

Some devices (e.g. dra7xx) support loading to RAM using DFU without
having direct boot from RAM support. Make sure the linker list
does not contain BOOT_DEVICE_RAM if CONFIG_SPL_RAM_DEVICE is not
enabled.

Fixes: 98136b2f26fa ("spl: Convert spl_ram_load_image() to use linker list")

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
7 years agoREADME: fix typo FAT_ENV_DEV_AND_PART
Nicolae Rosia [Mon, 21 Nov 2016 15:33:58 +0000 (17:33 +0200)]
README: fix typo FAT_ENV_DEV_AND_PART

The actual define symbol is FAT_ENV_DEVICE_AND_PART

Signed-off-by: Nicolae Rosia <Nicolae_Rosia@Mentor.com>
7 years agoxyz-modem: Change getc timeout loop waiting
tomas.melin@vaisala.com [Mon, 21 Nov 2016 08:18:51 +0000 (10:18 +0200)]
xyz-modem: Change getc timeout loop waiting

This fixes the loop delay when using a hw watchdog.

In case a watchdog is used that accesses CPU registers,
the defined delay of 20us in a tight loop will cause a
huge delay in the actual timeout seen. This is caused
by the fact that udelay will inheritantly call WATCHDOG_RESET.
Together with the omap wdt implementation, the seen timeout increases up to
around 30s. This makes the loop very slow and causes long
delays when using the modem.

Instead, implement the 2 sec loop by using the timer interface to know
when to break out of the timeout loop. Watchdog kicking is taken care of
by getc().

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
7 years agosata: fix sata command can not being executed bug
Tang Yuantian [Mon, 21 Nov 2016 02:24:20 +0000 (10:24 +0800)]
sata: fix sata command can not being executed bug

Commit d97dc8a0 separated the non-command code into its own file
which caused variable sata_curr_device can not be set to a correct
value.

Before commit d97dc8a0, variable sata_curr_device can be set
correctly in sata_initialize().
After commit d97dc8a0, sata_initialize() is moved out to its own file.
Accordingly, variable sata_curr_device is removed from sata_initialize()
too. This caused sata_curr_device never gets a chance to be set properly
which prevent other commands from being executed.

This patch sets variable sata_curr_device properly.

Fixes: d97dc8a0 (dm: sata: Separate the non-command code into its
 own file)

Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agotools/env: fix environment alignment tests for block devices
Max Krummenacher [Sat, 19 Nov 2016 12:58:56 +0000 (13:58 +0100)]
tools/env: fix environment alignment tests for block devices

commit 183923d3e412500bdc597d1745e2fb6f7f679ec7 enforces that the
environment must start at an erase block boundary.

For block devices the sample fw_env.config does not mandate a erase block size
for block devices. A missing setting defaults to the full env size.

Depending on the environment location the alignment check now errors out for
perfectly legal settings.

Fix this by defaulting to the standard blocksize of 0x200 for environments
stored in a block device.
That keeps the fw_env.config files for block devices working even with that
new check.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agotools/Makefile: suppress "which swig" error output
Andre Przywara [Sat, 19 Nov 2016 12:04:59 +0000 (12:04 +0000)]
tools/Makefile: suppress "which swig" error output

The Makefile in tools/ tries to find the "swig" utility by calling "which".
If nothing is found in the path, some versions of which will print an error
message:
$ make clean
which: no swig in (/usr/local/bin:/usr/bin:/bin)

This does not apply to all version of "which", though:
$ echo $0
bash
$ type which
which is aliased to `type -path'
$ which foo <== this version is OK
$ /usr/bin/which foo <== this one is chatty
/usr/bin/which: no foo in (/usr/local/bin:/usr/bin:/bin)
$ sh <== make uses /bin/sh
sh-4.3$ which foo <== no alias here
which: no foo in (/usr/local/bin:/usr/bin:/bin)

This error message is rather pointless in our case, since we just have
this very check to care for this. So add stderr redirection to suppress
the message.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoti_armv7_keystone2: env: Add NFS loading support for PMMC and MON
Andrew F. Davis [Fri, 18 Nov 2016 17:56:16 +0000 (11:56 -0600)]
ti_armv7_keystone2: env: Add NFS loading support for PMMC and MON

NFS loading support has been added to the default environment for
most boot components, as PMMC and MON loading were added later they
did not originally get the NFS commands added, add these now.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agokeystone2: Move target selection to Kconfig
Andrew F. Davis [Fri, 18 Nov 2016 17:56:15 +0000 (11:56 -0600)]
keystone2: Move target selection to Kconfig

The config option TARGET_K2x_EVM is set by the k2x defconfigs to pick
a board target, but the header configs also set K2x_EVM. This config
is redundant, remove it and use TARGET_K2x_EVM everywhere in its place.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agobootcounter_ram: Fix misaligned cache warning
Stefan Roese [Fri, 18 Nov 2016 16:21:52 +0000 (17:21 +0100)]
bootcounter_ram: Fix misaligned cache warning

This patch fixes the warning about misaligned cache on Armada XP:

CACHE: Misaligned operation at range [7ffff0007fffffac]

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agolinux/compat.h: Properly implement ndelay fallback
mario.six@gdsys.cc [Fri, 18 Nov 2016 13:40:37 +0000 (14:40 +0100)]
linux/compat.h: Properly implement ndelay fallback

Commit c68c62 ("i2c: mvtwsi: Make delay times frequency-dependent")
extensively used the ndelay function with a calculated parameter
which is dependant on the configured frequency of the I2C bus. If
standard speed is employed, the parameter is usually 10000 (10000ns
period length for 100kHz frequency).

But, since the arm architecture does not implement a proper version of
ndelay, the fallback default from include/linux/compat.h is used,
which defines every ndelay as udelay(1). This causes problems for
slower speeds on arm, since the delay time is now 9us too short for
the desired frequency, which leads to random failures of the I2C
interface.

To remedy this, we implement a proper, parameter-aware ndelay fallback
for architectures that don't implement a real ndelay function.

Reported-By: Jason Brown <Jason.brown@apcon.com>
To: Tom Rini <trini@konsulko.com>
To: Heiko Schocher <hs@denx.de>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
7 years agocolibri_vf: usb gadget: toradex pid is now set generically
Max Krummenacher [Wed, 16 Nov 2016 16:49:25 +0000 (17:49 +0100)]
colibri_vf: usb gadget: toradex pid is now set generically

remove now unused CONFIG_TRDX_PID_XXX

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis/colibri_t30: move environment location
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:24 +0000 (17:49 +0100)]
apalis/colibri_t30: move environment location

Now with the config block handling in place move the U-Boot environment
location before the config block at the end of 1st "boot sector" as
deployed during production using our downstream BSP.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis/colibri_imx7/pxa270/t20/t30/vf: integrate config block handling
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:23 +0000 (17:49 +0100)]
apalis/colibri_imx7/pxa270/t20/t30/vf: integrate config block handling

With our common code in place actually make use of it across all our
modules.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agotoradex: config block handling
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:22 +0000 (17:49 +0100)]
toradex: config block handling

Add Toradex factory configuration block handling. The config block is a
data structure which gets stored to flash during production testing. The
structure holds such information as board resp. hardware revision,
product ID and serial number which is used as the NIC part of the
Ethernet MAC address as well. The config block will be read upon boot by
the show_board_info() function, displayed as part of the board
information and passed to Linux via device tree or ATAGs.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis/colibri_t20/t30: deactivate displaying board info
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:21 +0000 (17:49 +0100)]
apalis/colibri_t20/t30: deactivate displaying board info

Deactivate CONFIG_DISPLAY_BOARDINFO in favour of
CONFIG_DISPLAY_BOARDINFO_LATE which also displays on the LCD.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agogeneric-board: make show_board_info a weak function
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:20 +0000 (17:49 +0100)]
generic-board: make show_board_info a weak function

Make show_board_info() a weak function which allows for custom board
specific implementations thereof.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoRevert "generic-board: allow showing custom board info"
Marcel Ziswiler [Wed, 16 Nov 2016 16:49:19 +0000 (17:49 +0100)]
Revert "generic-board: allow showing custom board info"

Drop CONFIG_CUSTOM_BOARDINFO as it is not Kconfig compliant and anyway
not really used anywhere plus the upcoming weak show_board_info()
approach seems much superior.

This reverts commit a9ad18c9d5fe2554753b0f9a52adfd5ebce61147.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agospl: remove redundant call to parse_image_header()
tomas.melin@vaisala.com [Wed, 16 Nov 2016 11:15:05 +0000 (13:15 +0200)]
spl: remove redundant call to parse_image_header()

Image header was checked twice.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agospl: add check for FIT-header when loading image
tomas.melin@vaisala.com [Wed, 16 Nov 2016 10:54:39 +0000 (12:54 +0200)]
spl: add check for FIT-header when loading image

Add check for FDT_MAGIC, otherwise also legacy images will be loaded as
a FIT. With this check in place, the loader works correct both
with legacy and FIT images.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agosun8i_emac: Fix mdio read sequence
Philipp Tomsich [Wed, 16 Nov 2016 01:40:27 +0000 (01:40 +0000)]
sun8i_emac: Fix mdio read sequence

To send a parametrized command to the PHY over MDIO, we should write
the data first, the trigger the execution by the command register
write. Fix the access pattern in our MDIO write routine.
Apparently this doesn't really matter with the Realtek PHY on the
Pine64, but other PHYs (which require more setup) will choke on
the wrong order.
[Andre: add commit message]

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: add support for Nintendo NES Classic Edition
FUKAUMI Naoki [Thu, 17 Nov 2016 23:31:29 +0000 (08:31 +0900)]
sunxi: add support for Nintendo NES Classic Edition

Add board support for sun8i_r16 Nintendo NES Classic edition.

Signed-off-by: FUKAUMI Naoki <naobsd@gmail.com>
[jagan: Add commit message body]
Signed-off-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agomtd: nand: add support for the TC58NVG2S0H chip
Boris Brezillon [Tue, 8 Nov 2016 16:21:12 +0000 (17:21 +0100)]
mtd: nand: add support for the TC58NVG2S0H chip

Add the description of the Toshiba TC58NVG2S0H SLC nand to the nand_ids
table so we can use the NAND ECC infos and the ONFI timings.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agosunxi: Mele_M5_defconfig: Drop non existing STATUSLED setting
Hans de Goede [Sun, 13 Nov 2016 18:54:08 +0000 (19:54 +0100)]
sunxi: Mele_M5_defconfig: Drop non existing STATUSLED setting

And also remove it from scripts/config_whitelist.txt as the
Mele_M5_defconfig was the only one defining it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: mmc: Set CONFIG_SYS_MMC_MAX_DEVICE
Emmanuel Vadot [Sat, 5 Nov 2016 19:51:11 +0000 (20:51 +0100)]
sunxi: mmc: Set CONFIG_SYS_MMC_MAX_DEVICE

Set CONFIG_SYS_MMC_MAX_DEVICE to 4 for sunxi SoC.
This define is needed in the API code.

Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agoarm: sunxi: do not force USB for arch-sunxi
Yann E. MORIN [Mon, 31 Oct 2016 21:33:40 +0000 (22:33 +0100)]
arm: sunxi: do not force USB for arch-sunxi

Currently, USB is forced-enabled for the sunxi familly, and there is no
way to disable it.

However, USB takes a long time to initiliase, delaying the boot by up to
5 seconds (without any USB device attached!). This is a very long delay,
especially in cases where USB booting is not wanted at all, and where
the device is expected to boot relatively often (even in production).

Change the way the dependencies are handled, by only forcibly selecting
USB when CONFIG_DISTRO_DEFAULTS ("defaults suitable for booting general
purpose Linux distributions") is set. This option defaults to y for the
sunxi familly, so the current default behaviour is kept unchanged. Users
interested in boot time and/or size will be able to disable this to
further disable USB.

With USB disabled, the time spent in U-Boot before handing control to
the Linux kernel is about 1s now, down from ~5s (Nanopi Neo, sunxi H3).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Ian Campbell <ijc@hellion.org.uk>
Cc: Hans De Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agosunxi: Use the available Kconfig option for AHCI
Jelle van der Waa [Mon, 31 Oct 2016 20:05:09 +0000 (21:05 +0100)]
sunxi: Use the available Kconfig option for AHCI

Use the already available Kconfig option for AHCI. Tested on the
BananaPi.

Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agotravis: Add efi_loader grub2 test
Alexander Graf [Fri, 18 Nov 2016 12:18:00 +0000 (13:18 +0100)]
travis: Add efi_loader grub2 test

We have all the building blocks now to run arbitrary efi applications
in travis. The most important one out there is grub2, so let's add
a simple test to verify that grub2 still comes up.

Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agoTravis: Remove sleep test from integratorcp_cm926ejs-qemu test
Alexander Graf [Thu, 17 Nov 2016 17:31:07 +0000 (18:31 +0100)]
Travis: Remove sleep test from integratorcp_cm926ejs-qemu test

Most of the time when running the sleep test in Travis for
the integratorcp_cm926ejs target I get errors like this:

  E       assert 2.999901056289673 >= 3

The deviation is tiny, but fails the overall build result. Since
the sleep test is not terribly important as gate keeper for travis
tests, let's just exclude it for this board.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoefi_loader: Allow to compile helloworld.efi w/o bundling it
Alexander Graf [Thu, 17 Nov 2016 21:40:10 +0000 (22:40 +0100)]
efi_loader: Allow to compile helloworld.efi w/o bundling it

Today we can compile a self-contained hello world efi test binary that
allows us to quickly verify whether the EFI loader framwork works.

We can use that binary outside of the self-contained test case though,
by providing it to a to-be-tested system via tftp.

This patch separates compilation of the helloworld.efi file from
including it in the u-boot binary for "bootefi hello". It also modifies
the efi_loader test case to enable travis to pick up the compiled file.
Because we're now no longer bloating the resulting u-boot binary, we
can enable compilation always, giving us good travis test coverage.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agotests: Add efi_loader hello world test
Alexander Graf [Thu, 17 Nov 2016 17:31:05 +0000 (18:31 +0100)]
tests: Add efi_loader hello world test

Now that we have working network tests and a hello world efi application
built inside our tree, we can automatically test that efi binary running
inside of U-Boot.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agotravis: Add python path for environments
Alexander Graf [Thu, 17 Nov 2016 17:31:04 +0000 (18:31 +0100)]
travis: Add python path for environments

When running in travis-ci, we want to pass environment configuration to
the tests. These reside in a path available through PYTHONPATH, so let's
define that one to point to the unit test repo.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoTravis: Expose build dir as variable
Alexander Graf [Thu, 17 Nov 2016 17:31:03 +0000 (18:31 +0100)]
Travis: Expose build dir as variable

Some travis QEMU tests can transfer files between the build directory
and the guest U-Boot instance. For that to work, both need to have access
to the same directory.

This patch puts the current build path into an environment variable, so
that the environment generating python scripts can extract it from there
and read the respective files.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agotests: net: Offset downloads to 4MB
Alexander Graf [Thu, 17 Nov 2016 17:31:02 +0000 (18:31 +0100)]
tests: net: Offset downloads to 4MB

The network test currently downloads files at 0MB offset of RAM start.
This works for most ARM systems, but x86 has weird memory layout constraints
on the first MB of RAM.

To not get caught into any of these, let's add a 4MB pad from start
of RAM to the default memory offset.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Sat, 26 Nov 2016 14:26:27 +0000 (09:26 -0500)]
Merge git://git.denx.de/u-boot-rockchip

7 years agorockchip: configs: correct partitions 'boot' size
Jacob Chen [Tue, 15 Nov 2016 08:55:27 +0000 (16:55 +0800)]
rockchip: configs: correct partitions 'boot' size

It should be 112M, to make rootfs start at 0x40000

Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Add support for veyron-minnie (ASUS Chromebook Flip)
Simon Glass [Sun, 13 Nov 2016 21:24:54 +0000 (14:24 -0700)]
rockchip: Add support for veyron-minnie (ASUS Chromebook Flip)

This adds support for the Asus Chromebook Flip, an RK3288-based clamshell
device which can flip into 'tablet' mode. The device tree file comes from
Linux v4.8. The SDRAM parameters are for 4GB Samsung LPDDR3.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Add support for veyron-mickey (Chromebit)
Simon Glass [Sun, 13 Nov 2016 21:22:16 +0000 (14:22 -0700)]
rockchip: Add support for veyron-mickey (Chromebit)

This adds support for the Asus Chromebit, and RK3288-based device designed
to plug directly into an HDMI monitor. The device tree file comes from
Linux v4.8.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: video: Avoid using u8 in the HDMI driver
Simon Glass [Sun, 13 Nov 2016 21:22:15 +0000 (14:22 -0700)]
rockchip: video: Avoid using u8 in the HDMI driver

It makes not sense using u8 to hold a value on a 32-bit or 64-bit machine.
It can only bloat the code by forcing the compiler to mask the value.
Change it to uint.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: veyron: Adjust ARM clock after relocation
Simon Glass [Sun, 13 Nov 2016 21:22:14 +0000 (14:22 -0700)]
rockchip: veyron: Adjust ARM clock after relocation

Update board_init() to increase the ARM clock to the maximum speed on
veyron boards. This makes quite a large difference in performance. With
this change, speed goes from about 750 DMIPS to 2720 DMIPs.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: clk: Support setting ACLK
Simon Glass [Sun, 13 Nov 2016 21:22:13 +0000 (14:22 -0700)]
rockchip: clk: Support setting ACLK

Add basic support for setting the ARM clock, since this allows us to run
at maximum speed in U-Boot. Currently only a single speed is supported
(1.8GHz).

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Move jerry SDRAM settings into its own .dts file
Simon Glass [Sun, 13 Nov 2016 21:22:12 +0000 (14:22 -0700)]
rockchip: Move jerry SDRAM settings into its own .dts file

The SDRAM settings are not common across all veyron models. Move the
current settings into Jerry's file.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: veyron: Add a note about the SDRAM voltage
Simon Glass [Sun, 13 Nov 2016 21:22:11 +0000 (14:22 -0700)]
rockchip: veyron: Add a note about the SDRAM voltage

Add a comment to indicate that we are not supporting the PWM regulator
yet.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Rename jerry files to veyron
Simon Glass [Sun, 13 Nov 2016 21:22:10 +0000 (14:22 -0700)]
rockchip: Rename jerry files to veyron

At present we have a single rk3288-based Chromebook: chromebook_jerry. But
all such Chromebooks can use the same binary with only device-tree
differences. The family name is 'veyron', so rename the files accordingly.

Also update the device-tree filename since this currently differs from
Linux.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Move jerry to use of-platdata
Simon Glass [Sun, 13 Nov 2016 21:22:09 +0000 (14:22 -0700)]
rockchip: Move jerry to use of-platdata

Adjust jerry to use of-platdata like other rk3288 boards. This reduces the
SPL size enough that it boots again.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: video: Check for device in use
Simon Glass [Sun, 13 Nov 2016 21:22:08 +0000 (14:22 -0700)]
rockchip: video: Check for device in use

Check whether a display device is in use before using it. Add a comment as
to why two displays cannot currently be used at the same time.

This allows us to remove the device-tree change that disables vopb on
jerry.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agovideo: Track whether a display is in use
Simon Glass [Sun, 13 Nov 2016 21:22:07 +0000 (14:22 -0700)]
video: Track whether a display is in use

Mark a display as in use when display_enable() is called. This can avoid
a display being used by multiple video-output devices.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agovideo: Use cache-alignment in video_sync()
Simon Glass [Sun, 13 Nov 2016 21:22:06 +0000 (14:22 -0700)]
video: Use cache-alignment in video_sync()

Sometimes the frame buffer is not a multiple of the cache line size.
Adjust the cache-flushing code to avoid cache warnings/errors in this
case.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agospi: Add a debug() on bind failure
Simon Glass [Sun, 13 Nov 2016 21:22:05 +0000 (14:22 -0700)]
spi: Add a debug() on bind failure

This is an uncommon error but we may as well have a debug() message when
it happens.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: spi: Honour the deactivation delay
Simon Glass [Sun, 13 Nov 2016 21:22:03 +0000 (14:22 -0700)]
rockchip: spi: Honour the deactivation delay

This is not currently implemented. Add support for this so that the Chrome
OS EC can be used on jerry.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: spi: Add support for of-platdata
Simon Glass [Sun, 13 Nov 2016 21:22:02 +0000 (14:22 -0700)]
rockchip: spi: Add support for of-platdata

Allow this driver to be used with of-platdata on rk3288.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agospi: Add of-platdata support to SPI and SPI flash
Simon Glass [Sun, 13 Nov 2016 21:22:01 +0000 (14:22 -0700)]
spi: Add of-platdata support to SPI and SPI flash

Some boards may want to use these subsystems with of-platdata in SPL. Add
support for this by avoiding any device tree access in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agostdio: Correct numbering logic in stdio_probe_device()
Simon Glass [Sun, 13 Nov 2016 21:22:00 +0000 (14:22 -0700)]
stdio: Correct numbering logic in stdio_probe_device()

The current code assumes that the devices are ordered corresponding to
their alias value. But (for example) video1 can come before video0 in the
device tree.

Correct this, by always looking for device 0 first. After that we can fall
back to finding the first available device.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agostdio: Correct code style nits
Simon Glass [Sun, 13 Nov 2016 21:21:59 +0000 (14:21 -0700)]
stdio: Correct code style nits

Fix a few code style nits in stdio_get_by_name().

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Allow jerry to use of-platdata
Simon Glass [Sun, 13 Nov 2016 21:21:57 +0000 (14:21 -0700)]
rockchip: Allow jerry to use of-platdata

This board always boots from SPI, so update the code to support that with
of-platdata. The boot source is not currently available with of-platdata.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: video: Correct VOP clock selection
Simon Glass [Sun, 13 Nov 2016 21:21:56 +0000 (14:21 -0700)]
rockchip: video: Correct VOP clock selection

This code incorrectly uses the oscillator. It should use the clock
selected in the device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 135aa95 (clk: convert API to match reset/mailbox style)

7 years agorockchip: video: Correct HDMI data source selection
Simon Glass [Sun, 13 Nov 2016 21:21:55 +0000 (14:21 -0700)]
rockchip: video: Correct HDMI data source selection

This code currently always selects the second source. It only worked
because both sources are set up.

With the change to only init video devices that are present in the stdout
environment variable, this fails. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodts: arm: rk3036: add usb vbus node
Kever Yang [Tue, 8 Nov 2016 10:13:41 +0000 (18:13 +0800)]
dts: arm: rk3036: add usb vbus node

add fix regulator node for usb vbus power control.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agoconfig: rk3036: enable fix regulator
Kever Yang [Tue, 8 Nov 2016 10:13:40 +0000 (18:13 +0800)]
config: rk3036: enable fix regulator

usb host vbus power is using gpio fix regulator, enable it.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>