Commit Graph

10810 Commits

Author SHA1 Message Date
Kever Yang 68fff71bb3 rockchip: evb-rk3128: enable rk818 current limit early
Some rk3128 board like fireprime is using rk818, and it may limit
the current before change the pmic setting, the normal process
need to enable the fuelguage and its dts which is too late,
the U-Boot may HANG at regulator_power_on_init() in board_init().

Change-Id: I7bd058d8bd8fac01377c3cef6b3681c1c6110ee7
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-08-06 10:28:41 +08:00
Masahiro Yamada f1ba13f8e2 UPSTREAM: libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>
Thomas reported U-Boot failed to build host tools if libfdt-devel
package is installed because tools include libfdt headers from
/usr/include/ instead of using internal ones.

This commit moves the header code:
  include/libfdt.h         -> include/linux/libfdt.h
  include/libfdt_env.h     -> include/linux/libfdt_env.h

and replaces include directives:
  #include <libfdt.h>      -> #include <linux/libfdt.h>
  #include <libfdt_env.h>  -> #include <linux/libfdt_env.h>

Change-Id: I68fd5734d6460c169fa5ee2893c57cb5d73340b6
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit b08c8c4870831c9315dcae237772238e80035bd5)
2019-07-05 19:33:35 +08:00
Mario Six 5acabbc59d UPSTREAM: flash: Fix spelling of "ERR_TIMOUT"
checkpatch.pl complains about the spelling of ERR_TIMOUT. Since the
error is only used in a handful of files, we rename the error to
ERR_TIMEOUT.

Change-Id: If99b9c4f75aa0582da432b748a723e477e22759c
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 9dbaebcf9f401c5dcea762e34a3dc8ed10760623)
2019-07-05 19:33:35 +08:00
Jon Lin b491b49882 UPSTREAM: wait_bit: use wait_for_bit_le32 and remove wait_for_bit
wait_for_bit callers use the 32 bit LE version

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Change-Id: I638846de7db29711fb7c778cc8304b507de057fe
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 48263504c8d501678acaa90c075f3f7cda17c316)
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2019-07-05 19:21:04 +08:00
Masahiro Yamada 331c237568 UPSTREAM: mtd: nand: Rename nand.h into rawnand.h
This header was renamed to rawnand.h in Linux.

The following is the corresponding commit in Linux.

  commit d4092d76a4a4e57b65910899948a83cc8646c5a5
  Author: Boris Brezillon <boris.brezillon@free-electrons.com>
  Date:   Fri Aug 4 17:29:10 2017 +0200

      mtd: nand: Rename nand.h into rawnand.h

      We are planning to share more code between different NAND based
      devices (SPI NAND, OneNAND and raw NANDs), but before doing that
      we need to move the existing include/linux/mtd/nand.h file into
      include/linux/mtd/rawnand.h so we can later create a nand.h header
      containing all common structure and function prototypes.

Change-Id: Ia387c26297c268a449e3451c7adfabcd6417b278
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 6ae3900a86b52429bf7a73ad832f0ad02acc2282)
2019-07-05 19:21:04 +08:00
Heinrich Schuchardt 5aae54de78 UPSTREAM: rockchip: evb-rk3399: correct README for board bring up
%s/rkflashtool/rkdeveloptool/

We are using rkdeveloptool not rkflashtool.

Change-Id: Icca82ca411f06d3ec5f578d8e4ac53fbbc486868
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 19ee1fae097325c7af4f18956c903d3ad15b43b7)
2019-01-21 18:00:33 +08:00
Masahiro Yamada 0e00a84cde UPSTREAM: libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>
Thomas reported U-Boot failed to build host tools if libfdt-devel
package is installed because tools include libfdt headers from
/usr/include/ instead of using internal ones.

This commit moves the header code:
  include/libfdt.h         -> include/linux/libfdt.h
  include/libfdt_env.h     -> include/linux/libfdt_env.h

and replaces include directives:
  #include <libfdt.h>      -> #include <linux/libfdt.h>
  #include <libfdt_env.h>  -> #include <linux/libfdt_env.h>

