]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
6 years agoMerge tag 'signed-rpi-next' of git://github.com/agraf/u-boot
Tom Rini [Thu, 24 May 2018 13:54:14 +0000 (09:54 -0400)]
Merge tag 'signed-rpi-next' of git://github.com/agraf/u-boot

Patch queue for rpi - 2018-05-24

Some minor fixes for the Raspberry Pi:

  - Fix SD writes on new sdhost controller
  - Sanitize default load addresses, allowing for better payload placement

6 years agorpi: Change load addresses to make more room for the kernel & DTB
Tuomas Tynkkynen [Fri, 20 Apr 2018 10:03:49 +0000 (13:03 +0300)]
rpi: Change load addresses to make more room for the kernel & DTB

As of Linux 4.16, a multiplatform AArch64 kernel with our distro config
takes 26M. The current space reservation leaves only 17M for the kernel
and if it goes over it, the initrd gets overwritten when loading the
kernel from the filesystem.

A similar problem happens on ARMv7 with the DTBs taken from the
downstream Raspberry Pi foundation kernel. I guess they compile them
with DT overlay support enabled which grows them just enough.

Fix both of these problems by rewriting the memory map, which now allows
kernels to be up to 36M and DTBs up to 1M. Also the comment block was
kind of obsolete ever since the introduction of AArch64 support and the
firmware-loaded DTB doesn't get placed at 0x100 anymore either, so that
is fixed as well.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agospl: Add full fitImage support
Marek Vasut [Sat, 12 May 2018 22:23:17 +0000 (00:23 +0200)]
spl: Add full fitImage support

Add support for loading U-Boot and optionally FDT from a fitImage
in SPL by using the full fitImage support from U-Boot. While we do
have limited SPL loading support in SPL with a small footprint, it
is missing a lot of important features, like checking signatures.
This support has all the fitImage features, while the footprint is
obviously larger.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agopylibfdt: Add missing CC and LD to Makefile
Marek Vasut [Fri, 18 May 2018 07:56:53 +0000 (09:56 +0200)]
pylibfdt: Add missing CC and LD to Makefile

Add missing CC and LDSHARED variables to the Makefile to pass the
correct C compiler and linker path to the build of _libfdt.so .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoscripts: add decodecode from Linux
Heinrich Schuchardt [Tue, 15 May 2018 17:42:24 +0000 (19:42 +0200)]
scripts: add decodecode from Linux

The script decodecode can be used to disassemble the 'Code:' line  written
when an exception occurs.

The script is copied from Linux v4.16.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoarm: print instructions pointed to by pc
Heinrich Schuchardt [Tue, 15 May 2018 17:42:23 +0000 (19:42 +0200)]
arm: print instructions pointed to by pc

If an exception occurs in a loaded image and the relocation offset is
unknown, it is helful to know the instructions pointed to by the
program counter. This patch adds the missing output.

A possible output is:
    Code: e1c560d0 e12fff1e e120077b e12fff1e (e7f7defb)

The parentheses indicate the instruction causing the exception.

The output can be disassembled using the decodecode script provided
by the Linux kernel project.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoarm64: timer: Create timer_get_bootus for bootstage support
Michal Simek [Tue, 15 May 2018 14:47:02 +0000 (16:47 +0200)]
arm64: timer: Create timer_get_bootus for bootstage support

Implement timer_get_boot_us() based on available functions to support
bootstage command.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoMakefile: adopt --std=gnu11 for HOSTCFLAGS on Linux
Philipp Tomsich [Mon, 14 May 2018 13:22:06 +0000 (15:22 +0200)]
Makefile: adopt --std=gnu11 for HOSTCFLAGS on Linux

Following the conversion of the SPDX license tags, a number of files
compiled with -pedantic now generate warnings similar to the following
for using C99-style '//' comments in ISO C90 code:

  tools/gen_eth_addr.c:1:1: warning: C++ style comments are not allowed in ISO C90
   // SPDX-License-Identifier: GPL-2.0+
   ^

The SPDX comment-style change means that these files have adopted C99,
so need to change the language-standard to --std=gnu99 or --std=gnu11
to let the compiler know this.

As we now require GCC 6 or newer for the cross-compiler, the project has
implicitly moved the project to GNU11: let older GCC versions on various
Linux distros know to treat our host tools as GNU11 as well.

References: commit 83d290c56fab ("SPDX: Convert all of our single license tags to Linux Kernel style")
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotwister: Let SPL load U-Boot from MMC
Ladislav Michl [Mon, 14 May 2018 07:17:45 +0000 (09:17 +0200)]
twister: Let SPL load U-Boot from MMC

MMC is not initialized in SPL, so it cannot load u-boot.img
preventing boot from MMC.

Also driver specific functions are guarded with generic
configuration options which leads to build failures when device
driver is not enabled in config. Fix that by using driver
specific defines.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Stefano Babic <sbabic@denx.de>
6 years agofit: Add standalone image type handling
Marek Vasut [Sat, 12 May 2018 22:22:54 +0000 (00:22 +0200)]
fit: Add standalone image type handling

Just add IH_TYPE_STANDALONE to fit_get_image_type_property().

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agofit: Add empty fit_print_contents() and fit_image_print()
Marek Vasut [Sat, 12 May 2018 22:22:53 +0000 (00:22 +0200)]
fit: Add empty fit_print_contents() and fit_image_print()

