platform/kernel/u-boot.git
8 years agofpga: xilinx: zynqmp: Add PL bitstream download support for ZynqMP
Siva Durga Prasad Paladugu [Wed, 13 Jan 2016 10:55:37 +0000 (16:25 +0530)]
fpga: xilinx: zynqmp: Add PL bitstream download support for ZynqMP

Add PL bitstream dowload support for ZynqMP
Bitstream will be validated by uboot and loaded
to PL by invoking an smc instruction to ATF which route this request to
PMU FW which will take care of loading it to PL

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Fix USB ulpi phy sequence
Michal Simek [Tue, 16 Aug 2016 13:40:05 +0000 (15:40 +0200)]
ARM64: zynqmp: Fix USB ulpi phy sequence

It should be enough to call low(5us)->high pulse for all cases
to provide proper reset. There is no need to call high->low->high.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Add support for USB ulpi phy reset via mode pins
Michal Simek [Mon, 15 Aug 2016 07:41:36 +0000 (09:41 +0200)]
ARM64: zynqmp: Add support for USB ulpi phy reset via mode pins

Mode pins can be used as output for reset. Xilinx boards are using
this feature as additional way how to reset USB phys and also others
chips on the boards.
Mode1 is used on all these boards for this feature.
Let SPL toggle reset on this pin by default.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Add support for DFU from SPL
Michal Simek [Fri, 19 Aug 2016 12:14:52 +0000 (14:14 +0200)]
ARM64: zynqmp: Add support for DFU from SPL

SPL needs to have bigger stack size because of USB.
Simple malloc needs to be disabled because dfu code requires different
allocation functions. There is no space in OCM that's why random place
in DDR is used.

BOOTD must be disabled because it is causing compilation error.

All variables are disabled and used only variables valid for DFU because
they are simple huge. Including automatic variables added by
CONFIG_ENV_VARS_UBOOT_CONFIG.
Hardcode addresses for u-boot, atf, kernel and dtb
just for SPL DFU code.

Enable SPL DFU for zcu100.
Create new usb_dfu_spl variable just to run Linux kernel loaded in SPL.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: Add new BOOT_DEVICE_DFU boot mode
Michal Simek [Tue, 30 Aug 2016 13:38:57 +0000 (15:38 +0200)]
ARM: Add new BOOT_DEVICE_DFU boot mode

This enum is needed when SPL_DFU is enabled.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Add USB boot mode
Michal Simek [Fri, 29 Apr 2016 11:00:10 +0000 (13:00 +0200)]
ARM64: zynqmp: Add USB boot mode

Add USB boot mode.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Move BSS location to the beginning of ram
Michal Simek [Tue, 30 Aug 2016 12:58:46 +0000 (14:58 +0200)]
ARM64: zynqmp: Move BSS location to the beginning of ram

With SPL_DFU support memory layout needs to be cleanup
that's why move bss to the start of memory.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agospi: zynq: Use variable to remove u32 to u64 conversions
Michal Simek [Thu, 1 Sep 2016 10:51:27 +0000 (12:51 +0200)]
spi: zynq: Use variable to remove u32 to u64 conversions

Current code generates warning when it is compiled for arm64:
Warnings:
In file included from drivers/spi/zynq_spi.c:14:0:
drivers/spi/zynq_spi.c: In function ‘zynq_spi_init_hw’:
drivers/spi/zynq_spi.c:95:9: warning: large integer implicitly truncated
to unsigned type [-Woverflow]
  writel(~ZYNQ_SPI_ENR_SPI_EN_MASK, &regs->enr);
         ^
./arch/arm/include/asm/io.h:146:34: note: in definition of macro
‘writel’
 #define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v;
})
                                  ^
drivers/spi/zynq_spi.c: In function ‘zynq_spi_release_bus’:
drivers/spi/zynq_spi.c:177:9: warning: large integer implicitly
truncated to unsigned type [-Woverflow]
  writel(~ZYNQ_SPI_ENR_SPI_EN_MASK, &regs->enr);
         ^
./arch/arm/include/asm/io.h:146:34: note: in definition of macro
‘writel’
 #define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v;
})
                                  ^
