]> git.sur5r.net Git - u-boot/log
u-boot
6 years agoarm64: zynqmp: Enable mac address randomization for zc1751 dc5
Michal Simek [Wed, 28 Mar 2018 12:30:35 +0000 (14:30 +0200)]
arm64: zynqmp: Enable mac address randomization for zc1751 dc5

There is no memory which stores mac address that's why generate it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Enable ethernet phys for zc1751 dc5
Michal Simek [Wed, 28 Mar 2018 12:17:19 +0000 (14:17 +0200)]
arm64: zynqmp: Enable ethernet phys for zc1751 dc5

Enable ethernet phys for zc1751 dc5.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Enable booting to ATF
Luca Ceresoli [Mon, 12 Mar 2018 16:18:38 +0000 (17:18 +0100)]
arm64: zynqmp: Enable booting to ATF

U-Boot is now able to boot to ARM Trusted Firmware (ATF). The boot
flow is SPL(EL3) loads ATF and full u-boot and jump to ATF(EL3) which
pass control to full u-boot(EL2). This has been tested on zcu106, so
enable it in this defconfig.

To generate an image that triggers this booting flow, you need to pass
'-O arm-trusted-firmware' to mkimage.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Enable pxe and dhcp if commands are enabled
Michal Simek [Wed, 28 Mar 2018 13:20:48 +0000 (15:20 +0200)]
arm64: zynqmp: Enable pxe and dhcp if commands are enabled

Targets without net can't use pxe or dhcp boot methods.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agonet: phy: xilinx_phy: Read phytype using property xlnx,phy-type
Siva Durga Prasad Paladugu [Fri, 12 Jan 2018 07:14:54 +0000 (12:44 +0530)]
net: phy: xilinx_phy: Read phytype using property xlnx,phy-type

This patch reads phytype from property "xlnx,phy-type" instead
od simply looking for "phy-type". This is to be inline with
Linux and also fixes the issue of detecting it wrongly in
u-boot.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agoaxi: ethernet: Added support for 64 bit addressing for axi-ethernet
Vipul Kumar [Tue, 23 Jan 2018 09:22:35 +0000 (14:52 +0530)]
axi: ethernet: Added support for 64 bit addressing for axi-ethernet

This patch uses writeq() function to enable greater than 32 bit
addressing of axi-ethernet for the ZynqMP devices.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agonand: arasan_nfc: Fixed NAND write issue
Vipul Kumar [Sat, 10 Mar 2018 12:22:23 +0000 (17:52 +0530)]
nand: arasan_nfc: Fixed NAND write issue

