oweals/u-boot.git
5 years agopico-imx6ul: Add bootmenu to choose the baseboard
Otavio Salvador [Tue, 4 Sep 2018 13:23:15 +0000 (10:23 -0300)]
pico-imx6ul: Add bootmenu to choose the baseboard

Currently the baseboards do not offer a way to autodetect which one is
in use, so we ask the user if no value has been set.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6ul: Sync defconfig with new changes
Otavio Salvador [Tue, 4 Sep 2018 13:23:14 +0000 (10:23 -0300)]
pico-imx6ul: Sync defconfig with new changes

Due the changes in previous commits, we need to resync the defconfig
to reduce noise in next commits.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6ul: Update the README file
Fabio Estevam [Tue, 4 Sep 2018 13:23:13 +0000 (10:23 -0300)]
pico-imx6ul: Update the README file

Update the README file to take into accound the switch to SPL.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6ul: Add support for the 512MB module
Fabio Estevam [Tue, 4 Sep 2018 13:23:11 +0000 (10:23 -0300)]
pico-imx6ul: Add support for the 512MB module

Currently only the module with 256MB of RAM is supported.

Add support for the 512MB of RAM variant as well.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6ul: Add bmode support
Fabio Estevam [Tue, 4 Sep 2018 13:23:10 +0000 (10:23 -0300)]
pico-imx6ul: Add bmode support

The 'bmode' command is helpful for switching the boot media.

In the case of pico-imx6ul there are two possible boot media:
eMMC or USB.

To boot from eMMC:

=> bmode emmc

To boot from USB (via Serial Download Protocol):

=> bmode usb

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6ul: Add fastboot support
Fabio Estevam [Tue, 4 Sep 2018 13:23:09 +0000 (10:23 -0300)]
pico-imx6ul: Add fastboot support

fastboot tool is a convenient way to flash the eMMC, so
add support for it.

Examples of usages:

On the pico-imx6ul U-Boot prompt:

=> fastboot 0

On the Linux PC connected via USB:

1. Retrieving the U-Boot version

$ sudo fastboot getvar bootloader-version -i 0x0525
bootloader-version: U-Boot 2018.07-rc2-00130-g0881835-dirty
finished. total time: 0.000s

2. Resetting the board

$ sudo fastboot reboot -i 0x0525

(this causes the pico-imx6ul to reboot)

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6ul: Convert to SPL
Fabio Estevam [Tue, 4 Sep 2018 13:23:08 +0000 (10:23 -0300)]
pico-imx6ul: Convert to SPL

There are two versions of imx6ul pico SOMs: one with 256MB and another
one with 512MB of RAM.

Convert to SPL so that both versions can be supported. This patch
doesn't rework the clock initialization to avoid changing the behavior
in this same patch, so it will be cleaned up in future.

Currently only the 256MB is tested/supported.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agopico-imx6ul: Convert to distro config
Fabio Estevam [Tue, 4 Sep 2018 13:23:07 +0000 (10:23 -0300)]
pico-imx6ul: Convert to distro config