This patch is using one variable to do conversion via u32 variable.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agoARM64: zynqmp: Fix usb_gadget_handle_interrupt routine
Michal Simek [Thu, 1 Sep 2016 09:16:40 +0000 (11:16 +0200)]
ARM64: zynqmp: Fix usb_gadget_handle_interrupt routine

Function is defined in g_dnl.h and have different parameter
then it is used. This patch fixes it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Force certain bootmode for SPL
Michal Simek [Tue, 30 Aug 2016 14:17:27 +0000 (16:17 +0200)]
ARM64: zynqmp: Force certain bootmode for SPL

ZynqMP provides an option to overwrite bootmode setting which
can change SPL behavior.
For example: boot SPL via JTAG and then SPL loads images from SD.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Wire up both USBs available on ZynqMP
Michal Simek [Mon, 8 Aug 2016 08:11:26 +0000 (10:11 +0200)]
ARM64: zynqmp: Wire up both USBs available on ZynqMP

The second USB wasn't enabled. This patch fixes it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agofpga: Add Kconfig to fpga subsystem
Michal Simek [Mon, 19 Sep 2016 08:41:55 +0000 (10:41 +0200)]
fpga: Add Kconfig to fpga subsystem

Add missing Kconfig to fpga subsystem to be able
to add new options.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Tue, 20 Sep 2016 13:34:53 +0000 (09:34 -0400)]
Merge git://git.denx.de/u-boot-dm

8 years agoPowerPC: Update last users of CONFIG_ISO_STRING to Kconfig
Tom Rini [Tue, 20 Sep 2016 02:02:46 +0000 (22:02 -0400)]
PowerPC: Update last users of CONFIG_ISO_STRING to Kconfig

There are a few boards that use CONFIG_ISO_STRING as part of a sanity
check during firmware update at run time.  Move this string to Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoPowerPC: Update MIP405/MIP405T to use Kconfig better
Tom Rini [Tue, 20 Sep 2016 01:55:34 +0000 (21:55 -0400)]
PowerPC: Update MIP405/MIP405T to use Kconfig better

Convert CONFIG_MIP405T from SYS_EXTRA_OPTIONS to a real config

There are two boards, MIP405 and MIP405T that have a few differences.
Start by checking for CONFIG_TARGET_MIP405.  Then introduce
CONFIG_TARGET_MIP405T and use that not CONFIG_MIP405T.  Next, convert
also convert the usage of CONFIG_ISO_STRING to be based on Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoKconfig: Move config IDENT_STRING to Kconfig
Siva Durga Prasad Paladugu [Fri, 29 Jul 2016 10:01:47 +0000 (15:31 +0530)]
Kconfig: Move config IDENT_STRING to Kconfig

Move the config IDENT_STRING to Kconfig and migrate all boards

[sivadur: Migrate zynq boards]
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
[trini: Update configs, add some default to sunxi Kconfig]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: Re-sync
Tom Rini [Mon, 19 Sep 2016 21:00:58 +0000 (17:00 -0400)]
configs: Re-sync

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoRevert "Increase default of CONFIG_SYS_MALLOC_F_LEN for SPL_OF_CONTROL"
Masahiro Yamada [Mon, 19 Sep 2016 12:40:26 +0000 (21:40 +0900)]
Revert "Increase default of CONFIG_SYS_MALLOC_F_LEN for SPL_OF_CONTROL"

This reverts commit 90c08d9e08c7a108ab904f3bbdeb558081757892.

I took a closer look at this after the commit was applied, and found
CONFIG_SYS_MALLOC_F_LEN=0x2000 was too much.  8KB memory for SPL is
actually too big for some boards.  Perhaps 0x800 is enough, but the
situation varies board by board.

Let's postpone our decision until we come up with a better idea.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoA20-OLinuXino-Lime2: Enable USB gadget support
Tom Rini [Mon, 19 Sep 2016 14:03:32 +0000 (10:03 -0400)]
A20-OLinuXino-Lime2: Enable USB gadget support

Based on A13-OLinuXino, enable DFU and UMS support.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
8 years agodtoc: Add methods for reading data from properties
Simon Glass [Tue, 26 Jul 2016 00:59:18 +0000 (18:59 -0600)]
dtoc: Add methods for reading data from properties