In commit 2453c695185f ("arm64: zynqmp: nand: Fixed NAND erase issue for
size 1GiB or more"), ARASAN_NAND_MEM_ADDR1_PAGE_MASK macro changed
to 0xFFFF and the same macro is used in nand write and so that getting
nand write error.
This patch reverted this macro to the 0xFFFF0000 and used
ARASAN_NAND_MEM_ADDR1_COL_MASK in the nand erase function
which is equal to 0xFFFF.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agofpga: zynq: Add delay after PCFG_PROG_B change
Siva Durga Prasad Paladugu [Tue, 6 Mar 2018 12:07:09 +0000 (17:37 +0530)]
fpga: zynq: Add delay after PCFG_PROG_B change

There is delay needed after PCFG_PROGB change if
AES key source is efuse. This fixes the issue of
encrypted bitstream loading with AES efuse as key
source.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agofpga: zynqmp: Fix the nonsecure bitstream loading issue
Siva Durga Prasad Paladugu [Wed, 14 Mar 2018 18:47:24 +0000 (00:17 +0530)]
fpga: zynqmp: Fix the nonsecure bitstream loading issue

Xilfpga library expects the size of bitstream in a pointer
but currenly we are passing the size as a value. This patch
fixes this issue.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agofpga: zynqmp: Update zynqmp_load() as per latest xilfpga
Siva Durga Prasad Paladugu [Thu, 1 Mar 2018 12:14:47 +0000 (17:44 +0530)]
fpga: zynqmp: Update zynqmp_load() as per latest xilfpga

Latest xilfpga expects to set BIT5 of flags for nonsecure
bitsream and also expects length in bytes instead of words
This patch does the same.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agofpga: zynqmp: Add support to get the PCAP status for fpga info command
Nitin Jain [Fri, 16 Feb 2018 11:59:54 +0000 (17:29 +0530)]
fpga: zynqmp: Add support to get the PCAP status for fpga info command

This patch adds support for ZynqMP platform to print FPGA PCAP status
for "fpga status" command.

Signed-off-by: Nitin Jain <nitinj@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoclk: zynqmp: Add new compatible string for clock driver
Michal Simek [Wed, 21 Feb 2018 12:59:21 +0000 (13:59 +0100)]
clk: zynqmp: Add new compatible string for clock driver

New and old clk drivers are sharing IDs and descriptions.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Use fixed partitions for spi flash for zc770 xm010
Michal Simek [Tue, 27 Mar 2018 11:49:05 +0000 (13:49 +0200)]
arm: zynq: Use fixed partitions for spi flash for zc770 xm010

Sync with mainline.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Fix eeprom dt nodes
Michal Simek [Tue, 27 Mar 2018 11:48:51 +0000 (13:48 +0200)]
arm: zynq: Fix eeprom dt nodes

- Use eeprom for node name
- Use atmel compatible string instead of at.
- Add missing labels

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoARM: dts: zynq: Add generic compatible string for I2C EEPROM
Javier Martinez Canillas [Thu, 15 Jun 2017 18:54:12 +0000 (20:54 +0200)]
ARM: dts: zynq: Add generic compatible string for I2C EEPROM

The at24 driver allows to register I2C EEPROM chips using different vendor
and devices, but the I2C subsystem does not take the vendor into account
when matching using the I2C table since it only has device entries.

But when matching using an OF table, both the vendor and device has to be
taken into account so the driver defines only a set of compatible strings
using the "atmel" vendor as a generic fallback for compatible I2C devices.

So add this generic fallback to the device node compatible string to make
the device to match the driver using the OF device ID table.

Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Use i2c-mux instead of i2cswitch for pca9548
Michal Simek [Tue, 6 Feb 2018 13:00:30 +0000 (14:00 +0100)]
arm: zynq: Use i2c-mux instead of i2cswitch for pca9548

i2c muxes should described like this.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Sync up licenses with mainline kernel
Michal Simek [Tue, 27 Mar 2018 11:43:05 +0000 (13:43 +0200)]
arm: zynq: Sync up licenses with mainline kernel

Use different location for SPDX line. Also update dates for new mainline
DTS files.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Remove 0x prefixes from cc108
Michal Simek [Tue, 27 Mar 2018 12:31:42 +0000 (14:31 +0200)]
arm: zynq: Remove 0x prefixes from cc108

The patch fixing issues reported by DTC:
zynq-cc108.dtb: Warning (unit_address_format): Node
/amba/spi@e000d000/flash@0/partition@0x400000 unit name should not have
leading "0x"
zynq-cc108.dtb: Warning (unit_address_format): Node
/amba/spi@e000d000/flash@0/partition@0x800000 unit name should not have
leading "0x"
zynq-cc108.dtb: Warning (unit_address_format): Node
/amba/spi@e000d000/flash@0/partition@0xc00000 unit name should not have
leading "0x"
zynq-cc108.dtb: Warning (unit_address_format): Node
/amba/spi@e000d000/flash@0/partition@0xd00000 unit name should not have
leading "0x"
zynq-cc108.dtb: Warning (unit_address_format): Node
/amba/spi@e000d000/flash@0/partition@0xf00000 unit name should not have
leading "0x"

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Remove double spaces from dts file
Michal Simek [Tue, 27 Mar 2018 14:21:42 +0000 (16:21 +0200)]
arm64: zynqmp: Remove double spaces from dts file

There is no reason to have double spaces for indentation.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add silabs prefix to u69 for zcu102
Michal Simek [Tue, 27 Mar 2018 10:48:30 +0000 (12:48 +0200)]
arm64: zynqmp: Add silabs prefix to u69 for zcu102

Add vendor prefix to si5341.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Remove number from clock-generator node name
Michal Simek [Tue, 27 Mar 2018 08:39:53 +0000 (10:39 +0200)]
arm64: zynqmp: Remove number from clock-generator node name

There shouldn't be a number appended based on spec.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Remove u-boot commands from dts files
Michal Simek [Tue, 27 Mar 2018 08:47:26 +0000 (10:47 +0200)]
arm64: zynqmp: Remove u-boot commands from dts files

U-Boot commands shouldn't be the part of kernel DTS files.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Update sd properties for dc5
Srinivas Goud [Tue, 22 Aug 2017 09:08:46 +0000 (14:38 +0530)]
arm64: zynqmp: Update sd properties for dc5

This patch adds no-1-8-v below properties to sd node for dc5 board dts.

Signed-off-by: Srinivas Goud <srinivas.goud@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Enable ttcs for zc1751 dc5
Michal Simek [Tue, 27 Mar 2018 14:10:25 +0000 (16:10 +0200)]
arm64: zynqmp: Enable ttcs for zc1751 dc5

Enable TTCs for this target as is done in Linux kernel.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add eeprom reference to eeprom nodes
Michal Simek [Tue, 27 Mar 2018 11:15:17 +0000 (13:15 +0200)]
arm64: zynqmp: Add eeprom reference to eeprom nodes

eeprom can contain information which can be used by nvmem drivers.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Use atmel prefix instead of at
Michal Simek [Tue, 27 Mar 2018 08:54:25 +0000 (10:54 +0200)]
arm64: zynqmp: Use atmel prefix instead of at

This changes was done in mainline and this patch is just following it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Fix spi flash partition definition for zc1751 dc2
Michal Simek [Tue, 27 Mar 2018 11:09:15 +0000 (13:09 +0200)]
arm64: zynqmp: Fix spi flash partition definition for zc1751 dc2

Using different node name and label partitions as data.
Also use latest compatible strings based on mainline review.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Use s/_/-/g in node name for zcu102 rev1.0
Michal Simek [Tue, 27 Mar 2018 10:50:04 +0000 (12:50 +0200)]
arm64: zynqmp: Use s/_/-/g in node name for zcu102 rev1.0

Follow spec for node names.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Use keycode from input/input.h
Michal Simek [Tue, 27 Mar 2018 10:13:13 +0000 (12:13 +0200)]
arm64: zynqmp: Use keycode from input/input.h

Instead of hardcoding numbers.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Remove additional comments from dts files
Michal Simek [Tue, 27 Mar 2018 10:01:24 +0000 (12:01 +0200)]
arm64: zynqmp: Remove additional comments from dts files

Remove additional comments which were removed as the part of upstreaming.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Sync up license with mainline kernel
Michal Simek [Tue, 27 Mar 2018 08:36:39 +0000 (10:36 +0200)]
arm64: zynqmp: Sync up license with mainline kernel

Mainline Linux kernel has adopted SPDX header license in a different
format then was used before. This patch is syncing it up.

Also update years in License text and remove Nathalie's email because it
is no longer valid.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Use i2c-mux instead of i2cswitch instead
Michal Simek [Tue, 27 Mar 2018 08:38:08 +0000 (10:38 +0200)]
arm64: zynqmp: Use i2c-mux instead of i2cswitch instead

Based on review from mainline i2c-mux is standard name for i2c switches.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Use maxim prefix for all maxim chips
Michal Simek [Tue, 27 Mar 2018 08:52:40 +0000 (10:52 +0200)]
arm64: zynqmp: Use maxim prefix for all maxim chips

Use vendor prefix for Maxim chips.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Sync alignment with mainline
Michal Simek [Wed, 17 Jan 2018 15:32:33 +0000 (16:32 +0100)]
arm64: zynqmp: Sync alignment with mainline

Sync pcie and lpd_dma nodes with mainline version.
Incorrect locations are causing diff in statistics that's why
synchronizations are needed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoMAINTAINERS: ZYNQMP: correct entries
Heinrich Schuchardt [Wed, 4 Apr 2018 07:22:03 +0000 (09:22 +0200)]
MAINTAINERS: ZYNQMP: correct entries

Replace references to non-existent file.

Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoMAINTAINERS: Fix zynqmp clock driver path
Michal Simek [Tue, 13 Mar 2018 10:50:22 +0000 (11:50 +0100)]
MAINTAINERS: Fix zynqmp clock driver path

Fix c&p error from Zynq.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Handle ENXIO error return value properly
Michal Simek [Fri, 23 Feb 2018 12:39:37 +0000 (13:39 +0100)]
arm: zynq: Handle ENXIO error return value properly

zynq_clk_get_rate() is also returning ENXIO which is not handled now.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoARM: dts: zynq: Rename dts for Z-turn board
Anton Gerasimov [Sat, 24 Mar 2018 17:32:00 +0000 (18:32 +0100)]
ARM: dts: zynq: Rename dts for Z-turn board

Makes naming in line with other Zynq boards.

Signed-off-by: Anton Gerasimov <tossel@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoARM: dts: zynq: Update dts for Z-turn board
Anton Gerasimov [Sat, 24 Mar 2018 17:31:59 +0000 (18:31 +0100)]
ARM: dts: zynq: Update dts for Z-turn board

Delete devices implemented in PL, stylistic changes.

Signed-off-by: Anton Gerasimov <tossel@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agotreewide: Convert CONFIG_HOSTNAME to a string option
Mario Six [Wed, 28 Mar 2018 12:38:20 +0000 (14:38 +0200)]
treewide: Convert CONFIG_HOSTNAME to a string option

CONFIG_HOSTNAME is defined as a "plain" preprocessor string, but every
use is couched by __stringify(...).

Hence, convert it to a proper string option.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agotreewide: Migrate CONFIG_FSL_ESDHC to Kconfig
Mario Six [Wed, 28 Mar 2018 12:38:19 +0000 (14:38 +0200)]
treewide: Migrate CONFIG_FSL_ESDHC to Kconfig

Migrate the CONFIG_FSL_ESDHC option to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agotreewide: Migrate CONFIG_TSEC_ENET to Kconfig
Mario Six [Wed, 28 Mar 2018 12:38:18 +0000 (14:38 +0200)]
treewide: Migrate CONFIG_TSEC_ENET to Kconfig

Migrate the CONFIG_TSEC_ENET option to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agotreewide: Migrate CONFIG_DISPLAY_BOARDINFO_LATE to Kconfig
Mario Six [Wed, 28 Mar 2018 12:38:17 +0000 (14:38 +0200)]
treewide: Migrate CONFIG_DISPLAY_BOARDINFO_LATE to Kconfig

Migrate the CONFIG_DISPLAY_BOARDINFO_LATE option to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
[trini: Re-run migration]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agotreewide: Migrate CONFIG_LAST_STAGE_INIT to Kconfig
Mario Six [Wed, 28 Mar 2018 12:38:16 +0000 (14:38 +0200)]
treewide: Migrate CONFIG_LAST_STAGE_INIT to Kconfig

Migrate the CONFIG_LAST_STAGE_INIT option to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agotreewide: Migrate CONFIG_BOARD_EARLY_INIT_R to Kconfig
Mario Six [Wed, 28 Mar 2018 12:38:15 +0000 (14:38 +0200)]
treewide: Migrate CONFIG_BOARD_EARLY_INIT_R to Kconfig

Migrate the CONFIG_BOARD_EARLY_INIT_R option to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agotreewide: Migrate CONFIG_SYS_ALT_MEMTEST to Kconfig
Mario Six [Wed, 28 Mar 2018 12:38:14 +0000 (14:38 +0200)]
treewide: Migrate CONFIG_SYS_ALT_MEMTEST to Kconfig

Migrate the CONFIG_SYS_ALT_MEMTEST option to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
[trini: Re-run migration after also including CMD_MEMTEST]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoconfigs: Resync with savedefconfig
Tom Rini [Sun, 8 Apr 2018 00:27:54 +0000 (20:27 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoconfigs: Finish migration of CONFIG_ATMEL_SPI
Tom Rini [Sat, 7 Apr 2018 17:11:01 +0000 (13:11 -0400)]
configs: Finish migration of CONFIG_ATMEL_SPI

With the previous temporary reverts, we need to re-complete the
migration of CONFIG_ATMEL_SPI here now.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoRevert "spi: atmel: Drop non-dm code"
Tom Rini [Sat, 7 Apr 2018 13:15:50 +0000 (09:15 -0400)]
Revert "spi: atmel: Drop non-dm code"

As we aren't quite able to convert some platforms with a very small size
limit in SPL yet, we need to revert this for now.

This reverts commit 7b0947787358c6b277431d6b76ce043d8bec641d.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoRevert "spi: atmel: Drop atmel_spi.h"
Tom Rini [Sat, 7 Apr 2018 13:15:06 +0000 (09:15 -0400)]
Revert "spi: atmel: Drop atmel_spi.h"

As we aren't quite able to convert some platforms with a very small size
limit in SPL yet, we need to revert this for now.

This reverts commit 37434db29be495ef41f204a97b8bf13b1418f97d.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agocmd: Add command for calculating binary operations
Mario Six [Wed, 28 Mar 2018 12:39:18 +0000 (14:39 +0200)]
cmd: Add command for calculating binary operations

This patch adds a command that enables the calculation of bit operations
(AND, OR, XOR) on binary data from the command line. Memory locations as
well as the contents of environment variables are eligible as sources
and destination of the binary data used in the operations.

The possible applications are manifold: Setting specific bits in
registers using the regular read-OR-write pattern, masking out bits in
bit values, implementation of simple OTP encryption using the XOR
operation, etc.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agocmd: ximg: Respect cache line size for flushing
Mario Six [Wed, 28 Mar 2018 12:39:10 +0000 (14:39 +0200)]
cmd: ximg: Respect cache line size for flushing

Make sure that the cache line size if respected when flushing the cache.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agogpio: uclass: Fix debug string
Mario Six [Wed, 28 Mar 2018 12:39:01 +0000 (14:39 +0200)]
gpio: uclass: Fix debug string

A debug string still has the old name of a function being called; update
it.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agowatchdog: Fix Kconfig alignment for WDT_SANDBOX
Michal Simek [Wed, 28 Mar 2018 10:57:54 +0000 (12:57 +0200)]
watchdog: Fix Kconfig alignment for WDT_SANDBOX

Fix Kconfig alignment which should be <tab><space><space>.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoimage: fit: Show information about OS type in firwmare case too
Michal Simek [Mon, 26 Mar 2018 14:31:27 +0000 (16:31 +0200)]
image: fit: Show information about OS type in firwmare case too

SPL ATF implementation requires FIT image with partitions where the one
is Firmware/ATF and another one Firmware/U-Boot. OS field is used for
recording that difference that's why make sense to show values there for
Firmware types.

For example:
 Image 0 (atf)
  Description:  ATF bl31.bin
  Created:      Mon Mar 26 15:58:14 2018
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    51152 Bytes = 49.95 KiB = 0.05 MiB
  Architecture: ARM
  OS:           ARM Trusted Firmware
  Load Address: 0xfffe0000
  Hash algo:    md5
  Hash value:   36a4212bbb698126bf5a248f0f4b5336
 Image 1 (uboot)
  Description:  u-boot.bin
  Created:      Mon Mar 26 15:58:14 2018
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    761216 Bytes = 743.38 KiB = 0.73 MiB
  Architecture: ARM
  OS:           U-Boot
  Load Address: 0x08000000
  Hash algo:    md5
  Hash value:   f22960fe429be72296dc8dc59a47d566

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
6 years agoimage: fit: Show firmware configuration property if present
Michal Simek [Mon, 26 Mar 2018 14:31:26 +0000 (16:31 +0200)]
image: fit: Show firmware configuration property if present

SPL ATF support requires to have firmware property which should be also
listed by mkimage -l when images is created.

The patch is also using this macro in spl_fit to match keyword.

When image is created:
 Default Configuration: 'config'
 Configuration 0 (config)
  Description:  ATF with full u-boot
  Kernel:       unavailable
  Firmware:     atf
  FDT:          dtb

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoconfigs: am43xx_evm_qspiboot_defconfig: Move to DM
Vignesh R [Mon, 26 Mar 2018 07:57:03 +0000 (13:27 +0530)]
configs: am43xx_evm_qspiboot_defconfig: Move to DM

Move am43xx_evm_qspiboot_defconfig to DM. This is required as SPI core
and TI QSPI driver no longer supports non DM interfaces.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoARM: dts: Add new "generic" am4372 device tree file.
Vignesh R [Mon, 26 Mar 2018 07:57:02 +0000 (13:27 +0530)]
ARM: dts: Add new "generic" am4372 device tree file.

With U-boot runtime board detect for DTB selection a "default" dtb needs
to be created. This will be used temporarily until the "proper" dtb is
selected.

Also, add -u-boot.dtsi for AM437x SK and IDK to enable I2C for
board detection via DM_I2C.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoboard: ti: am43xx: Define embedded_dtb_select for runtime DTB selection in U-boot
Vignesh R [Mon, 26 Mar 2018 07:57:01 +0000 (13:27 +0530)]
board: ti: am43xx: Define embedded_dtb_select for runtime DTB selection in U-boot

AM437x QSPI boot is a single stage boot and hence needs runtime DTB
selection to support AM437x-SK and AM437x-IDK with DM enabled. This is
required to move am43xx_evm_qspiboot_defconfig to use DM/DT.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoenv: Properly check for BLK support
Sjoerd Simons [Thu, 22 Mar 2018 21:53:50 +0000 (22:53 +0100)]
env: Properly check for BLK support

Use CONFIG_IS_ENABLED to see if CONFIG_BLK is enabled. Otherwise
SPL compilation breaks on boards which do have CONFIG_BLK enabled but
not DM_MMC for the SPL as follows:

env/mmc.c: In function â€˜init_mmc_for_env’:
env/mmc.c:164:6: warning: implicit declaration of function â€˜blk_get_from_parent’; did you mean â€˜efi_get_ram_base’? [-Wimplicit-function-declaration]
  if (blk_get_from_parent(mmc->dev, &dev))
      ^~~~~~~~~~~~~~~~~~~
      efi_get_ram_base
env/mmc.c:164:29: error: â€˜struct mmc’ has no member named â€˜dev’
  if (blk_get_from_parent(mmc->dev, &dev))
                             ^~

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoconfigs: k2hk_hs_evm: Resync defconfig with non-HS defconfig
Andrew F. Davis [Thu, 22 Mar 2018 20:44:40 +0000 (15:44 -0500)]
configs: k2hk_hs_evm: Resync defconfig with non-HS defconfig

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh vutla <lokeshvutla@ti.com>
6 years agoconfigs: k2e_hs_evm: Resync defconfig with non-HS defconfig
Andrew F. Davis [Thu, 22 Mar 2018 20:44:39 +0000 (15:44 -0500)]
configs: k2e_hs_evm: Resync defconfig with non-HS defconfig

Signed-off-by: Andrew F. Davis <afd@ti.com>
6 years agoconfigs: k2g_hs_evm: Resync defconfig with non-HS defconfig
Andrew F. Davis [Thu, 22 Mar 2018 20:44:38 +0000 (15:44 -0500)]
configs: k2g_hs_evm: Resync defconfig with non-HS defconfig

Signed-off-by: Andrew F. Davis <afd@ti.com>
6 years agortc: rx8025: remove redundant code in rtc_reset
Chris Packham [Wed, 21 Mar 2018 02:40:37 +0000 (15:40 +1300)]
rtc: rx8025: remove redundant code in rtc_reset

As of commit 1a1fa2406689 ("rtc: Set valid date after reset") the
command "date reset" will set the date/time to 2000-01-01 0:00:00 after
calling rtc_reset(). This means that the rx8025 implementation of
rtc_reset() does not need to call rtc_set().

Signed-off-by: Chris Packham <judge.packham@gmail.com>
6 years agortc: rs5c372: remove redundant code in rtc_reset
Chris Packham [Wed, 21 Mar 2018 02:40:36 +0000 (15:40 +1300)]
rtc: rs5c372: remove redundant code in rtc_reset

As of commit 1a1fa2406689 ("rtc: Set valid date after reset") the
command "date reset" will set the date/time to 2000-01-01 0:00:00 after
calling rtc_reset(). This means that the rs5c372 implementation of
rtc_reset() does not need to call rtc_set().

Signed-off-by: Chris Packham <judge.packham@gmail.com>
6 years agortc: mx27rtc: remove redundant code in rtc_reset
Chris Packham [Wed, 21 Mar 2018 02:40:35 +0000 (15:40 +1300)]
rtc: mx27rtc: remove redundant code in rtc_reset

As of commit 1a1fa2406689 ("rtc: Set valid date after reset") the
command "date reset" will set the date/time to 2000-01-01 0:00:00 after
calling rtc_reset(). This means that the mx27rtc implementation of
rtc_reset() can be an empty stub function.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
6 years agortc: ds1374: remove redundant code in rtc_reset
Chris Packham [Wed, 21 Mar 2018 02:40:34 +0000 (15:40 +1300)]
rtc: ds1374: remove redundant code in rtc_reset

As of commit 1a1fa2406689 ("rtc: Set valid date after reset") the
command "date reset" will set the date/time to 2000-01-01 0:00:00 after
calling rtc_reset(). This means that the ds1374 implementation of
rtc_reset() doesn't need to call rtc_set().

Signed-off-by: Chris Packham <judge.packham@gmail.com>
6 years agortc: ds1307: remove redundant code in rtc_reset
Chris Packham [Wed, 21 Mar 2018 02:40:33 +0000 (15:40 +1300)]
rtc: ds1307: remove redundant code in rtc_reset

As of commit 1a1fa2406689 ("rtc: Set valid date after reset") the
command "date reset" will set the date/time to 2000-01-01 0:00:00 after
calling rtc_reset(). This means that the ds1307 implementation of
rtc_reset() doesn't need to call rtc_set().

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agobootvx: use program header for loading
Christian Gmeiner [Tue, 20 Mar 2018 13:18:25 +0000 (14:18 +0100)]
bootvx: use program header for loading

The section header address is a VMA whereas the address found in
the program header is a physical one. With this change it is
possible to load and start a vx7 intel generic based image.

$ readelf -l /tmp/vx7

Elf file type is EXEC (Executable file)
Entry point 0x408000
There are 2 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x001000 0x00408000 0x00408000 0x04000 0x04000 RWE 0x1000
  LOAD           0x005000 0xe040c000 0x0040c000 0x583a84 0x5ccc70 RWE 0x1000

 Section to Segment mapping:
  Segment Sections...
   00     .text.locore .data.locore
   01     .text .eh_frame .wrs_build_vars .data .tls_data .tls_vars .bss

$ readelf -S /tmp/vx7
There are 13 section headers, starting at offset 0x588af8:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .text.locore      PROGBITS        00408000 001000 00011e 00  AX  0   0 16
  [ 2] .data.locore      PROGBITS        00409000 002000 003000 00  WA  0   0 4096
  [ 3] .text             PROGBITS        e040c000 005000 4802a0 00 WAX  0   0 32
  [ 4] .eh_frame         PROGBITS        e088c2a0 4852a0 0a1ed0 00   A  0   0  4
  [ 5] .wrs_build_vars   PROGBITS        e092e170 527170 000190 00  Ax  0   0  1
  [ 6] .data             PROGBITS        e092f000 528000 060a70 00  WA  0   0 4096
  [ 7] .tls_data         PROGBITS        e098fa70 588a70 000004 00   A  0   0  4
  [ 8] .tls_vars         PROGBITS        e098fa78 588a78 00000c 00  WA  0   0  4
  [ 9] .bss              NOBITS          e098faa0 588a84 0491d0 00  WA  0   0 32
  [10] .shstrtab         STRTAB          00000000 588a84 000074 00      0   0  1
  [11] .symtab           SYMTAB          00000000 588d00 056ee0 10     12 9758  4
  [12] .strtab           STRTAB          00000000 5dfbe0 05f48a 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

For completeness here are the same information for an old vx5 based image. After
this change it is possible to boot vx5 and vx7 (intel generic) images.

$ readelf -l /tmp/vx5

Elf file type is EXEC (Executable file)
Entry point 0x308000
There are 1 program headers, starting at offset 52

Program Headers:
 Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
 LOAD           0x000060 0x00308000 0x00308000 0x3513a0 0x757860 RWE 0x20

Section to Segment mapping:
 Segment Sections...
  00     .text .data .bss
[christian@chgm-pc ~]$ readelf -S /tmp/vx5
There are 12 section headers, starting at offset 0x356580:

Section Headers:
 [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
 [ 0]                   NULL            00000000 000000 000000 00      0   0  0
 [ 1] .text             PROGBITS        00308000 000060 319b10 00 WAX  0   0 32
 [ 2] .data             PROGBITS        00621b20 319b80 037880 00  WA  0   0 32
 [ 3] .bss              NOBITS          006593a0 351400 4064c0 00  WA  0   0 16
 [ 4] .debug_aranges    PROGBITS        00000000 351400 000060 00      0   0  1
 [ 5] .debug_pubnames   PROGBITS        00000000 351460 00018b 00      0   0  1
 [ 6] .debug_info       PROGBITS        00000000 3515eb 003429 00      0   0  1
 [ 7] .debug_abbrev     PROGBITS        00000000 354a14 000454 00      0   0  1
 [ 8] .debug_line       PROGBITS        00000000 354e68 0016a4 00      0   0  1
 [ 9] .shstrtab         STRTAB          00000000 35650c 000071 00      0   0  1
 [10] .symtab           SYMTAB          00000000 356760 0440e0 10     11 8574  4
 [11] .strtab           STRTAB          00000000 39a840 03e66c 00      0   0  1
Key to Flags:
 W (write), A (alloc), X (execute), M (merge), S (strings)
 I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
 O (extra OS processing required) o (OS specific), p (processor specific)

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
6 years agostm32mp: handle SYSRESET
Patrick Delaunay [Tue, 20 Mar 2018 13:15:06 +0000 (14:15 +0100)]
stm32mp: handle SYSRESET

Add support of sysreset with generic driver "syscon-reboot"
provided by RCC, for U-boot and for SPL.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agostm32mp: add syscon for STGEN
Patrick Delaunay [Tue, 20 Mar 2018 10:45:14 +0000 (11:45 +0100)]
stm32mp: add syscon for STGEN

Add STGEN as SYSCON device: allow access to device address
defined in device tree

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agostm32mp1: change STGEN clock source to HSE
Patrick Delaunay [Tue, 20 Mar 2018 10:41:26 +0000 (11:41 +0100)]
stm32mp1: change STGEN clock source to HSE

No more use static frequency HSI = 64MHz for STGEN clock
but HSE (with higher accurency) by default.

Need to remove CONFIG_SYS_HZ_CLOCK as arch timer frequency
is provided at boot by BootRom and cp15 cntfrq and modified
during clock tree initialization if needed.

When HSI is no more used by any device, this internal
oscillator can be switched off to reduce consumption.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agoclock: stm32mp1: add stgen clock source change support
Patrick Delaunay [Tue, 20 Mar 2018 10:41:25 +0000 (11:41 +0100)]
clock: stm32mp1: add stgen clock source change support

The STGEN is the clock source for the Cortex A7 arch timer.
So after modification of its frequency, CP15 cntfreq is updated
and a new timer init is performed.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agoarm: timer: get frequency for arch timer armv7 in cp15 cntfrq
Patrick Delaunay [Tue, 20 Mar 2018 10:41:23 +0000 (11:41 +0100)]
arm: timer: get frequency for arch timer armv7 in cp15 cntfrq

Manage dynamic value for armv7 arch clock timer,
when CONFIG_SYS_HZ_CLOCK is not defined.
Get frequency from CP15 cntfrq information, initialized for example
by first boot stage, clock driver or by BootRom.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agoAllow providing default environment from file
Rasmus Villemoes [Tue, 20 Mar 2018 10:38:45 +0000 (11:38 +0100)]
Allow providing default environment from file

Modifying the default environment via CONFIG_EXTRA_ENV_SETTINGS is
somewhat inflexible, partly because the cpp language does not allow
appending to an existing macro. This prevents reuse of "environment
fragments" for different boards, which in turn makes maintaining that
environment consistently tedious and error-prone.

This implements a Kconfig option for allowing one to define the entire
default environment in an external file, which can then, for example, be
generated programmatically as part of a Yocto recipe, or simply be kept
in version control separately from the U-boot repository.

Tested-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
6 years agostm32mp1: select boot device and partition
Patrick Delaunay [Tue, 20 Mar 2018 09:54:54 +0000 (10:54 +0100)]
stm32mp1: select boot device and partition

Bootrom loads SPL from SDCARD or eMMC
according BootPin selection.

Then SPL loads U-Boot on the same mmc device
with the following predefined GPT partitioning:

on SDCARD: gpt partitioning
  1: SPL
  2: SPL#2
  3: U-Boot
  4: bootable partition

on eMMC:
  The 2 boot partitions are used for SPL (2 copy)
    boot1: SPL
    boot2: SPL#2
  The user partition use gpt partitioning
    1: U-Boot
    2: bootable partition

This patch select the correct SPL partition
(3 for SDCARD on mmc0 and 1 for eMMC on mmc1)
according the BootRom information saved in TAMP register
and based on configuration flasg:
- CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
  => for BOOT_DEVICE_MMC1 or mmc 0 in U-Boot
- CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_MMC2 (new)
  => for BOOT_DEVICE_MMC2 or mmc 1 in U-Boot

And the correct boot_targets is selected according the environment
variables boot_device and boot_instance, with preboot command,
to search the bootable partition with kernel on this device
(generic distro support).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agostm32mp1: get boot mode from BootRom
Patrick Delaunay [Tue, 20 Mar 2018 09:54:53 +0000 (10:54 +0100)]
stm32mp1: get boot mode from BootRom

SPL copy BootRom boot mode information
in TAMP register 21.

This TAMP register information is used
after relocation to set 2 env variables
- boot_device
- boot_instance

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agostm32mp1: add eMMC support for ED1
Patrick Delaunay [Tue, 20 Mar 2018 09:54:52 +0000 (10:54 +0100)]
stm32mp1: add eMMC support for ED1

Add command GPT support
Add EMMC boot support
Add the 2 other SDMMC instances for ED1:
- SDMMC2 = mmc 1, eMMC on the ED1 board
- SDMMC3 = extension connector, deactivated by default

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agospl: spl_mmc: provide one weak function spl_boot_partition
Patrick Delaunay [Tue, 20 Mar 2018 09:54:51 +0000 (10:54 +0100)]
spl: spl_mmc: provide one weak function spl_boot_partition

The spl_boot_partition function has been added in order to have
the possibility to boot on a same binary from different mmc devices
with different partitions.

By default keep the current behavior, SPL use the partition defined
by CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Christophe KERELLO <christophe.kerello@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
6 years agortc: rewrite isl1208 to support DM
Klaus Goger [Mon, 19 Mar 2018 19:32:05 +0000 (20:32 +0100)]
rtc: rewrite isl1208 to support DM

Adds devicemodel support to the ISL1208 driver.
This patch drops the non-dm API as no board was using it anyway.
Also add it to Kconfig.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agostm32mp: add check of cpu identifier
Patrick Delaunay [Mon, 19 Mar 2018 18:09:21 +0000 (19:09 +0100)]
stm32mp: add check of cpu identifier

Add support of DBGMCU_IDC for cpu identifier
and revision

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agostm32mp: cleanup cpu.c
Patrick Delaunay [Mon, 19 Mar 2018 18:09:20 +0000 (19:09 +0100)]
stm32mp: cleanup cpu.c

Move all defines at the beginning of the file

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agotools/mxsimage: Support building with LibreSSL
Hauke Mehrtens [Sun, 18 Mar 2018 15:03:47 +0000 (16:03 +0100)]
tools/mxsimage: Support building with LibreSSL

The mxsimage utility fails to compile against LibreSSL version < 2.7.0
because LibreSSL says it is OpenSSL 2.0, but it does not support the
complete OpenSSL 1.1 interface.

LibreSSL defines OPENSSL_VERSION_NUMBER with 0x20000000L and therefor
claims to have an API compatible with OpenSSL 2.0, but it implements
EVP_MD_CTX_new(), EVP_MD_CTX_free() and EVP_CIPHER_CTX_reset() only
starting with version 2.7.0, which is not yet released. OpenSSL
implements this function since version 1.1.0.

This commit will activate the compatibility code meant for
OpenSSL < 1.1.0 also for LibreSSL version < 2.7.0.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: Jonathan Gray <jsg@jsg.id.au>
6 years agoregulator: pbias: don't evaluate variable before assignment
Heinrich Schuchardt [Sun, 18 Mar 2018 11:01:06 +0000 (12:01 +0100)]
regulator: pbias: don't evaluate variable before assignment

We should not evaluate the value of reg before its value is set.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoomap3_logic: Fix FDT ADDR for ramdisk booting
Adam Ford [Mon, 26 Mar 2018 15:24:12 +0000 (10:24 -0500)]
omap3_logic: Fix FDT ADDR for ramdisk booting

The boot scripts for booting from ramdisk are using
${fdtimage} when they really should be using ${fdtaddr}

This patch will fix it so the RAMdisk bootscripts operate
correctly.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoinput: Drop PS/2 keyboard support
Simon Glass [Mon, 19 Mar 2018 21:20:25 +0000 (15:20 -0600)]
input: Drop PS/2 keyboard support

This is not used by any current board and has not been converted to driver
model. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agofs: btrfs: Remove unused debug code left from development
Marek BehĂșn [Mon, 19 Mar 2018 11:02:11 +0000 (12:02 +0100)]
fs: btrfs: Remove unused debug code left from development

Signed-off-by: Marek Behun <marek.behun@nic.cz>
6 years agoARM: am33xx: Inhibit re-initialization of DDR during RTC-only
Russ Dill [Tue, 20 Mar 2018 06:53:00 +0000 (12:23 +0530)]
ARM: am33xx: Inhibit re-initialization of DDR during RTC-only

This inhibits the re-inititialization of DDR during an RTC-only resume. If
this is not done, an L3 NOC error is produced as the DDR gets accessed
before the re-init has time to complete. Tested on AM437x GP EVM.

Signed-off-by: Russ Dill <Russ.Dill@ti.com>
[j-keerthy@ti.com Ported to Latest Master branch]
Signed-off-by: Keerthy <j-keerthy@ti.com>
6 years agoam43xx: Do not allow EMIF to control DDR_RESET in rtconly config
Dave Gerlach [Sat, 17 Mar 2018 07:54:30 +0000 (13:24 +0530)]
am43xx: Do not allow EMIF to control DDR_RESET in rtconly config

Prevent EMIF control of DDR_RESET line on DDR3 am43xx platforms for
am43xx_evm_rtconly_config. Without this DDR is unstable and can become
corrupted after multiple iterations of RTC+DDR mode.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
[j-keerthy@ti.com Ported to latest master branch]
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoARM: AM43xx: Add support for RTC only + DDR in self-refresh mode
Tero Kristo [Sat, 17 Mar 2018 08:02:52 +0000 (13:32 +0530)]
ARM: AM43xx: Add support for RTC only + DDR in self-refresh mode

Kernel stores information to the RTC_SCRATCH0 and RTC_SCRATCH1 registers
for wakeup from RTC-only mode with DDR in self-refresh. Parse these
registers during SPL boot and jump to the kernel resume vector if the
device is waking up from RTC-only modewith DDR in Self-refresh.

The RTC scratch register layout used is:

SCRATCH0 : bits00-31 : kernel resume address
SCRATCH1 : bits00-15 : RTC magic value used to detect valid config
SCRATCH1 : bits16-31 : board type information populated by bootloader

During the normal boot path the SCRATCH1 : bits16-31 are updated with
the eeprom read board type data. In the rtc_only boot path the rtc
scratchpad register is read and the board type is determined and
correspondingly ddr dpll parameters are set. This is done so as to avoid
costly i2c read to eeprom.

RTC-only +DRR in self-refresh mode support is currently only enabled for
am43xx_evm_rtconly_config.
This is not to be used with epos evm builds.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
[j-keerthy@ti.com Rebased to latest u-boot master branch]
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agodrivers: serial: remove nonexisting initialisation functions
Christophe Leroy [Fri, 16 Mar 2018 15:55:02 +0000 (16:55 +0100)]
drivers: serial: remove nonexisting initialisation functions

This patch removes call of serial initialisation functions that
are not implemented anymore.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
6 years agoam335x: am335x_evm_usbspl_defconfig: NETCONSOLE
Jason Kridner [Wed, 7 Mar 2018 10:40:44 +0000 (05:40 -0500)]
am335x: am335x_evm_usbspl_defconfig: NETCONSOLE

Enable NETCONSOLE by default. Still requires changes to the boot
environment to enable on the platform.

Signed-of-by: Jason Kridner <jdk@ti.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoHandle NETCONSOLE and SPL enabled
Jason Kridner [Wed, 7 Mar 2018 10:40:43 +0000 (05:40 -0500)]
Handle NETCONSOLE and SPL enabled

NETCONSOLE isn't compiled in with SPL, so the include file needs to recognize that.

Signed-off-by: Jason Kridner <jdk@ti.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agoAdd support for BeagleBoard.org PocketBeagle
Jason Kridner [Wed, 7 Mar 2018 10:40:41 +0000 (05:40 -0500)]
Add support for BeagleBoard.org PocketBeagle

Texas Instruments AM3358 based low-cost board using Octavo Systems OSD3358 SIP
with built-in TPS65217 PMIC and 512MB DDR3. Board features small 35mm x
55mm size, high-speed USB OTG, microSD and 72 0.1" expansion header
pins with 2xSPI, 2xI2C, 2xUART, USB, 8xADC, up-to-44 GPIO, PRU pins and much more.

https://beagleboard.org/pocket

This was tested using the am335x_evm_usbspl_defconfig.

Note that MII pins are enabled despite not having Ethernet on this
board. This avoids an issue where otherwise many timeout errors would be
generated. See https://e2e.ti.com/support/arm/sitara_arm/f/791/t/298976
for some related discussion.

Signed-off-by: Jason Kridner <jdk@ti.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoMigrate CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC
Alex Kiernan [Thu, 15 Mar 2018 22:11:46 +0000 (22:11 +0000)]
Migrate CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC

This converts CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC to Kconfig

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agopowerpc: mpc8xx: move watchdog into drivers/watchdog
Christophe Leroy [Fri, 16 Mar 2018 16:21:01 +0000 (17:21 +0100)]
powerpc: mpc8xx: move watchdog into drivers/watchdog

In preparation of DM watchdog, move basic actions into drivers/watchdog

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
6 years agopowerpc: mpc8xx: cleaning up watchdog
Christophe Leroy [Fri, 16 Mar 2018 16:20:59 +0000 (17:20 +0100)]
powerpc: mpc8xx: cleaning up watchdog

In preparation of migration to DM watchdog, clean up a bit.

The 8xx watchdog really is a HW watchdog, so declare it as is
then it goes through Kconfig

And the watchdog reset doesn't mind getting interrupted, so
no need to disable interrupts

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
6 years agopowerpc: mpc8xx: refactorise reginfo
Christophe Leroy [Fri, 16 Mar 2018 16:20:57 +0000 (17:20 +0100)]
powerpc: mpc8xx: refactorise reginfo

reginfo is redundant with some of the commands in immap.c, so
move reginfo into that file and remove duplicated info.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
6 years agoboard: MCR3000: Use smaller flash sector for environment
Christophe Leroy [Fri, 16 Mar 2018 16:20:55 +0000 (17:20 +0100)]
board: MCR3000: Use smaller flash sector for environment

Latest versions of u-boot have increased in size and require more
than the 256kb allocated to it.

The MCR3000 board is equipped with an AM29LV160DB boot flash which
is organised as follows:
- One 16kb block
- Two 8kb block
- One 32kb block
- Thirty one 64kb blocks

At the time being, u-boot is a single piece occupying the 256 first
kbytes, then the environment is stored in the following 64kb block

The environment being quite tiny, we save one 64kb block by embedding
the environment in the first 8kb block, hence allowing to increase
the monitor size to 320kb.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
6 years agocommon: env_embedded: allow fine placement of environment object
Christophe Leroy [Fri, 16 Mar 2018 16:20:53 +0000 (17:20 +0100)]
common: env_embedded: allow fine placement of environment object

Commit 7653942b10e9e ("common/env_embedded.c: drop support for
CONFIG_SYS_USE_PPCENV") dropped the .ppcenv section which was
used in linking scripts to allow fine placement of embedded
environment sections.

This implies that GCC randomly places objects from env/embedded.o
and environment is not guaranteed to be located at the correct address:

04003df8 g     F .text  00000038 mii_init
04004000 g     O .text  00000004 env_size
04004004 g     O .text  00002000 environment
04006004 g     F .text  00000040 .hidden __lshrdi3

This patch restores this capability by allocating each object marked
with __UBOOT_ENV_SECTION__ into a different section. Hence
'environment' will be alone in .text.environment, allowing a
fine placement in u-boot.lds with:

. = DEFINED(env_offset) ? env_offset : .;
env/embedded.o (.text.environment)

Fixes: 7653942b10e9e ("common/env_embedded.c: drop support for CONFIG_SYS_USE_PPCENV")
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>