These functions may be needed in SPL, so add empty variants of them
if CONFIG_SPL_FIT_PRINT is disabled.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agofit: Fix CONFIG_FIT_SPL_PRINT
Marek Vasut [Sat, 12 May 2018 22:22:52 +0000 (00:22 +0200)]
fit: Fix CONFIG_FIT_SPL_PRINT

Rename CONFIG_FIT_SPL_PRINT to CONFIG_SPL_FIT_PRINT and add Kconfig
entry for it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agospl: fit: Add support for loading FPGA bitstream
Marek Vasut [Sat, 12 May 2018 20:25:28 +0000 (22:25 +0200)]
spl: fit: Add support for loading FPGA bitstream

Add support for loading FPGA into the SPL fitImage support. The
mechanism is flexible and allows user to override the actual
function for loading the FPGA itself. This is because on some
systems, the FPGA must be programmed to allow DRAM access, so
loading the full fitImage may not be possible if it contains
the bitstream. Instead, the spl_load_fpga_image() provides all
the tools to load the bitstream in parts while programming it
into the FPGA.

Signed-off-by: Marek Vasut <marex@denx.de>
[trini: Don't always have a branch to print out type]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agobootcount: Add bootcount command
Alex Kiernan [Sat, 12 May 2018 05:49:47 +0000 (05:49 +0000)]
bootcount: Add bootcount command

Add a command to manipulate the bootcounter. This is useful if you can
run device recovery from inside U-Boot and need to reset the bootcounter
after executing that process as part of altbootcmd.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
6 years agoconfigs: sama5d2_xplained: fix bootcmd/args for spi+emmc demo
Eugen Hristev [Fri, 11 May 2018 08:14:32 +0000 (11:14 +0300)]
configs: sama5d2_xplained: fix bootcmd/args for spi+emmc demo

For sama5d2_xplained_spiflash_defconfig, we have the demo layout
as presented on this link:
http://www.at91.com/linux4sam/bin/view/Linux4SAM/Sama5d2XplainedMainPage#SPI_eMMC_Flash_demo_Memory_map

on SPI Flash (4 Mbyte) we have Bootstrap (second level bootloader), U-boot + env

and kernel+dtb we keep on eMMC on single partition in /boot directory, formatted
with ext4.

Thus, changing the boot command to reflect this demo for the spiflash config,
and fixing up bootargs. Sama5d2_xplained does not have NAND flash, so the
bootargs were completely wrong.

Fixes: "5abc1a45": common: Move CONFIG_BOOTARGS to Kconfig
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoconfigs: sama5d2_xplained: set default FAT env location to SD-Card
Eugen Hristev [Fri, 11 May 2018 08:14:31 +0000 (11:14 +0300)]
configs: sama5d2_xplained: set default FAT env location to SD-Card

For sama5d2_xplained_mmc_defconfig, we have the following layout for SD-Card:
partition 1: FAT: contains bootstrap binary (second level bootloader),
U-boot, U-boot env, kernel, dtb
partition 2: EXT4: Rootfs.

Add to defconfig CONFIG_ENV_FAT_DEVICE_AND_PART to have environment
by default on SD-Card, to align with our demo layout.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agodoc: expand README.commands
Heinrich Schuchardt [Thu, 10 May 2018 13:57:27 +0000 (15:57 +0200)]
doc: expand README.commands

Describe U_BOOT_CMD_COMPLETE.
Describe the arguments of U_BOOT_CMD and U_BOOT_CMD_COMPLETE.
Describe the arguments of the command function.
Describe the arguments of the completion function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agotest: fs: fs-test: Modified test 1 to do a ls to a nonexistent dir
Eugen Hristev [Wed, 9 May 2018 13:28:38 +0000 (16:28 +0300)]
test: fs: fs-test: Modified test 1 to do a ls to a nonexistent dir

Added a simple ls to a nonexistent directory for test 1.
In case the driver is broken for a nonexistent directory, U-boot
might crash.

Here is an example failed output:

=> # Test Case 1 - ls
=> ext4ls host 0:0
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<DIR>       4096 SUBDIR
      2621440000 2.5GB.file
         1048576 1MB.file
=> # In addition, test with a nonexistent directory to see if we crash.
=> ext4ls host 0:0 invalid_d
** Can not find directory. **
./test/fs/fs-test.sh: line 161: 25786 Segmentation fault      (core dumped) $UBOOT  <<EOF

Subsequent tests will fail if U-boot crashes.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agofs: ext4: fix crash on ext4ls
Eugen Hristev [Wed, 9 May 2018 13:28:37 +0000 (16:28 +0300)]
fs: ext4: fix crash on ext4ls

Found a crash while issuing ext4ls with a non-existent directory.
Crash test:

=> ext4ls mmc 0 1
** Can not find directory. **
data abort
pc : [<3fd7c2ec>]          lr : [<3fd93ed8>]
reloc pc : [<26f142ec>]    lr : [<26f2bed8>]
sp : 3f963338  ip : 3fdc3dc4     fp : 3fd6b370
r10: 00000004  r9 : 3f967ec0     r8 : 3f96db68
r7 : 3fdc99b4  r6 : 00000000     r5 : 3f96dc88  r4 : 3fdcbc8c
r3 : fffffffa  r2 : 00000000     r1 : 3f96e0bc  r0 : 00000002
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

resetting ...

Tested on SAMA5D2_Xplained board (sama5d2_xplained_mmc_defconfig)

Looks like crash is introduced by commit:
"fa9ca8a" fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls

Issue is that dirnode is not initialized, and then freed if the call
to ext4_ls fails. ext4_ls will not change the value of dirnode in this case
thus we have a crash with data abort.

I added initialization and a check for dirname being NULL.

Fixes: "fa9ca8a" fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls
Cc: Stefan BrĂ¼ns <stefan.bruens@rwth-aachen.de>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoi2c: Drop CONFIG_SH_SH7734_I2C
Tuomas Tynkkynen [Wed, 9 May 2018 12:24:35 +0000 (15:24 +0300)]
i2c: Drop CONFIG_SH_SH7734_I2C

Last user of this driver went away in May 2017 in commit
eb5ba3aefdf0f6c ("i2c: Drop use of CONFIG_I2C_HARD").

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Acked-by: Heiko Schocher <hs@denx.de>
6 years agoi2c: Drop CONFIG_TSI108_I2C
Tuomas Tynkkynen [Wed, 9 May 2018 12:24:34 +0000 (15:24 +0300)]
i2c: Drop CONFIG_TSI108_I2C

Last user of this driver went away in June 2015 in commit
d928664f4101e24 ("powerpc: 74xx_7xx: remove 74xx_7xx cpu support")

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Acked-by: Heiko Schocher <hs@denx.de>
6 years agonet: Drop CONFIG_TSI108_ETH
Tuomas Tynkkynen [Wed, 9 May 2018 12:24:33 +0000 (15:24 +0300)]
net: Drop CONFIG_TSI108_ETH

Last user of this driver went away in June 2015 in commit
d928664f4101e24 ("powerpc: 74xx_7xx: remove 74xx_7xx cpu support")

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agoconfigs: sama5d2_xplained: enable ext4 command support
Eugen Hristev [Wed, 9 May 2018 10:08:01 +0000 (13:08 +0300)]
configs: sama5d2_xplained: enable ext4 command support

To support loading the zImage + DTB from the rootfs ext4 partitions,
enable the ext4 command support.

Based on original work by Wenyou Yang

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoclk: at91: clk-h32mx: replace dm_warn with dev_dbg
Eugen Hristev [Wed, 9 May 2018 07:58:30 +0000 (10:58 +0300)]
clk: at91: clk-h32mx: replace dm_warn with dev_dbg

dm_warn is too noisy, replace with dev_dbg for less noise.

Based on original work by Wenyou Yang

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoconfigs: at91sam9x5ek: updated mtdparts variable in bootargs
Eugen Hristev [Wed, 9 May 2018 07:30:26 +0000 (10:30 +0300)]
configs: at91sam9x5ek: updated mtdparts variable in bootargs

We have a new demo layout of our sama5 boards for the NAND Flash
memory.
According to this new layout, adjust the mtdparts variable in bootargs
to align with this, which is available at :
http://www.at91.com/linux4sam/bin/view/Linux4SAM/Sama5d3XplainedMainPage#NAND_Flash_demo_Memory_map,

Based on original work by Wenyou Yang

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoconfigs: at91: Adjust CONFIG_ENV_OFFSET to match sama5 address
Nicolas Ferre [Wed, 9 May 2018 07:30:25 +0000 (10:30 +0300)]
configs: at91: Adjust CONFIG_ENV_OFFSET to match sama5 address

In order to have a single ENV_OFFSET to manage, use the same as the sama5 one.
This address matches our NAND flash map available at:
http://www.at91.com/linux4sam/bin/view/Linux4SAM/Sama5d3XplainedMainPage#NAND_Flash_demo_Memory_map

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
[eugen.hristev@microchip.com: rework on latest version of u-boot]
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoconfigs: at91: sama5_common: Adjust CONFIG_ENV_OFFSET to match block alignment
Nicolas Ferre [Wed, 9 May 2018 07:30:24 +0000 (10:30 +0300)]
configs: at91: sama5_common: Adjust CONFIG_ENV_OFFSET to match block alignment

Fix the unaligned environment address.
This address matches our NAND flash map available at:
http://www.at91.com/linux4sam/bin/view/Linux4SAM/Sama5d3XplainedMainPage#NAND_Flash_demo_Memory_map

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
[eugen.hristev@microchip.com: rework on latest version of u-boot]
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
6 years agoFIT: Make fit_conf_print() be a static function
Tom Rini [Tue, 8 May 2018 18:34:05 +0000 (14:34 -0400)]
FIT: Make fit_conf_print() be a static function

We only call fit_conf_print from one place in the code, so mark it as
static and move it up to where we call it.  This in turn has us move a
few other already static functions up further as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoLicenses/README: Update some style and add explicit license to the document
Tom Rini [Tue, 8 May 2018 15:34:36 +0000 (11:34 -0400)]
Licenses/README: Update some style and add explicit license to the document

- Add an SPDX license tag to the file, saying it's GPL-2.0.
- From the Linux Kernel v4.17-rc4, import the "License identifier
  syntax" section as-is from Documentation/process/license-rules.rst
  and then change it to be clearer about examples from the Linux Kernel
  vs examples found in U-Boot, and when we're talking about U-Boot.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoConvert CONFIG_SUPPORT_EMMC_RPMB to Kconfig
Alex Kiernan [Tue, 8 May 2018 04:43:31 +0000 (04:43 +0000)]
Convert CONFIG_SUPPORT_EMMC_RPMB to Kconfig

Convert CONFIG_SUPPORT_EMMC_RPMB to Kconfig. Split the command handling
from the underlying support and expose this through CMD_MMC_RPMB.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agommc: Unirqify bcm2835_sdhost and fix writes
Alexander Graf [Wed, 23 May 2018 20:24:51 +0000 (22:24 +0200)]
mmc: Unirqify bcm2835_sdhost and fix writes

The bcm2835 sdhost driver has a problem with "write multiple" commands.
It seems to boil down to the fact that the controller dislikes its FIFO
to get drained at the end of a block when a write multiple blocks command
is in flight.

The easy fix is to simply get rid of all the IRQ driven logic and make
the driver push as much data into the FIFO as it can. That way we never
drain and we never run into the problem.

Reported-by: Jan Leonhardt <jan@cyberdesigner.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agorpi: Adjust fdt_addr_r to a sane address
Alexander Graf [Fri, 13 Apr 2018 15:37:34 +0000 (17:37 +0200)]
rpi: Adjust fdt_addr_r to a sane address

Back in the old days, 0x100 was used as the address to pass the device tree
from firmware into the kernel. This has since changed to a more dynamic
location, so using 0x100 actually breaks more things than it helps with.

Let's move the device tree default location for distro boot to a more sane
place that gives us enough head room in low memory.

Reported-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoarm: armv7m: Clean up some thumb / compiler flag options
Tom Rini [Tue, 8 May 2018 00:46:52 +0000 (20:46 -0400)]
arm: armv7m: Clean up some thumb / compiler flag options

- The correct way to build with thumb mode is to select SYS_THUMB_BUILD
- We should be setting -march=armv7-m in arch/arm/Makefile not the
  sub-config.mk file.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years ago.travis.yml: Further optimizations
Tom Rini [Thu, 10 May 2018 11:15:54 +0000 (07:15 -0400)]
.travis.yml: Further optimizations

- Xilinx aarch64 is caught in the general xilinx arm job, exclude from
  the general aarch64 job.
- Give the generic aarch64 job a better name
- Re-sort the PowerPC jobs so that we can complete them a bit quicker.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agobuildman: support newer gcc versions from kernel.org
Daniel Schwierzeck [Thu, 10 May 2018 11:15:53 +0000 (07:15 -0400)]
buildman: support newer gcc versions from kernel.org

Add support for gcc versions 7.3.0, 6.4.0 and 4.9.4.

Also use a regex for matching the tarball names. Some gcc versions
use '-ARCH-' instead of '_ARCH-'.

As part of this, we switch TravisCI to also using these toolchains for
all platforms.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoat91: Minor tweaks to SPL logic for space savings on smartweb
Tom Rini [Thu, 10 May 2018 11:15:52 +0000 (07:15 -0400)]
at91: Minor tweaks to SPL logic for space savings on smartweb

- spl_board_init is empty on smartweb so drop that function
- When CONFIG_AT91SAM9_WATCHDOG is set we do not disable the watchdog in
  SPL and instead let full U-Boot handle it.  Instead of an empty
  function just do not call a function.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Tue, 22 May 2018 17:53:26 +0000 (13:53 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

6 years agoARM: dts: uniphier: sync with Linux 4.17-rc6
Masahiro Yamada [Tue, 22 May 2018 15:30:54 +0000 (00:30 +0900)]
ARM: dts: uniphier: sync with Linux 4.17-rc6

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: uniphier: rename environment variable fdt_file to fdtfile
Masahiro Yamada [Thu, 17 May 2018 10:55:20 +0000 (19:55 +0900)]
ARM: uniphier: rename environment variable fdt_file to fdtfile

For booting Linux in the generic distro mechanism, cmd/pxe.c
retrieves the FDT file name from "fdtfile" environment variable.

Rename "fdt_file" to "fdtfile" for easier migration to distro boot.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: dts: uniphier: change phy-mode to 'internal' for LD11
Kunihiko Hayashi [Fri, 11 May 2018 09:49:17 +0000 (18:49 +0900)]
ARM: dts: uniphier: change phy-mode to 'internal' for LD11

Change the phy-mode property to 'internal' that means to use a built-in PHY
implemented on LD11 SoC.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: dts: uniphier: add clock-names and reset-names to ethernet node
Kunihiko Hayashi [Fri, 11 May 2018 09:49:16 +0000 (18:49 +0900)]
ARM: dts: uniphier: add clock-names and reset-names to ethernet node

Add clock-names and reset-names because this node recognizes multiple
clocks and resets.  ("ether", and so on, for each)

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: dts: uniphier: add required clocks and resets to Pro4 ethernet node
Kunihiko Hayashi [Fri, 11 May 2018 09:49:15 +0000 (18:49 +0900)]
ARM: dts: uniphier: add required clocks and resets to Pro4 ethernet node

The GIO clock/reset, another MAC clock, and the PHY clock are required
for the ethernet of Pro4 SoC.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: dts: uniphier: add syscon-phy-mode property to each ethernet node
Kunihiko Hayashi [Fri, 11 May 2018 09:49:14 +0000 (18:49 +0900)]
ARM: dts: uniphier: add syscon-phy-mode property to each ethernet node

Add syscon-phy-mode property specifying a phandle of system controller
to each ethernet node.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoSPDX: Fixup SPDX tags in a few new files
Tom Rini [Sun, 20 May 2018 13:47:45 +0000 (09:47 -0400)]
SPDX: Fixup SPDX tags in a few new files

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Sun, 20 May 2018 13:44:38 +0000 (09:44 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

6 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Sun, 20 May 2018 13:44:13 +0000 (09:44 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

6 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Sun, 20 May 2018 13:44:05 +0000 (09:44 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

6 years agoARM: rmobile: Unify Gen2 Makefile entry
Marek Vasut [Wed, 2 May 2018 10:09:23 +0000 (12:09 +0200)]
ARM: rmobile: Unify Gen2 Makefile entry

Drop per-SoC Makefile entries and replace them with one unified entry
now that the PFC tables are gone. Shuffle the Makefile around a bit
to make it more organized.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Drop old R8A7794 PFC tables
Marek Vasut [Wed, 2 May 2018 10:07:45 +0000 (12:07 +0200)]
ARM: rmobile: Drop old R8A7794 PFC tables

All the boards use new modern PFC framework, the old PFC tables
are no longer used, so remove them.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Drop old R8A7793 PFC tables
Marek Vasut [Wed, 2 May 2018 10:07:18 +0000 (12:07 +0200)]
ARM: rmobile: Drop old R8A7793 PFC tables

All the boards use new modern PFC framework, the old PFC tables
are no longer used, so remove them.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Drop old R8A7792 PFC tables
Marek Vasut [Wed, 2 May 2018 10:06:48 +0000 (12:06 +0200)]
ARM: rmobile: Drop old R8A7792 PFC tables

All the boards use new modern PFC framework, the old PFC tables
are no longer used, so remove them.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Drop old R8A7791 PFC tables
Marek Vasut [Wed, 2 May 2018 10:06:08 +0000 (12:06 +0200)]
ARM: rmobile: Drop old R8A7791 PFC tables

All the boards use new modern PFC framework, the old PFC tables
are no longer used, so remove them.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Drop old R8A7790 PFC tables
Marek Vasut [Wed, 2 May 2018 10:05:08 +0000 (12:05 +0200)]
ARM: rmobile: Drop old R8A7790 PFC tables

All the boards use new modern PFC framework, the old PFC tables
are no longer used, so remove them.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Update V2H Blanche
Marek Vasut [Mon, 30 Apr 2018 12:10:36 +0000 (14:10 +0200)]
ARM: rmobile: Update V2H Blanche

The V2H Blanche port was broken since some time. This patch updates
the V2H Blanche port to use modern frameworks, DM, DT probing, SPL
for the preloading and puts it on par with the M2 Porter board.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Enable DM capable RCar I2C driver on Silk
Marek Vasut [Tue, 1 May 2018 06:57:25 +0000 (08:57 +0200)]
ARM: rmobile: Enable DM capable RCar I2C driver on Silk

Enable the DM capable driver instead of the legacy one.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Enable DM capable RCar I2C driver on Lager
Marek Vasut [Tue, 1 May 2018 06:57:20 +0000 (08:57 +0200)]
ARM: rmobile: Enable DM capable RCar I2C driver on Lager

Enable the DM capable driver instead of the legacy one.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoi2c: rcar_i2c: Add DM and DT capable I2C driver
Marek Vasut [Sat, 21 Apr 2018 16:57:28 +0000 (18:57 +0200)]
i2c: rcar_i2c: Add DM and DT capable I2C driver

Add derivative of the rcar_i2c driver which is capable of
probing itself from DM and uses DT.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoi2c: rcar_i2c: Remove the driver
Marek Vasut [Sat, 21 Apr 2018 16:54:27 +0000 (18:54 +0200)]
i2c: rcar_i2c: Remove the driver

Remove the rcar_i2c driver, since it's no longer used by any
board and will be superseded by a DM and DT capable variant.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoFixup various SPDX tags from the latest merge
Tom Rini [Fri, 18 May 2018 21:54:39 +0000 (17:54 -0400)]
Fixup various SPDX tags from the latest merge

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agodrivers: usb: dwc3: remove devm_zalloc from linux_compact
Mugunthan V N [Fri, 18 May 2018 11:10:27 +0000 (13:10 +0200)]
drivers: usb: dwc3: remove devm_zalloc from linux_compact

devm_zalloc() is already defined in dm/device.h header, so
devm_zalloc can be removed from linux_compact.h beader file.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agousb: xhci: zynqmp: Remove support for !DM_USB
Michal Simek [Fri, 18 May 2018 11:15:09 +0000 (13:15 +0200)]
usb: xhci: zynqmp: Remove support for !DM_USB

Switch to DM_USB was done and there is no need to keep !DM_USB code in
tree.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoarm64: zynqmp: Use DWC3 generic driver and DM_USB
Michal Simek [Fri, 18 May 2018 11:15:08 +0000 (13:15 +0200)]
arm64: zynqmp: Use DWC3 generic driver and DM_USB

Remove harcoded XHCI lists and detect mode, speed based on DT.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Serial-changes: 2
- Remove also XHCI macros from hardware.h
- Remove additional new line in zcu106

6 years agousb: xhci: zynqmp: Add support for DM_USB
Michal Simek [Fri, 18 May 2018 11:15:07 +0000 (13:15 +0200)]
usb: xhci: zynqmp: Add support for DM_USB

The patch is adding support for DM_USB for xhci driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agousb: dwc3: Add generic DWC3 glue logic driver
Michal Simek [Fri, 18 May 2018 11:15:06 +0000 (13:15 +0200)]
usb: dwc3: Add generic DWC3 glue logic driver

By enabling BLK by default this is the next driver which needs to get
support for DM_USB. Adding generic DWC3 glue logic which only
parse nodes and read device mode. Based on it probe proper
host/peripheral DWC3 drivers for it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agousb: common: add support to get maximum speed from dt
Mugunthan V N [Fri, 18 May 2018 11:15:05 +0000 (13:15 +0200)]
usb: common: add support to get maximum speed from dt

Add support to get maximum speed from dt so that usb drivers
makes use of it for DT parsing.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
(rebase and fix errors)
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agousb: dwc3: Add dwc3_init/remove with DM_USB
Mugunthan V N [Fri, 18 May 2018 11:15:04 +0000 (13:15 +0200)]
usb: dwc3: Add dwc3_init/remove with DM_USB

The patch is preparing dwc3 core for enabling DM_USB with peripheral
driver with using driver model support.
The driver will be bound by the DWC3 wrapper driver based on the
dr_mode device tree entry.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
(Remove dwc3-omap changes)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agophy: add support for STM32 usb phy controller
Patrice Chotard [Fri, 27 Apr 2018 09:01:55 +0000 (11:01 +0200)]
phy: add support for STM32 usb phy controller

This patch adds phy tranceiver driver for STM32 USB PHY
Controller (usbphyc) that provides dual port High-Speed
phy for OTG (single port) and EHCI/OHCI host controller
(two ports).
One port of the phy is shared between the two USB controllers
through a UTMI+ switch.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agogadget: f_thor: update to support more than 4GB file as thor 5.0
Seung-Woo Kim [Thu, 10 May 2018 01:52:15 +0000 (10:52 +0900)]
gadget: f_thor: update to support more than 4GB file as thor 5.0

During file download, it only uses 32bit variable for file size and
it limits maximum file size less than 4GB. Update to support more
than 4GB file with using two 32bit variables for file size as thor
protocol 5.0.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agogadget: f_thor: fix filename overflow
Seung-Woo Kim [Thu, 10 May 2018 01:52:14 +0000 (10:52 +0900)]
gadget: f_thor: fix filename overflow

The thor sender can send filename without null character and it is
used without consideration of overflow. Actually, character array
for filename is assigned with DEFINE_CACHE_ALIGN_BUFFER() and it
is bigger than size of memcpy, so there was no real overflow.
Fix filename overflow for code level integrity.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoMerge git://git.denx.de/u-boot-imx
Tom Rini [Fri, 18 May 2018 11:11:11 +0000 (07:11 -0400)]
Merge git://git.denx.de/u-boot-imx

6 years agoarm: dts: socfpga: stratix10: update dtsi and dts
Ley Foon Tan [Fri, 18 May 2018 14:05:35 +0000 (22:05 +0800)]
arm: dts: socfpga: stratix10: update dtsi and dts

Update dtsi and dts files for resets, phy node and other properties.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
6 years agoarm: socfpga: misc: Add CONFIG_SYS_L2_PL310 switch
Ley Foon Tan [Fri, 18 May 2018 14:05:25 +0000 (22:05 +0800)]
arm: socfpga: misc: Add CONFIG_SYS_L2_PL310 switch

Preparation for Stratix 10 enablement. In ARM64, L2 cache controller is
accessed through processor registers. So, add CONFIG_SYS_L2_PL310 switch
conditional build in order this file can by shared across other SOCFPGAs.

Signed-off-by: Chin Liang See <chin.liang.see@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
6 years agoarm: socfpga: stratix10: Add pinmux support for Stratix10 SoC
Ley Foon Tan [Fri, 18 May 2018 14:05:24 +0000 (22:05 +0800)]
arm: socfpga: stratix10: Add pinmux support for Stratix10 SoC

Add pinmux driver support for Stratix SoC

Signed-off-by: Chin Liang See <chin.liang.see@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
6 years agoarm: socfpga: stratix10: Add reset manager driver for Stratix10 SoC
Ley Foon Tan [Fri, 18 May 2018 14:05:23 +0000 (22:05 +0800)]
arm: socfpga: stratix10: Add reset manager driver for Stratix10 SoC

Add Reset Manager driver support for Stratix SoC

Signed-off-by: Chin Liang See <chin.liang.see@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
6 years agoarm: socfpga: stratix10: Add clock manager driver for Stratix10 SoC
Ley Foon Tan [Fri, 18 May 2018 14:05:22 +0000 (22:05 +0800)]
arm: socfpga: stratix10: Add clock manager driver for Stratix10 SoC

Add Clock Manager driver support for Stratix SoC

Signed-off-by: Chin Liang See <chin.liang.see@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
6 years agoarm: socfpga: stratix10: Add watchdog and firewall base addresses
Ley Foon Tan [Fri, 18 May 2018 14:05:21 +0000 (22:05 +0800)]
arm: socfpga: stratix10: Add watchdog and firewall base addresses

Add the base address for watchdog and firewall.

Signed-off-by: Chin Liang See <chin.liang.see@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
6 years agoARM: socfpga: Fix Documentation errors in scu_registers
Ben Kalo [Tue, 15 May 2018 16:45:37 +0000 (19:45 +0300)]
ARM: socfpga: Fix Documentation errors in scu_registers

According to ARM Cortex-A9 MPCore TRM section 2.2 - SCU registers
Access Control register offset is 0x50.

Signed-off-by: Ben Kalo <ben.h.kalo@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
6 years agoARM: socfpga: Adding SoCFPGA info for both SPL and U-Boot
Tien Fong Chee [Tue, 5 Dec 2017 07:58:08 +0000 (15:58 +0800)]
ARM: socfpga: Adding SoCFPGA info for both SPL and U-Boot

SoC FPGA info is required in both SPL and U-Boot.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
6 years agoARM: socfpga: Adding clock frequency info for U-Boot
Tien Fong Chee [Tue, 5 Dec 2017 07:58:07 +0000 (15:58 +0800)]
ARM: socfpga: Adding clock frequency info for U-Boot

Clock frequency info is required in U-Boot because info would be erased
when transition from SPL to U-Boot.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
6 years agoARM: socfpga: Enable SPL memory allocation
Tien Fong Chee [Tue, 5 Dec 2017 07:58:04 +0000 (15:58 +0800)]
ARM: socfpga: Enable SPL memory allocation

Enable memory allocation in SPL for preparation to enable FAT
in SPL. Memory allocation is needed by FAT to work properly.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Dinh Nguyen <dinguyen@kernel.org>
6 years agoconfigs: Add DDR Kconfig support for Arria 10
Tien Fong Chee [Tue, 5 Dec 2017 07:58:03 +0000 (15:58 +0800)]
configs: Add DDR Kconfig support for Arria 10

This patch enables DDR Kconfig support for Arria 10.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Dinh Nguyen <dinguyen@kernel.org>
6 years agoARM: socfpga: Add DDR driver for Arria 10
Tien Fong Chee [Tue, 5 Dec 2017 07:58:02 +0000 (15:58 +0800)]
ARM: socfpga: Add DDR driver for Arria 10

Add DDR driver support for Arria 10.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
6 years agoARM: socfpga: Add DRAM bank size initialization function
Tien Fong Chee [Tue, 5 Dec 2017 07:58:01 +0000 (15:58 +0800)]
ARM: socfpga: Add DRAM bank size initialization function

Add function for both multiple DRAM bank and single DRAM bank size
initialization. This common functionality could be used by every single
SOCFPGA board.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Tested-by: Ley Foon Tan <ley.foon.tan@intel.com>
6 years agoARM: socfpga: Rename the gen5 sdram driver to more specific name
Tien Fong Chee [Tue, 5 Dec 2017 07:58:00 +0000 (15:58 +0800)]
ARM: socfpga: Rename the gen5 sdram driver to more specific name

Current sdram driver is only applied to gen5 device, hence it is better
to rename sdram driver to more specific name which is related to gen5
device.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
6 years agoARM: socfpga: Repair A10 EMAC reset handling
Marek Vasut [Mon, 23 Apr 2018 20:49:31 +0000 (22:49 +0200)]
ARM: socfpga: Repair A10 EMAC reset handling

The EMAC reset and PHY mode configuration was never working on the
Arria10 SoC, fix this. This patch pulls out the common code into
misc.c and passes the SoC-specific function call in as a function
pointer.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
6 years agoARM: socfpga: Synchronize Arria10 SoCDK SDMMC handoff
Marek Vasut [Sat, 12 May 2018 10:00:47 +0000 (12:00 +0200)]
ARM: socfpga: Synchronize Arria10 SoCDK SDMMC handoff

Regenerate Altera Arria 10 SoCDK SDMMC handoff file using latest
Quartus to get the new set of clock bindings in.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
6 years agoARM: socfpga: Synchronize Arria10 DTs
Marek Vasut [Sun, 22 Apr 2018 23:37:57 +0000 (01:37 +0200)]
ARM: socfpga: Synchronize Arria10 DTs

Synchronize Altera Arria 10 DT sources with Linux 4.16.3 as of commit
ef8216d28a5920022cddcb694d2d75bd1f0035ca

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
6 years agoARM: socfpga: Sort the DT Makefile
Marek Vasut [Mon, 7 May 2018 20:29:17 +0000 (22:29 +0200)]
ARM: socfpga: Sort the DT Makefile

Sort the Makefile entries, no functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
6 years agoARM: socfpga: Sync A10 clock manager binding parser
Marek Vasut [Fri, 11 May 2018 22:09:21 +0000 (00:09 +0200)]
ARM: socfpga: Sync A10 clock manager binding parser

The A10 clock manager parsed DT bindings generated by Quartus the
bsp-editor to configure the A10 clocks. Sadly, those DT bindings
changed at some point. The clock manager patch used the old ones,
this patch replaces the bindings parser with one for the new set.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
6 years agoARM: socfpga: Convert to DM serial
Marek Vasut [Fri, 11 May 2018 20:26:35 +0000 (22:26 +0200)]
ARM: socfpga: Convert to DM serial

Pull the serial port configuration from DT and use DM serial instead
of having the serial configuration in two places, DT and board config.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
6 years agoARM: socfpga: Clean up Kconfig entries
Marek Vasut [Fri, 11 May 2018 20:25:59 +0000 (22:25 +0200)]
ARM: socfpga: Clean up Kconfig entries

Shuffle the default Kconfig entries around so it is not such a mess.
No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
6 years agoARM: socfpga: Zap CONFIG_SOCFPGA_VIRTUAL_TARGET
Marek Vasut [Sun, 22 Apr 2018 23:26:10 +0000 (01:26 +0200)]
ARM: socfpga: Zap CONFIG_SOCFPGA_VIRTUAL_TARGET

This was never used, is not used anywhere and is just in the way
by adding annoying ifdeffery. Get rid of it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
6 years agoARM: socfpga: Put stack at the end of SRAM
Marek Vasut [Thu, 26 Apr 2018 20:23:05 +0000 (22:23 +0200)]
ARM: socfpga: Put stack at the end of SRAM

The global data are in the .data section, so there's no point in
reserving any space for it above stack. Put stack at the end of
SRAM.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
6 years agofdt: Add another Altera Arria10 clock init compatible
Marek Vasut [Sat, 12 May 2018 09:56:10 +0000 (11:56 +0200)]
fdt: Add another Altera Arria10 clock init compatible

The DT bindings for the Arria10 clock init have changed, add another
compatible to make them work with U-Boot until a proper clock driver
gets written.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
6 years agoarm: imx53: Add support for imx53 boards from K+P
Lukasz Majewski [Thu, 26 Apr 2018 13:07:18 +0000 (15:07 +0200)]
arm: imx53: Add support for imx53 boards from K+P

This commit adds support for DDC and HSC boards from
K+P in u-boot.

Console output:

U-Boot 2018.05-rc2-00090-g752b7ed6f9 (Apr 26 2018 - 14:24:24 +0200)

CPU:   Freescale i.MX53 rev2.1 at 800 MHz
Reset cause: WDOG
Model: K+P iMX53
DRAM:  512 MiB
MMC:   FSL_SDHC: 0
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
Module EEPROM:
  ID: TQMa53-CB.0401
  SN: 63152762
  MAC: 00:0b:64:03:14:2a
BBoard:40x0 Rev:10
Net:   eth0: ethernet@63fec000
Hit any key to stop autoboot:  0

Signed-off-by: Lukasz Majewski <lukma@denx.de>
6 years agosandbox: tests: Add tests for mc34708 PMIC device
Lukasz Majewski [Tue, 15 May 2018 14:26:43 +0000 (16:26 +0200)]
sandbox: tests: Add tests for mc34708 PMIC device

Following tests has been added for mc34708 device:

- get_test for mc34708 PMIC
- Check if proper number of registers is read
- Check if default (emulated via i2c device) value is properly read
- Check if value write/read operation is correct
- Perform tests to check if pmic_clrsetbits() is working correctly

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agosandbox: tests: Exclude common test code (pmic_get) in test/dm/pmic.c
Lukasz Majewski [Tue, 15 May 2018 14:26:42 +0000 (16:26 +0200)]
sandbox: tests: Exclude common test code (pmic_get) in test/dm/pmic.c

The common code can be excluded to be reused by tests for other PMIC.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agosandbox: Enable MC34708 PMIC support
Lukasz Majewski [Tue, 15 May 2018 14:26:41 +0000 (16:26 +0200)]
sandbox: Enable MC34708 PMIC support

This MC34708 PMIC is somewhat special - it used single transfers (R/W) with
3 bytes size - up till now U-Boot's PMICs only used 1 byte.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agosandbox: Enable support for MC34708 PMIC in DTS
Lukasz Majewski [Tue, 15 May 2018 14:26:40 +0000 (16:26 +0200)]
sandbox: Enable support for MC34708 PMIC in DTS

This commit also provides the default values of the emulated MC34708 PMIC
internal registers content.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agosandbox: Rewrite i2c_pmic_emul.c to support PMIC with 3 bytes transmission
Lukasz Majewski [Tue, 15 May 2018 14:26:39 +0000 (16:26 +0200)]
sandbox: Rewrite i2c_pmic_emul.c to support PMIC with 3 bytes transmission

This change enables support for MC34708 PMIC in sandbox. Now we can
emulate the I2C transfers larger than 1 byte.

Notable changes for this driver:

- From now on the register number is not equal to index in the buffer,
  which emulates the PMIC registers

- The PMIC register's pool is now dynamically allocated up till
  64 regs * 3 bytes each = 192 B

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>