Provide easy helpers for reading integer, string and boolean values from
device-tree properties.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Correct quotes in fdt_util
Simon Glass [Tue, 26 Jul 2016 00:59:17 +0000 (18:59 -0600)]
dtoc: Correct quotes in fdt_util

The style is to use single quotes for strings where possible. Adjust this
function.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Support finding the offset of a property
Simon Glass [Tue, 26 Jul 2016 00:59:16 +0000 (18:59 -0600)]
dtoc: Support finding the offset of a property

Add a way to find the byte offset of a property within the device tree. This
is only supported with the normal libfdt implementation since fdtget does
not provide this information.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Support packing the device tree
Simon Glass [Tue, 26 Jul 2016 00:59:15 +0000 (18:59 -0600)]
dtoc: Support packing the device tree

After any node/property deletion the device tree can be packed to remove
spare space. Add a way to perform this operation.

Note that for fdt_fallback, fdtput automatically packs the device tree after
deletion, so no action is required here.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Support deleting device tree properties
Simon Glass [Tue, 26 Jul 2016 00:59:14 +0000 (18:59 -0600)]
dtoc: Support deleting device tree properties

Add support for deleting a device tree property. With the fallback
implementation this uses fdtput. With libfdt it uses the API call and
updates the offsets afterwards.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Move to using bytearray
Simon Glass [Tue, 26 Jul 2016 00:59:13 +0000 (18:59 -0600)]
dtoc: Move to using bytearray

Since we want to be able to change the in-memory device tree using libfdt,
use a bytearray instead of a string. This makes interfacing from Python
easier.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Prepare for supporting changing of device trees
Simon Glass [Tue, 26 Jul 2016 00:59:12 +0000 (18:59 -0600)]
dtoc: Prepare for supporting changing of device trees

For binman we need to support deleting properties in the device tree. This
will change the offsets of nodes after the deletion. In preparation, add
code to keep track of when the offsets are invalid, and regenerate them.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Drop the convert_dash parameter to GetProps()
Simon Glass [Tue, 26 Jul 2016 00:59:11 +0000 (18:59 -0600)]
dtoc: Drop the convert_dash parameter to GetProps()

This is not used anywhere in dtoc, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Allow the device tree to be compiled from source
Simon Glass [Tue, 26 Jul 2016 00:59:10 +0000 (18:59 -0600)]
dtoc: Allow the device tree to be compiled from source

If a source device tree is provide to the Fdt() constructors, compile it
automatically. This will be used in tests, where we want to build a
particular test .dts file and check that it works correctly in binman.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agopatman: Add a library to handle logging and progress
Simon Glass [Tue, 26 Jul 2016 00:59:09 +0000 (18:59 -0600)]
patman: Add a library to handle logging and progress

When tools want to display information of varying levels of importance, it
helps to provide the user with control over the verbosity of these messages.
Progress messages work best if they are displayed and then removed from the
display when no-longer relevant.

Add a new tout library (terminal out) to handle these tasks.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agopatman: Add a tools library for using temporary files
Simon Glass [Tue, 26 Jul 2016 00:59:08 +0000 (18:59 -0600)]
patman: Add a tools library for using temporary files

For tools which want to use input files and temporary output, it is useful
to have the handling of these dealt with in one place. Add a new library
which allows input files to be read, and output files to be written, all
based on a common directory structure.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Move a few more common functions into fdt.py
Simon Glass [Tue, 26 Jul 2016 00:59:07 +0000 (18:59 -0600)]
dtoc: Move a few more common functions into fdt.py

Some functions have the same code in the subclasses. Move these into the
superclass to avoid duplication.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Move Widen() and GetPhandle() into the base class
Simon Glass [Tue, 26 Jul 2016 00:59:06 +0000 (18:59 -0600)]
dtoc: Move Widen() and GetPhandle() into the base class

These functions are identical in both subclasses. Move them into the base
class.

Note: In fact there is a bug in one version, which was fixed by this patch:

https://patchwork.ozlabs.org/patch/651697/

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Move BytesToValue() and GetEmpty() into PropBase
Simon Glass [Tue, 26 Jul 2016 00:59:05 +0000 (18:59 -0600)]
dtoc: Move BytesToValue() and GetEmpty() into PropBase