Change-Id: I6c0f7e50e8b571106627f25ddac008a62bd2994e
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-12-24 17:20:37 +08:00
Joseph Chen eee2651354 rockchip: rk3308: detect adc key by uboot fdt info
fixes: bcf84996f0
(rockchip: rk3308: fix adc key read failed when kernel dtb is enabled)

Change-Id: I46071bf516cc9ee81f4e33cf884ba7baaa5f2d89
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-11-30 17:21:44 +08:00
Joseph Chen bcf84996f0 rockchip: rk3308: fix adc key read failed when kernel dtb is enabled
return negative erro num makes board_r.c bootflow abort, so that
the adc key driver can not be probe.

Change-Id: I815b16427dc4bf1fdeaab3b75077ed40f5a2beab
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-10-24 20:30:06 +08:00
William Wu 706cec9061 rockchip: rk1808: add dwc3 board init
Change-Id: I52953d7d1b84b4841d494c68bb79074b394811ca
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-10-06 21:01:35 +08:00
Joseph Chen 8870d6b7ed rockchip: rk1808: add evb board support
Change-Id: Id2beac9acc5b4b96fe480b3b2bea88e2f3c158aa
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-09-04 10:36:14 +08:00
Joseph Chen 9a7ebf3105 rockchip: rk3368: add evb rk3368 support
Change-Id: Icd49c20a25e19eb66d797e17df5e128d7572fe73
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-08-17 09:57:39 +08:00
Kever Yang 7a39aeb5cd rockchip: rk3399: update doc for u-boot.itb write position
u-boot.itb will use the same position as uboot.img

Change-Id: I839c947a0221d347e5810d1fc8bbae655aba429b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-07-12 10:22:48 +08:00
William Wu 2878d5a3aa usb: dwc3: init phy utmi width in platform data
On rk3399 board, we need to configure phy interface UTMI+ width
to 16 bits via the property "snps,phyif-utmi-bits" of dwc3 node.
But we can't the get the property from kernel dtb. So this patch
initialize the phy interface UTMI+ width in dwc3 platform data,
and not dependent on the property in dtb.

Change-Id: I3f6b05e0d72806242a128c85f82b260f61ac4f95
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-06-28 16:24:34 +08:00
Kever Yang 55a83ed534 rockchip: gva-rk3229: add fastboot key detect
Since the common board init do not detect the fastboot key,
we need to add it in gva board init.

Change-Id: I7f5ea5df740e855c1ec4f64092450d028321200b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-06-04 12:24:52 +08:00
Andy Yan 7a5fbf5e5e board: evb-rk3308: compatible different adc key channle on board
The RK3308 EVB has two variants: V10 & V11, and V10 bind the
Recovery key on adc channel 0, but V11 bind to channel 1.
Fortunately, the two variants use adc channel 3 to identify
one from another as board id information. So we identify
the board id by adc channel 3, then get the Recovery key
status according to it's corresponding adc channel.

Change-Id: Ib04fb1aad08f69fcdb493258e25c748fb45468d4
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-05-24 16:43:06 +08:00
David Wu 5f601e7c0e rockchip: kylin-rk3036: add README file for OP-TEE support
Detail of step by step to bring up the board with OP-TEE support.

Change-Id: I0d0a1ab8cbe720e35959d6611519f4dfcb51b349
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-03-29 16:27:44 +08:00
Andy Yan c1e43163e9 board: rockchip: add rk3308 evb support
Add basic support for rk3308 evb.

Change-Id: I35aecc6747c222327a12b7583f84f971ab253fa3
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-03-22 08:55:19 +08:00
Kever Yang 822b9c09c1 rockchip: phycore-rk3288: fix compile warning
Change-Id: Iaa874efe1446b788e45415e8b70473b105014727
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-02-11 19:56:55 +08:00
Andy Yan 53cb838439 board: rockchip: update README of rv1108 evb
The RV1108 EVB switch to spl now, so we need
to update the README.

Change-Id: I1c300a53a8a5c76aafa4857f55956e0203df8634
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-02-06 12:50:39 +08:00
Zhihuan He d14f7e1ef9 rockchip: updata the style of reporting sdram cap
updata the style of reporting sdram capacity to uboot

