platform/kernel/u-boot.git
5 years agoMerge branch '2019-07-29-ti-imports'
Tom Rini [Mon, 29 Jul 2019 21:59:15 +0000 (17:59 -0400)]
Merge branch '2019-07-29-ti-imports'

- More DaVinci DM migration, drop am18xx EVM platform
- Keystone bug fix

5 years agoarm: mach-keystone: Use appended original image size in image processing
Andrew F. Davis [Tue, 16 Jul 2019 13:49:38 +0000 (09:49 -0400)]
arm: mach-keystone: Use appended original image size in image processing

When an image is signed/encrypted on K2 devices the image may get padded
to meet alignment requirements for the signature/encryption type. The
original size is appended as 4 bytes little-endian to the end of the
final image.

Normally the trailing extra bytes are ignored and so restoring the
exact original size is not important. In the case of initrd the
original size is important as the kernel uses it to look for
additional filesystem data and can do the wrong thing when the
size is not correct.

Read off the original size and report it back from the image post
processing stage.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoconfigs: omapl138_lcdk: enable NAND self-init in SPL
Bartosz Golaszewski [Mon, 29 Jul 2019 06:58:10 +0000 (08:58 +0200)]
configs: omapl138_lcdk: enable NAND self-init in SPL

Now that we have enabled the driver-model in SPL, we can remove the
code disabling NAND self-init in SPL from the config include for
omapl138-lcdk.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agodavinci: omapl138-lcdk: enable driver-model in SPL
Bartosz Golaszewski [Mon, 29 Jul 2019 06:58:09 +0000 (08:58 +0200)]
davinci: omapl138-lcdk: enable driver-model in SPL

Enable CONFIG_SPL_DM and enable the driver model for serial by defining
an appropriate device in the board file for da850-lcdk.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agodavinci: omapl138-lcdk: remove unneeded includes
Bartosz Golaszewski [Mon, 29 Jul 2019 06:58:08 +0000 (08:58 +0200)]
davinci: omapl138-lcdk: remove unneeded includes

There's no SPI on da850-lcdk. Remove unnecessary includes.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agodavinci: omapl138-lcdk: enable CONFIG_USE_TINY_PRINTF
Bartosz Golaszewski [Mon, 29 Jul 2019 06:58:07 +0000 (08:58 +0200)]
davinci: omapl138-lcdk: enable CONFIG_USE_TINY_PRINTF

We're working towards enabling the driver-model in SPL for da850-lcdk.
Enable CONFIG_USE_TINY_PRINTF in defconfig to reduce SPL size.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agodavinci: omapl138-lcdk: enable SPL_SYS_MALLOC_SIMPLE
Bartosz Golaszewski [Mon, 29 Jul 2019 06:58:06 +0000 (08:58 +0200)]
davinci: omapl138-lcdk: enable SPL_SYS_MALLOC_SIMPLE

We're working towards enabling the driver model in SPL for da850-lcdk.
Enable SPL_SYS_MALLOC_SIMPLE in defconfig to reduce SPL size.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agodavinci: da850-evm: enable driver model for NAND
Bartosz Golaszewski [Mon, 29 Jul 2019 06:58:05 +0000 (08:58 +0200)]
davinci: da850-evm: enable driver model for NAND

Enable the driver-model on da850-evm. We need to add a dummy nand node
to the device tree, as the real nand node is a sub-node of the aemif
device.

On linux the aemif driver populates all its child nodes, but we can't do
it in u-boot currently.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Tested-by: Adam Ford <aford173@gmail.com> #da850-evm
5 years agodavinci: omapl138-lcdk: enable driver model for NAND
Bartosz Golaszewski [Mon, 29 Jul 2019 06:58:04 +0000 (08:58 +0200)]
davinci: omapl138-lcdk: enable driver model for NAND

Enable the driver-model on da850-lcdk. We need to add a dummy nand node
to the device tree, as the real nand node is a sub-node of the aemif
device.

On linux the aemif driver populates all its child nodes, but we can't do
it in u-boot currently.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agonand: davinci: add support for driver model
Bartosz Golaszewski [Mon, 29 Jul 2019 06:58:03 +0000 (08:58 +0200)]
nand: davinci: add support for driver model

Extend the davinci NAND driver to support the driver model. For now this
doesn't add any device-tree parsing due to the fact that we can't access
the actual nand node on the device-tree - it's a subnode of the aemif
device and we don't have an aemif driver on davinci at the moment.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agonand: davinci: make davinci_nand_init() static
Bartosz Golaszewski [Mon, 29 Jul 2019 06:58:02 +0000 (08:58 +0200)]
nand: davinci: make davinci_nand_init() static

This function is only used within the driver itself. No need
to export it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
5 years agoomapl138_lcdk_defconfig: don't build support for SPI
Bartosz Golaszewski [Mon, 29 Jul 2019 06:58:01 +0000 (08:58 +0200)]
omapl138_lcdk_defconfig: don't build support for SPI

