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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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>
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)
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)
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)
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)
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)
Add a section to the README on how to flash the on-board eMMC
with the rkdeveloptool.
Change-Id: Ic069b5bbaf64c6834f048167b21ac79071c399ee
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 cc8fb2f79304963597248ad7cdab6cf2f9b336ef)
All these places seem to inherit the codes from the MMC driver where
a FIXME was put in the comment. However the correct operation after
read should be cache invalidate, not flush.
The underlying drivers should be responsible for the cache operation.
Remove these codes completely.
Change-Id: I8f04c721432753b34e85b19616a0b42d83a633eb
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: York Sun <york.sun@nxp.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: York Sun <york.sun@nxp.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 723b43daec7ee2ddb600cfcb9b0253d4a71c3915)
Provide a Python function that creates a small block device for the
purpose of testing the cmd/gpt.c or cmd/part.c functions in the u-boot
sandbox.
Change-Id: I620c2f97c7b6533d8cb607e365e719246cdb7acd
Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit bf6d76b84ae13b463c0dca556118047e2d046f33)
After commit d962e5dadc2c("rockchip: mkimage: use spl_boot0 for all Rockchip SoCs"),
the mkimage will not pad the Tag memroy, so we shoud
pass a Taged ddr.bin/spl.bin to it.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
(cherry picked from commit dca4740930c77c465b9645e0a6928c3710b21cdd)
Change-Id: I83e99669e90fda662d176f8f687785609e364312
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
The rk3288-evb-rk1608 is a development/evaluation for RK3288
and RK1608. The RK3288 as Host AP, and the RK1608 as a
Dual-cores DSP coprocessor, it provides high-performance
professional computing capabilities to Host AP.
They communicate with each other through MIPI and SPI. There
is a good host environment on host RK3288, we can easily debug
RK1608.
Also, the rk3288-evb-rk1608 is different with rk3288-evb, so
we need to add a independent BSP configuration for rk3288-evb-rk1608.
Change-Id: I75ec0e14ee88acd9de7f809d7e88bca97a77a5c2
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I6fc41b5480adfbd8456032e844d4f22f30c413a5
Signed-off-by: Francis Fan <francis.fan@rock-chips.com>
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
gva-rk3229 is a som based board design for Android Things project.
Change-Id: I2e054407231a2549573d2302855c09b9795fdddd
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
The Raspberry Pi bootloader (bootcode.bin and start.elf) will load
the device tree from the same FAT partition and combine it with
device tree overlays specified in config.txt. This device tree is then
passed to the kernel (in this case U-Boot) in the r2 register.
This patch retrieves the machine id (r1 register) and the device tree
(r2 register) passed to U-Boot and store those in environment variables
on boot so boot scripts can refer to those and pass them to the kernel.
When CONFIG_OF_BOARD is defined, the same device tree passed to U-Boot
will be used in lieu of bundling one with the U-Boot image at build
time.
Bug: 31636643
Test: Booted a Raspberry Pi3 passing the DT from the bootloader.
Change-Id: Ibf9c754719b3e0f41d20382833abf853ba7613e2
mk808 is a tv stick with two usb ports, micro sd card slot, hdmi and
nand onboard.
Change-Id: I317c516f2023eec59c46195dd8280684137f977c
Signed-off-by: Paweł Jarosz <paweljarosz3691@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
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>
Add a script to generate binaries from bl31.elf, and generate
u-boot.its file for FIT image including u-boot, dtb and atf
binaries.
Change-Id: Ife016da5468b3c618c619354fb280b6951aed94b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
evb-rk3128 is an evb from Rockchip based on rk3128 SoC:
- 2 USB2.0 Host port;
- 1 HDMI port;
- 2 10/100M eth port;
- 2GB ddr;
- 16GB eMMC;
- UART to USB debug port;
Change-Id: Icfc8b74449678e0e2488f7bf394ec217e52c15b6
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Detail of step by step to bring up the board with OP-TEE support.
Change-Id: If3156fa3fb3ede6270f871dcf0e518aced202443
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
We package U-Boot and OP-TEE into one itb file for SPL,
so that we can support OP-TEE in SPL.
Change-Id: I2c20333d6f3bb11ac1ec4bbb32c901028fb15d64
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Since we support ATF in SPL and add script for it, let's make the
document up to date.
Change-Id: Ic6468825c61a8729ca38f7580dc728f0a753560a
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Add a script to generate binaries from bl31.elf, and generate
u-boot.its file for FIT image including u-boot, dtb and atf binaries.
Change-Id: Iad47682119a8e1b382da913069a0771e32f9295d
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Sync the code from puma-rk3399:
8adc9d1 rockchip: board: puma_rk3399: derive ethaddr from cpuid
9415b9a rockchip: board: puma_rk3399: add support for serial# and cpuid#
via efuses
Change-Id: Ib5528d0742b56a0e57431adaa01f411eee7e1ca1
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
In rk3328, some function pin may have more than one choice, and muxed
with more than one IO, for example, the UART2 controller IO,
TX and RX, have 3 choice(setting in com_iomux):
- M0 which mux with GPIO1A0/GPIO1A1
- M1 which mux with GPIO2A0/GPIO2A1
- usb2phy which mux with USB2.0 DP/DM pin.
We should set these IO routing in board file.
Change-Id: If6f6fd890d8e225cdb584a4025aac578198764e6
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
This patch add board_usb_init() and interrupt callback
for dwc3 gadget.
Change-Id: I1ea19c0ec7d3fd14904e7fcc97c6d19221206762
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
On RCar M3 and on RCar H3 newer than and not including ES1.0, the SD clock
must be divided by 4 rather than 2 because a hardware workaround present
only in the H3 ES1.0 has been removed from these chips. U-Boot currently
only supports M3 and H3 ES 2.0 and newer, so configure the SD pre-divider
to 4 to prevent SD instability.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Read SoM information from EEPROM and set ethaddr in late init.
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
The board_mmc_init() is no longer invoked when DM is used, so move
all the pinmux config into board_init() instead.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
The configuration option name is the later, so replace usage of
CONFIG_RAVB in board files with CONFIG_RENESAS_RAVB , otherwise
the RAVB pinmux is not set and ethernet does not work.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
- Pass MTDPARTS kernel arguments to kernel
- Use Kconfig CONFIG_NAND instead of CONFIG_SYS_EXTRA_OPTIONS="NAND"
- Call 'usb_stop' on kernel start
- Update Falcon mode setup to match other OMAP3 boards
- Use "uEnv.txt" as boot script instead of "boot.scr"
SUNXI_GMAC was still used to configure the code where as the
same has been renamed and moved to Kconfig in below commit
"sunxi: Move SUNXI_GMAC to Kconfig"
(sha1: 4d43d065db)
Signed-off-by: Dave Prue <dave@prue.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Tested-by: Mark Kettenis <kettenis@openbsd.org>
[Tweek commit message, config_whitelist.txt, build-whitelist.sh]
Signed-off-by: Jagan Teki <jagan@openedev.com>