Change-Id: I6a652f233d8d26e842398edcc184cbbe89099401
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2018-02-05 21:05:36 +08:00
Kever Yang 448a4b3860 rockchip: px30: add evb_px30 board support
PX30 is a rockchip evb for px30, including all harware interface
from px30.

Change-Id: I5bac5a7ebf23b5c51b3a01f51fe0404db0a1b5fc
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-02-05 20:55:54 +08:00
Kever Yang db48fc9697 rockchip: rk3399: use common board file
Use common board file and move SoC spec setting into rk3399.c

Change-Id: Ic674cef566b16c33978a1430eadfa9438b2de1db
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-23 08:45:27 +08:00
Kever Yang 9814e89b69 rockchip: rk3368: use common board file
Use common board file and move SoC spec setting into rk3368.c

Change-Id: I1d5a2b0bae03f89092cc0daf1c52622b3884cc43
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-23 08:45:26 +08:00
Kever Yang 73d952acc8 rockchip: rk3328: use common board file
Use common board file and move SoC spec setting into rk3328.c

Change-Id: Ia7cf43e0096da980d744260caa61456ddc6b24eb
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-23 08:45:26 +08:00
Kever Yang 27dbe19836 rockchip: rv1108: use common board file
Use common board file.

Change-Id: I5fefdfad9a2acdb837ffe15f93518dc26e08b9e7
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-23 08:45:26 +08:00
Kever Yang fc9839356c rockchip: rk3288: use common board file
Use common board file and move SoC spec setting into rk3288.c

Change-Id: Ie17232dd60d2b185b635631ce9373eb59b11c89c
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-23 08:45:26 +08:00
Kever Yang b99d793163 rockchip: remove no use script
We have move these script to common folder.

Change-Id: Ieacd1d49fc481435602fec3de0747873df22c2b5
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:49:29 +08:00
Philipp Tomsich feba3cdb1a UPSTREAM: rockchip: board: lion-rk3368: reduce env-size default to 8KiB
We want to have the same configuration defaults for the RK3368-uQ7
as for the RK3399-Q7: this change reduces the default env-size to
8KiB to ensure that it does not overlap the boot-payload on SD/MMC
configurations.

References: commit fe529e6597c0 ("rockchip: rk3399-puma: reduce env size to 8kiB")
Change-Id: Ia3fcfb0fed8422017cca7cb8c9d1e12025598c8c
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 224d261a16435389cc349b0e1640d489f117189d)
2018-01-17 15:27:28 +08:00
Jakob Unterwurzacher 2b00ccbd41 UPSTREAM: rockchip: rk3399-puma: reduce env size to 8kiB
This commit changes the size of the enviroment (for the RK3399-Q7) to
8kiB for all possible locations of the environment (i.e. even when the
environment is saved to SD card).

With the default of 32kiB, the environment overwrites the SPL
stage which lives at 16kiB.

Change-Id: Iafe513fc093669b51d108641c435c406a654c62b
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
[Reworked commit-message:]
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit fe529e6597c00a98893e5d0ab00251cb50d457a7)
2018-01-17 15:27:28 +08:00
Klaus Goger 49a2ef1590 UPSTREAM: rockchip: move CONFIG_ENV_SIZE and CONFIG_ENV_OFFSET to Kconfig
This commit adds ENV_SIZE and ENV_OFFSET configuration items for
ARCH_ROCKCHIP, but keeps these non-visible (i.e. not prompt is given).
With these new items present, the configuration from the header files
is moved to Kconfig.

Keeping these non-visible is necessary to have the possibility to
select new default values if CONFIG_IS_IN_* is changed (interactively
or with oldconfig). Otherwise it will always be set to a previous
value if used with a prompt.  As an example if we do a defconfig with
CONFIG_IS_IN_MMC and change it to CONFIG_IS_IN_SPI_FLASH via
menuconfig, ENV_SIZE and ENV_OFFSET will not be changed to the correct
values as defconfig will already have set them to the default values
of CONFIG_IS_IN_MMC in .config.