These functions are currently in a separate fdt_util file. Since they are
only used from PropBase and subclasses, it makes sense for them to be in the
PropBase class.

Move these functions into fdt.py along with the list of types.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Create a base class for Fdt
Simon Glass [Tue, 26 Jul 2016 00:59:04 +0000 (18:59 -0600)]
dtoc: Create a base class for Fdt

At present we have two separate implementations of the Fdt library, one which
uses fdtget/fdtput and one which uses libfdt (via swig).

Before adding more functionality it makes sense to create a base class for
these. This will allow common functions to be shared, and make the Fdt API
a little clearer.

Create a new fdt.py file with the base class, and adjust fdt_normal.py and
fdt_fallback.py to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Rename fdt.py to fdt_normal.py
Simon Glass [Tue, 26 Jul 2016 00:59:03 +0000 (18:59 -0600)]
dtoc: Rename fdt.py to fdt_normal.py

In preparation for creating an Fdt base class, rename this file to indicate
it is the normal Fdt implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Move the fdt library selection into fdt_select
Simon Glass [Tue, 26 Jul 2016 00:59:02 +0000 (18:59 -0600)]
dtoc: Move the fdt library selection into fdt_select

Rather than have dtc worry about which fdt library to use, move this into
a helper file. Add a function which creates a new Fdt object and scans it,
regardless of the implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agodtoc: Move the struct import into the correct order
Simon Glass [Tue, 26 Jul 2016 00:59:01 +0000 (18:59 -0600)]
dtoc: Move the struct import into the correct order

This should be in with the other system includes. Move it.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agopatman: Adjust command.Output() to raise an error by default
Simon Glass [Tue, 26 Jul 2016 00:59:00 +0000 (18:59 -0600)]
patman: Adjust command.Output() to raise an error by default

It is more useful to have this method raise an error when something goes
wrong. Make this the default and adjust the few callers that don't want to
use it this way.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agosandbox: Add "host size" hostfs command for fs test
Stefan Brüns [Thu, 11 Aug 2016 20:52:04 +0000 (22:52 +0200)]
sandbox: Add "host size" hostfs command for fs test

