oweals/u-boot.git
6 years agophy: rcar: Add R-Car Gen3 PHY driver
Marek Vasut [Tue, 2 Oct 2018 20:31:47 +0000 (22:31 +0200)]
phy: rcar: Add R-Car Gen3 PHY driver

Add a PHY driver for the R-Car Gen3 which allows configuring
USB OTG PHY on Gen3 into host mode and toggles VBUS in case a
dedicated regulator is present.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Mark 4-64GiB as DRAM on Gen3
Marek Vasut [Tue, 2 Oct 2018 19:42:49 +0000 (21:42 +0200)]
ARM: rmobile: Mark 4-64GiB as DRAM on Gen3

Mark area 0x1_0000_0000 - 0x10_0000_0000 as DRAM on Gen3 as the
chip is capable of addressing that and U-Boot can make use of it.
This patch prevents exception when accessing those areas.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Repair TMU clock on Gen2
Marek Vasut [Wed, 19 Sep 2018 14:33:09 +0000 (16:33 +0200)]
ARM: rmobile: Repair TMU clock on Gen2

The CPfi/4 is derived from XTAL clock and is not fixed. Undo
the previous commit 7984ac8d1635aebd11175c96b07f937a39f0384d.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
6 years agoARM: dts: rmobile: Reinstate missing i2c6 on Porter
Marek Vasut [Wed, 19 Sep 2018 11:56:27 +0000 (13:56 +0200)]
ARM: dts: rmobile: Reinstate missing i2c6 on Porter

The I2C6 is used to communicate with the PMIC and it was removed
during DT sync with Linux 4.17. Reinstate it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Tue, 2 Oct 2018 17:02:22 +0000 (13:02 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

This is the PR for SPI-NAND changes along with few spi changes.

[trini: Re-sync changes for ls1012afrwy_qspi*_defconfig]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agospi: sh_qspi: Add DM support to SH QSPI driver
Marek Vasut [Sat, 25 Aug 2018 17:34:24 +0000 (19:34 +0200)]
spi: sh_qspi: Add DM support to SH QSPI driver

Add DM support to the SH QSPI driver while retaining non-DM support.
The later is required as this driver is used in SPL which has a size
limitation of 16 kiB.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
[jagan: use proper commit head]
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agodriver/spi: fsl_qspi: Remove non-DM stuff
Ashish Kumar [Fri, 7 Sep 2018 04:19:34 +0000 (09:49 +0530)]
driver/spi: fsl_qspi: Remove non-DM stuff

Convert fsl_qspi.c to complete DM mode.

Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Tested-by: Rajat Srivastava <rajat.srivastava@nxp.com>
Tested-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agospi: designware_spi: Add reset ctrl to driver
Ley Foon Tan [Fri, 7 Sep 2018 06:25:29 +0000 (14:25 +0800)]
spi: designware_spi: Add reset ctrl to driver

Add code to reset all reset signals as in SPI DT node. A reset property
is an optional feature, so only print out a warning and do not fail if a
reset property is not present.

If a reset property is discovered, then use it to deassert, thus
bringing the IP out of reset.

Release reset when _remove().

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agocmd: mtdparts: describe as legacy
Miquel Raynal [Sat, 29 Sep 2018 10:58:30 +0000 (12:58 +0200)]
cmd: mtdparts: describe as legacy

The 'mtdparts' command is not needed anymore. While the environment
variable is still valid (and useful, along with the 'mtdids' one), the
command has been replaced by 'mtd' which is much more close to the MTD
stack and do not add its own specific glue.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
6 years agocmd: ubi: clean the partition handling
Miquel Raynal [Sat, 29 Sep 2018 10:58:29 +0000 (12:58 +0200)]
cmd: ubi: clean the partition handling

UBI should not mess with MTD partitions, now that the partitions are
handled in a clean way, clean the ubi command and avoid using this
uneeded extra-glue to reference the devices.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
6 years agocmd: mtd: add 'mtd' command
Miquel Raynal [Sat, 29 Sep 2018 10:58:28 +0000 (12:58 +0200)]
cmd: mtd: add 'mtd' command

There should not be a 'nand' command, a 'sf' command and certainly not
a new 'spi-nand' command. Write a 'mtd' command instead to manage all
MTD devices/partitions at once. This should be the preferred way to
access any MTD device.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
6 years agomtd: mtdpart: implement proper partition handling
Miquel Raynal [Sat, 29 Sep 2018 10:58:27 +0000 (12:58 +0200)]
mtd: mtdpart: implement proper partition handling

Instead of collecting partitions in a flat list, create a hierarchy
within the mtd_info structure: use a partitions list to keep track of
the partitions of an MTD device (which might be itself a partition of
another MTD device), a pointer to the parent device (NULL when the MTD
device is the root one, not a partition).

By also saving directly in mtd_info the offset of the partition, we
can get rid of the mtd_part structure.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
6 years agomtd: uboot: search for an equivalent MTD name with the mtdids
Miquel Raynal [Sat, 29 Sep 2018 10:58:26 +0000 (12:58 +0200)]
mtd: uboot: search for an equivalent MTD name with the mtdids

Using an MTD device (resp. partition) name in mtdparts is simple and
straightforward. However, for a long time already, another name was
given in mtdparts to indicate a device (resp. partition) so the
"mtdids" environment variable was created to do the match.

Let's create a function that, from an MTD device (resp. partition)
name, search for the equivalent name in the "mtdparts" environment
variable thanks to the "mtdids" string.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
6 years agomtd: mtdpart: add a generic mtdparts-like parser
Miquel Raynal [Sat, 29 Sep 2018 10:58:25 +0000 (12:58 +0200)]
mtd: mtdpart: add a generic mtdparts-like parser

The current parser is very specific to U-Boot mtdparts implementation.
It does not use MTD structures like mtd_info and mtd_partition. Copy
and adapt the current parser in drivers/mtd/mtd-uclass.c (to not break
the current use of mtdparts.c itself) and write some kind of a wrapper
around the current implementation to allow other commands to benefit
from this parsing in a user-friendly way.

This new function will allocate an mtd_partition array for each
successful call. This array must be freed after use by the caller.
The given 'mtdparts' buffer pointer will be moved forward to the next
MTD device (if any, it will point towards a '\0' character otherwise).

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
6 years agomtd: uclass: add probe function
Miquel Raynal [Sat, 29 Sep 2018 10:58:24 +0000 (12:58 +0200)]
mtd: uclass: add probe function

The user might want to trigger the probe of any MTD device, export these
functions so they can be called from a command source file.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
6 years agodm: drop unused helper in MTD header
Miquel Raynal [Sat, 29 Sep 2018 10:58:23 +0000 (12:58 +0200)]
dm: drop unused helper in MTD header

include/mtd.h might be included by files even if CONFIG_DM is not
enabled. In this case, the call to dev_get_uclass_priv() would trigger
a build error. Because this helper has no user, let's drop it off.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agoPrepare v2018.11-rc1 v2018.11-rc1
Tom Rini [Tue, 2 Oct 2018 00:32:03 +0000 (20:32 -0400)]
Prepare v2018.11-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMAINTAINERS: at91: update entry for at91 boards
Eugen Hristev [Mon, 1 Oct 2018 14:31:53 +0000 (17:31 +0300)]
MAINTAINERS: at91: update entry for at91 boards

Updated the maintainership for the at91 boards.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Sun, 30 Sep 2018 22:16:51 +0000 (18:16 -0400)]
Merge git://git.denx.de/u-boot-dm

