summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-13puma: Increase MMC environment size to 16 kiB.puma-v2019.04Christoph Muellner
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>
2019-10-13rk3399: Take environment from boot device via mmc_get_env_dev().Christoph Muellner
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>
2019-08-09dram: rk3399: Adding speed grade information on bootup.Christoph Muellner
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>
2019-08-07spl: atf: Fix uninitialized pointer to bl31_image_infoChristoph Muellner
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>
2019-06-25rk3399: puma: Add support for DDR3-1600-4GB dual-rank.Christoph Muellner
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>
2019-05-06rockchip: clk: rk3399: allow requests for all UART clocksChristoph Muellner
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>
2019-05-06rockchip: rk3399: Add option to print on UART3.Christoph Muellner
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>
2019-05-06rockchip: pinctrl: rk3399: add support for UART3Christoph Muellner
This patch adds the GRF bit definitions for UART3 on the RK3399. Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
2019-05-04rk3399: gru: Fix DTS compilation issues.Christoph Müllner
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>
2019-05-04rk3399: Restore USB functionality.Christoph Müllner
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>
2019-04-30common: fdt: Remove wrong error message.Christoph Muellner
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>
2019-04-30rk3399: New DMC (denali) driver.Christoph Muellner
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>
2019-04-29dts: puma: Add SPD EEPROM node.Christoph Muellner
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>
2019-04-29rockchip: spi: fix off-by-one in chunk size computationPhilipp Tomsich
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>
2019-04-29rockchip: spi: only wait for completion, if transmittingPhilipp Tomsich
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>
2019-04-29rockchip: spi: consistently use false/true with rkspi_enable_chipPhilipp Tomsich
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>
2019-04-29rockchip: spi: remove unused code and fields in privPhilipp Tomsich
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>
2019-04-29puma: defconfig: Use simple pinctrl driver in SPL.Christoph Muellner
This patch reduces the SPL size by using the simple pinctrl driver in SPL. Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
2019-04-29pinctrl: rockchip: (Re-)Introduce pinctrl simple for SPL.Christoph Muellner
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>
2019-04-29Puma: Drop DOS/EFI partition support from SPL.Christoph Muellner
Drop DOS/EFI partition support from SPL to save 4k. Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
2019-04-29puma: Reduce SPL size.Christoph Muellner
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>
2019-04-29Revert "rockchip: rk3399-puma: enable SPL_ATF_NO_PLATFORM_PARAM"Christoph Müllner
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>
2019-04-29rockchip: rk3399-puma: enable I2C eeprom in SPLPhilipp Tomsich
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>
2019-04-29rockchip: rk3399-puma: enable MTD.Philipp Tomsich
This patch enables the driver model for MTD drivers for the RK3399-Q7. Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
2019-04-29rockchip: rk3399-puma: enable gigadevice spi-norKlaus Goger
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>
2019-04-29rockchip: rk3399-puma: Reset from SPL on error.Christoph Muellner
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>
2019-04-29puma: move ENV_OFFSET to 4MiB-16kiBJakob Unterwurzacher
The old location overlaps the SPL.
2019-04-29dw_mmc: Print error message on error.Christoph Muellner
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>
2019-04-26common: command: Add command execution tracer.Christoph Muellner
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>
2019-04-26.gitignore: ignore patch rejects (*.rej) filesPhilipp Tomsich
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
2019-04-26Kconfig: don't pollute Kconfig w/ i.MX8M options for everyonePhilipp Tomsich
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
2019-04-26arm: introduce _relaxed MMIO accessorsAndre Przywara
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/
2019-04-26arm: clean up asm/io.hAndre Przywara
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>
2019-04-26Prepare v2019.04Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-04-26arm: sunxi: Enable DM_MMC on required SoCsJagan Teki
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>
2019-04-26dts: imx8qxp-mek: Add PHY post reset delayAndrejs Cainikovs
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>
2019-04-26net: dm: fec: Support phy-reset-post-delay propertyAndrejs Cainikovs
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>
2019-04-26watchdog: Move watchdog_dev to data section (BSS may not be cleared)Stefan Roese
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>
2019-04-26net: phy: implement fallback mechanism for negative phy adressesHannes Schmelzer
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>
2019-04-26DTS: Fix ETH PHY reset on HSC|DDC boards (imx53)Lukasz Majewski
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>
2019-04-26cosmetic: Remove not needed string from kp_imx53.h configLukasz Majewski
Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-04-26cosmetic: config: Remove empty #ifdefsLukasz Majewski
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>
2019-04-26imx8mq_evk: README: Make the underline marker fill the whole sentenceFabio Estevam
Let the underline marker "=" fill the whole sentence for better readability. Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-04-26imx8mq_evk: README: Fix a typo in the destination pathFabio Estevam
The DDR firmware binaries should be copied to '$(srctree)', so fix a typo. Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-04-26imx8mq_evk: README: Need to copy bl31.bin to U-Boot source treeFabio Estevam
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>
2019-04-26tools/imx8m_image.sh: remove bashismBaruch Siach
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>
2019-04-26doc: Fix outdated ohci board hook documentationKrzysztof Kozlowski
The ohci driver calls board_usb_init(), not usb_board_init(). Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2019-04-26tools/Makefile: build host tools with -std=gnu99Thomas Petazzoni
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>
2019-04-26fix compile error on macOS Mojave默默
2019-04-26configs: khadas_vim2: Fix defconfigNeil Armstrong
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>