21 Jul, 2018

1 commit

  • The order distroboot searches for a boot.scr is fixed at compile time.
    To make BIOS_DISABLE work as expected and boot from mmc1 instead of
    mmc0 if enabled, we need to change the environment at runtime.
    Especially as commit: 482cf22333 ("rockchip: rk3399-puma: add boot-on
    regulator to override BIOS_DISABLE") enables the eMMC in U-Boot even
    if BIOS_DISABLE is active.

    Signed-off-by: Klaus Goger
    Signed-off-by: Philipp Tomsich

    Klaus Goger
     

07 May, 2018

2 commits

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have multiple licenses (in
    these cases, dual license) declared in the SPDX-License-Identifier tag.
    In this case we change from listing "LICENSE-A LICENSE-B" or "LICENSE-A
    or LICENSE-B" or "(LICENSE-A OR LICENSE-B)" to "LICENSE-A OR LICENSE-B"
    as per the Linux Kernel style document. Note that parenthesis are
    allowed so when they were used before we continue to use them.

    Reviewed-by: Fabio Estevam
    Signed-off-by: Tom Rini

    Tom Rini
     
  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

28 Apr, 2018

1 commit


09 Apr, 2018

1 commit

  • In order that we can use eth_env_* even when CONFIG_NET isn't set, move
    these functions to environment code from net code.

    This fixes failures such as:

    board/ti/am335x/built-in.o: In function `board_late_init':
    board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr'
    u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr'

    which caters for use cases such as:

    commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment
    variable")

    when Ethernet is required in Linux, but not U-Boot.

    Signed-off-by: Alex Kiernan

    Alex Kiernan
     

03 Jan, 2018

1 commit


01 Jan, 2018

1 commit

  • 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.

    Signed-off-by: Jakob Unterwurzacher
    Acked-by: Philipp Tomsich
    Reviewed-by: Philipp Tomsich
    Tested-by: Philipp Tomsich
    [Reworked commit-message:]
    Signed-off-by: Philipp Tomsich

    Jakob Unterwurzacher
     

18 Dec, 2017

1 commit

  • 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.

    Signed-off-by: Klaus Goger
    Reviewed-by: Philipp Tomsich

    Klaus Goger
     

17 Dec, 2017

1 commit

  • 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.

    Signed-off-by: Jakob Unterwurzacher
    Acked-by: Philipp Tomsich
    Reviewed-by: Philipp Tomsich

    Jakob Unterwurzacher
     

08 Dec, 2017

1 commit


01 Dec, 2017

2 commits

  • 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.

    Signed-off-by: Philipp Tomsich
    Tested-by: Klaus Goger
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • 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.

    Signed-off-by: Philipp Tomsich
    Tested-by: Jakob Unterwurzacher

    Philipp Tomsich
     

26 Nov, 2017

2 commits

  • 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.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • 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.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     

01 Oct, 2017

4 commits

  • 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.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • 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.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • 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.

    Signed-off-by: Philipp Tomsich

    Philipp Tomsich
     
  • 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.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     

19 Sep, 2017

3 commits


16 Aug, 2017

3 commits


13 Aug, 2017

4 commits

  • There is no reasonably robust way (this will be needed so early that
    diagnostics will be limited) to specify the base-address of the secure
    timer through the DTS for TPL and SPL. In order to allow us a cleaner
    way to structure our SPL and TPL stage, we now move to a DM timer
    driver.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • prefix the bl31 firmware needed to build uboot.itb so it can coexist in
    the build area with ATFs from other boards (i.e. lion_rk3368)

    Signed-off-by: Klaus Goger
    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Klaus Goger
     
  • The ITS file generated warnings due to @ designations in the naming
    which cause DTC to complain as follows:
    Warning (unit_address_vs_reg): Node /images/uboot@1 has a unit name, but no reg property
    Warning (unit_address_vs_reg): Node /images/atf@1 has a unit name, but no reg property
    Warning (unit_address_vs_reg): Node /images/pmu@1 has a unit name, but no reg property
    Warning (unit_address_vs_reg): Node /images/fdt@1 has a unit name, but no reg property
    Warning (unit_address_vs_reg): Node /configurations/conf@1 has a unit name, but no reg property

    This removes the @ part from the names, as we only have a single
    image for each payload aspect (and only a single configuration) anyway.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • The RK3368-uQ7 (codenamed 'Lion') is a micro-Qseven (40mm x 70mm,
    MXM-230 edge connector compatible with the Qseven specification)
    form-factor system-on-module based on the octo-core Rockchip RK3368.
    It is designed, supported and manufactured by Theobroma Systems.

    It provides the following features:
    - 8x Cortex-A53 (in 2 clusters of 4 cores each)
    - (on-module) up to 4GB of DDR3 memory
    - (on-module) SPI-NOR flash
    - (on-module) eMMC
    - Gigabit Ethernet (with an on-module KSZ9031 PHY)
    - USB
    - HDMI
    - MIPI-DSI/single-channel LVDS (muxed on the 'LVDS-A' pin-group)
    - various 'slow' interfaces (e.g. UART, SPI, I2C, I2S, ...)

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     

27 Jul, 2017

1 commit

  • A few lines (defines and declarations) had been duplicated when the
    puma-rk3399 board was initially merged. This removes the duplicates
    and changes the style to use local constants instead of pasted
    literals.

    Signed-off-by: Kever Yang
    [fixed up commit-message & converted to use 'const u32':]
    Signed-off-by: Philipp Tomsich

    Kever Yang
     

11 Jul, 2017

2 commits

  • The bank0 ram size should be the DRAM size minus reserved size,
    the DRAM size may be 1GB, 2GB, 4GB, we can not hard code it.

    Signed-off-by: Kever Yang
    Reviewed-by: Philipp Tomsich
    Added DECLARE_GLOBAL_DATA_PTR for RK3328, RK3368 and RK3399:
    Signed-off-by: Philipp Tomsich

    Kever Yang
     
  • Replace the sdram_init() in board init and rockchip_sdram_size() in
    sdram driver for all the Rockchip SoCs which enable CONFIG_RAM.

    Signed-off-by: Kever Yang
    Reviewed-by: Philipp Tomsich
    Make dram_init() in rk3036-board.c conditional on CONFIG_RAM:
    Signed-off-by: Philipp Tomsich

    Kever Yang
     

07 Jun, 2017

3 commits


11 May, 2017

1 commit


16 Apr, 2017

1 commit

  • The RK3399-Q7 SoM is a Qseven-compatible (70mm x 70mm, MXM-230
    connector) system-on-module from Theobroma Systems, featuring the
    Rockchip RK3399.

    It provides the following feature set:
    * up to 4GB DDR3
    * on-module SPI-NOR flash
    * on-module eMMC (with 8-bit interace)
    * SD card (on a baseboad) via edge connector
    * Gigabit Ethernet w/ on-module Micrel KSZ9031 GbE PHY
    * HDMI/eDP/MIPI displays
    * 2x MIPI-CSI
    * USB
    - 1x USB 3.0 dual-role (direct connection)
    - 2x USB 3.0 host + 1x USB 2.0 (on-module USB 3.0 hub)
    * on-module STM32 Cortex-M0 companion controller, implementing:
    - low-power RTC functionality (ISL1208 emulation)
    - fan controller (AMC6821 emulation)
    - USBCAN bridge controller

    Note that we use a multi-payload FIT image for booting and have
    Cortex-M0 payload in a separate subimage: we thus rely on the FIT
    image loader to put it into the SRAM region that ATF expects it in.

    Signed-off-by: Klaus Goger
    Signed-off-by: Philipp Tomsich
    Fixed build warning on puma-rk3399:
    Signed-off-by: Simon Glass
    Reviewed-by: Simon Glass

    Klaus Goger