26 Jul, 2019

8 commits

  • - DaVinci emac DM work
    - NXP driver work
    - macb updates for RISC-V

    Tom Rini
     
  • Now that we removed all legacy boards selecting TI_EMAC we can
    completely convert the driver code to using the driver model.
    This patch also updates all remaining users of davinci_emac.

    Signed-off-by: Bartosz Golaszewski
    Tested-by: Adam Ford #am3517-evm & da850-evm
    Reviewed-by: Ramon Fried

    Bartosz Golaszewski
     
  • We typically use same set of distro images (yocto, debian, fedora, etc.)
    on both QEMU RISC-V virt machine and SiFive Unleashed board.

    With growing kernel and ramdisk images, we need to re-adjust default
    U-Boot environment variables. The config header for QEMU RISC-V virt
    machine has been already updated to handle bigger kernel and ramdisk
    images hence this patch updates SiFive FU540 config header accordingly.

    Signed-off-by: Anup Patel
    Reviewed-by: Bin Meng
    Reviewed-by: Joe Hershberger
    Reviewed-by: David Abdurachmanov
    Tested-by: David Abdurachmanov

    Anup Patel
     
  • The LS1021A-TSN is a development board built by VVDN/Argonboards in
    partnership with NXP.

    It features the LS1021A SoC and the first-generation SJA1105T Ethernet
    switch for prototyping implementations of a subset of IEEE 802.1 TSN
    standards.

    Supported boot media: microSD card (via SPL), QSPI flash.

    Rev. A of the board uses a Spansion S25FL512S_256K serial flash, which
    is 64 MB in size and has an erase sector size of 256KB (therefore,
    flashing the RCW would erase part of U-Boot).

    Rev. B and C of the board use a Spansion S25FL256S1 serial flash, which
    is only 32 MB in size but has an erase sector size of 64KB (therefore
    the RCW image can be flashed without erasing U-Boot).

    To avoid the problems above, the U-Boot base address has been selected
    at 0x100000 (the start of the 5th 256KB erase sector), which works for
    all board revisions. Actually 0x40000 would have been enough, but
    0x100000 is common for all Layerscape devices.

    eTSEC3 is connecting directly to SJA1105 via an RGMII fixed-link, but
    SJA1105 is currently not supported by uboot. Therefore, eTSEC3 is
    disabled.

    Signed-off-by: Xiaoliang Yang
    Signed-off-by: Mingkai Hu
    Signed-off-by: Jianchao Wang
    Signed-off-by: Changming Huang
    Signed-off-by: Vladimir Oltean

    [Vladimir] Code taken from https://github.com/openil/u-boot (which
    itself is mostly copied from ls1021a-iot) and adapted with the following
    changes:

    - Add a008850 errata workaround
    - Converted eTSEC, MMC to DM to avoid all build warnings
    - Plugged in distro boot feature, including support for extlinux.conf
    - Added defconfig for QSPI boot
    - Added the board/freescale/ls1021atsn/README.rst for initial setup
    - Increased CONFIG_SYS_MONITOR_LEN so that the SPL malloc pool does not
    get overwritten during copying of the u-boot.bin payload from MMC to
    DDR.
    Acked-by: Joe Hershberger
    Reviewed-by: Bin Meng

    Jianchao Wang
     
  • Due to a typo, "run qspi_bootcmd" and "env exists secureboot" got
    concatenated instead of being separated by a semicolon.

    Signed-off-by: Vladimir Oltean
    Reviewed-by: Bin Meng
    Acked-by: Joe Hershberger

    Vladimir Oltean
     
  • Now that we have added driver model support to the TSEC driver,
    convert ls1021atwr board to use it.

    This depends on previous DM series for ls1021atwr:
    http://patchwork.ozlabs.org/patch/561855/

    Signed-off-by: Bin Meng
    Signed-off-by: Vladimir Oltean
    Acked-by: Joe Hershberger

    [Vladimir] Made the following changes:
    - Added 'status = "disabled";' for all Ethernet ports in ls1021a.dtsi
    - Fixed the confusion between the SGMII/TBI PCS for enet0 and enet1 -
    a mistake ported over from Linux. Each SGMII PCS lies on the private
    MDIO bus of the interface (and the RGMII enet2 has no SGMII PCS).
    - Added CONFIG_DM_ETH to all ls1021atwr_* defconfigs
    - Completely removed non-DM_ETH support from ls1021atwr
    - Changed "compatible" string from "fsl,tsec-mdio" to "fsl,etsec2-mdio"
    and from "fsl,tsec" to "fsl,etsec2" to match Linux

    Bin Meng
     
  • By convention, the eTSEC MDIO controller nodes are defined in DT at
    0x2d24000 and 0x2d50000, but actually U-Boot does not touch the
    interrupt portion of the register map (MDIO_IEVENTM, MDIO_IMASKM,
    MDIO_EMAPM).

    That leaves only the MDIO bus registers (MDIO_MIIMCFG, MDIO_MIIMCOM,
    MDIO_MIIMADD, MDIO_MIIMADD, MDIO_MIIMCON, MDIO_MIIMSTAT) which start at
    the 0x520 offset.

    So shift the DT-defined register map by the offset of MDIO_MIIMCFG when
    mapping the MDIO bus registers.

    Signed-off-by: Vladimir Oltean
    Acked-by: Joe Hershberger
    Reviewed-by: Bin Meng

    Vladimir Oltean
     
  • LS1028A ethernet interfaces work with at least 8 BDs, set number of buffers
    to match that.

    Signed-off-by: Alex Marginean
    Reviewed-by: Bin Meng
    Acked-by: Joe Hershberger

    Alex Marginean
     