The following warning is emited when building u-boot for da850-lcdk:

===================== WARNING ======================
This board does not use CONFIG_DM_SPI. Please update
the board before v2019.04 for no dm conversion
and v2019.07 for partially dm converted drivers.
Failure to update can lead to driver/board removal
See doc/driver-model/MIGRATION.txt for more info.
====================================================
===================== WARNING ======================
This board does not use CONFIG_DM_SPI_FLASH. Please update
the board to use CONFIG_SPI_FLASH before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.
====================================================

While we could fix it by selecting CONFIG_DM_SPI, there's no need to
build it at all as SPI is disabled on da850-lcdk. Remove all unneeded
options from the defconfig.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Heiko Schocher <hs@denx.de>
5 years agoi2c: remove i2c driver-model compatibility layer
Bartosz Golaszewski [Mon, 29 Jul 2019 06:58:00 +0000 (08:58 +0200)]
i2c: remove i2c driver-model compatibility layer

There are no more users of the compatibility layer for i2c. Remove the
driver and all references to it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Heiko Schocher <hs@denx.de>
5 years agosandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs
Bartosz Golaszewski [Mon, 29 Jul 2019 06:57:59 +0000 (08:57 +0200)]
sandbox: remove CONFIG_DM_I2C_COMPAT from defconfigs

There are no more "real" users of CONFIG_DM_I2C_COMPAT and we'll soon
remove it altogether. Stop building it in sandbox mode.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Heiko Schocher <hs@denx.de>
5 years agodavinci: remove CONFIG_DM_I2C_COMPAT from defconfigs
Bartosz Golaszewski [Mon, 29 Jul 2019 06:57:58 +0000 (08:57 +0200)]
davinci: remove CONFIG_DM_I2C_COMPAT from defconfigs

This option is no longer used on any davinci board but still selected
in defconfigs which causes the following warning:

===================== WARNING ======================
This board uses CONFIG_DM_I2C_COMPAT. Please remove
(possibly in a subsequent patch in your series)
before sending patches to the mailing list.
====================================================

Remove all references to CONFIG_DM_I2C_COMPAT from davinci.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Heiko Schocher <hs@denx.de>
5 years agoARM: da850_am18xxevm: Remove config and references
Adam Ford [Mon, 29 Jul 2019 13:28:39 +0000 (08:28 -0500)]
ARM: da850_am18xxevm: Remove config and references

This board has been abandonded for a while.  I do not have this hardware
and nobody has appeared to notice and/or care that it's orphaned.
Since much of this code is inserted into the da850evm code base, removing
it from support will make da850evm support easier going forward.
This patch removes the da850_am18xxevm_defconfig, README references to this
board and the reference to this board from the MAINTAINERS list.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoMerge branch '2019-07-29-master-imports'
Tom Rini [Mon, 29 Jul 2019 15:51:17 +0000 (11:51 -0400)]
Merge branch '2019-07-29-master-imports'

- Assorted bug fixes

5 years agoAdd validation for icache/dcache arguments - arguments different from off/on/flush...
Eric Perie [Sat, 13 Jul 2019 18:54:58 +0000 (14:54 -0400)]
Add validation for icache/dcache arguments - arguments different from off/on/flush are currently silently ignored.

Signed-off-by: Eric Perie <eric.perie@yahoo.com>
5 years agolib: uuid: alignment error in gen_rand_uuid()
Heinrich Schuchardt [Sun, 14 Jul 2019 21:31:50 +0000 (23:31 +0200)]
lib: uuid: alignment error in gen_rand_uuid()

Packed structures like struct uuid are not aligned. GCC 9.1 therefore
throws an error when trying to compile gen_rand_uuid().

lib/uuid.c: In function ‘gen_rand_uuid’:
lib/uuid.c:244:2: error: converting a packed ‘struct uuid’ pointer
(alignment 1) to a ‘unsigned int’ pointer (alignment 4) may result in
an unaligned pointer value [-Werror=address-of-packed-member]
  244 |  unsigned int *ptr = (unsigned int *)&uuid;
      |  ^~~~~~~~

Generate the uuid in a properly aligned buffer.

The byte order of a random number should not matter. Do not call
cpu_to_be32() to change the byte order.

Reported-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agortc, rx8025: add DM support
Heiko Schocher [Tue, 16 Jul 2019 03:31:35 +0000 (05:31 +0200)]
rtc, rx8025: add DM support

add DM support for this RTC driver.

Signed-off-by: Heiko Schocher <hs@denx.de>
5 years agortc, rx8025: fix Coding Style
Heiko Schocher [Tue, 16 Jul 2019 03:31:34 +0000 (05:31 +0200)]
rtc, rx8025: fix Coding Style

fix Coding Style for this driver.