Change-Id: I72dcb184406523a3a846322fd58ee7b9669d3390
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 81f53b0dafdfe9458f6d04fc5ec2732c2ea23a71)
2018-01-17 15:27:28 +08:00
Jakob Unterwurzacher 83c6e7dea9 UPSTREAM: rockchip: rk3399-puma: set gpio4cd iodomain to 1.8V
The PCIe reset signal is connected to GPIO4_C6 on the Puma
module. This pin is supplied by 1.8V, but the default iodomain
setting is 3.0V and in this situation the pin is unable to go
high.

Linux assumes that this signal works in early boot
as PCIe is probed before loading the iodomain driver.

Make PCIe work in Linux by setting the gpio4cd iodomain to 1.8V.

Change-Id: I131ca6147b490a89cc913ce398dc163c99efd9f2
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit aa41220f6f7c79284ce5880e2533f81c125237a4)
2018-01-17 15:27:28 +08:00
Jakob Unterwurzacher 7cc0da0b68 UPSTREAM: rockchip: rk3399-puma: preserve leading zeros in serial#
Linux preserves leading zeros in /proc/cpuinfo, so we
should as well.

Otherwise we have the situation that
/sys/firmware/devicetree/base/serial-number
and /proc/cpuinfo disagree in Linux.

Change-Id: Ie1b53d75468ac9ae6ac3298ed54a4e7b5e6bea9a
Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit b32b1bd10b86d01a26056f50de89f768e5183ed1)
2018-01-17 15:27:28 +08:00
Philipp Tomsich 23429be340 UPSTREAM: rockchip: rk3399-puma: add code to allow forcing a power-on reset
The reset circuitry in the RK3399 only resets 'almost all logic' when
a software reset is performed.  To make our software maintenance
easier in the future, we want to have the option (controlled by a DTS
property) to force all reset causes other than a power-on reset to
trigger a power-on reset via a GPIO trigger.

This adds the necessary support to the rk3399-puma (i.e. RK3399-Q7)
board-support and the documentation for the new property
(sysreset-gpio) within the /config-node.

Change-Id: If51b78c2ef6ca929c2d108346e21697f7e9b36db
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ae0d33a7291a164a11ae034bcf4f71226b2bef48)
2018-01-17 15:27:28 +08:00
Philipp Tomsich 0c58140478 UPSTREAM: rockchip: rk3399-puma: implement usb_hub_reset_devices for puma-rk3399
For some versions of the RK3399-Q7 (at least revisions v1.1 and v1.2
are affected), we need to turn on the power for the port connected to
the on-module USB hub only when the device is probed for the first
time to ensure that the hub does not enter a low-power mode (that
U-Boot's USB stack can't deal with).

Note that this is needed for U-Boot only, as Linux eventually manages
to attach the hub even when it has entered into its low-power state
(when the hub wakes up the next time) after a few seconds.

Change-Id: I4eca5fe6953ae77ff12c45248d156de4a890803c
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 614539d4f79669413e3336f349c487b605f2bb6b)
2018-01-17 15:27:28 +08:00
Philipp Tomsich 3f6e9bd9ff UPSTREAM: usb: hub: identify the hub-device to usb_hub_reset_devices
When usb_hub_reset_devices is called, it should be passed both an
indicator which hub it should operate on and what port number (local
to that hub) should be reset.

Previously, the usb_hub.c code did not include such context and
always started resets from port number 1, performing multiple
reset-requests for the same devices:

       /*
        * Reset any devices that may be in a bad state when applying
        * the power.  This is a __weak function.  Resetting of the devices
        * should occur in the board file of the device.
        */
       for (i = 0; i < dev->maxchild; i++)
              usb_hub_reset_devices(i + 1);

This adds an additional 'hub' parameter to usb_hub_reset_devices
that provides the context to fully qualify the port-number in.

Existing implementations are changed to accept and ignore the new
parameter.

