Age | Commit message (Collapse) | Author |
|
On Puma we have the MMC environment at an offset of 16 kiB.
This leaves us with 16 kiB for the environment before the SPL starts.
This patch expands the environment size from 8 kiB to its maximum.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
This patch uses the boot device detection code to set the environment
device to the one, which is currently booted from.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
To ease the on-site error reporting procedure, we print
the DRAM speed grade during bootup.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
The pointer to struct atf_image_info in
bl31_params_mem.bl31_params.bl31_image_info is not initialized before
being dereferenced. This can cause U-Boot to crash right before jumping
to the BL31 ATF binary.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Fixes: bcc1726a7bdd ("spl: add support to booting with ATF")
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
This patch adds support for DDR3 with speed grade 1600,
capacity 4 GB on dual-rank devices.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
This patch adds the rate for UART1 and UART3 the same way
as already implemented for UART0 and UART2.
This is required for boards, which have their console output
on these UARTs.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
The RK3399 SPL does not use a pinctrl driver to setup the UART pins.
Instead it works based on config macros, which set the base address
of the actual UART block.
Currently the RK3399 SPL support UART0 and UART2.
This patch adds UART3 in the same way as UART0.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
This patch adds the GRF bit definitions for UART3 on the RK3399.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
A previous commit changed the USB node names, which
breaks compilation of the Gru DTS files.
This patch addresses this issue by fixing the referenced
node names.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
This is a partial revert of commit 0a09f2f1173d877a007fe64c7e130c04c5085662.
Harmonizing the rk3399.dtsi with the one from Linux is a good idea.
However, only if the information within that file can be used by U-Boot.
Before the named commit USB3 was working fine, after the commit USB3 was
broken on all RK3399 boards.
This commit reverts the USB3 changes to the original ones, which provide
the required information for the corresponding drivers in the U-Boot
tree.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
In case of generated reserved memory areas, we might encounter
the case that we have an unused region with size 0.
In this case memory reservation clearly fails, but that should
not be considered as error.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
The upstream dynamic memory controller driver suffers
from being:
* unreliable (we have a drop-out rate of about 10%
for 2GB 1600 Micron RAM)
* non-maintainable (the RAM description in the DTS
is register contents to write)
* incorrect (it does not follow the specified initialisation
sequence from the RAM specification)
To address this issues, the patch introduces a new SPD data
based driver.
Tested on RK3399-Q7 with several RAM chip vendors (Micron,
Issi, Nanya) and speed grades (1600 and 1866).
This patch is based on ba29f7b1 of ptomsich/denali-neuronsw.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
Recent Puma versions have an on-board I2C EEPROM, which is used
for storing SPD information. This patch adds the required information
for SPL.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
The maximum transfer length (in a single transaction) for the Rockchip
SPI controller is 64Kframes (i.e. 0x10000 frames) of 8bit or 16bit
frames and is encoded as (num_frames - 1) in CTRLR1. The existing
code subtracted the "minus 1" twice for a maximum transfer length of
0xffff (64K - 1) frames.
While this is not strictly an error (the existing code is correct, but
leads to a bit of head-scrating), fix this off-by-one situation.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
The logic in the main transmit loop took a bit of reading the TRM to
fully understand (due to silent assumptions based in internal logic):
the "wait until idle" at the end of each iteration through the loop is
required for the transmit-path as each clearing of the ENA register
(to update run-length in the CTRLR1 register) will implicitly flush
the FIFOs... transmisson can therefore not overlap loop iterations.
This change adds a comment to clarify the reason/need for waiting
until the controller becomes idle and wraps the entire check into an
'if (out)' to make it clear that this is required for transfers with a
transmit-component only (for transfers having a receive-component,
completion of the transmit-side is trivially ensured by having
received the correct number of bytes).
The change does not increase execution time measurably in any of my
tests.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
While rkspi_enable_chip is called with true/false everywhere else in
the file, one call site uses '0' to denot 'false'.
This change this one parameter to 'false' and effects consistency.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
Even though the priv-structure and the claim-bus function contain
logic for 16bit frames and for unidirectional transfer modes, neither
of these is used anywhere in the driver.
This removes the unused (as in "has no effect") logic and fields.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
This patch reduces the SPL size by using the simple pinctrl driver in
SPL.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
This patch brings back parts of the simple pinctrl driver, which has a smaller
footprint and is therefore the preferred driver for SPL.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
Drop DOS/EFI partition support from SPL to save 4k.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
This commit reduces the SPL size by fixing typos in the removed property
string list and switching to the tiny versions of printf/memset.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
This reverts commit c869d63f2785ccde22582f96cf40cb8809f838ba.
Mainline ATF already supports fdt-parsing, which allows us to
pass rk3399-puma specific data to setup things like the correct
UART. Therefore we can re-enable platform paramters again.
Signed-off-by: Christoph Müllner <christophm30@gmail.com>
|
|
The RK3399-Q7 (v2.x and up) has a EEPROM on-module to store per-module
configuration paramaters injected during our manufacturing flow.
To make this accessible, we need to enable SPL_I2C_EEPROM and disable
full pinctrl (we need simple pinctrl to correctly configure our I2C
pins w/o pulling in an unreasonable number of nodes into our DTS).
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
|
|
This patch enables the driver model for MTD drivers
for the RK3399-Q7.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
Some Puma SoMs are populated with Gigadevice NOR Flash.
Enable it in the defconfig to support it.
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
|
|
Every now an then we experience errors in SPL
(most likely "DRAM init failed").
In such cases, the system hangs and requires a power-cycle
from the user.
While a power-cycle might be a proper way to address
the symptom, we could also call do_reset() instead
of hanging. That would allow to "heal" spurious issues.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
The old location overlaps the SPL.
|
|
During a board bringup we observed random hangs in SPL,
which turned out to be caused by communication errors with
an SD card. However, the driver did not say a single character
and neither did the upper layers.
This patch changes the driver to print a short but precise
error message if there is a communication problem with
the SD card.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
When using boot scripts it can become quite hard to understand
which commands are actually executed during bootup (e.g. where
is a kernel image loaded from or which DTB is in use).
Shell scripts suffer from a similar problem and many shells address
this problem with a command execution tracer (e.g. BASH has xtrace,
which can be enabled by "set -x").
This patch introduces a command tracer for U-Boot, which prints
every command with its arguments before it is executed.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
|
|
As my last merge (and the successive follow-up patch) shows, *.rej
files are not covered by our .gitignore. To protect against future
accidental addition of *.rej artifacts, this adds a pattern for these
to our .gitignore.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Series-Cc: michal.simek@xilinx.com
Series-Cc: vigneshr@ti.com
|
|
No point in showing the various DRAM options (right in the top-level
menu for 'Device Drivers') for i.MX8M when configured for a different
architecture. This wraps an 'if ARCH_IMX8M' around these.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Series-cc: trini
|
|
The normal MMIO accessor macros (readX/writeX) guarantee a strong ordering,
even with normal memory accesses [1].
For some MMIO operations (framebuffers being a prominent example) this is
not needed, and the rather costly barrier inserted on weakly ordered
systems like ARM costs some performance.
To mitigate this issue, Linux introduced readX_relaxed and
writeX_relaxed primitives, which only guarantee ordering between each
other, so are typically faster due to the missing barrier.
We probably do not care so much about performance in U-Boot, but want to
have those primitives for two other reasons:
- Being able to use the _relaxed macros simplifies porting drivers from
Linux.
- The missing barrier typically allows to generate smaller code, which can
relieve some chronically tight SPL builds.
Add those macros definitions by using the __raw versions of the
accessors, which matches an earlier (and less complicated) version of
the Linux implementation.
[1] https://lwn.net/Articles/698014/
|
|
asm/io.h is the header file containing the central MMIO accessor macros.
Judging by the header and the comments, it was apparently once copied
from the Linux kernel, but has deviated since then heavily.
Clean up the definitions by:
- removing pointless Linux history
- removing commented code
- removing outdated comments
- removing unused definitions, for instance for mem_isa and mem_pci
This massively improves the readability of the file.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
|
|
Signed-off-by: Tom Rini <trini@konsulko.com>
|
|
Enabling DM_MMC is forcing CONFIG_BLK=y so if any board which uses
SCSI must need to enable DM_SCSI otherwise SCSI reads on that particular
target making invalid reading to the disk drive.
Allwinner platform do support SCSI on A10, A20 and R40 SoC's out of
these only A10 have DM_SCSI enabled. So enabling DM_MMC on A20, R40
would eventually end-up with scsi disk read failures like [1]
So, enable DM_MMC in all places of respective SoC's instead of enabling
them globally to Allwinner platform.
Now, DM_MMC is enabled in Allwinner SoC's except A20 and R40.
[1] https://lists.denx.de/pipermail/u-boot/2019-April/364057.html
Reported-by: Pablo Sebastián Greco <pgreco@centosproject.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
|
|
PHY cannot be detected unless we wait about 150 ms.
Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@netmodule.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
|
|
As per Linux kernel DT binding doc:
- phy-reset-post-delay : Post reset delay in milliseconds. If present then
a delay of phy-reset-post-delay milliseconds will be observed after the
phy-reset-gpios has been toggled. Can be omitted thus no delay is
observed. Delay is in range of 1ms to 1000ms. Other delays are invalid.
Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@netmodule.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
|
|
This patch moves all instances of static "watchdog_dev" declarations to
the "data" section. This may be needed, as the BSS may not be cleared
in the early U-Boot phase, where watchdog_reset() is already beeing
called. This may result in incorrect pointer access, as the check to
"!watchdog_dev" in watchdog_reset() may not be true and the function
may continue to run.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Marek Behún" <marek.behun@nic.cz>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu100)
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
|
|
Negative phy-addresses can occour if the caller function was not able to
determine a valid phy address (from device-tree for example). In this
case we catch this here and search for ANY phy device on the given mdio-
bus.
Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Lukasz Majewski <lukma@denx.de>
|
|
After the commit: "eth: dm: fec: Add gpio phy reset binding"
SHA1: efd0b791069af93e9d439a70d1fe2ae8994dbbfa
The FEC ETH driver switched to PHY GPIO reset performed with data defined
in DTS.
For the HSC|DDC boards the GPIO reset signal is active low and hence the
wrong DTS description must be changed (otherwise the reset for ETH is not
properly setup).
Signed-off-by: Lukasz Majewski <lukma@denx.de>
|
|
Signed-off-by: Lukasz Majewski <lukma@denx.de>
|
|
After running tools/moveconfig.py it turned out that for various boards
there are an empty #ifdef statements.
Remove them to clean u-boot source code.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
|
|
Let the underline marker "=" fill the whole sentence for better
readability.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
|
|
The DDR firmware binaries should be copied to '$(srctree)', so fix
a typo.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
|
|
After building ATF it is needed to copy the generated bl31.bin file to
the U-Boot source tree.
Make this step explicit in the instructions.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
|
|
Use a single '=' to test string equality for compatibility with non-bash
shells. Otherwise, if /bin/sh is dash, build fails:
./tools/imx8m_image.sh: 15: [: signed_hdmi_imx8m.bin: unexpected operator
./tools/imx8m_image.sh: 15: [: signed_hdmi_imx8m.bin: unexpected operator
./tools/imx8m_image.sh: 15: [: spl/u-boot-spl-ddr.bin: unexpected operator
./tools/imx8m_image.sh: 15: [: spl/u-boot-spl-ddr.bin: unexpected operator
WARNING './spl/u-boot-spl-ddr.bin' not found, resulting binary is not-functional
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Tested-by: Chris Spencer <christopher.spencer@sea.co.uk>
|
|
The ohci driver calls board_usb_init(), not usb_board_init().
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
|
|
Parts of the code are using C99 constructs (such as variables declared
inside loops), but also GNU extensions (such as typeof), so using
-std=gnu99 is necessary to build with older versions of gcc that don't
default to building with gnu99.
It fixes the following build failure:
./tools/../lib/crc16.c: In function "crc16_ccitt":
./tools/../lib/crc16.c:70:2: error: "for" loop initial declarations are only allowed in C99 mode
for (int i = 0; i < len; i++)
^
./tools/../lib/crc16.c:70:2: note: use option -std=c99 or -std=gnu99 to compile your code
when building the host tools with gcc 4.7.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
|
|
|
|
The Khadas VIM2 defconfig was missing the USB PHY config and
two other misc configs to setup dram banks and call misc_init_r.
Align it on the other Amlogic SoC based boards defconfig.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|