25 Jul, 2019

8 commits

  • Minor driver-model fixes and tweaks
    A few device-tree fixes
    Binman support for extracting files from an image

    Tom Rini
     
  • The uclass_next_device() routine continues a previously started device
    iteration. Change the description that is copied from
    uclass_first_device().

    Signed-off-by: Baruch Siach
    Reviewed-by: Simon Glass

    Baruch Siach
     
  • The comments of dev_read_name() wrongly describe "node" as its
    parameter.

    Signed-off-by: Bin Meng
    Reviewed-by: Simon Glass

    Bin Meng
     
  • Starting libvirt v5.3.0 with QEMU 4.0.0 use of PCI is automatic
    and thus storage is connected via PCI, which is not visible to
    U-Boot out-of-the-box.

    Refactor to do "pci enum" followed by "virtio scan" to see PCI
    connected storage, and allow bootloader to load kernel and
    initramfs images.

    Tested with Fedora/RISCV using releases: libvirt 5.4.0 & 5.5.0,
    QEMU 4.0.0 and U-Boot 2019.07 RC4.

    Signed-off-by: David Abdurachmanov

    David Abdurachmanov
     
  • The rproc uclass driver can either be built with SPL_REMOTEPROC
    or REMOTEPROC, but the function prototypes in remoteproc.h are
    defined only when CONFIG_REMOTEPROC is defined. This can cause
    build issues in SPL if CONFIG_REMOTEPROC is not selected.

    Fix this by replacing the existing precompiler macro usage with
    CONFIG_IS_ENABLED.

    Fixes: ddf56bc7e3ef ("drivers: Introduce a simplified remoteproc framework")
    Signed-off-by: Suman Anna
    Reviewed-by: Nishanth Menon
    Reviewed-by: Lokesh Vutla

    Suman Anna
     
  • Add support for A/B boot process on AM57xx based boards:

    1. Define 'slot_suffix' variable (using 'ab_select' command)
    2. Extend 'emmc_android_boot' boot command (add commands for A/B boot
    process)

    'ab_select' command is used to decide which slot should be used for
    booting up. A/B metadata resides in 'misc' partition.

    To activate the A/B boot process, the following config options must be
    set:

    CONFIG_ANDROID_AB=y
    CONFIG_CMD_AB_SELECT=y

    For successful A/B boot, the corresponding A/B infrastructure must be
    involved on Android side [1] (including mounting system as root), and
    disk must be partitioned accordingly.

    When A/B boot is enabled, there are some known limitations currently
    exist (not related to A/B patches, need to be implemented later):

    1. The 'Verified Boot' sequence is not supported
    2. dev path to system partition (system_a or system_b) is passed via
    'bootargs' as 'root=' argument like 'root=/dev/mmcblk1p12', but
    further we'll need to rework it with respect to dm-verity
    requirements [2]

    In case when A/B partitions are not present in system (and A/B boot is
    enabled), boot up process will be terminated and next message will be
    shown:

    "boot_a(b) partition not found"

    [1] https://source.android.com/devices/tech/ota/ab
    [2] https://source.android.com/devices/tech/ota/ab/ab_implement#kernel

    Signed-off-by: Ruslan Trofymenko
    Signed-off-by: Igor Opaniuk
    Signed-off-by: Sam Protsenko
    Reviewed-by: Alistair Strachan
    Reviewed-by: Sam Protsenko
    Reviewed-by: Simon Glass

    Ruslan Trofymenko
     
  • This patch determines the A/B-specific bootloader message structure
    that is the basis for implementation of recovery and A/B update
    functions. A/B metadata is stored in this structure and used to decide
    which slot should we use to boot the device. Also some basic functions
    for A/B metadata manipulation are implemented (like slot selection).

    The patch was extracted from commits [1], [2] with some coding style
    fixes.

    [1] https://android-review.googlesource.com/c/platform/external/u-boot/+/729878/2
    [2] https://android-review.googlesource.com/c/platform/external/u-boot/+/729880/2

    Signed-off-by: Ruslan Trofymenko
    Signed-off-by: Igor Opaniuk
    Reviewed-by: Sam Protsenko
    Reviewed-by: Simon Glass

    Ruslan Trofymenko
     
  • This patch adds part_get_info_by_dev_and_name_or_num() function which
    allows us to get partition info from its number or name. Partition of
    interest is specified by string like "device_num:partition_number" or
    "device_num#partition_name".

    The patch was extracted from [1].

    [1] https://android-review.googlesource.com/c/platform/external/u-boot/+/729880/2

    Signed-off-by: Ruslan Trofymenko
    Signed-off-by: Igor Opaniuk
    Reviewed-by: Alistair Strachan
    Reviewed-by: Sam Protsenko
    Reviewed-by: Simon Glass

    Ruslan Trofymenko
     