This complements the size/fatsize/ext4size commands added in
commit cf6598193aed5de8855eaf70c1994f2bc437255a
load, save and ls are already implemented for hostfs, now tests can
cover the same operations on hostfs and emulated block devices.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agosandbox: document support of block device emulation
Stefan Brüns [Thu, 11 Aug 2016 20:52:03 +0000 (22:52 +0200)]
sandbox: document support of block device emulation

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Simon Glass <sjg@chromium.org>
Changed 'Sandbox' to 'sandbox' in subject:
Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Sun, 18 Sep 2016 16:12:04 +0000 (12:12 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-sunxi
Tom Rini [Sun, 18 Sep 2016 16:11:50 +0000 (12:11 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-sunxi

8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-arc
Tom Rini [Sun, 18 Sep 2016 16:10:54 +0000 (12:10 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-arc

8 years agoARM: uniphier: update DRAM init code for LD20 SoC
Masahiro Yamada [Fri, 16 Sep 2016 18:33:12 +0000 (03:33 +0900)]
ARM: uniphier: update DRAM init code for LD20 SoC

Import the latest version from the Diag software.

  - Support LD21 SoC (including DDR chips in the package)
  - Per-board granule adjustment for both reference and TV boards
  - Misc cleanups

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: add PLL init code for LD20 SoC
Masahiro Yamada [Fri, 16 Sep 2016 18:33:11 +0000 (03:33 +0900)]
ARM: uniphier: add PLL init code for LD20 SoC

Initialize the DPLL (PLL for DRAM) in SPL, and others in U-Boot
proper.  Split the common code into pll-base-ld20.c for easier
re-use.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: collect clock/PLL init code into a single directory
Masahiro Yamada [Fri, 16 Sep 2016 18:33:10 +0000 (03:33 +0900)]
ARM: uniphier: collect clock/PLL init code into a single directory

Now PLLs for DRAM controller are initialized in SPL, and the others
in U-Boot proper.  Setting up all of them in a single directory will
be helpful when we want to share code between SPL and U-Boot proper.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: move PLL init code to U-Boot proper where possible
Masahiro Yamada [Fri, 16 Sep 2016 18:33:09 +0000 (03:33 +0900)]
ARM: uniphier: move PLL init code to U-Boot proper where possible

The PLL for the DRAM interface must be initialized in SPL, but the
others can be delayed until U-Boot proper.  Move them from SPL to
U-Boot proper to save the precious SPL memory footprint.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: rename CONFIG_DPLL_SSC_RATE_1PER
Masahiro Yamada [Fri, 16 Sep 2016 18:33:08 +0000 (03:33 +0900)]
ARM: uniphier: rename CONFIG_DPLL_SSC_RATE_1PER

Basically, this should not be configured by users.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: move XIRQ pin-mux settings of LD11/LD20
Masahiro Yamada [Fri, 16 Sep 2016 18:33:07 +0000 (03:33 +0900)]
ARM: uniphier: move XIRQ pin-mux settings of LD11/LD20

This is the last code in the mach-uniphier/pinctrl/ directory.
Push the remaining code out to delete the directory entirely.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: consolidate System Bus pin-mux settings for LD11/LD20
Masahiro Yamada [Fri, 16 Sep 2016 18:33:06 +0000 (03:33 +0900)]
ARM: uniphier: consolidate System Bus pin-mux settings for LD11/LD20

Use the pin-mux data in the pinctrl drivers by directly calling
pinctrl_generic_set_state().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: dts: uniphier: include System Bus pin group node in SPL DT
Masahiro Yamada [Fri, 16 Sep 2016 18:33:05 +0000 (03:33 +0900)]
ARM: dts: uniphier: include System Bus pin group node in SPL DT

This will be needed for setting up the System Bus pin-mux via the
LD11/LD20 pinctrl driver.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: consolidate NAND pin-mux settings
Masahiro Yamada [Fri, 16 Sep 2016 18:33:04 +0000 (03:33 +0900)]
ARM: uniphier: consolidate NAND pin-mux settings

The NAND subsystem has not supported the Driver Model yet, but the
NAND pin-mux data are already in the pinctrl drivers.  Use them by
calling pinctrl_generic_set_state() directly.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: remove ad-hoc pin-mux code for sLD3
Masahiro Yamada [Fri, 16 Sep 2016 18:33:03 +0000 (03:33 +0900)]
ARM: uniphier: remove ad-hoc pin-mux code for sLD3

These settings are nicely cared by the pinctrl driver now.  Remove.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: remove redundant pin-muxing for EA24 pin of sLD3 SoC
Masahiro Yamada [Fri, 16 Sep 2016 18:33:02 +0000 (03:33 +0900)]
ARM: uniphier: remove redundant pin-muxing for EA24 pin of sLD3 SoC

This is enabled by default for all the supported boot modes.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: select PINCTRL and SPL_PINCTRL
Masahiro Yamada [Fri, 16 Sep 2016 18:33:01 +0000 (03:33 +0900)]
ARM: uniphier: select PINCTRL and SPL_PINCTRL

Now all UniPhier SoCs support a pinctrl driver.  Select (SPL_)PINCTRL
since it is mandatory even for base use.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: dts: uniphier: add pinctrl device node and pinctrl properties
Masahiro Yamada [Fri, 16 Sep 2016 18:33:00 +0000 (03:33 +0900)]
ARM: dts: uniphier: add pinctrl device node and pinctrl properties

DT-side updates to make pinctrl on sLD3 SoC really available.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agopinctrl: uniphier: add UniPhier sLD3 pinctrl driver
Masahiro Yamada [Fri, 16 Sep 2016 18:32:59 +0000 (03:32 +0900)]
pinctrl: uniphier: add UniPhier sLD3 pinctrl driver

Add pin-mux support for UniPhier sLD3 SoC.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agopinctrl: uniphier: support 4bit-width pin-mux register capability
Masahiro Yamada [Fri, 16 Sep 2016 18:32:58 +0000 (03:32 +0900)]
pinctrl: uniphier: support 4bit-width pin-mux register capability

On LD4 SoC or later, the pin-mux registers are 8bit wide, while 4bit
wide on sLD3 SoC.  Support it for the sLD3 pinctrl driver.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agosunxi: Enable USB gadget support for Sinlinx SinA33
Chen-Yu Tsai [Wed, 14 Sep 2016 02:26:36 +0000 (10:26 +0800)]
sunxi: Enable USB gadget support for Sinlinx SinA33

Sinlinx SinA33 has a USB OTG port, but VBUS is controlled manually from
a jumper pad.

Enable OTG in gadget mode, as well as the download gadget and related
functions.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Enable USB host support for Sinlinx SinA33
Chen-Yu Tsai [Wed, 14 Sep 2016 02:26:35 +0000 (10:26 +0800)]
sunxi: Enable USB host support for Sinlinx SinA33

Sinlinx SinA33 has 1 USB host port. Enable EHCI_HCD support for it.
Also enable USB mass storage support so we can access USB sticks.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Add mmc0 card detect pin for Sinlinx SinA33
Chen-Yu Tsai [Wed, 14 Sep 2016 02:26:34 +0000 (10:26 +0800)]
sunxi: Add mmc0 card detect pin for Sinlinx SinA33

Sinlinx SinA33 uses PB4 for mmc0 card detect.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Add defconfig and dts for the NanoPi NEO
Jelle van der Waa [Tue, 13 Sep 2016 16:03:23 +0000 (18:03 +0200)]
sunxi: Add defconfig and dts for the NanoPi NEO

The NanoPi NEO is a simple h3 board with 512MB RAM, ethernet, one usb
and one usb OTG connector.

Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: musb: Re-init musb controller on repeated probe calls
Hans de Goede [Sat, 17 Sep 2016 14:02:38 +0000 (16:02 +0200)]
sunxi: musb: Re-init musb controller on repeated probe calls

With sunxi-musb musb_lowlevel_init() can fail when a charger; or no cable
is plugged into the otg port.

To avoid leaking the struct musb allocated by musb_init_controller()
on repeated musb_usb_probe() calls, we were caching its result.
But musb_init_controller() does more, such as calling sunxi_musb_init()
which enables the clocks.

Not calling sunxi_musb_init() causes the musb controller to stop working
after a "usb reset" since that calls musb_usb_remove() which disables the
clocks.

This commit fixes this by removing the caching of the struct returned
from musb_init_controller(), it replaces this by free-ing the allocated
memory in musb_usb_remove() and calling musb_usb_remove() on
musb_usb_probe() errors to ensure proper cleanup.

While at it also make musb_usb_probe() and musb_usb_remove() static.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: musb: Power off OTG port VBUS when disabled
Chen-Yu Tsai [Wed, 7 Sep 2016 06:25:21 +0000 (14:25 +0800)]
sunxi: musb: Power off OTG port VBUS when disabled

The Linux kernel musb driver expects VBUS to be off while initializing
musb. Having it on results in a repeating string of warnings, followed
by an unusable peripheral. The peripheral is only usable after
physically removing the OTG adapter, letting musb reset its state.

This partially reverts commit c9f8947e6604 ("sunxi: usb-phy: Never
power off the usb ports")

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: axp2xx: disable ldoio0/1 at boot
Hans de Goede [Mon, 12 Sep 2016 07:52:52 +0000 (09:52 +0200)]
sunxi: axp2xx: disable ldoio0/1 at boot

When cold-booting the ldoio0/1 regulators are always off / the
gpios are always at tristate. But when re-booting from android these
are sometimes on. Disable them at axp_init time (iow as early as possible)
to remove this difference between a cold boot and a reboot.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agoMakefile: Give a build error if ad-hoc CONFIG options are added
Simon Glass [Wed, 14 Sep 2016 03:44:07 +0000 (21:44 -0600)]
Makefile: Give a build error if ad-hoc CONFIG options are added

New CONFIG options should be added via Kconfig. To help prevent new ad-hoc
CONFIGs from being added, give a build error when these are detected.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
8 years agoKconfig: Add a whitelist of ad-hoc CONFIG options
Simon Glass [Wed, 14 Sep 2016 03:44:06 +0000 (21:44 -0600)]
Kconfig: Add a whitelist of ad-hoc CONFIG options

Add a list of ad-hoc CONFIG options that don't use Kconfig. This can be used
to check that new ones are not being added.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_YMODEM_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:19:03 +0000 (23:19 -0600)]
Convert CONFIG_SPL_YMODEM_SUPPORT to Kconfig

Convert CONFIG_SPL_YMODEM_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_WATCHDOG_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:19:02 +0000 (23:19 -0600)]
Convert CONFIG_SPL_WATCHDOG_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_USB_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:19:01 +0000 (23:19 -0600)]
Convert CONFIG_SPL_USB_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_USB_HOST_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:19:00 +0000 (23:19 -0600)]
Convert CONFIG_SPL_USB_HOST_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_USBETH_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:59 +0000 (23:18 -0600)]
Convert CONFIG_SPL_USBETH_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_SPI_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:58 +0000 (23:18 -0600)]
Convert CONFIG_SPL_SPI_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_SPI_FLASH_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:57 +0000 (23:18 -0600)]
Convert CONFIG_SPL_SPI_FLASH_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_SERIAL_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:56 +0000 (23:18 -0600)]
Convert CONFIG_SPL_SERIAL_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_SATA_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:55 +0000 (23:18 -0600)]
Convert CONFIG_SPL_SATA_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_POWER_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:54 +0000 (23:18 -0600)]
Convert CONFIG_SPL_POWER_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoRemove CONFIG_SPL_PINCTRL_SUPPORT
Simon Glass [Tue, 13 Sep 2016 13:05:50 +0000 (07:05 -0600)]
Remove CONFIG_SPL_PINCTRL_SUPPORT