6 years agoMAINTAINERS: Update some entries for missed boards
Tom Rini [Sun, 30 Sep 2018 14:24:45 +0000 (10:24 -0400)]
MAINTAINERS: Update some entries for missed boards

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agofs: btrfs: Fix cache alignment bugs
Marek Vasut [Sat, 22 Sep 2018 02:13:35 +0000 (04:13 +0200)]
fs: btrfs: Fix cache alignment bugs

The btrfs implementation passes cache-unaligned buffers into the
block layer, which triggers cache alignment problems down in the
block device drivers. Align the buffers to prevent this.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Behun <marek.behun@nic.cz>
6 years agousb:ci_udc: don't overwrite configuration on pullup
Ramon Fried [Fri, 21 Sep 2018 10:35:56 +0000 (13:35 +0300)]
usb:ci_udc: don't overwrite configuration on pullup

change writel to writebits32 in ci_pullup() in order
to keep phy configuration in tact.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agodb410c: automatically launch fastboot
Ramon Fried [Fri, 21 Sep 2018 10:35:55 +0000 (13:35 +0300)]
db410c: automatically launch fastboot

If during boot the key-vol-down press is detected
we'll fall back to fastboot.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agoDB410c: Enable fastboot support
Ramon Fried [Fri, 21 Sep 2018 10:35:54 +0000 (13:35 +0300)]
DB410c: Enable fastboot support

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agousb: ehci-msm: Add init_after_reset for CI_UDC
Ramon Fried [Fri, 21 Sep 2018 10:35:53 +0000 (13:35 +0300)]
usb: ehci-msm: Add init_after_reset for CI_UDC

MSM uses the chipidea controller IP, however it requires
to reinit the phy after controller reset. in EHCI mode there's a
dedicated callback for it.
In device mode however there's no such callback.
Add implementaion of ci_init_after_reset() to implement the above
requirement in case CI_UDC driver is used.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agousb:ci_udc: Introduce init_after_reset phy function
Ramon Fried [Fri, 21 Sep 2018 10:35:52 +0000 (13:35 +0300)]
usb:ci_udc: Introduce init_after_reset phy function