Change-Id: I2f201cb9c52522f6e553cbf54aae9bbb2e549a21
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 883946e8e7c5dacb5e12f18703e20d49a4886f0e)
2018-01-17 15:27:28 +08:00
Philipp Tomsich 916b3b5925 UPSTREAM: rockchip: board: lion-rk3368: update .its file
For the RK3368-uQ7, we can now update the .its file to mark the
Trusted Firmware as out 'firmware' bootable and annotate both ATF and
U-Boot with an OS-type.

Change-Id: I637ee137e1ea361ec198425e0e1b14c26343d913
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit b07856fe436a6ccf20c6176cd450a4c4487973a1)
2018-01-17 15:27:28 +08:00
Philipp Tomsich 07c4cb3a1f UPSTREAM: rockchip: board: puma-rk3399: update .its file to use new features
This commit updates the .its file for the RK3399-Q7 to use the new
features and demonstrates how to use those:
 * it marks the ATF as the 'firmware'
 * it tracks the OS-type for U-Boot and ATF
 * it loads the PMU (M0) firmware to DRAM and records the location
   to /fit-images (where our ATF reads it from)

With the handoff of the next-stage FDT to ATF in place, we can now use
this to pass information about the load addresses and names of each
loadables to ATF: now we can load the M0 firmware into DRAM and avoid
overwriting parts of the SPL stage.  This is achieved by changing our
.its-file to use an available area of DRAM as the load-address.

Change-Id: Iff9e14ecaa7eb01b40498880a34f8fc87bda0090
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit fc76fa3cfa3fa716bf541f30977896fd6656b148)
2018-01-17 15:27:28 +08:00
Tom Rini aee63dc84c MAINTAINERS: Add missing boards and config entries
As part of my usual round of build testing, output about missing
MAINTAINERS information was not logged, and thus often overlooked.
Correct that mistake by ensuring that I log the output of
genboardscfg.py every time.  As part of that, address a number of
missing MAINTAINERS entires.  In the case of a missing file, I have put
the original submitter down.  In the rest of the cases I have added the
config (and sometimes relevant header file) to the existing set of file
globs.

Change-Id: Ic4524445489daba323d638470c369ad914d5bfef
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 79df00fdb40b4584919c8bcef42d323a8d38d0f1)
2018-01-17 15:27:28 +08:00
Tuomas Tynkkynen b0ec94428e UPSTREAM: Drop CONFIG_HAS_DATAFLASH
Last user of this option went away in commit:

fdc7718999 ("board: usb_a9263: Update to support DT and DM")

Change-Id: Id05869deccb88c1102700dd5af58a8c249e3e9e2
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c68c03f52badc90951dbf8a054c0e500e04bf365)
2018-01-17 15:27:28 +08:00
Jean-Jacques Hiblot 2bbcffb1d3 UPSTREAM: dts: renamed FIT_EMBED to MULTI_DTB_FIT and moved it to the dts Kconfig
CONFIG_FIT_EMBED might be confused with CONFIG_OF_EMBED, rename it
MULTI_DTB_FIT as it is able to get a DTB from a FIT image containing
multiple DTBs. Also move the option to the Kconfig dedicated to the DTS
options and create a README for this feature.

Change-Id: Ide55c474339db3ccd5e20499c54c8bb41fe3a2c9
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 11955590a284ecb75892aad5f1174ca1b94a709b)
2018-01-17 15:27:28 +08:00
Masahiro Yamada 90aa625c9a treewide: replace with error() with pr_err()
U-Boot widely uses error() as a bit noisier variant of printf().

This macro causes name conflict with the following line in
include/linux/compiler-gcc.h:

  # define __compiletime_error(message) __attribute__((error(message)))

This prevents us from using __compiletime_error(), and makes it
difficult to fully sync BUILD_BUG macros with Linux.  (Notice
Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)

Let's convert error() into now treewide-available pr_err().

Done with the help of Coccinelle, excluing tools/ directory.

The semantic patch I used is as follows:

// <smpl>
@@@@
-error
+pr_err
 (...)
// </smpl>