Instead of keeping a custom environment, use a more generic approach
by switching to distro config.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Tue, 11 Sep 2018 12:50:10 +0000 (08:50 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

5 years agoMerge tag 'fpga-for-v2018.11' of git://git.denx.de/u-boot-microblaze
Tom Rini [Tue, 11 Sep 2018 12:49:21 +0000 (08:49 -0400)]
Merge tag 'fpga-for-v2018.11' of git://git.denx.de/u-boot-microblaze

FPGA changes for v2018.11

- add fpga tests to cover fpga commands
- fpga Kconfig cleanup
- fix cmd/fpga.c
- add support for missing fpga loadmk commands
- add fpga fragment to MAINTAINERS

5 years agoconfigs: am65x_evm_a53: Add initial support
Lokesh Vutla [Mon, 27 Aug 2018 10:29:10 +0000 (15:59 +0530)]
configs: am65x_evm_a53: Add initial support

Add initial defconfig support for AM65x that runs on A53.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoarm64: dts: k3: Add u-boot specific nodes
Lokesh Vutla [Mon, 27 Aug 2018 10:29:09 +0000 (15:59 +0530)]
arm64: dts: k3: Add u-boot specific nodes

Add the minimum dt nodes required to boot. These nodes
will get deleted as kernel gets these nodes added in the
main dts files.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoarm64: dts: k3: Add Support for AM654 SoC
Lokesh Vutla [Mon, 27 Aug 2018 10:29:08 +0000 (15:59 +0530)]
arm64: dts: k3: Add Support for AM654 SoC

Add initial DT support for AM654 EVM that runs on A53.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoinclude: am654_evm: Establish initial environment for SD card boot
Andreas Dannenberg [Mon, 27 Aug 2018 10:29:07 +0000 (15:59 +0530)]
include: am654_evm: Establish initial environment for SD card boot

Create a basic U-Boot environment that allows the automatic loading
of a Linux Kernel located at /boot/Image and an associated device tree
blob located at /boot/k3-am654-base-board.dtb from the secondary
partition of an ext4-formatted SD card on the AM654x EVM. Furthermore
the boot.scr and uEnv.txt detection and loading schemes are supported
in a manner already known from other TI platforms.

Note that this is intended to be a starting point to enable initial
board use and will most certainly get extended and refactored as
different boot media become available.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoboard: ti: am654: a53: Add initial support for am654
Lokesh Vutla [Mon, 27 Aug 2018 10:29:06 +0000 (15:59 +0530)]
board: ti: am654: a53: Add initial support for am654

Add initial support for AM654 based EVM running on A53. Enable
4GB of DDR available on the EVM so that kernel DTB file
can be updated accordingly.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
[Andreas: Added 4GB ddr support]
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
5 years agogpio: do not include <asm/arch/gpio.h> for ARCH_K3
Lokesh Vutla [Mon, 27 Aug 2018 10:27:55 +0000 (15:57 +0530)]
gpio: do not include <asm/arch/gpio.h> for ARCH_K3

As no gpio.h is defined in arch/arm/mach-k3/include/,
to avoid compilation failure, do not include asm/arch/gpio.h.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agommc: k3_arasan: Add sdhci driver support for K3 family SoCs
Lokesh Vutla [Mon, 27 Aug 2018 10:27:54 +0000 (15:57 +0530)]
mmc: k3_arasan: Add sdhci driver support for K3 family SoCs

AM654 has an arasan sdhci controller and a mmc phy attached to it.
Add basic support for K3 specific arasan sdhci controller.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agospl: Allow remoteproc drivers to be used within SPL
Lokesh Vutla [Mon, 27 Aug 2018 10:27:53 +0000 (15:57 +0530)]
spl: Allow remoteproc drivers to be used within SPL

Add an option for building remoteproc drivers within SPL.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoremoteproc: Introduce K3 remoteproc driver
Lokesh Vutla [Mon, 27 Aug 2018 10:27:52 +0000 (15:57 +0530)]
remoteproc: Introduce K3 remoteproc driver

Add support for K3 based remoteproc driver that
communicates with TISCI to start start a remote processor.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoremoteproc: Introduce K3 system controller
Lokesh Vutla [Mon, 27 Aug 2018 10:27:51 +0000 (15:57 +0530)]
remoteproc: Introduce K3 system controller

K3 specific SoCs have a dedicated microcontroller for doing
resource management. Any HLOS/firmware on compute clusters should
load a firmware to this microcontroller before accessing any resource.
Adding support for loading this firmware.

After the K3 system controller got loaded with firmware and started
up it sends out a boot notification message through the secure proxy
facility using the TI SCI protocol. Intercept and receive this message
through the rproc start operation which will need to get invoked
explicitly after the firmware got loaded.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoremoteproc: Allow for individual remoteproc initialization
Lokesh Vutla [Mon, 27 Aug 2018 10:27:50 +0000 (15:57 +0530)]
remoteproc: Allow for individual remoteproc initialization

Existing rproc_init() api tries to initialize all available
remoteproc devices. This will fail when there is dependency
among available remoteprocs. So introduce a separate api
that allows to initialize remoteprocs individually based
on id.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agospl: Allow mailbox drivers to be used within SPL
Lokesh Vutla [Mon, 27 Aug 2018 10:27:49 +0000 (15:57 +0530)]
spl: Allow mailbox drivers to be used within SPL

Add an option for building mailbox drivers within SPL.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agomailbox: Introduce K3 Secure Proxy Driver
Lokesh Vutla [Mon, 27 Aug 2018 10:27:48 +0000 (15:57 +0530)]
mailbox: Introduce K3 Secure Proxy Driver

Secure Proxy module manages hardware threads that are meant
for communication between the processor entities. Adding
support for this driver.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
5 years agomailbox: Allow attaching private data for mbox_chan
Lokesh Vutla [Mon, 27 Aug 2018 10:27:47 +0000 (15:57 +0530)]
mailbox: Allow attaching private data for mbox_chan

Sometimes mbox controllers wants to store private data in
mbox_chan so that it can be used at a later point of time.
Adding support for hooking private data.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agosysreset: Add TI System Control Interface (TI SCI) sysreset driver
Andreas Dannenberg [Mon, 27 Aug 2018 10:27:46 +0000 (15:57 +0530)]
sysreset: Add TI System Control Interface (TI SCI) sysreset driver

Devices from the TI K3 family of SoCs like the AM654x contain a Device
Management and Security Controller (SYSFW) that manages the low-level
device control (like clocks, resets etc) for the various hardware
modules present on the SoC. These device control operations are provided
to the host processor OS through a communication protocol called the TI
System Control Interface (TI SCI) protocol.

This patch adds a system reset driver that communicates to the system
controller over the TI SCI protocol for allowing to perform a system-
wide SoC reset.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agopower domain: Introduce TI System Control Interface (TI SCI) power domain driver
Andreas Dannenberg [Mon, 27 Aug 2018 10:27:45 +0000 (15:57 +0530)]
power domain: Introduce TI System Control Interface (TI SCI) power domain driver

Some TI Keystone 2 and K3 family of SoCs contain a system controller
(like the Power Management Micro Controller (PMMC) on 66AK2G SoCs and
the Device Management and Security Controller on AM65x SoCs) that manage
the low-level device control (like clocks, resets etc) for the various
hardware modules present on the SoC. These device control operations are
provided to the host processor OS through a communication protocol
called the TI System Control Interface (TI SCI) protocol.

This patch adds a power domain driver that communicates to the system
controller over the TI SCI protocol for performing power management of
various devices present on the SoC. Various power domain functionalities
are achieved by the means of different TI SCI device operations provided
by the TI SCI framework.

This code is loosely based on the drivers/soc/ti/ti_sci_pm_domains.c
driver of the Linux kernel.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agopower domain: Add support for multiple powerdomains per device
Lokesh Vutla [Mon, 27 Aug 2018 10:27:44 +0000 (15:57 +0530)]
power domain: Add support for multiple powerdomains per device

There are cases where there are more than one power domain
attached to the device inorder to get the device functional.
So add support for enabling power domain based on the index.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoclk: Introduce TI System Control Interface (TI SCI) clock driver
Andreas Dannenberg [Mon, 27 Aug 2018 10:27:43 +0000 (15:57 +0530)]
clk: Introduce TI System Control Interface (TI SCI) clock driver

Some TI Keystone 2 and K3 family of SoCs contain a system controller
(like the Power Management Micro Controller (PMMC) on 66AK2G SoCs and
the Device Management and Security Controller on AM65x SoCs) that manage
the low-level device control (like clocks, resets etc) for the various
hardware modules present on the SoC. These device control operations are
provided to the host processor OS through a communication protocol
called the TI System Control Interface (TI SCI) protocol.

This patch adds a clock driver that communicates to the system
controller over the TI SCI protocol for performing clock management of
various devices present on the SoC. Various clock functionality is
achieved by the means of different TI SCI device operations provided by
the TI SCI framework.

This code is loosely based on the drivers/clk/keystone/sci-clk.c driver
of the Linux kernel.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoclk: Extend clock control with an optional data field
Andreas Dannenberg [Mon, 27 Aug 2018 10:27:42 +0000 (15:57 +0530)]
clk: Extend clock control with an optional data field

Some systems require more than a single ID to identify and configure any
clock provider. For those scenarios add an optional data field to the
clock control structure.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoreset: Introduce TI System Control Interface (TI SCI) reset driver
Andreas Dannenberg [Mon, 27 Aug 2018 10:27:41 +0000 (15:57 +0530)]
reset: Introduce TI System Control Interface (TI SCI) reset driver

Some TI Keystone 2 and K3 family of SoCs contain a system controller
(like the Power Management Micro Controller (PMMC) on 66AK2G SoCs and
the Device Management and Security Controller on AM65x SoCs) that manage
the low-level device control (like clocks, resets etc) for the various
hardware modules present on the SoC. These device control operations are
provided to the host processor OS through a communication protocol
called the TI System Control Interface (TI SCI) protocol.

This patch adds a reset driver that communicates to the system
controller over the TI SCI protocol for performing reset management of
various devices present on the SoC. Various reset functionalities are
achieved by the means of different TI SCI device operations provided by
the TI SCI framework.

This code is loosely based on the drivers/reset/reset-ti-sci.c driver of
the Linux kernel.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoreset: Extend reset control with an optional data field
Andreas Dannenberg [Mon, 27 Aug 2018 10:27:40 +0000 (15:57 +0530)]
reset: Extend reset control with an optional data field

Some systems require more than a single ID to identify and configure any
reset provider. For those scenarios add an optional data field to the
reset control structure.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agodm: reset: Update uclass to allow querying reset status
Andreas Dannenberg [Mon, 27 Aug 2018 10:27:39 +0000 (15:57 +0530)]
dm: reset: Update uclass to allow querying reset status

Add a reset operations function pointer to support querying the current
status of a reset control.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agodm: firmware: Automatically bind child devices
Andreas Dannenberg [Mon, 27 Aug 2018 10:27:38 +0000 (15:57 +0530)]
dm: firmware: Automatically bind child devices

To support scenarios where a firmware device node has subnodes that
have their own drivers automatically scan the DT and bind those when
the firmware device gets bound.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agofirmware: ti_sci: Add support for processor control services
Lokesh Vutla [Mon, 27 Aug 2018 10:27:37 +0000 (15:57 +0530)]
firmware: ti_sci: Add support for processor control services

TI-SCI message protocol provides support for controlling of various
physical cores available in SoC. In order to control which host is
capable of controlling a physical processor core, there is a processor
access control list that needs to be populated as part of the board
configuration data.

Introduce support for the set of TI-SCI message protocol apis that
provide us with this capability of controlling physical cores.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agofirmware: ti_sci: Add support for reboot core service
Andreas Dannenberg [Mon, 27 Aug 2018 10:27:36 +0000 (15:57 +0530)]
firmware: ti_sci: Add support for reboot core service

Since system controller now has control over SoC power management, it
needs to be explicitly requested to reboot the SoC. Add support for
it.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
5 years agofirmware: ti_sci: Add support for clock control
Lokesh Vutla [Mon, 27 Aug 2018 10:27:35 +0000 (15:57 +0530)]
firmware: ti_sci: Add support for clock control

In general, we expect to function at a device level of abstraction,
however, for proper operation of hardware blocks, many clocks directly
supplying the hardware block needs to be queried or configured.

Introduce support for the set of SCI message protocol support that
provide us with this capability.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
5 years agofirmware: ti_sci: Add support for device control
Andreas Dannenberg [Mon, 27 Aug 2018 10:27:34 +0000 (15:57 +0530)]
firmware: ti_sci: Add support for device control

TI-SCI message protocol provides support for management of various
hardware entitites within the SoC. Introduce the fundamental
device management capability support to the driver protocol
as part of this change.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
5 years agofirmware: ti_sci: Add support for board configuration
Andreas Dannenberg [Mon, 27 Aug 2018 10:27:33 +0000 (15:57 +0530)]
firmware: ti_sci: Add support for board configuration

TI-SCI message protocol provides support for board configuration
to assign resources and other board related operations.
Introduce the board configuration capability support to the driver protocol
as part of this change.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agofirmware: Add basic support for TI System Control Interface (TI SCI) protocol
Lokesh Vutla [Mon, 27 Aug 2018 10:27:32 +0000 (15:57 +0530)]
firmware: Add basic support for TI System Control Interface (TI SCI) protocol

Texas Instrument's System Control Interface (TI SCI) message protocol is
used in Texas Instrument's System on Chip (SoC) such as those in the K3
family AM654 SoC to communicate between various compute processors with
a central system controller entity.

The TI SCI message protocol provides support for management of various
hardware entities within the SoC. Add support driver to allow
communication with system controller entity within the SoC using the
mailbox client.

This is mostly derived from the TI SCI driver in Linux located at
drivers/firmware/ti_sci.c.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
5 years agoarmv8: K3: am654: Add support for generating build targets
Lokesh Vutla [Mon, 27 Aug 2018 10:27:15 +0000 (15:57 +0530)]
armv8: K3: am654: Add support for generating build targets

Update Makefile to generate
- tispl.bin: First stage bootloader on ARMv8 core
- u-boot.img: Second stage bootloader on ARMv8 core.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoarmv8: K3: am654: Introduce FIT generator script
Lokesh Vutla [Mon, 27 Aug 2018 10:27:14 +0000 (15:57 +0530)]
armv8: K3: am654: Introduce FIT generator script

Add a script that is capable of generating a FIT image
source file that combines ATF, SPL(64 bit) and DT.
This combined image is used by R5 SPL and start ATF
on ARMv8 core.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoarmv8: K3: am654: Add custom MMU support
Lokesh Vutla [Mon, 27 Aug 2018 10:27:13 +0000 (15:57 +0530)]
armv8: K3: am654: Add custom MMU support

Add MMU mappings for AM654 SoC.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoarm: K3: am654: Unlock control module registers during init
Andreas Dannenberg [Mon, 27 Aug 2018 10:27:12 +0000 (15:57 +0530)]
arm: K3: am654: Unlock control module registers during init

By default the device control module registers are locked,
preventing any writes to its registers.
Unlock those registers as part of the init flow.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoarm: K3: am654: Add support for boot device detection
Lokesh Vutla [Mon, 27 Aug 2018 10:27:11 +0000 (15:57 +0530)]
arm: K3: am654: Add support for boot device detection

AM654 allows for booting from primary or backup boot media.
Both media can be chosen individually based on switch settings.
ROM looks for a valid image in primary boot media, if not found
then looks in backup boot media. In order to pass this boot media
information to boot loader, ROM stores a value at a particular
address. Add support for reading this information and determining
the boot media correctly.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoarm: K3: Update _start instruction
Lokesh Vutla [Mon, 27 Aug 2018 10:27:10 +0000 (15:57 +0530)]
arm: K3: Update _start instruction

On K3 family SoCs, once the ROM loads image on R5, M3 resets R5 and
expects to start executing from 0x0. In order to handle this ROM
updates the boot vector of R5 such that first 64 bytes of image load
address are mapped to 0x0.

In this case, it is SPL's responsibility to jump to the proper image
location. So, update the PC with address of reset vector(like how
other exception vectors are handled), instead of branching to reset.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agoarm: K3: Add support for AM654 SoC definition
Lokesh Vutla [Mon, 27 Aug 2018 10:27:09 +0000 (15:57 +0530)]
arm: K3: Add support for AM654 SoC definition

The AM654 device is designed for industrial automation and PLC
controller class platforms among other applications. Introduce
base support for AM654 SoC.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoarm: K3: Add initial support for TI's K3 generation of SoCs
Lokesh Vutla [Mon, 27 Aug 2018 10:27:08 +0000 (15:57 +0530)]
arm: K3: Add initial support for TI's K3 generation of SoCs

Add support for Texas Instruments' K3 Generation Processor
families.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoARM: uniphier: remove ad-hoc clock enabling for EHCI
Masahiro Yamada [Mon, 10 Sep 2018 03:58:36 +0000 (12:58 +0900)]
ARM: uniphier: remove ad-hoc clock enabling for EHCI

The MIO clock is enabled by default, and the STDMAC clock is
enabled by the clk driver.  The ad-hoc way to enable the clock
is no longer needed.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agommc: uniphier-sd: sync with Linux
Masahiro Yamada [Mon, 10 Sep 2018 03:58:35 +0000 (12:58 +0900)]
mmc: uniphier-sd: sync with Linux

Sync with the driver code and the binding recently merged in Linux.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: enable CONFIG_CMD_UBI
Masahiro Yamada [Mon, 10 Sep 2018 03:58:34 +0000 (12:58 +0900)]
ARM: uniphier: enable CONFIG_CMD_UBI

Now that CONFIG_SYS_MONITOR_LEN increased, we have room for enabling
more options again.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: uniphier: increase CONFIG_SYS_MONITOR_LEN again
Masahiro Yamada [Mon, 10 Sep 2018 03:58:33 +0000 (12:58 +0900)]
ARM: uniphier: increase CONFIG_SYS_MONITOR_LEN again

With the migration to distro-boot, the size of the U-Boot proper
image for uniphier_v7_defconfig exceeded the current limit, 576KB.
Increase it to 832KB.

CONFIG_SYS_UBOOT_BASE must be moved as well to avoid the image
over-wrap because the boot ROM of Pro4, Pro5, PXs2/LD6b loads
the SPL to the physical address 0x100000.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: dts: uniphier: sync DT with Linux 4.19-rc1
Masahiro Yamada [Mon, 10 Sep 2018 03:58:32 +0000 (12:58 +0900)]
ARM: dts: uniphier: sync DT with Linux 4.19-rc1

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoMAINTAINERS: Add myself as the FPGA maintainer
Michal Simek [Wed, 18 Jul 2018 15:03:13 +0000 (17:03 +0200)]
MAINTAINERS: Add myself as the FPGA maintainer

FPGA subsystem requires special care that's why it should be maintained
via one tree.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Fix loads command
Michal Simek [Tue, 5 Jun 2018 13:14:39 +0000 (15:14 +0200)]
cmd: fpga: Fix loads command

Convert last loads command to fpga subcommands.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Use CMD_RET_FAILURE instead of simple 1
Michal Simek [Tue, 5 Jun 2018 14:43:38 +0000 (16:43 +0200)]
cmd: fpga: Use CMD_RET_FAILURE instead of simple 1

Use standard return command failure macro.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Add support for missing fpga loadmk commands
Michal Simek [Thu, 26 Jul 2018 13:33:51 +0000 (15:33 +0200)]
cmd: fpga: Add support for missing fpga loadmk commands

There are ways how to call fpga loadmk

1. Full command
fpga loadmk [dev] [address]

2. Dev setup via variable
set fpga [dev]
fpga loadmk [address]

3. Address setup via variable
set fpgadata [address]
fpga loadmk [dev]

4. Dev and address setup via variables
set fpga [dev]
set fpgadata [address]
fpga loadmk

Before this patch only cases 1 and 3 are working but the part of code
was trying to support also cases 2 and 4.
This patch is adding support for cases 2 and 4 to have all of
combinations supported.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Fix loadmk command
Michal Simek [Mon, 4 Jun 2018 14:15:58 +0000 (16:15 +0200)]
cmd: fpga: Fix loadmk command

Convert loadmk command to fpga subcommands. Not all combinations are
working but they have never worked properly. This will be fixed later.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Fix loadfs command
Michal Simek [Mon, 4 Jun 2018 13:51:16 +0000 (15:51 +0200)]
cmd: fpga: Fix loadfs command

Convert loadfs command to fpga subcommands.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Fix dump and all direct fpga load commands
Michal Simek [Mon, 4 Jun 2018 13:51:23 +0000 (15:51 +0200)]
cmd: fpga: Fix dump and all direct fpga load commands

Separate dump, load, loadb, loadp and loadbp commands to separate
functions to make it clear how they are called and what parameters they
need.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Extract fpga info command to separate function
Michal Simek [Mon, 4 Jun 2018 12:57:34 +0000 (14:57 +0200)]
cmd: fpga: Extract fpga info command to separate function

Move fpga info to U_BOOT_CMD_MKENT subcommand.
Also use strtol instead of simple_strtoul. The reason is that if -1 is
passed (or fpga info without "fpga" variable) the list of all fpgas is
shown.
This functionality is in the fpga core but it couldn't be performed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Create new do_fpga_wrapper for using u-boot subcommands
Michal Simek [Mon, 4 Jun 2018 12:55:20 +0000 (14:55 +0200)]
cmd: fpga: Create new do_fpga_wrapper for using u-boot subcommands

Create command wrapper to clean fpga subcommands.
The function logic is taken from cmd_dm.c

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Clean wrong_parms handling
Michal Simek [Wed, 30 May 2018 09:28:57 +0000 (11:28 +0200)]
cmd: fpga: Clean wrong_parms handling

There is no reason to check parameters in separate switch. Check them
directly when they are read. Also there is no reason to check loadmk
case separately because fpga_data address must be non zero too.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Remove parameter checking from fpga loadfs command
Michal Simek [Mon, 4 Jun 2018 11:57:19 +0000 (13:57 +0200)]
cmd: fpga: Remove parameter checking from fpga loadfs command

Parameter checking is dead code because all the time there must be all
params assigned. If they are not assigned there is no 9th parameters
passed and checking before return CMD_RET_USAGE.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Move parameter checking for loadfs/loads
Michal Simek [Wed, 30 May 2018 09:18:38 +0000 (11:18 +0200)]
cmd: fpga: Move parameter checking for loadfs/loads

There is no reason to check parameters in separate switch before main
one. This patch is simplifying error path and checking parameters right
after assignment.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Cleanup error handling in connection to FPGA_NONE
Michal Simek [Wed, 30 May 2018 08:04:34 +0000 (10:04 +0200)]
cmd: fpga: Cleanup error handling in connection to FPGA_NONE

Incorrect command is already handled and FPGA_NONE should be used only
one. In case of error CMD_RET_USAGE can be returned directly without any
addition logic around.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Move fpga_get_op to avoid local function declaration
Michal Simek [Wed, 30 May 2018 08:00:40 +0000 (10:00 +0200)]
cmd: fpga: Move fpga_get_op to avoid local function declaration

Move fpga_get_op() to top of file to remove local function declaration
and also remove useless retyping.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Move error handling to do_fpga()
Michal Simek [Wed, 30 May 2018 07:57:42 +0000 (09:57 +0200)]
cmd: fpga: Move error handling to do_fpga()

Clean fpga_get_op() error handling by moving checking/print to do_fpga.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agotest/py: Extend fpga command to test all fpga load types
Michal Simek [Wed, 30 May 2018 11:42:22 +0000 (13:42 +0200)]
test/py: Extend fpga command to test all fpga load types

Add support for info, load, loadp, loadb, loadbp, loadmk_legacy,
loadmk_legacy_gz, loadmk_fit, loadfs also with variable support.

There are probably missing failed tests.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agocmd: fpga: Remove fit image support passed without fpga device
Michal Simek [Tue, 5 Jun 2018 11:52:32 +0000 (13:52 +0200)]
cmd: fpga: Remove fit image support passed without fpga device

The patch applied in 2010
"cmd_fpga: cleanup help and check parameters"
(sha1: a790b5b2326be9d7c9ad9e3d9b51a8bfabc62d07"
was adding this checking

+       if (dev == FPGA_INVALID_DEVICE) {
+               puts("FPGA device not specified\n");
+               op = FPGA_NONE;
+       }

which simply broke one command flow which was
setenv fpga <dev>
fpga loadmk <addr> // legacy image
fpga loadmk <addr>:<fit_image_name> //fit image

Also this sequence for FIT image is completely broken
setenv fpga <dev>
setenv fpgadata <addr>:<fit_image_name>
fpga loadmk
(Note: For legacy images this is working fine).

even from code I don't think this has ever worked properly
for fit image (dev = FPGA_INVALID_DEVICE should be rejected
by fpga core). Fit image support was in 2008 added by:
"[new uImage] Add new uImage fromat support to fpga command"
(sha1: c28c4d193dbfb20b2dd3a5447640fd6de7fd0720)

Just a summary of these facts that none found this for pretty long time
it shouldn't be a problem to remove this flow (without fpga dev)
completely to simplify the code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agofpga: Kconfig: Replace spaces with tabs
Michal Simek [Mon, 23 Jul 2018 13:59:55 +0000 (15:59 +0200)]
fpga: Kconfig: Replace spaces with tabs

Trivial Kconfig cleanup. Use tabs instead of spaces.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agocmd: part: use MAX_SEARCH_PARTITIONS for part search
Kever Yang [Fri, 7 Sep 2018 09:37:36 +0000 (17:37 +0800)]
cmd: part: use MAX_SEARCH_PARTITIONS for part search

Use Macro instead of hard code.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agoarm: armv7m: clean up armv7m unified code compilation
Vikas Manocha [Fri, 31 Aug 2018 23:57:06 +0000 (16:57 -0700)]
arm: armv7m: clean up armv7m unified code compilation

unified syntax should be selected by config ARM_ASM_UNIFIED

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
5 years agoarm: armv7m: remove un-necessary If then instruction
Vikas Manocha [Fri, 31 Aug 2018 23:39:36 +0000 (16:39 -0700)]
arm: armv7m: remove un-necessary If then instruction

With gas option -mimplicit-it=always, IT block is inserted by the assembler
for thumb2.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
5 years agoarm: stm32: Remove redundant thumb build selection
Vikas Manocha [Fri, 31 Aug 2018 23:15:14 +0000 (16:15 -0700)]
arm: stm32: Remove redundant thumb build selection

All armv7m arch builds are thumb & SYS_THUMB_BUILD is already selected by
CPU_ARMV7M.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
5 years agoarm: spear: enable GPIO3 and 4 clocks when the GPIO controller driver is built
Quentin Schulz [Fri, 31 Aug 2018 14:15:53 +0000 (16:15 +0200)]
arm: spear: enable GPIO3 and 4 clocks when the GPIO controller driver is built

There are multiple GPIOs that can be used with the same driver depending
on the CONFIG_GPIO_BASE defined in the controller driver.

GPIO3 and 4 require a clock to be enabled so let's enable them when the
driver is built.

Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com>
5 years agotools: mkimage: Ensure munmap unmaps the same length that was mapped
Mark Tomlinson [Tue, 28 Aug 2018 22:51:14 +0000 (10:51 +1200)]
tools: mkimage: Ensure munmap unmaps the same length that was mapped

The set_header call in kwbimage.c adds a checksum to the end of the
image in addition to setting up the header. It 'helpfully' updates the
st_size to match the fact that the file is now longer. However, mkimage
uses this length in the munmap call. This can lead to unmapping an extra
page, of perhaps required data. When this happens, a SEGV can occur.

To prevent this from happening, the munmap call now uses the same length
that was passed to mmap. This could also have been fixed by not changing
the length in kwbimage.c, however changing it in the main file means
that other plugins will also not fall for the same trap.

Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
[cp: resolve checkpatch complaints]
Tested-by: Chris Packham <judge.packham@gmail.com>
5 years agoserial: omap: Introduce DM specific omap serial
Lokesh Vutla [Mon, 27 Aug 2018 10:25:24 +0000 (15:55 +0530)]
serial: omap: Introduce DM specific omap serial

Add driver model support for OMAP_SERIAL while reusing
the functions in ns16550.c

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Derald D. Woods <woods.technical@gmail.com>
5 years agoomap3: pandora: Enable DM_SERIAL
Grazvydas Ignotas [Sat, 25 Aug 2018 19:40:08 +0000 (22:40 +0300)]
omap3: pandora: Enable DM_SERIAL

This patch enables DM_SERIAL for the pandora board. Verified that
the default kernel can still be booted with this.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
5 years agoboard: arm: Add support for Broadcom BCM7260
Thomas Fitzsimmons [Wed, 22 Aug 2018 22:37:55 +0000 (18:37 -0400)]
board: arm: Add support for Broadcom BCM7260

Add support for loading U-Boot on the Broadcom 7260 SoC.  This port
assumes Broadcom's BOLT bootloader is acting as the second stage
bootloader, and U-Boot is acting as the third stage bootloader, loaded
as an ELF program by BOLT.

Signed-off-by: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
5 years agoarm: bcm7445: Change serial console index
Thomas Fitzsimmons [Wed, 22 Aug 2018 22:37:54 +0000 (18:37 -0400)]
arm: bcm7445: Change serial console index

Change the configured serial console index to reflect that it is the
first physical UART, reorder some defconfig lines and move some
environment configuration from bcmstb.h to bcm7445.h.

Signed-off-by: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>
5 years agoARM: CPU: arm926ejs: Consolidate cache routines to common file
Adam Ford [Thu, 16 Aug 2018 18:23:11 +0000 (13:23 -0500)]
ARM: CPU: arm926ejs: Consolidate cache routines to common file

Four different boards had different options for enabling cache
that were virtually all the same.  This consolidates these
common functions into arch/arm/cpu/arm926ejs/cache.c

This also has the positive side-effect of enabling cache on
the Davinci (da850) boards.

Signed-off-by: Adam Ford <aford173@gmail.com>
[trini: Add mach-at91 to the list of consolidations]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoserial: arm_dcc: Add DCC support for V7R based cores
Lokesh Vutla [Thu, 16 Aug 2018 13:13:56 +0000 (18:43 +0530)]
serial: arm_dcc: Add DCC support for V7R based cores

DCC is supported on Cortex R series as well. Enable DCC support
for V7R.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agopinctrl: Fix build warning with ARM64
Lokesh Vutla [Thu, 16 Aug 2018 13:11:49 +0000 (18:41 +0530)]
pinctrl: Fix build warning with ARM64

Following build warning appears when pinctrl-single is built for ARM64:

In file included from drivers/pinctrl/pinctrl-single.c:10:0:
drivers/pinctrl/pinctrl-single.c: In function ‘single_configure_pins’:
./arch/arm/include/asm/io.h:43:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 #define __arch_getw(a)   (*(volatile unsigned short *)(a))

Fix this by using phys_addr_t for variable reg instead of u32

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agodm: omap-timer: Update clock rate only if not populated
Lokesh Vutla [Thu, 16 Aug 2018 12:56:55 +0000 (18:26 +0530)]
dm: omap-timer: Update clock rate only if not populated

timer_pre_probe() tries to populate the clock rate from DT. omap
timer driver tries to overwrite this value irrespective of the value
populated fro DT. So update this value only when DT doesn't populate
the clock rate.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agodm: omap-timer: Use 64bit for counter values
Lokesh Vutla [Thu, 16 Aug 2018 12:56:54 +0000 (18:26 +0530)]
dm: omap-timer: Use 64bit for counter values

In order to handle counter overflows use 64 bit values for counter.
Also load the initial value during probe.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agommc: fsl_esdhc: enable HS400 feature
Peng Fan [Fri, 10 Aug 2018 06:07:55 +0000 (14:07 +0800)]
mmc: fsl_esdhc: enable HS400 feature

The strobe dll code is ported from Linux Kernel:
drivers/mmc/host/sdhci-esdhc-imx.c
The comments are from the above file,
"For HS400 eMMC, there is a data_strobe line. This signal is generated
by the device and used for data output and CRC status response output
in HS400 mode. The frequency of this signal follows the frequency of
CLK generated by host. The host receives the data which is aligned to the
edge of data_strobe line. Due to the time delay between CLK line and
data_strobe line, if the delay time is larger than one clock cycle,
then CLK and data_strobe line will be misaligned, read error shows up.
So when the CLK is higher than 100MHz, each clock cycle is short enough,
host should configure the delay target. "

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agommc: add HS400 support
Peng Fan [Fri, 10 Aug 2018 06:07:54 +0000 (14:07 +0800)]
mmc: add HS400 support

Add HS400 support.
Selecting HS400 needs first select HS200 according to spec, so use
a dedicated function for HS400.
Add HS400 related macros.
Remove the restriction of only using the low 6 bits of
EXT_CSD_CARD_TYPE, using all the 8 bits.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoat91: fix devicetree warnings
Eugen Hristev [Thu, 9 Aug 2018 11:12:01 +0000 (14:12 +0300)]
at91: fix devicetree warnings

This commit fixes various devicetree warnings in the at91 devicetrees
like:
arch/arm/dts/sama5d36ek_cmp.dtb: Warning (avoid_unnecessary_addr_size): /gpio_keys: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

These warnings make buildman report failed builds for most of at91 boards.
Thus, fixing it.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
5 years agoARM: dts: Makefile: fix build for at91family
Eugen Hristev [Thu, 9 Aug 2018 11:12:00 +0000 (14:12 +0300)]
ARM: dts: Makefile: fix build for at91family

For at91family, makefile was building unwanted DTBs
Moved them under specific target configuration.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
5 years agogpio: stm32f7: replace ODR update by BSRR write
Patrice Chotard [Thu, 9 Aug 2018 09:57:57 +0000 (11:57 +0200)]
gpio: stm32f7: replace ODR update by BSRR write

Replace clrsetbits on ODR register (2 operations: one read + one write)
by writing on the correct bit (SET or RESET) of the BSRR register
(only 1 write operation).

Moreover this register if safe for simultaneous access by 2 master on
the bus.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
5 years agoclk: clk_meson: Add mux and div support for reparent and rate setting
Neil Armstrong [Mon, 6 Aug 2018 12:49:20 +0000 (14:49 +0200)]
clk: clk_meson: Add mux and div support for reparent and rate setting

This patch adds support for :
- Rate calculation through muxes and generic dividers
- Basic gate setting propagation
- Reparenting for muxes
- Clock rate setting through generic dividers without reparenting

Support is only added to the Composite VPU and VAPB clocks in order
to support the Video Processing Unit Power Domain clock setup.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agopower: domain: Add the VPU Power Domain driver
Neil Armstrong [Mon, 6 Aug 2018 12:49:19 +0000 (14:49 +0200)]
power: domain: Add the VPU Power Domain driver

The Amlogic Meson SoCs embeds a specific Power Domain dedicated to the
Video Processing Unit.
This patch implements support for this power domain in preparation of the
future support for the Video display support in U-Boot.

This driver will depend on changes in the clock driver to handle the setup
of the VPU and VAPB clocks configured from DT using assigned-clocks entries.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agoRemove <inttypes.h> includes and PRI* usages in printf() entirely
Masahiro Yamada [Mon, 6 Aug 2018 11:47:40 +0000 (20:47 +0900)]
Remove <inttypes.h> includes and PRI* usages in printf() entirely

In int-ll64.h, we always use the following typedefs:

  typedef unsigned int         u32;
  typedef unsigned long        uintptr_t;
  typedef unsigned long long   u64;

This does not need to match to the compiler's <inttypes.h>.
Do not include it.

The use of PRI* makes the code super-ugly.  You can simply use
"l" for printing uintptr_t, "ll" for u64, and no modifier for u32.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoarch: types.h: factor out fixed width typedefs to int-ll64.h
Masahiro Yamada [Mon, 6 Aug 2018 11:47:39 +0000 (20:47 +0900)]
arch: types.h: factor out fixed width typedefs to int-ll64.h

All architectures have the same definition for s8/16/32/64
and u8/16/32/64.

Factor out the duplicated code into <asm-generic/int-ll64.h>.

BTW, Linux unified the kernel space definition into int-ll64.h
a few years ago as you see in Linux commit 0c79a8e29b5f
("asm/types.h: Remove include/asm-generic/int-l64.h").

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoRemove CONFIG_USE_STDINT
Masahiro Yamada [Mon, 6 Aug 2018 11:47:38 +0000 (20:47 +0900)]
Remove CONFIG_USE_STDINT

You do not need to use the typedefs provided by compiler.

Our compilers are either IPL32 or LP64.  Hence, U-Boot can/should
always use int-ll64.h typedefs like Linux kernel, whatever the
typedefs the compiler internally uses.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoarm: armv7-a: Compile and tune for armv7-a instead of armv5
Adam Ford [Sat, 4 Aug 2018 21:34:54 +0000 (16:34 -0500)]
arm: armv7-a: Compile and tune for armv7-a instead of armv5

arch/arm/Makefile references armv5 for backwards compatibility with
older compilers.  This patch removes those references to armv5,
since by now newer compilers are required which should have armv7
support enabled.

The Makefile also also has a list of options for mtune, but the
entry for CONFIG_CPU_V7A is empty, so this patch tunes the
CPU_V7A architecture to generic-armv7-a.

The following size changed apply to omap3_logic using GCC.

Stock
text data bss dec hex filename
50910 429 67580 118919 1d087 spl/u-boot-spl
540713 22700 327072 890485   d9675 u-boot

Without Armv5
text data bss dec hex filename
50916 429 67580 118925   1d08d spl/u-boot-spl
540719 22700 327064 890483   d9673 u-boot

mtune=generic-armv7-a
text data bss dec hex filename
50932 429 67580 118941   1d09d spl/u-boot-spl
540519 22700 327080 890299   d95bb u-boot

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agosandbox: Add serial test
Patrice Chotard [Fri, 3 Aug 2018 13:07:41 +0000 (15:07 +0200)]
sandbox: Add serial test

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agodm: serial: Remove setparity ops
Patrice Chotard [Fri, 3 Aug 2018 13:07:40 +0000 (15:07 +0200)]
dm: serial: Remove setparity ops

setparity users has been updated to use new setconfig ops,
so we can safely remove setparity ops

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoserial: stm32: Replace setparity by setconfig
Patrice Chotard [Fri, 3 Aug 2018 13:07:39 +0000 (15:07 +0200)]
serial: stm32: Replace setparity by setconfig

Replace stm32_serial_setparity by stm32_serial_setconfig
which allows to set serial bits number, parity and stop
bits number.
Only parity setting is implemented.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agodm: serial: Replace setparity by setconfig
Patrice Chotard [Fri, 3 Aug 2018 13:07:38 +0000 (15:07 +0200)]
dm: serial: Replace setparity by setconfig

Replace setparity by more generic setconfig ops
to allow uart parity, bits word length and stop bits
number change.

Adds SERIAL_GET_PARITY/BITS/STOP macros.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>