MSM variant of Chipidea must reinitalize the phy
after controller reset.
Introduce ci_init_after_reset() weak function that
can be used to achieve the above init.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agoehci: msm: use init_type in probe
Ramon Fried [Fri, 21 Sep 2018 10:35:51 +0000 (13:35 +0300)]
ehci: msm: use init_type in probe

Change ehci_usb_probe() function to initialize the
USB according to the init_type provided.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agoehci: msm: switch to generic PHY uclass
Ramon Fried [Fri, 21 Sep 2018 10:35:50 +0000 (13:35 +0300)]
ehci: msm: switch to generic PHY uclass

All the underlying USB PHY was handled in the ehci driver.
Use the generic phy API instead.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agoconfigs: db410c: Enable USB PHY
Ramon Fried [Fri, 21 Sep 2018 10:35:49 +0000 (13:35 +0300)]
configs: db410c: Enable USB PHY

Enable USB PHY driver.
Also fixed the alphabetically ordering of the config.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agodts: db410c: Add bindings for MSM USB phy
Ramon Fried [Fri, 21 Sep 2018 10:35:48 +0000 (13:35 +0300)]
dts: db410c: Add bindings for MSM USB phy

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agophy: db410c: Add MSM USB PHY driver
Ramon Fried [Fri, 21 Sep 2018 10:35:47 +0000 (13:35 +0300)]
phy: db410c: Add MSM USB PHY driver

Add a PHY driver for the Qualcomm dragonboard 410c which
allows switching on/off and resetting the phy connected
to the EHCI controllers and USBHS controller.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agodb410c: serial# env using msm board serial
Ramon Fried [Fri, 21 Sep 2018 10:35:46 +0000 (13:35 +0300)]
db410c: serial# env using msm board serial

The serial# environment variable needs to be
defined so it will be used by fastboot as serial
for the endpoint descriptor.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agodts: db410c: add alias for USB
Ramon Fried [Fri, 21 Sep 2018 10:35:45 +0000 (13:35 +0300)]
dts: db410c: add alias for USB

Alias is required so req-seq will be filled.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agoehci: msm: Add missing platdata
Ramon Fried [Fri, 21 Sep 2018 10:35:44 +0000 (13:35 +0300)]
ehci: msm: Add missing platdata

platdata_auto_alloc_size was not initialized in structure.
Caused null pointer dereference when configuring device as
gadget.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agoehci: Replace board_prepare_usb with board_usb_init
Ramon Fried [Fri, 21 Sep 2018 10:35:43 +0000 (13:35 +0300)]
ehci: Replace board_prepare_usb with board_usb_init

Use standard board_usb_init() instead of the specific board_prepare_usb.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agoserial: serial_stm32: Enable uart FIFO for STM32F7xx SoCs
Patrice Chotard [Thu, 20 Sep 2018 13:14:15 +0000 (15:14 +0200)]
serial: serial_stm32: Enable uart FIFO for STM32F7xx SoCs

Since commit 7b3b74d32127 ("serial: serial_stm32: Enable overrun")
on STM32F7xx based boards, the first lines of serial output are
missing during boot (we no more see the U-Boot release version,
board model and DRAM size).

By enabling the uart FIFO on STM32F7, the complete U-boot log
can be sent correctly.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agou-boot: align cache flushes in load_elf_image_shdr to line boundaries
Neil Stainton [Wed, 19 Sep 2018 09:38:07 +0000 (10:38 +0100)]
u-boot: align cache flushes in load_elf_image_shdr to line boundaries

Prevent cache warning messages when using the 'bootelf' command on an
Arm target. Round down each section start address and round up the
respective section end to the nearest cache line.

Signed-off-by: Neil Stainton <nstainton@asl-control.co.uk>
[trini: Manually apply, rework whitespace]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agokbuild: fix # escaping in appending U-Boot own DT
Masahiro Yamada [Wed, 19 Sep 2018 02:35:57 +0000 (11:35 +0900)]
kbuild: fix # escaping in appending U-Boot own DT

The escape sequence '\#' does not work for the latest GNU Make from
the git tree.

Replace it with $(pound) as Linux did.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoKbuild: fix # escaping in .cmd files for future Make
Rasmus Villemoes [Wed, 19 Sep 2018 02:35:56 +0000 (11:35 +0900)]
Kbuild: fix # escaping in .cmd files for future Make

[ commit 9564a8cf422d7b58f6e857e3546d346fa970191e in Linux ]

