15 Jul, 2019

1 commit

  • The choice of the SPL_TEXT_BASE is not really a decision that should be
    specified by each board's defconfig, as this setting is actually
    dictated by the SoC's memory map and the BootROM behaviour.

    To make this obvious and reduce the clutter in the defconfig files,
    let's specify the SoC constraints in the Kconfig stanza.
    This allows us to remove these lines from the defconfig files again.

    Signed-off-by: Andre Przywara
    Acked-by: Maxime Ripard
    Reviewed-by: Jagan Teki

    Andre Przywara
     

14 Jul, 2019

2 commits


13 Jul, 2019

24 commits

  • Since we have limited resources in SPL, it is the best interest
    to keep the SPL as small as possible and that includes the DTB.
    There are a few items in the device tree that can be removed,
    because these boards don't use them.

    Signed-off-by: Adam Ford

    Adam Ford
     
  • Fixed regulators don't have a set_value method. Therefore, trying to
    set their value will always return -ENOSYS.

    Signed-off-by: Sven Schwermer
    Cc: Jaehoon Chung
    Cc: Peng Fan
    Reviewed-by: Simon Glass

    Sven Schwermer
     
  • add gpio-hog support. GPIO hogging is a mechanism
    providing automatic GPIO request and configuration
    as part of the gpio-controller's driver probe function.

    for more infos see:
    doc/device-tree-bindings/gpio/gpio.txt

    Signed-off-by: Heiko Schocher
    Tested-by: Michal Simek (zcu102)
    Tested-by: Patrick Delaunay

    Heiko Schocher
     
  • The MMC card-detect pin was incorrectly defined which was fixed.
    This patch resync's the dts and removes the u-boot specific fix.

    Signed-off-by: Adam Ford

    Adam Ford
     
  • The da850.dtsi file had some changes. This patch pulls in the
    changes from Kernel 5.1.9

    Signed-off-by: Adam Ford

    Adam Ford
     
  • With a recent update to the pinctrl-single driver and the fact
    that the da850evm has both DM and OF_CONTROL working in both SPL
    and U-Boot, some of the manual pinmuxing can be setup to only
    be activated when either the driver doesn't have DM for it, or
    when CONFIG_PINMUX isn't available (only during SPL). If the
    code ever shrinks enough to support PINCTRL in SPL, a lot of this
    can go away. This also remove some manual pinmuxing not needed
    by SPL to give SPL a little more breathing room.

    Signed-off-by: Adam Ford

    Adam Ford
     
  • The TI Davinci (da850/l138/am1808) use pinctrl-single,bits for
    pinmuxing peripherals. This patch allosw the pinctrl-single
    driver to parse the pinctrl-single,bits options and correctly
    setup devices.

    Signed-off-by: Adam Ford

    Adam Ford
     
  • The USE_TINY_PRINTF symbol only changes things within SPL and TPL
    builds, so make it depend on that support. Next, make it default as
    within these cases we should rarely have need of more advanced print
    formats outside of the debug context.

    To do this, in a few cases we need to correct our Kconfig dependencies
    as we had cases of non-SPL targets select'ing this symbol. Finally, in
    the case of a few boards we really do need the full printf
    functionality.

    Signed-off-by: Tom Rini

    Tom Rini
     
  • Add SPL_DM_REGULATOR configs for palmas/lp873x/lp87565. These were missing
    and the Makefile already assumes them to be defined. Add the corresponding
    SPL config options. This enables the regulator support in SPL.

    Signed-off-by: Keerthy

    Keerthy
     
  • Add SPL_PMIC configs for palmas/lp873x/lp87565. These were missing
    and the Makefile already assumes them to be defined. Add the corresponding
    SPL config options. This enables the pmics in SPL.

    Signed-off-by: Keerthy

    Keerthy
     
  • Support for Phytech phyCORE AM335x R2 SOM (PCL060) on the Phytec
    phyBOARD-Wega AM335x.

    CPU : AM335X-GP rev 2.1
    Model: Phytec AM335x phyBOARD-WEGA
    DRAM: 256 MiB
    NAND: 256 MiB
    MMC: OMAP SD/MMC: 0
    eth0: ethernet@4a100000

    Working:
    - Eth0
    - i2C
    - MMC/SD
    - NAND
    - UART
    - USB (host)

    Device trees were taken from Linux mainline:
    commit 37624b58542f ("Linux 5.1-rc7")

    Signed-off-by: Niel Fourie
    Signed-off-by: Parthiban Nallathambi
    Reviewed-by: Heiko Schocher
    Reviewed-by: Tom Rini
    Tested-by: Marek Vasut

    Niel Fourie
     
  • This converts LEGO MINDSTORMS EV3 to the driver model. MMC, SERIAL, SPI
    and SPI_FLASH are converted.

    The device tree contains only the minimal nodes required by U-Boot
    since the size of U-Boot is limited to 256K on this device.

    Signed-off-by: David Lechner

    David Lechner
     
  • Signed-off-by: Michael Walle

    Michael Walle
     
  • This commit addresses the following warning, when _NOT_ USB_MUSB_HOST:

    [...]
    CC drivers/usb/gadget/f_mass_storage.o
    CC drivers/usb/musb-new/omap2430.o
    CC drivers/usb/gadget/f_fastboot.o
    CC env/common.o
    CC env/env.o
    /src/etinker/software/u-boot-master/drivers/usb/musb-new/omap2430.c: In function ‘omap2430_musb_probe’:
    /src/etinker/software/u-boot-master/drivers/usb/musb-new/omap2430.c:239:6: warning: assignment to ‘int’ from ‘struct musb *’ makes integer from pointer without a cast [-Wint-conversion]
    ret = musb_register(&platdata->plat,
    ^
    LD drivers/usb/host/built-in.o
    CC drivers/usb/gadget/f_sdp.o
    CC fs/ext4/ext4fs.o
    [...]

    Signed-off-by: Derald D. Woods

    Derald D. Woods
     
  • This addresses the following warning message:

    ===================== WARNING ======================
    This board does not use CONFIG_DM_USB. Please update
    the board to use CONFIG_DM_USB before the v2019.07 release.
    Failure to update by the deadline may result in board removal.
    See doc/driver-model/MIGRATION.txt for more info.
    ====================================================

    As USB support for older OMAP3 SoC's improves, OMAP3 EVM can be
    readily adapted. There is some additional 'gpio-hog' support
    needed to fully setup USB in a similar manner to Linux.

    Signed-off-by: Derald D. Woods

    Derald D. Woods
     
  • Signed-off-by: Derald D. Woods

    Derald D. Woods
     
  • add m41t11 support in ds1307 driver. changes:

    - add compatible string for m41t11
    - check if RTC clock is running, if not
    enable the clock

    Signed-off-by: Heiko Schocher

    Heiko Schocher
     
  • When MMC_TINY is enabled, support for only one MMC device
    is provided. Boards that register more than one device,
    will just write over mmc_static keeping only the last one
    registered.

    This commit prevents this, keeping only the first MMC
    device created. A debug warning message is added, if nothing
    else, as a hint/documentation for developers.

    Signed-off-by: Ezequiel Garcia

    Ezequiel Garcia
     
  • The SPL_MMC_TINY implements feature-reduced MMC support
    on SPL, and as such, it's more consistent and convenient
    to find it as part of the SPL configuration.

    Signed-off-by: Ezequiel Garcia

    Ezequiel Garcia
     
  • Add sub-command 'env info' to display environment information:
    - env_valid : is environment valid
    - env_ready : is environment imported into hash table
    - env_use_default : is default environment using

    This command can be optionally used for evaluation in scripts:
    [-d] : evaluate whether default environment is used
    [-p] : evaluate whether environment can be persisted
    The result of multiple evaluations will be combined with AND.

    Signed-off-by: Leo Ruan
    Signed-off-by: Mark Jonas
    Reviewed-by: Simon Glass
    [trini: Do not enable by default]
    Signed-off-by: Tom Rini

    Leo Ruan
     
  • `if (!strncmp(dev->name, name, strlen(name)))` might find out
    the wrong device, it might find out `dram_pll_ref_sel`, when name is
    `dram_pll`. So use strcmp to avoid such issue.

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

    Peng Fan
     
  • "keyb" is not the real device name, "keyb@3" is.

    Signed-off-by: Peng Fan
    Reviewed-by: Bin Meng

    Peng Fan
     
  • "adc" is not the real device name, "adc@0" is.

    Signed-off-by: Peng Fan
    Reviewed-by: Bin Meng

    Peng Fan
     
  • Use the uclass_first_device_check and uclass_next_device_check functions
    instead of uclass_first_device and uclass_next_device in pci_init. This
    ensures that all PCI devices are tried to be probed. Currently if a
    device fails to probe, the enumeration stops and the devices which come
    after the failed device are not probed.

    Signed-off-by: Marek Behún
    Cc: Stefan Roese
    Cc: Anton Schubert
    Cc: Dirk Eibach
    Cc: Mario Six
    Cc: Chris Packham
    Cc: Phil Sutter
    Cc: VlaoMao
    Cc: Tom Rini
    Reviewed-by: Stefan Roese
    Reviewed-by: Bin Meng

    Marek Behún
     

12 Jul, 2019

13 commits

  • Convert the board to support the USB and video driver model and remove
    the unnecessary code.

    Ilko Iliev
     
  • Convert the board to support the USB and video driver model and remove
    the unnecessary code.

    Ilko Iliev
     
  • - Sandbox improvements including .dts refactor
    - Minor tracing and PCI improvements
    - Various other minor fixes
    - Conversion of patman, dtoc and binman to support Python 3

    Tom Rini
     
  • - SPL SATA enhancements to allow booting from RAW SATA device
    needed for Clearfog (Baruch)
    - Enable SATA booting on Clearfog (Baruch)
    - Misc changes to Turris Omnia (Marek)
    - Enable CMD_BOOTZ and increase SYS_BOOTM_LEN on crs305-1g-4s
    (Luka)
    - Enable FIT support for db-xc3-24g4xg (Chris)
    - Enable DM_SPI on Keymile Kirkwood board with necessary changes
    for this (Pascal)
    - Set 38x and 39x AVS on lower frequency (Baruch)

    Tom Rini
     
  • UniPhier SoC updates for v2019.10

    - import DT updates from Linux

    - add UniPhier SPI controller driver

    - make U-Boot image for 64bit SoCs position independent

    - tidy up various init code for next generation SoCs

    - misc cleanups

    Tom Rini
     
  • - spear platform improvements
    - Android BCB support
    - Cadence PCIe endpoint driver

    Tom Rini
     
  • Add TI TCA9539 compatible string for yet another I2C GPIO expander.

    Signed-off-by: Marek Vasut
    Cc: Mario Six
    Cc: Peng Fan
    Cc: Simon Glass
    Reviewed-by: Peng Fan

    Marek Vasut
     
  • The board_early_init_f() inits clock before initing pinmux. However,
    the clock configuration code might need to adjust PMIC settings of a
    PMIC on I2C bus (e.g. board/ti/am335x/board.c does that). If the I2C
    bus pin muxing is not configured before attempting to communicate
    with the PMIC, the communication will silently fail and the prcm_init()
    may configure fast enough CPU clock that the default voltage provided
    by the PMIC would be insufficient and the platform would become
    unstable.

    Signed-off-by: Marek Vasut
    Cc: Jean-Jacques Hiblot
    Cc: Tom Rini

    Marek Vasut
     
  • Rename:
    - doc/{README.avb2 => android/avb2.txt}
    - doc/{README.android-fastboot => android/fastboot.txt}

    Add a new file documenting the 'bcb' command:
    - doc/android/bcb.txt

    The new directory structure has been reviewed by Simon in
    https://patchwork.ozlabs.org/patch/1101107/#2176031 .

    Signed-off-by: Eugeniu Rosca
    Reviewed-by: Simon Glass

    Eugeniu Rosca
     
  • 'Bootloader Control Block' (BCB) is a well established term/acronym in
    the Android namespace which refers to a location in a dedicated raw
    (i.e. FS-unaware) flash (e.g. eMMC) partition, usually called "misc",
    which is used as media for exchanging messages between Android userspace
    (particularly recovery [1]) and an Android-capable bootloader.

    On higher level, this allows implementing a subset of Android Bootloader
    Requirements [2], amongst which is the Android-specific bootloader
    flow [3]. Regardless how the latter is implemented in U-Boot ([3] being
    the most memorable example), reading/writing/dumping the BCB fields in
    the development process from inside the U-Boot is a convenient feature.
    Hence, make it available to the users.

    Some usage examples of the new command recorded on R-Car H3ULCB-KF
    ('>>>' is an overlay on top of the original console output):

    => bcb
    bcb - Load/set/clear/test/dump/store Android BCB fields

    Usage:
    bcb load - load BCB from mmc :
    bcb set - set BCB to
    bcb clear [] - clear BCB or all fields
    bcb test - test BCB against
    bcb dump - dump BCB
    bcb store - store BCB back to mmc

    Legend:
    - MMC device index containing the BCB partition
    - MMC partition index or name containing the BCB
    - one of {command,status,recovery,stage,reserved}
    - the binary operator used in 'bcb test':
    '=' returns true if matches the string stored in
    '~' returns true if matches a subset of 's string
    - string/text provided as input to bcb {set,test}
    NOTE: any ':' character in will be replaced by line feed
    during 'bcb set' and used as separator by upper layers

    => bcb dump command
    Error: Please, load BCB first!
    >>> Users must specify mmc device and partition before any other call

    => bcb load 1 misc
    => bcb load 1 1
    >>> The two calls are equivalent (assuming "misc" has index 1)

    => bcb dump command
    00000000: 62 6f 6f 74 6f 6e 63 65 2d 73 68 65 6c 6c 00 72 bootonce-shell.r
    00000010: 79 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 y.r.............
    >>> The output is in binary/string format for convenience
    >>> The output size matches the size of inspected BCB field
    >>> (32 bytes in case of 'command')

    => bcb test command = bootonce-shell && echo true
    true
    => bcb test command = bootonce-shell- && echo true
    => bcb test command = bootonce-shel && echo true
    >>> The '=' operator returns 'true' on perfect match

    => bcb test command ~ bootonce-shel && echo true
    true
    => bcb test command ~ bootonce-shell && echo true
    true
    >>> The '~' operator returns 'true' on substring match

    => bcb set command recovery
    => bcb dump command
    00000000: 72 65 63 6f 76 65 72 79 00 73 68 65 6c 6c 00 72 recovery.shell.r
    00000010: 79 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 y.r.............
    >>> The new value is NULL-terminated and stored in the BCB field

    => bcb set recovery "msg1:msg2:msg3"
    => bcb dump recovery
    00000040: 6d 73 67 31 0a 6d 73 67 32 0a 6d 73 67 33 00 00 msg1.msg2.msg3..
    00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    >>> --- snip ---
    >>> Every ':' is replaced by line-feed '\n' (0xA). The latter is used
    >>> as separator between individual commands by Android userspace

    => bcb store
    >>> Flush/store the BCB structure to MMC

    [1] https://android.googlesource.com/platform/bootable/recovery
    [2] https://source.android.com/devices/bootloader
    [3] https://patchwork.ozlabs.org/patch/746835/
    ("[U-Boot,5/6] Initial support for the Android Bootloader flow")

    Signed-off-by: Eugeniu Rosca

    Eugeniu Rosca
     
  • Perform the following updates:
    - Relocate the commit id from the file to the description of U-Boot
    commit. The AOSP commit is c784ce50e8c10eaf70e1f97e24e8324aef45faf5.
    This is done to avoid stale references in the file itself. The
    reasoning is in https://patchwork.ozlabs.org/patch/1098056/#2170209.
    - Minimize the diff to AOSP, to decrease the effort of the next AOSP
    backports. The background can be found in:
    https://patchwork.ozlabs.org/patch/1080394/#2168454.
    - Guard the static_assert() calls by #ifndef __UBOOT__ ... #endif,
    to avoid compilation failures of files including the header.

    Signed-off-by: Eugeniu Rosca
    Reviewed-by: Sam Protsenko
    Reviewed-by: Simon Glass

    Eugeniu Rosca
     
  • When we have a FIT image being used by SPL by default that means the
    most common case is that we'll never run into a legacy image. Disable
    legacy image support by default in that case to reclaim space.

    Signed-off-by: Tom Rini

    Tom Rini
     
  • The name CONFIG_LEGACY_IMAGE_FORMAT reads slightly better along with
    allowing us to avoid a rather nasty Kbuild/Kconfig issue down the line
    with CONFIG_IS_ENABLED(IMAGE_FORMAT_LEGACY). In a few places outside of
    cmd/ switch to using CONFIG_IS_ENABLED() to test what is set.

    Signed-off-by: Tom Rini

    Tom Rini