This option is not used. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_ONENAND_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:52 +0000 (23:18 -0600)]
Convert CONFIG_SPL_ONENAND_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_NOR_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:51 +0000 (23:18 -0600)]
Convert CONFIG_SPL_NOR_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_NET_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:50 +0000 (23:18 -0600)]
Convert CONFIG_SPL_NET_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_NET_VCI_STRING to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:49 +0000 (23:18 -0600)]
Convert CONFIG_SPL_NET_VCI_STRING to Kconfig

This converts the following to Kconfig:
   CONFIG_SPL_NET_VCI_STRING

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_NAND_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:48 +0000 (23:18 -0600)]
Convert CONFIG_SPL_NAND_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_MUSB_NEW_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:47 +0000 (23:18 -0600)]
Convert CONFIG_SPL_MUSB_NEW_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_MTD_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:46 +0000 (23:18 -0600)]
Convert CONFIG_SPL_MTD_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:45 +0000 (23:18 -0600)]
Convert CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_MMC_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:44 +0000 (23:18 -0600)]
Convert CONFIG_SPL_MMC_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_LIBGENERIC_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:43 +0000 (23:18 -0600)]
Convert CONFIG_SPL_LIBGENERIC_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_LIBDISK_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:42 +0000 (23:18 -0600)]
Convert CONFIG_SPL_LIBDISK_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_LIBCOMMON_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:41 +0000 (23:18 -0600)]
Convert CONFIG_SPL_LIBCOMMON_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_I2C_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:40 +0000 (23:18 -0600)]
Convert CONFIG_SPL_I2C_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_GPIO_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:39 +0000 (23:18 -0600)]
Convert CONFIG_SPL_GPIO_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_FAT_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:38 +0000 (23:18 -0600)]
Convert CONFIG_SPL_FAT_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_EXT_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:37 +0000 (23:18 -0600)]
Convert CONFIG_SPL_EXT_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_ETH_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:36 +0000 (23:18 -0600)]
Convert CONFIG_SPL_ETH_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_ENV_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:35 +0000 (23:18 -0600)]
Convert CONFIG_SPL_ENV_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_DRIVERS_MISC_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:34 +0000 (23:18 -0600)]
Convert CONFIG_SPL_DRIVERS_MISC_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_DMA_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:33 +0000 (23:18 -0600)]
Convert CONFIG_SPL_DMA_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_HASH_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:32 +0000 (23:18 -0600)]
Convert CONFIG_SPL_HASH_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoConvert CONFIG_SPL_CRYPTO_SUPPORT to Kconfig
Simon Glass [Tue, 13 Sep 2016 05:18:31 +0000 (23:18 -0600)]
Convert CONFIG_SPL_CRYPTO_SUPPORT to Kconfig

Move this option to Kconfig and tidy up existing uses.

Signed-off-by: Simon Glass <sjg@chromium.org>