Change-Id: I921807c1770d36a91e692c48ab477558bb2ed0b8
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Re-run Coccinelle]
Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 9b643e312d528f291966c1f30b0d90bf3b1d43dc)
2018-01-17 15:27:28 +08:00
Philipp Tomsich be29fed8f9 UPSTREAM: rockchip: rk3399-puma: add boot-on regulator to override BIOS_DISABLE
The (Qseven) BIOS_DISABLE signal on the RK3399-Q7 (Puma) keeps the
eMMC and SPI in reset initially and we need to write a GPIO to turn
them on before continuing the boot-up.

This adds the DTS entries for the additional regulator and makes
pinctrl and gpio3 available during SPL.  It also adds a hook to the
spl_board_init() to ensure that the regulator gets probed and enabled.

Change-Id: I5d229af39d5b410a5abc38f9d151bc766384c275
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 482cf22333dbfb7c706d6a7ec1ffbfa5409cc6a3)
2018-01-17 15:27:28 +08:00
Philipp Tomsich b4d43cb807 UPSTREAM: rockchip: puma-rk3399: update board_init()
The original initialisation code for board_init() was largely lifted
from the code on the EVB.  However, the RK3399-Q7 can do with a much
more concise init sequence.

This cleans up the board_init() by updating it to the essentials for
the RK3399-Q7 and getting rid of the accumulated cruft.

Change-Id: I7855f00a4256b246f6a082b0edf12fc776798e26
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 0b5e7aab0ef62fea852d03df76e577c217d0b8bf)
2018-01-17 15:27:28 +08:00
Philipp Tomsich c8c978c955 rockchip: rk3399: make spl_board_init board-specific
The later-stage spl_board_init (as opposed to board_init_f) should set
up board-specific details: these differ between the EVB-RK3399 and the
RK3399-Q7 (Puma).

This moves spl_board_init back into the individual boards and removes
the unneeded functionality from Puma.

Change-Id: I36b72844fbd0fd45665608f11e1a9a46168490ab
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
(cherry picked from commit fb7406469c012092d652741f103b0993103cf8e3)
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-17 15:27:28 +08:00
Philipp Tomsich c47ae866ef UPSTREAM: rockchip: board: lion-rk3368: avoid ATF overwriting active SPL stage
The RK3368-uQ7 ATF has been moved back to 0x100000 (1MB from the start
of DRAM) to avoid it overwriting the active SPL stage during FIT image
loading.  This change adapts the .its to match up (again) with our ATF
repository for the RK3368-uQ7.

Change-Id: I53e7babad41367d1178a65934a0e2fb3af457a28
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 6696fe5a2fac33fa9c1ed65d7f1b1af095129da9)
2018-01-17 15:26:54 +08:00
Jagan Teki 5282fce264 UPSTREAM: rk3288: vyasa: Add falcon mode support
Add Falcon mode support in vyasa rk3288 board.

Change-Id: I720f05f76ce553464bd9ac723edffecbfdf23402
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 5d94ebedcd192bcceabcd1ca90f417f1130e46dc)
2018-01-17 15:26:54 +08:00
Klaus Goger 67f537f2b3 UPSTREAM: rockchip: puma_rk3399: increase serialno_str size
Increase serialno_str to 17 bytes so it can hold the 16 bytes long serial
nummer and the terminating null byte added by snprintf.

Change-Id: Ie419f2d41ec8af598601d8726416cbaec1767266
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 60d7c50945d65185a5c86c4f52d4671fb59292e3)
2018-01-16 18:16:48 +08:00
Jagan Teki c19af67fed UPSTREAM: rk3288: Add Vyasa initial board support
This patch adds support for Vyasa RK3288 initial board
from Amarula Solutions.

Change-Id: I50cc01993c16caa97a6b0f9019a5433bd30adc80
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit d55af074e5a8dc85fc78f468d1f8bc96ae8b6855)
2018-01-16 18:16:48 +08:00
Klaus Goger 5d3f9f0b85 UPSTREAM: rockchip: board: puma_rk3399: update README flash instructions
Puma supports other boot sources then SD-Card. Update README to include
the required steps.

 * how to package a SPI-NOR SPL
 * how to flash eMMC with rkdeveloptool

Change-Id: I52274ca551217209007d3ac9074351b7467404c8
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c91403409079e4747f60b79be5816773f6a4c8b3)
2018-01-16 18:16:48 +08:00