24 Jul, 2019

4 commits


22 Jul, 2019

5 commits

  • The current implementation supports only binary file load.
    Add helpers to support ELF32 format (sanity check, and load).
    Note that since an ELF32 image is built for the remote processor, the
    load function uses the device_to_virt ops to translate the addresses.
    Implement a basic translation for sandbox_testproc.

    Add related tests. Test result:
    => ut dm remoteproc_elf
    Test: dm_test_remoteproc_elf: remoteproc.c
    Test: dm_test_remoteproc_elf: remoteproc.c (flat tree)
    Failures: 0

    Signed-off-by: Loic Pallardy
    Signed-off-by: Fabien Dessenne
    Reviewed-by: Lokesh Vutla

    Fabien Dessenne
     
  • Introduce the device_to_virt function to allow translation between
    device address (remote processor view) and virtual address (main
    processor view).

    Signed-off-by: Loic Pallardy
    Signed-off-by: Fabien Dessenne
    Reviewed-by: Lokesh Vutla

    Fabien Dessenne
     
  • Add full function comment headers.
    Fix rproc_is_initialized() return value description.

    Signed-off-by: Fabien Dessenne
    Reviewed-by: Lokesh Vutla

    Fabien Dessenne
     
  • Add the following functions to translate DMA address to CPU address:
    - dev_translate_dma_address()
    - ofnode_translate_dma_address()
    - of_translate_dma_address()
    - fdt_translate_dma_address()
    These functions work the same way as xxx_translate_address(), with the
    difference that the translation relies on the "dma-ranges" property
    instead of the "ranges" property.

    Add related test. Test report:
    => ut dm fdt_translation
    Test: dm_test_fdt_translation: test-fdt.c
    Test: dm_test_fdt_translation: test-fdt.c (flat tree)
    Failures: 0

    Signed-off-by: Fabien Dessenne

    Fabien Dessenne
     
  • - rk3399 lpddr4 support
    - rk3399-rock960 board support improvement
    - Eliminate pyelftools dependency by make_fit_atf.py
    - clean up rockchip dts to use -u-boot.dtsi
    - use ARM arch/generic timer instead of rk_timer
    - clean up Kconfig options for board support

    Tom Rini
     

20 Jul, 2019

7 commits


19 Jul, 2019

8 commits