I tried building using a freshly built Make (4.2.1-69-g8a731d1), but
already the objtool build broke with

orc_dump.c: In function ‘orc_dump’:
orc_dump.c:106:2: error: ‘elf_getshnum’ is deprecated [-Werror=deprecated-declarations]
  if (elf_getshdrnum(elf, &nr_sections)) {

Turns out that with that new Make, the backslash was not removed, so cpp
didn't see a #include directive, grep found nothing, and
-DLIBELF_USE_DEPRECATED was wrongly put in CFLAGS.

Now, that new Make behaviour is documented in their NEWS file:

  * WARNING: Backward-incompatibility!
    Number signs (#) appearing inside a macro reference or function invocation
    no longer introduce comments and should not be escaped with backslashes:
    thus a call such as:
      foo := $(shell echo '#')
    is legal.  Previously the number sign needed to be escaped, for example:
      foo := $(shell echo '\#')
    Now this latter will resolve to "\#".  If you want to write makefiles
    portable to both versions, assign the number sign to a variable:
      C := \#
      foo := $(shell echo '$C')
    This was claimed to be fixed in 3.81, but wasn't, for some reason.
    To detect this change search for 'nocomment' in the .FEATURES variable.

This also fixes up the two make-cmd instances to replace # with $(pound)
rather than with \#. There might very well be other places that need
similar fixup in preparation for whatever future Make release contains
the above change, but at least this builds an x86_64 defconfig with the
new make.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=197847
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agospl: mmc: Report device number when we fail
Alex Kiernan [Tue, 18 Sep 2018 08:11:55 +0000 (08:11 +0000)]
spl: mmc: Report device number when we fail

If we fail to find the MMC boot device, report the number of the one
we were looking for in the error to aid diagnosis.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agoclk: Add support for Arm's Versatile Express OSC clock generators
Liviu Dudau [Mon, 17 Sep 2018 16:50:00 +0000 (17:50 +0100)]
clk: Add support for Arm's Versatile Express OSC clock generators

The Arm Versatile Express and Juno development boards contain an
OSC clock generator that can be accessed through the Versatile
Express config bus. The generators are quite often being controlled
by some MCU and the config bus offers a uniform way of exposing them.

Signed-off-by: Liviu Dudau <liviu.dudau@foss.arm.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
6 years agocmd: env: Fix CRC calculation for 'env export -c -s'
Neil Stainton [Wed, 12 Sep 2018 11:02:51 +0000 (11:02 +0000)]
cmd: env: Fix CRC calculation for 'env export -c -s'

Fix failure to reimport exported checksummed, size constrained data block.

'env export -c' command ignores optional -s size argument when calculating checksum causing subsequent 'env import -c' to fail.

Signed-off-by: Neil Stainton <nstainton@asl-control.co.uk>
6 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Sun, 30 Sep 2018 02:28:44 +0000 (22:28 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-video

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agodm: test: Add "/firmware" node scan test
Rajan Vaja [Wed, 19 Sep 2018 10:43:46 +0000 (03:43 -0700)]
dm: test: Add "/firmware" node scan test

Add a test which verifies that all subnodes under "/firmware"
nodes are scanned.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Added 'imply FIRMWARE' to sandbox Kconfig to fix test failures, fixed
ordering of lines in arch/sandbox/dts/test.dts and test/dm/Makefile,
updated #if condition in drivers/firmware/firmware-uclass.c:
Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agofirmware: Add FIRMWARE config prompt string
Rajan Vaja [Wed, 19 Sep 2018 10:43:43 +0000 (03:43 -0700)]
firmware: Add FIRMWARE config prompt string

There is no prompt string for FIRMWARE config. Without this,
FIRMWARE config cannot be enabled through menuconfing or
config file. Fix this by adding prompt summary.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agosandbox: Add an explanation of the sandbox variants
Simon Glass [Wed, 19 Sep 2018 00:43:28 +0000 (18:43 -0600)]
sandbox: Add an explanation of the sandbox variants

There are quite a few builds of sandbox now. Add information about these
to the README.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobuildman: Avoid hanging when the config changes
Simon Glass [Tue, 18 Sep 2018 05:55:42 +0000 (23:55 -0600)]
buildman: Avoid hanging when the config changes

Something has changed in the last several month such that when buildman
builds U-Boot incrementally and a new CONFIG option has been added to the
Kconfig, the build hanges waiting for input:

    Test new config (NEW_CONFIG) [N/y/?] (NEW)

Since binamn does not connect the build's stdin to anything this waits on
stdin to the build thread, which never comes. Eventually I suspect all the
threads end up in this state and the build does not progress.

Fix this by passing /dev/null as input to the build. That way, if there is
a new CONFIG, the build will stop (and fail):

    Test new config (NEW_CONFIG) [N/y/?] (NEW)

    Error in reading or end of file.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoinclude/dm.h: Remove duplicated include directive
Liviu Dudau [Mon, 17 Sep 2018 16:46:07 +0000 (17:46 +0100)]
include/dm.h: Remove duplicated include directive

Remove duplicated inclusion of dm/ofnode.h

Signed-off-by: Liviu Dudau <liviu.dudau@foss.arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Drop period at end of commit subject:
Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoinclude/clk.h: Fix the name of the clock uclass in comment
Liviu Dudau [Mon, 17 Sep 2018 16:43:08 +0000 (17:43 +0100)]
include/clk.h: Fix the name of the clock uclass in comment

The comment references a structure name that doesn't exist. Use
the name of the actual uclass.

Signed-off-by: Liviu Dudau <liviu.dudau@foss.arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Drop period at end of commit subject:
Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agofdt: fdtdec_setup_memory_banksize() use livetree
Jens Wiklander [Mon, 20 Aug 2018 09:09:59 +0000 (11:09 +0200)]
fdt: fdtdec_setup_memory_banksize() use livetree

Converts fdtdec_setup_memory_banksize() to use ofnode functions instead.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
6 years agocmd: clk: Add trivial implementation of clock dump for DM
Marek Vasut [Wed, 8 Aug 2018 20:10:44 +0000 (22:10 +0200)]
cmd: clk: Add trivial implementation of clock dump for DM

Add trivial implementation of the clk dump in case DM is enabled.
This implementation just iterates over all the clock registered
with the CLK uclass and prints their rate.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
6 years agotest: Add tests for board uclass
Mario Six [Tue, 31 Jul 2018 09:44:13 +0000 (11:44 +0200)]
test: Add tests for board uclass

Add tests for the new board uclass.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agoboard: Add gazerbeam driver
Mario Six [Tue, 31 Jul 2018 09:44:12 +0000 (11:44 +0200)]
board: Add gazerbeam driver

Add a board driver for the upcoming gdsys Gazerbeam board.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodrivers: Add board uclass
Mario Six [Tue, 31 Jul 2018 09:44:11 +0000 (11:44 +0200)]
drivers: Add board uclass

Since there is no canonical "board device" that can be used in board
files, it is difficult to use DM function for board initialization in
these cases.

Hence, add a uclass that implements a simple "board device", which can
hold devices not suitable anywhere else in the device tree, and is also
able to read encoded information, e.g. hard-wired GPIOs on a GPIO
expander, read-only memory ICs, etc. that carry information about the
hardware.

The devices of this uclass expose methods to read generic data types
(integers, strings, booleans) to encode the information provided by the
hardware.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agotest: Add tests for dev_{enable, disable}_by_path
Mario Six [Tue, 26 Jun 2018 06:46:51 +0000 (08:46 +0200)]
test: Add tests for dev_{enable, disable}_by_path

Add tests for the dev_{enable,disable}_by_path functions.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agocore: Add dev_{disable,enable}_by_path
Mario Six [Tue, 26 Jun 2018 06:46:50 +0000 (08:46 +0200)]
core: Add dev_{disable,enable}_by_path

We cannot use device structures to disable devices, since getting
them with the API functions would bind and activate the device, which
would fail if the underlying device does not exist.
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotest: Add tests for DT-manipulation functions
Mario Six [Tue, 26 Jun 2018 06:46:49 +0000 (08:46 +0200)]
test: Add tests for DT-manipulation functions

Add tests for the ofnode_set_enabled, ofnode_write_string, and
ofnode_write_property functions.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agocore: Add functions to set properties in live-tree
Mario Six [Tue, 26 Jun 2018 06:46:48 +0000 (08:46 +0200)]
core: Add functions to set properties in live-tree

Implement a set of functions to manipulate properties in a live device
tree:

* ofnode_write_prop() to set generic properties of a node
* ofnode_write_string() to set string properties of a node
* ofnode_set_enabled() to either enable or disable a node

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Allow writing a map file when something goes wrong
Simon Glass [Fri, 14 Sep 2018 10:57:36 +0000 (04:57 -0600)]
binman: Allow writing a map file when something goes wrong

When we get a problem like overlapping regions it is sometimes hard to
figure what what is going on. At present we don't write the map file in
this case. However the file does provide useful information.

Catch any packing errors and write a map file (if enabled with -m) to aid
debugging.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Support ELF files for U-Boot and SPL
Simon Glass [Fri, 14 Sep 2018 10:57:35 +0000 (04:57 -0600)]
binman: Support ELF files for U-Boot and SPL

For sandbox we want to put ELF files in the image since that is what we
need to execute. Add support for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Correct fmap output on x86
Simon Glass [Fri, 14 Sep 2018 10:57:34 +0000 (04:57 -0600)]
binman: Correct fmap output on x86

Normally x86 platforms use the end-at-4gb option. This currently produces
an FMAP with positions which have a large offset. The use of end-at-4gb is
a useful convenience within binman, but we don't really want to export
a map with these offsets.

Fix this by subtracting the 'skip at start' parameter.

Also put the code which convers names to fmap format, for clarity.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Record the parent section of each section
Simon Glass [Fri, 14 Sep 2018 10:57:33 +0000 (04:57 -0600)]
binman: Record the parent section of each section

At present sections have no record of their parent so it is not possible
to traverse up the tree to the root and figure out the position of a
section within the image.

Change the constructor to record this information.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Support x86 microcode in TPL
Simon Glass [Fri, 14 Sep 2018 10:57:32 +0000 (04:57 -0600)]
binman: Support x86 microcode in TPL

When TPL is used on x86 we may want to program the microcode (at least for
the first CPU) early in boot. Add support for this by refactoring the
existing code to be more generic.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Support hashing entries
Simon Glass [Fri, 14 Sep 2018 10:57:31 +0000 (04:57 -0600)]
binman: Support hashing entries

Sometimesi it us useful to be able to verify the content of entries with
a hash. Add an easy way to do this in binman. The hash information can be
retrieved from the device tree at run time.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Mention section attributes in docs
Simon Glass [Fri, 14 Sep 2018 10:57:30 +0000 (04:57 -0600)]
binman: Mention section attributes in docs

Images and sections have the same attributes, since an image is mostly
just a top-level section. Update the docs to explain this.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Support expanding entries
Simon Glass [Fri, 14 Sep 2018 10:57:29 +0000 (04:57 -0600)]
binman: Support expanding entries

It is useful to have entries which can grow automatically to fill
available space. Add support for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Support adding files
Simon Glass [Fri, 14 Sep 2018 10:57:28 +0000 (04:57 -0600)]
binman: Support adding files

In some cases it is useful to add a group of files to the image and be
able to access them at run-time. Of course it is possible to generate
the binman config file with a set of blobs each with a filename. But for
convenience, add an entry type which can do this.

Add required support (for adding nodes and string properties) into the
state module.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Allow zero-size sections
Simon Glass [Fri, 14 Sep 2018 10:57:27 +0000 (04:57 -0600)]
binman: Allow zero-size sections

At present if there is only a zero-size entry in a section this is
reported as an error, e.g.:

   Offset 0x0 (0) is outside the section starting at 0x0 (0)

Adjust the logic in CheckEntries() to avoid this.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agobinman: Support compressed entries
Simon Glass [Fri, 14 Sep 2018 10:57:26 +0000 (04:57 -0600)]
binman: Support compressed entries

Add support for compressing blob entries. This can help reduce image sizes
for many types of data. It requires that the firmware be able to
decompress the data at run-time.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Sat, 29 Sep 2018 15:48:02 +0000 (11:48 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

6 years agoMerge tag 'mpc85xx-for-v2018.11-rc1' of git://git.denx.de/u-boot-mpc85xx
Tom Rini [Sat, 29 Sep 2018 15:47:50 +0000 (11:47 -0400)]
Merge tag 'mpc85xx-for-v2018.11-rc1' of git://git.denx.de/u-boot-mpc85xx

Use device tree for mpc85xx with binman. Enabled for T2080QDS.

6 years agoMerge tag 'fsl-qoriq-for-v2018.11-rc1' of git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Sat, 29 Sep 2018 15:47:32 +0000 (11:47 -0400)]
Merge tag 'fsl-qoriq-for-v2018.11-rc1' of git://git.denx.de/u-boot-fsl-qoriq

Switch to driver model for eSDHC on Layerscape SoCs including LS1021A,
LS1043A, LS1046A, LS1088A, LS2088A.
Switch to driver model for SATA on LS1021A and LS1043A.
Add support for LS1012AFRWY rev C board.
Enable SMMU for LS1043A.

6 years agoConvert CONFIG_DISABLE_CONSOLE to Kconfig
Christian Gmeiner [Mon, 10 Sep 2018 10:43:16 +0000 (12:43 +0200)]
Convert CONFIG_DISABLE_CONSOLE to Kconfig

This converts the following to Kconfig:
   CONFIG_DISABLE_CONSOLE

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
6 years agoARM: da850evm_direct_nor_defconfig: Enable DM_SERIAL
Adam Ford [Wed, 19 Sep 2018 21:06:49 +0000 (16:06 -0500)]
ARM: da850evm_direct_nor_defconfig: Enable DM_SERIAL

With DM enabled, this patch enables DM_SERIAL and removes
the NS16550 initialization from da850_lowlevel since the driver
will take care of that itself.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoARM: omap3_logic: Remove non-DM MMC initialization
Adam Ford [Wed, 12 Sep 2018 03:15:05 +0000 (22:15 -0500)]
ARM: omap3_logic: Remove non-DM MMC initialization

With DM_MMC working for both SPL and U-Boot, this patch removes
the legacy style of initializing the MMC driver.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoARM: omap3_logic: Remove some manual pin-muxing
Adam Ford [Sun, 9 Sep 2018 21:12:11 +0000 (16:12 -0500)]
ARM: omap3_logic: Remove some manual pin-muxing

With the pinctrl function enabled and the device tree setting up
the pins we want to use, this patch removes the manual pinmuxing
except for that which is not done by the device tree and minimal
pins necessary for SPL (like serial, GPMC, and MMC)

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoARM: am3517_evm: Enable TCA6416PW GPIO Expander
Adam Ford [Sun, 9 Sep 2018 14:21:21 +0000 (09:21 -0500)]
ARM: am3517_evm: Enable TCA6416PW GPIO Expander

With DM_I2C and DM_GPIO working, this patch can enable the
GPIO expander on the I2C bus.  This GPIO expander is connected
to some of the DIP switches and can now read the status of these
pins.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoARM: da850evm: Pinctrl for da850evm
Adam Ford [Sun, 9 Sep 2018 13:50:40 +0000 (08:50 -0500)]
ARM: da850evm: Pinctrl for da850evm

The simple pin controller works for da850, so this patch enables
this to pin-mux the pins defined in the device tree for the da850evm.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoARM: da850evm: Enable CMD_DM for da850evm
Adam Ford [Sun, 9 Sep 2018 13:50:39 +0000 (08:50 -0500)]
ARM: da850evm: Enable CMD_DM for da850evm

With DM enabled, this patch enables the 'dm' command to access
the dm tree, uclass and devres.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoARM: am3517_evm: Enable Pinctrl
Adam Ford [Sun, 9 Sep 2018 12:25:30 +0000 (07:25 -0500)]
ARM: am3517_evm: Enable Pinctrl

The simple pinctrl driver currently available works with the omap3.
Enabling this will use the device tree to automatically set the
pin-muxing for various drivers.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agocmd: Relocate poweroff under Device access commands
Adam Ford [Sun, 9 Sep 2018 12:05:57 +0000 (07:05 -0500)]
cmd: Relocate poweroff under Device access commands

Previously poweroff was located under boot.  It seems to make more
sense to have it located under the Device access commands.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoARM: DTS: various omap3: Remove cd-inverted from u-boot.dtsi
Adam Ford [Sat, 8 Sep 2018 13:16:24 +0000 (08:16 -0500)]
ARM: DTS: various omap3: Remove cd-inverted from u-boot.dtsi

With the omap_mmc driver no longer supporting cd-inverted, this
patch removes all these references since they are not needed.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agommc: omap_mmc: Remove invert references
Adam Ford [Sat, 8 Sep 2018 13:16:23 +0000 (08:16 -0500)]
mmc: omap_mmc: Remove invert references

With DM_GPIO and DM_MMC translating GPIO_ACTIVE_LOW, any boards
using the 'cd-invert' option will no longer need to do this.  This
patch removes the support for 'invert' from the MMC driver.

Signed-off-by: Adam Ford <aford173@gmail.com>
[trini: Fix warning over when !DM_GPIO]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoARM: dts: at91: sama5d4_xplained: add onewire connector for LCD eeprom
Eugen Hristev [Tue, 18 Sep 2018 07:35:57 +0000 (10:35 +0300)]
ARM: dts: at91: sama5d4_xplained: add onewire connector for LCD eeprom

Add onewire node in device tree for TM series LCDs

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoARM: dts: at91: sama5d2_ptc: add onewire connector for LCD eeprom
Eugen Hristev [Tue, 18 Sep 2018 07:35:56 +0000 (10:35 +0300)]
ARM: dts: at91: sama5d2_ptc: add onewire connector for LCD eeprom

Add onewire node in device tree for TM series LCDs

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoARM: dts: at91: sama5d27_som1_ek: add onewire connector for LCD eeprom
Eugen Hristev [Tue, 18 Sep 2018 07:35:55 +0000 (10:35 +0300)]
ARM: dts: at91: sama5d27_som1_ek: add onewire connector for LCD eeprom

Add onewire node in device tree for TM series LCDs

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoARM: dts: at91: sama5d3_xplained: add onewire connector for LCD eeprom
Eugen Hristev [Tue, 18 Sep 2018 07:35:54 +0000 (10:35 +0300)]
ARM: dts: at91: sama5d3_xplained: add onewire connector for LCD eeprom

Add onewire node in device tree for TM series LCDs

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoARM: dts: at91: sama5d2_xplained: add onewire connector for LCD eeprom
Eugen Hristev [Tue, 18 Sep 2018 07:35:53 +0000 (10:35 +0300)]
ARM: dts: at91: sama5d2_xplained: add onewire connector for LCD eeprom

Add onewire node in device tree for TM series LCDs

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoconfigs: sama5d4_xplained: add fdt overlay support
Eugen Hristev [Tue, 18 Sep 2018 07:35:52 +0000 (10:35 +0300)]
configs: sama5d4_xplained: add fdt overlay support

Add commands for fdt overlay merging. This is required for the boot scripts
that detect PDAs and apply specific overlays to the DTB passed on to kernel.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoconfigs: sama5d27_som1_ek: add fdt overlay support
Eugen Hristev [Tue, 18 Sep 2018 07:35:51 +0000 (10:35 +0300)]
configs: sama5d27_som1_ek: add fdt overlay support

Add commands for fdt overlay merging. This is required for the boot scripts
that detect PDAs and apply specific overlays to the DTB passed on to kernel.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoconfigs: sama5d2_ptc_ek: add fdt overlay support
Eugen Hristev [Tue, 18 Sep 2018 07:35:50 +0000 (10:35 +0300)]
configs: sama5d2_ptc_ek: add fdt overlay support

Add commands for fdt overlay merging. This is required for the boot scripts
that detect PDAs and apply specific overlays to the DTB passed on to kernel.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoconfigs: sama5d3_xplained: add fdt overlay support
Eugen Hristev [Tue, 18 Sep 2018 07:35:49 +0000 (10:35 +0300)]
configs: sama5d3_xplained: add fdt overlay support

Add commands for fdt overlay merging. This is required for the boot scripts
that detect PDAs and apply specific overlays to the DTB passed on to kernel.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoconfigs: sama5d2_xplained: add fdt overlay support
Eugen Hristev [Tue, 18 Sep 2018 07:35:48 +0000 (10:35 +0300)]
configs: sama5d2_xplained: add fdt overlay support

Add commands for fdt overlay merging. This is required for the boot scripts
that detect PDAs and apply specific overlays to the DTB passed on to kernel.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoboard: sama5d4_xplained: add pda detect call at init time
Eugen Hristev [Tue, 18 Sep 2018 07:35:47 +0000 (10:35 +0300)]
board: sama5d4_xplained: add pda detect call at init time

Call the PDA detection mechanism at boot time so we can have
the pda environment variable ready for use.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoboard: sama5d2_ptc_ek: add pda detect call at init time
Eugen Hristev [Tue, 18 Sep 2018 07:35:46 +0000 (10:35 +0300)]
board: sama5d2_ptc_ek: add pda detect call at init time

Call the PDA detection mechanism at boot time so we can have
the pda environment variable ready for use.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoboard: sama5d27_som1_ek: add pda detect call at init time
Eugen Hristev [Tue, 18 Sep 2018 07:35:45 +0000 (10:35 +0300)]
board: sama5d27_som1_ek: add pda detect call at init time

Call the PDA detection mechanism at boot time so we can have
the pda environment variable ready for use.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoboard: sama5d3_xplained: add pda detect call at init time
Eugen Hristev [Tue, 18 Sep 2018 07:35:44 +0000 (10:35 +0300)]
board: sama5d3_xplained: add pda detect call at init time

Call the PDA detection mechanism at boot time so we can have
the pda environment variable ready for use.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoboard: sama5d2_xplained: add pda detect call at init time
Eugen Hristev [Tue, 18 Sep 2018 07:35:43 +0000 (10:35 +0300)]
board: sama5d2_xplained: add pda detect call at init time

Call the PDA detection mechanism at boot time so we can have
the pda environment variable ready for use.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoboard: atmel: add support for pda detection
Eugen Hristev [Tue, 18 Sep 2018 07:35:42 +0000 (10:35 +0300)]
board: atmel: add support for pda detection

This adds the support for PDA detection as common code for
Atmel boards.
Using the one wire interface over GPIO , an EEPROM memory is read
and compared to preprogrammed values for PDA screens TM4300, TM7000
and TM7000B.
Once the PDA is detected, an environment variable is set accordingly.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoconfigs: sama5d4_xplained: add onewire and eeprom drivers
Eugen Hristev [Tue, 18 Sep 2018 07:35:41 +0000 (10:35 +0300)]
configs: sama5d4_xplained: add onewire and eeprom drivers

SAMA5D4 SoC can have extra clip boards (PDAs) connected, which have
an EEPROM memory for identification. A special GPIO can be used to read
this memory over 1wire protocol.
Enabling one wire and eeprom drivers for this memory.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>