Signed-off-by: Heiko Schocher <hs@denx.de>
5 years agortc: move RTC_RX8025 to Kconfig
Heiko Schocher [Tue, 16 Jul 2019 03:31:33 +0000 (05:31 +0200)]
rtc: move RTC_RX8025 to Kconfig

move RTC_RX8025 to Kconfig and fixup board configs.

Signed-off-by: Heiko Schocher <hs@denx.de>
5 years agoboard: mediatek: Add pumpkin board support
Fabien Parent [Thu, 18 Jul 2019 17:08:09 +0000 (19:08 +0200)]
board: mediatek: Add pumpkin board support

The pumpkin board is made by Gossamer Engineering and is using
a MediaTek SoC. The board currently comes in two available version:
MT8516 SoC and MT8167 SoC.
The board provides the following IOs: eMMC, NAND, SD card, USB type-A,
Ethernet, Wi-Fi, Bluetooth, Audio (jack out, 2 PDM port, 1 analog in),
serial over USB, and an expansion header.

Additionally there is a HDMI port, DSI port, and camera port only
on the MT8167 version of the board.

The board can be powered by battery and/or via a USB Type-C port and
is using a PMIC MT6392.

The eMMC and NAND are sharing pins and cannot be used together.

This commit is adding the basic boot support for the Pumpkin MT8516
board on the eMMC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
5 years agopinctrl: mediatek: fix warning
Fabien Parent [Thu, 18 Jul 2019 17:08:08 +0000 (19:08 +0200)]
pinctrl: mediatek: fix warning

Fix the following warning when CONFIG_PINCONF=n:

drivers/pinctrl/mediatek/pinctrl-mtk-common.c:35:36:
warning: ‘mtk_drive’ defined but not used [-Wunused-const-variable=]
 static const struct mtk_drive_desc mtk_drive[] = {
                                    ^~~~~~~~~

Signed-off-by: Fabien Parent <fparent@baylibre.com>
5 years agogpio: fixes for gpio-hog support
Heiko Schocher [Wed, 17 Jul 2019 04:59:51 +0000 (06:59 +0200)]
gpio: fixes for gpio-hog support

recently added gpio hog patch was "in discussion"
state with Simon Glass. This patch now adds most
of comments from Simon Glass.

Signed-off-by: Heiko Schocher <hs@denx.de>
5 years agodoc: arch: sandbox: Replace all the instances of README.sandbox
Keerthy [Mon, 29 Jul 2019 08:22:04 +0000 (13:52 +0530)]
doc: arch: sandbox: Replace all the instances of README.sandbox

commit 49116e6d236d ("doc: arch: Convert README.sandbox to reST")
Moves README.sandbox to doc/arch.
Replace all the existing instances to point to the right documentation
file.

Signed-off-by: Keerthy <j-keerthy@ti.com>
5 years agoDrop linker-generated array creation when CONFIG_CMDLINE is disabled
Andrej Rosano [Mon, 29 Jul 2019 07:24:53 +0000 (09:24 +0200)]
Drop linker-generated array creation when CONFIG_CMDLINE is disabled

Linker generated array entry is not needed when the command line is
disabled. Remove this code in that case.

This is required as the commit 80a48dd47e3bf3ede676fae5a630cb6c80de3e69
breaks the linking stage when CONFIG_CMDLINE=n:

..
  LDS     u-boot.lds
  LD      u-boot
u-boot contains unexpected relocations: R_ARM_NONE
R_ARM_RELATIVE
make: *** [Makefile:1775: checkarmreloc] Error 1

Signed-off-by: Andrej Rosano <andrej.rosano@f-secure.com>
5 years agodoc: board: Add missing board index.rst files
Bin Meng [Fri, 26 Jul 2019 02:04:04 +0000 (19:04 -0700)]
doc: board: Add missing board index.rst files

These board index.rst files are missing in previous html doc patch
series, hence it causes some build warnings. Add those files.

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agotools/logos: remove black background of U-Boot logo
Heinrich Schuchardt [Thu, 25 Jul 2019 18:46:15 +0000 (20:46 +0200)]
tools/logos: remove black background of U-Boot logo

When generating the Sphinx documentation with command 'make htmldocs' the
U-Boot logo is displayed with a black box as a background.

Remove the black box.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agofit: Support compat string property in configuration node
Julius Werner [Thu, 25 Jul 2019 02:37:56 +0000 (19:37 -0700)]
fit: Support compat string property in configuration node

This patch adds support for an optional optimization to compatible
string matching where the compatible string property from the root node
of the kernel FDT can be copied into the configuration node of the FIT
image. This is most useful when using compressed FDTs or when using FDT
overlays, where the traditional extraction of the compatible string from
the kernel FDT itself is not easily possible.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agofit: Support compression for non-kernel components (e.g. FDT)
Julius Werner [Thu, 25 Jul 2019 02:37:55 +0000 (19:37 -0700)]
fit: Support compression for non-kernel components (e.g. FDT)

This patch adds support for compressing non-kernel image nodes in a FIT
image (kernel nodes could already be compressed previously). This can
reduce the size of FIT images and therefore improve boot times
(especially when an image bundles many different kernel FDTs). The
images will automatically be decompressed on load.

This patch does not support extracting compatible strings from
compressed FDTs, so it's not very helpful in conjunction with
CONFIG_FIT_BEST_MATCH yet, but it can already be used in environments
that select the configuration to load explicitly.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agocommon: Move bootm_decomp_image() to image.c (as image_decomp())
Julius Werner [Thu, 25 Jul 2019 02:37:54 +0000 (19:37 -0700)]
common: Move bootm_decomp_image() to image.c (as image_decomp())

Upcoming patches want to add decompression to use cases that are no
longer directly related to booting. It makes sense to retain a single
decompression routine, but it should no longer be in bootm.c (which is
not compiled for all configurations). This patch moves
bootm_decomp_image() to image.c and renames it to image_decomp() in
preparation of those upcoming patches.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
[trini: Fix warning around handle_decomp_error being unused]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-socfpga
Tom Rini [Mon, 29 Jul 2019 13:03:11 +0000 (09:03 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-socfpga

- Various gen5 fixes

5 years agoMerge tag 'video-for-2019.10' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Mon, 29 Jul 2019 13:02:46 +0000 (09:02 -0400)]
Merge tag 'video-for-2019.10' of https://gitlab.denx.de/u-boot/custodians/u-boot-video

- dcu and imx7 DM_VIDEO conversion
- lb070wv8 compatible in simple_panel driver
- bmp_logo improvements for DM_VIDEO
- EDID updates to filter supported modes
- meson_dw_hdmi: support EDID mode filtering
- dw_hdmi: support ddc-i2c-bus phandle for external I2C masters
- fix rpi crash when firmware doesn't report connected display

5 years agoMerge tag 'u-boot-rockchip-20190729' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 29 Jul 2019 13:02:15 +0000 (09:02 -0400)]
Merge tag 'u-boot-rockchip-20190729' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip

- Clean up and migrate to use common rockchip spl board file
- Clean up and migrate to use common rockchip board file
- Increase rk3288 CONFIG_SYS_BOOTM_LEN to 16MB

5 years agogitlab-ci: Switch to a Docker image that contains a QEMU we build
Tom Rini [Wed, 24 Jul 2019 17:09:31 +0000 (13:09 -0400)]
gitlab-ci: Switch to a Docker image that contains a QEMU we build

Rather than buiding QEMU for each test.py build it once in our
Dockerfile and re-use it as needed.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agovideo: arm: rpi: Bail out early if querying video information fails
Fabian Vogt [Thu, 11 Jul 2019 14:56:24 +0000 (16:56 +0200)]
video: arm: rpi: Bail out early if querying video information fails

When probing we query for the width and hight of the display. If the
firmware does not report any connected display the system will crash.
See https://github.com/raspberrypi/firmware/issues/1157 for details.

Signed-off-by: Fabian Vogt <fvogt@suse.com>
[mb: update commit message]
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
5 years agorockchip: rv1108: Migrate to use common board file
Kever Yang [Mon, 22 Jul 2019 12:02:21 +0000 (20:02 +0800)]
rockchip: rv1108: Migrate to use common board file

Use common board file for board_init() and board_late_init(),
for Rockchip SoCs have very similar process.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: elgin-rv1108: use board_early_init_f for per-boar init
Kever Yang [Mon, 22 Jul 2019 12:02:20 +0000 (20:02 +0800)]
rockchip: elgin-rv1108: use board_early_init_f for per-boar init

Use board_early_init_f() for per-board init operation and
use board_init() from common board file.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3399: Migrate to use common board file
Kever Yang [Mon, 22 Jul 2019 12:02:19 +0000 (20:02 +0800)]
rockchip: rk3399: Migrate to use common board file

Use common board file for board_init() and board_late_init(),
for Rockchip SoCs have very similar process.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3399: init vbus regulator in board_early_init_f()
Kever Yang [Mon, 22 Jul 2019 12:02:18 +0000 (20:02 +0800)]
rockchip: rk3399: init vbus regulator in board_early_init_f()

Handle per-board init in board_early_init_f() and use the
common board_init() for per-platform board init later.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3368: Migrate to use common board file
Kever Yang [Mon, 22 Jul 2019 12:02:17 +0000 (20:02 +0800)]
rockchip: rk3368: Migrate to use common board file

Use common board file for board_init() and board_late_init(),
for Rockchip SoCs have very similar process.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3328: Migrate to use common board file
Kever Yang [Mon, 22 Jul 2019 12:02:16 +0000 (20:02 +0800)]
rockchip: rk3328: Migrate to use common board file

Use common board file for board_init() and board_late_init(),
for Rockchip SoCs have very similar process.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
5 years agorockchip: rk3288: Migrate to use common board file
Kever Yang [Mon, 22 Jul 2019 12:02:15 +0000 (20:02 +0800)]
rockchip: rk3288: Migrate to use common board file

Use common board file for board_init() and board_late_init(),
for Rockchip SoCs have very similar process.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3288: Move rk3288_detect_reset_reason to soc file
Kever Yang [Mon, 22 Jul 2019 12:02:14 +0000 (20:02 +0800)]
rockchip: rk3288: Move rk3288_detect_reset_reason to soc file

The rk3288_detect_reset_reason() is per-SoC operation, move
it to rk3288.c, and extend the rk_board_late_init() with
rk3288_board_late_init() to make all the board works fine
as before.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3288: Move clock CMD to SoC file
Kever Yang [Mon, 22 Jul 2019 12:02:13 +0000 (20:02 +0800)]
rockchip: rk3288: Move clock CMD to SoC file

Move the do_clock CMD to rk3288.c so that we can re-use
the common board file later.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3288: Move veyron_init() back to veyron.c
Kever Yang [Mon, 22 Jul 2019 12:02:12 +0000 (20:02 +0800)]
rockchip: rk3288: Move veyron_init() back to veyron.c

The veyron_init() should go to its board file veyron.c,
and the board_early_init_f() could be the right place.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3288: move board_early_init_f() back to veyron
Kever Yang [Mon, 22 Jul 2019 12:02:11 +0000 (20:02 +0800)]
rockchip: rk3288: move board_early_init_f() back to veyron

The board_early_init_f() is only used by veyron board now,
move it into the board file veyron.c

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3288: move SOC setting into arch_cpu_init()
Kever Yang [Mon, 22 Jul 2019 12:02:10 +0000 (20:02 +0800)]
rockchip: rk3288: move SOC setting into arch_cpu_init()

Qos setting and emmc relate SoC setting should go to arch_cpu_init().

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3188: Migrate to use common board file
Kever Yang [Mon, 22 Jul 2019 12:02:09 +0000 (20:02 +0800)]
rockchip: rk3188: Migrate to use common board file

Use common board file for board_init() and board_late_init(),
for Rockchip SoCs have very similar process.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3188: Move SoC one time setting into arch_cpu_init()
Kever Yang [Mon, 22 Jul 2019 12:02:08 +0000 (20:02 +0800)]
rockchip: rk3188: Move SoC one time setting into arch_cpu_init()

The setting for noc remap should goto arch_cpu_init().

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk322x: Migrate to use common board file
Kever Yang [Mon, 22 Jul 2019 12:02:07 +0000 (20:02 +0800)]
rockchip: rk322x: Migrate to use common board file

Use common board file for board_init() and board_late_init(),
for Rockchip SoCs have very similar process.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk322x: move SoC setting into arch_cpu_init()
Kever Yang [Mon, 22 Jul 2019 12:02:06 +0000 (20:02 +0800)]
rockchip: rk322x: move SoC setting into arch_cpu_init()

The SoC one time setting should go to arch_cpu_init() in
rk322x.c

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3128: Migrate to use common board file
Kever Yang [Mon, 22 Jul 2019 12:02:05 +0000 (20:02 +0800)]
rockchip: rk3128: Migrate to use common board file

Use common board file for board_init() and board_late_init(),
for Rockchip SoCs have very similar process.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3036: Migrate to use common board file
Kever Yang [Mon, 22 Jul 2019 12:02:04 +0000 (20:02 +0800)]
rockchip: rk3036: Migrate to use common board file

Use common board file for board_init() and board_late_init(),
for Rockchip SoCs have very similar process.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3036: move dram_init() into soc file
Kever Yang [Mon, 22 Jul 2019 12:02:03 +0000 (20:02 +0800)]
rockchip: rk3036: move dram_init() into soc file

Move dram_init() into rk3036.c so that we can use to common board
file later.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: sdram_common: add common dram_init_banksize
Kever Yang [Mon, 22 Jul 2019 12:02:02 +0000 (20:02 +0800)]
rockchip: sdram_common: add common dram_init_banksize

dram_init_banksize() can be common used by all SoCs, move it into
sdram_common.c

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: add common board file for U-Boot proper
Kever Yang [Mon, 22 Jul 2019 12:02:01 +0000 (20:02 +0800)]
rockchip: add common board file for U-Boot proper

Add common board file for Rockchip SoCs to avoid too much
copy-paste work for different SoCs.
This board file in charge for common board_init() and board_late_init()
in U-Boot proper.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: clean up board_usb_init() for all SoCs
Kever Yang [Mon, 22 Jul 2019 12:02:00 +0000 (20:02 +0800)]
rockchip: clean up board_usb_init() for all SoCs

Use "snps,dwc2" for compatible name and and common variable
names so that we can share the common code for all SoCs.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: convert to use ROCKCHIP_BOOT_MODE_REG for fastboot tag
Kever Yang [Mon, 22 Jul 2019 12:01:59 +0000 (20:01 +0800)]
rockchip: convert to use ROCKCHIP_BOOT_MODE_REG for fastboot tag

The fastboot_set_reboot_flag() update a TAG into a register
for next boot, use the common macro for the register so that
we can re-use the function for different SoCs.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3328: add board_debug_uart_init()
Kever Yang [Mon, 22 Jul 2019 12:01:58 +0000 (20:01 +0800)]
rockchip: rk3328: add board_debug_uart_init()

Add board_debug_uart_init() to make the debug UART work with
correct setting.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3399: Migrate to use common spl board file
Kever Yang [Mon, 22 Jul 2019 11:59:42 +0000 (19:59 +0800)]
rockchip: rk3399: Migrate to use common spl board file

rk3399 has similar boot flow in SPL with other Rockchip SoCs,
migrate to use common spl board file.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3399: move chromebook bob specific flow to its board file
Kever Yang [Mon, 22 Jul 2019 11:59:41 +0000 (19:59 +0800)]
rockchip: rk3399: move chromebook bob specific flow to its board file

Add a board_early_init_f() in board_init_f() and move the board
specific init code into its own board file.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3399: move boot_devices into soc file
Kever Yang [Mon, 22 Jul 2019 11:59:40 +0000 (19:59 +0800)]
rockchip: rk3399: move boot_devices into soc file

Move boot_devices definition into rk3399.c, so that we can
share the common code for board_spl_was_booted_from().

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3399; move spl_board_init() into soc file
Kever Yang [Mon, 22 Jul 2019 11:59:39 +0000 (19:59 +0800)]
rockchip: rk3399; move spl_board_init() into soc file

Move spl_board_init() into rk3399.c so that we can re-use the
common SPL board file later.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3399: move SoC setting into arch_cpu_init()
Kever Yang [Mon, 22 Jul 2019 11:59:38 +0000 (19:59 +0800)]
rockchip: rk3399: move SoC setting into arch_cpu_init()

SoC setting like DDR secure region and EMMC clock setting
should go to arch_cpu_init().

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3399: show SPL BANNER earlier in board_init_f()
Kever Yang [Mon, 22 Jul 2019 11:59:37 +0000 (19:59 +0800)]
rockchip: rk3399: show SPL BANNER earlier in board_init_f()

Show the SPL BANNER earlier so that we know already get into SPL.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3399: move spl_perform_fixups() into soc file
Kever Yang [Mon, 22 Jul 2019 11:59:36 +0000 (19:59 +0800)]
rockchip: rk3399: move spl_perform_fixups() into soc file

Move the spl_perform_fixups() into rk3399.c so that we can
use common spl board file later.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3368: add boot_devices mapping to support 'same-as-spl'
Kever Yang [Mon, 22 Jul 2019 11:59:35 +0000 (19:59 +0800)]
rockchip: rk3368: add boot_devices mapping to support 'same-as-spl'

The driver need a mapping to get the dts node by boot srouce ID.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3368: migrate to use common spl board file
Kever Yang [Mon, 22 Jul 2019 11:59:34 +0000 (19:59 +0800)]
rockchip: rk3368: migrate to use common spl board file

rk3368 has similar boot flow in SPL with other Rockchip SoCs,
migrate to use common spl board file.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3328: add boot_devices mapping to support 'same-as-spl'
Kever Yang [Mon, 22 Jul 2019 11:59:33 +0000 (19:59 +0800)]
rockchip: rk3328: add boot_devices mapping to support 'same-as-spl'

The driver need a mapping to get the dts node by boot srouce ID.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3328: migrate to use common spl board file
Kever Yang [Mon, 22 Jul 2019 11:59:32 +0000 (19:59 +0800)]
rockchip: rk3328: migrate to use common spl board file

rk3328 has similar boot flow in SPL with other Rockchip SoCs,
migrate to use common spl board file.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3328: add STIMER_BASE definition
Kever Yang [Mon, 22 Jul 2019 11:59:31 +0000 (19:59 +0800)]
rockchip: rk3328: add STIMER_BASE definition

Add the CONFIG_ROCKCHIP_STIMER_BASE so that we can use the stimer
init function in tpl.c and spl.c

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3288: add boot_devices mapping to support 'same-as-spl'
Kever Yang [Mon, 22 Jul 2019 11:59:30 +0000 (19:59 +0800)]
rockchip: rk3288: add boot_devices mapping to support 'same-as-spl'

The driver need a mapping to get the dts node by boot srouce ID.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3288-veyron: Migrate "u-boot, boot0" to "u-boot, spl-boot-order"
Kever Yang [Mon, 22 Jul 2019 11:59:29 +0000 (19:59 +0800)]
rockchip: rk3288-veyron: Migrate "u-boot, boot0" to "u-boot, spl-boot-order"

"u-boot,spl-boot-order" is more flexible and other rockchip SoCs
has convert to use it, migrate to use the new dts property.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: phycore: remove no use "u-boot, boot0" in dts
Kever Yang [Mon, 22 Jul 2019 11:59:28 +0000 (19:59 +0800)]
rockchip: phycore: remove no use "u-boot, boot0" in dts

We are using "u-boot,spl-boot-order" now and re-use the
definition from rk3288-u-boot.dtsi, so remove it directly here.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3288: Migrate to use common spl board file
Kever Yang [Mon, 22 Jul 2019 11:59:27 +0000 (19:59 +0800)]
rockchip: rk3288: Migrate to use common spl board file

rk3288 has similar boot flow in SPL with other Rockchip SoCs,
migrate to use common spl board file.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3288: move dram_init_banksize() into soc file
Kever Yang [Mon, 22 Jul 2019 11:59:26 +0000 (19:59 +0800)]
rockchip: rk3288: move dram_init_banksize() into soc file

Mov edram_init_banksize() into rk3288.c so that we can re-use
the common SPL board file later.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3288-phycore: move phycore_init() to its own board file
Kever Yang [Mon, 22 Jul 2019 11:59:25 +0000 (19:59 +0800)]
rockchip: rk3288-phycore: move phycore_init() to its own board file

phycore_init() is use for phycore board only, it should be move back
to phycore-rk3288.c

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3288: move setup_led() to firefly-rk3288
Kever Yang [Mon, 22 Jul 2019 11:59:24 +0000 (19:59 +0800)]
rockchip: rk3288: move setup_led() to firefly-rk3288

Only firefly-rk3288 has the dts node "u-boot,boot-led",
while CONFIG_SPL_LED is not enable, move code to firefly-rk3288
now in case someone need this code.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3288: show SPL BANNER earlier in board_init_f()
Kever Yang [Mon, 22 Jul 2019 11:59:23 +0000 (19:59 +0800)]
rockchip: rk3288: show SPL BANNER earlier in board_init_f()

Show the SPL BANNER earlier so that we know already get into SPL.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: fit_spl_optee: rockchip: fix warning unit_address_vs_reg
Kever Yang [Mon, 22 Jul 2019 11:59:22 +0000 (19:59 +0800)]
rockchip: fit_spl_optee: rockchip: fix warning unit_address_vs_reg

Update to fix warning:
u-boot.itb.tmp: Warning (unit_address_vs_reg): Node /images/uboot@1
has a unit name, but no reg property
u-boot.itb.tmp: Warning (unit_address_vs_reg): Node /images/optee@1
has a unit name, but no reg property
u-boot.itb.tmp: Warning (unit_address_vs_reg): Node /images/fdt@1
has a unit name, but no reg property
u-boot.itb.tmp: Warning (unit_address_vs_reg): Node /configurations/conf@1
has a unit name, but no reg property

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk322x: add boot_devices mapping to support 'same-as-spl'
Kever Yang [Mon, 22 Jul 2019 11:59:21 +0000 (19:59 +0800)]
rockchip: rk322x: add boot_devices mapping to support 'same-as-spl'

The driver need a mapping to get the dts node by boot srouce ID.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk322x: migrate to use common spl board file
Kever Yang [Mon, 22 Jul 2019 11:59:20 +0000 (19:59 +0800)]
rockchip: rk322x: migrate to use common spl board file

rk322x has similar boot flow in SPL with other Rockchip SoCs,
migrate to use common spl board file.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk322x: introduce arch_cpu_init() for SoC setting init
Kever Yang [Mon, 22 Jul 2019 11:59:19 +0000 (19:59 +0800)]
rockchip: rk322x: introduce arch_cpu_init() for SoC setting init

Use arch_cpu_init() to init SoC secure region and move it to
rk322x.c

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3188: migrate to use common spl board file
Kever Yang [Mon, 22 Jul 2019 11:59:18 +0000 (19:59 +0800)]
rockchip: rk3188: migrate to use common spl board file

rk3188 has similar boot flow in SPL with other Rockchip SoCs,
migrate to use common spl board file.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3188: add boot_devices mapping to support 'same-as-spl'
Kever Yang [Mon, 22 Jul 2019 11:59:17 +0000 (19:59 +0800)]
rockchip: rk3188: add boot_devices mapping to support 'same-as-spl'

The driver need a mapping to get the dts node by boot srouce ID.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3188: move spl_board_init() into rk3188.c
Kever Yang [Mon, 22 Jul 2019 11:59:16 +0000 (19:59 +0800)]
rockchip: rk3188: move spl_board_init() into rk3188.c

Clean up the rk3188.c so that we can re-use the common spl board file.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: Migrate to use BOOTROM_SUPPORT driver
Kever Yang [Mon, 22 Jul 2019 11:59:15 +0000 (19:59 +0800)]
rockchip: Migrate to use BOOTROM_SUPPORT driver

SPL bootrom support is a boot device just like mmc and etc,
use formal boot device instead of jump to bootrom directly.
Enable the Kconfig by default if ROCKCHIP_BACK_TO_BROM is enabled.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3188: move usb uart init into arch_cpu_init()
Kever Yang [Mon, 22 Jul 2019 11:59:14 +0000 (19:59 +0800)]
rockchip: rk3188: move usb uart init into arch_cpu_init()

The SoC feature init will be better to use arch_cpu_init() and
goes to soc file.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: rk3188: init CPU freq in clock driver
Kever Yang [Mon, 22 Jul 2019 11:59:13 +0000 (19:59 +0800)]
rockchip: rk3188: init CPU freq in clock driver

Init CPU frquency in clock driver instead of in SPL board file,
this will help for use common board file later.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agorockchip: add common spl board file
Kever Yang [Mon, 22 Jul 2019 11:59:12 +0000 (19:59 +0800)]
rockchip: add common spl board file

The common spl board file handles board_init_f() in SPL,
and with board_early_init_f() and arch_cpu_init() callback,
other operateion after board_init_f() should go to board specific
spl_board_init().

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 years agovideo: dw_hdmi: Add support for ddc-i2c-bus property
Niklas Schulze [Sat, 27 Jul 2019 12:07:13 +0000 (12:07 +0000)]
video: dw_hdmi: Add support for ddc-i2c-bus property

Add support for the ddc-i2c-bus device tree property which allows
for using an external i2c master for reading the display's EDID.

Signed-off-by: Niklas Schulze <me@jns.io>
5 years agovideo: meson: dw-hdmi: add EDID mode filtering to only select supported modes
Neil Armstrong [Thu, 4 Jul 2019 13:52:08 +0000 (15:52 +0200)]
video: meson: dw-hdmi: add EDID mode filtering to only select supported modes

Add support for the new mode_valid() display op to filter out unsupported
display DMT timings.

This is useful when connected to 4k displays, since we only support DMT
monitors up to 1920x1080, the 4k native timings are discarded to select
supported timings.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agovideo: display: use edid_get_timing_validate() variant to filter supported EDID modes
Neil Armstrong [Thu, 4 Jul 2019 13:52:07 +0000 (15:52 +0200)]
video: display: use edid_get_timing_validate() variant to filter supported EDID modes

Introduce a new display op, mode_valid() to be used with the newly
introduced edid_get_timing_validate() function, to filter supported
monitor timings if handled by the display driver.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agoedid: add edid_get_timing_validate() variant to filter out edid modes
Neil Armstrong [Thu, 4 Jul 2019 13:52:06 +0000 (15:52 +0200)]
edid: add edid_get_timing_validate() variant to filter out edid modes

The original edid_get_timing() function returns the first valid timing,
but on some plaforms, we could only supports a subset of the listed
monitot's navite timing.

Let's introduce a edid_get_timing_validate() adding a mode_valid callback
including a private cookie pointer.

If the callback returns false, the current timing is discared and the next
one is checked. If no valid & supported timings are found, the function
would return an error.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agobmp_logo: support CONFIG_DM_VIDEO
Heiko Schocher [Thu, 13 Jun 2019 03:12:38 +0000 (05:12 +0200)]
bmp_logo: support CONFIG_DM_VIDEO

in case of bmp_logo, the video_bmp driver is used for
drawing a bmp logo. This driver supports only "full"
bmp data. Adding a logo with the bmp_logo tool to
u-boot binary adds currently only real data and drops
the bmp header.

This patch adds now the full bmp data to the u-boot
binary, so video_bmp driver works with the logo embedded
into u-boot.

Fixed also some checkpatch error poping up with this
patch.

Signed-off-by: Heiko Schocher <hs@denx.de>
5 years agovideo, simple_panel: add lg,lb070wv8 display
Heiko Schocher [Mon, 27 May 2019 06:14:39 +0000 (08:14 +0200)]
video, simple_panel: add lg,lb070wv8 display

add "lg,lb070wv8" display to compatible node.

Signed-off-by: Heiko Schocher <hs@denx.de>
5 years agoconfigs: colibri-imx6ull: switch to DM_VIDEO
Igor Opaniuk [Wed, 19 Jun 2019 08:47:10 +0000 (11:47 +0300)]
configs: colibri-imx6ull: switch to DM_VIDEO

Use CONFIG_DM_VIDEO=y by default for Colibri iMX6ULL.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
5 years agoARM: dts: colibri-imx6ull: extend lcdif node
Igor Opaniuk [Wed, 19 Jun 2019 08:47:09 +0000 (11:47 +0300)]
ARM: dts: colibri-imx6ull: extend lcdif node

Provide proper display timings for lcdif node, used by mxsfb DM_VIDEO
enabled framebuffer driver.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>