]> git.sur5r.net Git - u-boot/log
u-boot
6 years agofastboot: Correct dependencies in FASTBOOT_FLASH
Alex Kiernan [Tue, 29 May 2018 15:30:42 +0000 (15:30 +0000)]
fastboot: Correct dependencies in FASTBOOT_FLASH

Ensure that when selecting FASTBOOT_FLASH you end up with a buildable
configuration. Prior to this you could select NAND without MTDPARTS
and end up with an image which (surprisingly) excluded NAND.

Also fix dependencies on FASTBOOT_GPT_NAME/FASTBOOT_MBR_NAME which require
you have EFI_PARTITION/DOS_PARTITION enabled.

Delete redundant FASTBOOT_FLASH_NAND_DEV from Kconfig - it was only ever
used as a guard and the value was ignored in all cases, we're using
FASTBOOT_FLASH_NAND as the guard now.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agofastboot: Extract fastboot_okay/fail to fb_common.c
Alex Kiernan [Tue, 29 May 2018 15:30:41 +0000 (15:30 +0000)]
fastboot: Extract fastboot_okay/fail to fb_common.c

Add drivers/fastboot/fb_common.c, where fastboot_okay/fail are implemented
so we can call them from a non-USB implementation.

Introduce fastboot_response which takes varargs parameters so we can
use it to generate formatted response strings. Refactor fastboot_okay/fail
to use it.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agofastboot: Refactor fastboot_okay/fail to take response
Alex Kiernan [Tue, 29 May 2018 15:30:40 +0000 (15:30 +0000)]
fastboot: Refactor fastboot_okay/fail to take response

Add the response string as a parameter to fastboot_okay/fail, instead
of modifying a global, to match the contract expected by the AOSP
U-Boot code.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agofastboot: Move fastboot to drivers/fastboot
Alex Kiernan [Tue, 29 May 2018 15:30:39 +0000 (15:30 +0000)]
fastboot: Move fastboot to drivers/fastboot

Separate CMD_FASTBOOT from FASTBOOT and move code and configuration to
drivers/fastboot.

Switch dependencies on FASTBOOT to USB_FUNCTION_FASTBOOT as anyone who wants
FASTBOOT before this series wants USB_FUNCTION_FASTBOOT. Split
USB_FUNCTION_FASTBOOT from FASTBOOT so they retain their existing
behaviour.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agogadget: f_thor: Fix memory leaks of usb request and its buffer
Seung-Woo Kim [Fri, 25 May 2018 05:21:01 +0000 (14:21 +0900)]
gadget: f_thor: Fix memory leaks of usb request and its buffer

There are memory leaks of usb request and its buffer for ep0,
in_ep, and out ep. Fix memory leaks of usb request and its buffer.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agorockchip: xhci: remove DTS parsing for PHY (which is unused)
Philipp Tomsich [Thu, 24 May 2018 15:11:57 +0000 (17:11 +0200)]
rockchip: xhci: remove DTS parsing for PHY (which is unused)

The xhci wrapper-driver for Rockchip searches the DTS to find its
child node compatbile with 'rockchip,rk3399-usb3-phy' to retrieve the
base-address of the PHY.  However, this is currently broken (and
always has been), returning NULL.  However, the (wrongly) retrieved
base-address is never used.

We thus remove this code for now.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agousb: xhci: Handle endianness in xhci_set_configuration()
Bin Meng [Thu, 24 May 2018 06:40:50 +0000 (23:40 -0700)]
usb: xhci: Handle endianness in xhci_set_configuration()

In xhci_set_configuration(), 'Context Entries' field in the slot
context was cleared with mask LAST_CTX_MASK, but it should have
taken the endianness into consideration.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
6 years agousb: xhci: Fix config fail of FS hub behind a HS hub with MTT
Bin Meng [Thu, 24 May 2018 06:40:49 +0000 (23:40 -0700)]
usb: xhci: Fix config fail of FS hub behind a HS hub with MTT

If a full speed hub connects to a high speed hub which supports MTT,
the MTT field of its slot context will be set to 1 when xHCI driver
setups an xHCI virtual device in xhci_setup_addressable_virt_dev().
Once usb core fetch its hub descriptor, and need to update the xHC's
internal data structures for the device, the HUB field of its slot
context will be set to 1 too, meanwhile MTT is also set before, this
will cause configure endpoint command fail. In the case, we should
clear MTT to 0 for full speed hub according to section 6.2.2.

This keeps in sync with Linux kernel commit:
  096b110: usb: xhci: fix config fail of FS hub behind a HS hub with MTT

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
6 years agousb: xhci: Initialize dev_state to 0 in the input slot context
Bin Meng [Thu, 24 May 2018 06:40:48 +0000 (23:40 -0700)]
usb: xhci: Initialize dev_state to 0 in the input slot context

Per xHCI spec chapter 6.2.2 table 6-7, as input, software shall
initialize the dev_state field to '0'. Though this does not seem
to cause any issue with most xHC implementations, let's do this
to conform with the spec.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Marek Vasut <marek.vasut@gmail.com>
Tested-by: Matthias Blankertz <matthias.blankertz@cetitec.com>
6 years agousb: xhci: Set accurate add context flags when updating hub attributes
Bin Meng [Thu, 24 May 2018 06:40:47 +0000 (23:40 -0700)]
usb: xhci: Set accurate add context flags when updating hub attributes

If a USB 3.0 hub is plugged into the root port of the xHC, the xHCI
driver will issue a 'Configure Endpoint' command to the xHC for it
to update its internal data structure for this hub device. The hub
attributes are in the slot context so we need tell xHC to update the
slot context by setting the add context flags of the input control
context to only cover the slot context.

At present the add context flags is or'ed with the slot context bit,
but it should really be accurately set to the slot context, as the
variable that holds the value of the add context flags comes from
whatever was set in the last command execution, which may contain
additional contexts that 'Configure Endpoint' command should not
touch. Some xHC implementations like x86 don't complain such, but
it was observed on Renesas RCar Gen3 platform that the RCar xHC
complains with a 'TRB error' completion codes as the response.

Reported-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Marek Vasut <marek.vasut@gmail.com>
Tested-by: Matthias Blankertz <matthias.blankertz@cetitec.com>
6 years agousb: xhci-rcar: deregister before deactivating clock
Matthias Blankertz [Tue, 22 May 2018 13:24:48 +0000 (15:24 +0200)]
usb: xhci-rcar: deregister before deactivating clock

During the execution of xhci_deregister xHCI registers are accessed. If
the clock is already deactivated when xhci_deregister is called this can
lead to undefined behavior. Change the order to deregister the device
before deactivating the clock.

Signed-off-by: Matthias Blankertz <matthias.blankertz@cetitec.com>
6 years agotravis.yml: Support RISC-V 64-bit
Rick Chen [Wed, 30 May 2018 08:12:19 +0000 (16:12 +0800)]
travis.yml: Support RISC-V 64-bit

Fix riscv: ax25-ae350 build fail problem
https://travis-ci.org/trini/u-boot/jobs/385147373

...
Building current source for 1 boards (1 thread, 2 jobs per thread)
     riscv:  +   ax25-ae350
+arch/riscv/cpu/ax25/start.S: Assembler messages:
+arch/riscv/cpu/ax25/start.S:48: Error: unrecognized opcode `sd a2,0(t0)'
+arch/riscv/cpu/ax25/start.S:112: Error: unrecognized opcode `ld t5,0(t0)'
...

After apply the commit
configs: ax25-ae350: Set 64-bit as default configuration

Toolchain shall be also setuped with 64-bit in .travis.yml.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Reviewed-by: Chih-Mao Chen <cmchen@andestech.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Tue, 29 May 2018 15:01:46 +0000 (11:01 -0400)]
Merge git://git.denx.de/u-boot-marvell

6 years agoMerge branch 'master' of git://git.denx.de/u-boot-ubi
Tom Rini [Tue, 29 May 2018 15:01:43 +0000 (11:01 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-ubi

6 years agomach-snapdragon: increase size of malloc pool
Ramon Fried [Mon, 28 May 2018 20:55:49 +0000 (23:55 +0300)]
mach-snapdragon: increase size of malloc pool

Pool size must be increased to support new additionals
drivers.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agodb820c: add dummy clock for uart node
Ramon Fried [Mon, 28 May 2018 21:30:45 +0000 (00:30 +0300)]
db820c: add dummy clock for uart node

The missing clock causes serial_msm driver probe to fail.
Added a dummy node so the probe succeeds, as the clock init
currently in db820c is empty.

Fixes: 11d59fe5374a ("serial: serial_msm: fail probe if settings clocks fails")
Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
6 years agoImport Android's dt_table.h for DT image format
Alex Deymo [Mon, 28 May 2018 15:19:35 +0000 (17:19 +0200)]
Import Android's dt_table.h for DT image format

Android documentation defines the recommended image format for storing
DTB/DTBO files in a single dtbo.img image. This patch includes the
latest header file with the struct definitions for this format from
AOSP.

The header was adapted to U-Boot's coding style and the function
declarations were removed.

Signed-off-by: Alex Deymo <deymo@google.com>
[trini: Change SDPX tag location]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoconfigs: remove CONFIG_SYS_MVFS
Chris Packham [Sat, 26 May 2018 10:32:29 +0000 (22:32 +1200)]
configs: remove CONFIG_SYS_MVFS

This was being used by some Marvell boards to enable some file system
related features (many of which have already been moved to Kconfig).
Make the future migration of the final 2 or 3 config options easier by
expanding #define CONFIG_SYS_MVFS into the options that it enables and
remove CONFIG_SYS_MVFS.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agomtd: ftsmc020: Drop unsed code
Rick Chen [Tue, 29 May 2018 03:10:56 +0000 (11:10 +0800)]
mtd: ftsmc020: Drop unsed code

ftsmc020_init is not used anymore.
So it can be removed.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agoboard: ax25-ae350: Support cfi flash
Rick Chen [Tue, 29 May 2018 03:07:53 +0000 (11:07 +0800)]
board: ax25-ae350: Support cfi flash

Add smc_init() to get register base from dts and
deal with atfsmc020 controler initialzation job.

Write protect is enabled by default. So WP shall
be disabled when startup, then cfi flash can be
detected and erasing and writing can be executed.

Adp-ae3xx and adp-ag101p both do smc initilize job
in lowlevel_init.S and get register base fron
CONFIG_FTSMC020_BASE. They also can be moved those
codes to board stage. Remind them as todo jobs.
After that CONFIG_FTSMC020_BASE can be removed.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agoriscv: dts: Support cfi flash
Rick Chen [Tue, 29 May 2018 03:05:54 +0000 (11:05 +0800)]
riscv: dts: Support cfi flash

Add nor node for cfi-flash driver and smc node
for smc(aftsmc020) controller.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agoconfigs: ax25-ae350: Support cfi flash
Rick Chen [Tue, 29 May 2018 03:04:23 +0000 (11:04 +0800)]
configs: ax25-ae350: Support cfi flash

Enable cfi flash driver and setup flash
parameters to support parallel nor flash
which type is JS28F00A-M29EWH.

Verification:
Size detection, data read, erase and write are all ok.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agommc: ftsdc010_mci: Sync compatible with DT mmc node
Rick Chen [Tue, 29 May 2018 03:00:28 +0000 (11:00 +0800)]
mmc: ftsdc010_mci: Sync compatible with DT mmc node

The compatible string of ftsdc010_mci.c is different from
the mmc driver in Linux Kernel. Modify it for consistency.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agoriscv: dts: Sync DT with Linux Kernel
Rick Chen [Tue, 29 May 2018 02:53:41 +0000 (10:53 +0800)]
riscv: dts: Sync DT with Linux Kernel

Use same dts to boot U-Boot and RISC-V
Linux Kernel v4.16-rc2 in ax25-ae350 platform.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agonet: ftmac100: Fix compiler warning
Rick Chen [Tue, 29 May 2018 02:42:19 +0000 (10:42 +0800)]
net: ftmac100: Fix compiler warning

Fix warnings as below when compile in 64-bit.

warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agospi: atcspi200: Fix compiler warning
Rick Chen [Tue, 29 May 2018 02:40:03 +0000 (10:40 +0800)]
spi: atcspi200: Fix compiler warning

Fix warning as below when compile in 64-bit.

warning: format '%u' expects argument of type
'unsigned int', but argument 6 has type 'size_t
{aka long unsigned int}

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agoconfigs: ax25-ae350: Set 64-bit as default configuration
Rick Chen [Tue, 29 May 2018 02:38:16 +0000 (10:38 +0800)]
configs: ax25-ae350: Set 64-bit as default configuration

Set 64-bit as default configuration for ax25-ae350.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agodoc: ae250: Rename as ae350
Rick Chen [Tue, 29 May 2018 02:29:20 +0000 (10:29 +0800)]
doc: ae250: Rename as ae350

Rename
 nx25 as ax25
 ae250 as ae350
 nx25-ae250 as ax25-ae350
 including filename, variable, string and definition.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agoconfigs: nx25-ae250:Rename as ax25-ae350
Rick Chen [Tue, 29 May 2018 02:20:39 +0000 (10:20 +0800)]
configs: nx25-ae250:Rename as ax25-ae350

Rename
 nx25 as ax25
 ae250 as ae350
 nx25-ae250 as ax25-ae350
 including filename, variable, string and definition.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agoboard: nx25-ae250: Rename as ax25-ae350
Rick Chen [Tue, 29 May 2018 02:06:42 +0000 (10:06 +0800)]
board: nx25-ae250: Rename as ax25-ae350

Rename
 nx25 as ax25
 ae250 as ae350
 nx25-ae250 as ax25-ae350
 including filename, variable, string and definition.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agoriscv: cpu: nx25: Rename as ax25
Rick Chen [Tue, 29 May 2018 01:54:40 +0000 (09:54 +0800)]
riscv: cpu: nx25: Rename as ax25

Andes has rearranged the product combinations.
nx25 and ax25 both are RISC-V architecture cpu core.
But ax25 has MMU unit inside, and nx25 is not.

Cpu nx25 and platform ae250 are arranged in pairs.
Cpu ax25 and platform ae350 are arranged in pairs.

This patch will rename
nx25 as ax25
ae250 as ae350
nx25-ae250 as ax25-ae350
including filename, variable, string and definition.

Then u-boot can boot linux kernel in ae350
platform reasonably.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agoSPDX: Convert single license tags to Linux Kernel style
Rick Chen [Tue, 29 May 2018 06:10:06 +0000 (14:10 +0800)]
SPDX: Convert single license tags to Linux Kernel style

Fix license tags problem after apply patchs about
riscv: Enable efi_loader support.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>
6 years agoefi_loader: Enable RISC-V support
Rick Chen [Mon, 28 May 2018 11:06:37 +0000 (19:06 +0800)]
efi_loader: Enable RISC-V support

We have almost all pieces needed to support RISC-V UEFI binaries in place already.
The only missing piece are ELF relocations for runtime code and
data.

This patch adds respective support in the linker script and the runtime
relocation code. It also allows users to enable the EFI_LOADER configuration
switch on RISC-V platforms.

Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoriscv: nx25: Enable distro boot
Alexander Graf [Mon, 23 Apr 2018 05:59:49 +0000 (07:59 +0200)]
riscv: nx25: Enable distro boot

Distro boot allows for a common boot path on systems that allow distributions
to easily boot from a default configuration.

This patch enables distro boot for the nx25-ae250. Hopefully this can serve
as a good example for new boards, so they enable it as well.

Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agodistro: Extend with RISC-V defines
Alexander Graf [Mon, 23 Apr 2018 05:59:48 +0000 (07:59 +0200)]
distro: Extend with RISC-V defines

While we don't have UEFI naming conventions for RISC-V file paths yet,
we need to search for something. So let's copy the removable file paths
from the RISC-V edk2 port.

Also add the official VCI strings that contain the standardized RISC-V
architecture ID fields.

Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: Use EFI_CACHELINE_SIZE in the image loader too
Alexander Graf [Mon, 23 Apr 2018 05:59:47 +0000 (07:59 +0200)]
efi_loader: Use EFI_CACHELINE_SIZE in the image loader too

We were using our EFI_CACHELINE_SIZE define only in the runtime service
code, but left the image loader to use plain CONFIG_SYS_CACHELINE_SIZE.

This patch moves EFI_CACHELINE_SIZE into efi_loader.h and converts
the image loader to use it.

Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoriscv: Add board_quiesce_devices stub
Alexander Graf [Mon, 23 Apr 2018 05:59:46 +0000 (07:59 +0200)]
riscv: Add board_quiesce_devices stub

This patch adds an empty stub for board_quiesce_devices() which allows boards
to quiesce their devices before we boot into an OS in a platform agnostic way.

Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoriscv: Add EFI application infrastructure
Alexander Graf [Mon, 23 Apr 2018 05:59:45 +0000 (07:59 +0200)]
riscv: Add EFI application infrastructure

The hello world binary and a few selftests require to build EFI target
binaries, not just the EFI host environment.

This patch adds all required files to generate an EFI binary for
RISC-V.

Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoriscv: Enable function sections
Alexander Graf [Mon, 23 Apr 2018 05:59:44 +0000 (07:59 +0200)]
riscv: Enable function sections

The linker can remove sections that are never addressed, so it makes a lot
of sense to declare every function as an individual section.

This reduces the output U-Boot code size by ~30kb for me.

Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoriscv: Add setjmp/longjmp code
Alexander Graf [Mon, 23 Apr 2018 05:59:43 +0000 (07:59 +0200)]
riscv: Add setjmp/longjmp code

To support efi_loader we need to have platform support for setjmp/longjmp.
Add it here.

Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoconfigs: remove redundant comment sections
Chris Packham [Sat, 26 May 2018 10:32:28 +0000 (22:32 +1200)]
configs: remove redundant comment sections

mv-common.h and mv-plug-common.h still had comments delimiting sections
of configuration options that have all been moved to Kconfig by previous
treewide efforts. Remove the redundant comment sections.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoconfigs: remove empty #ifdef block from mv-common.h
Chris Packham [Sat, 26 May 2018 09:43:56 +0000 (21:43 +1200)]
configs: remove empty #ifdef block from mv-common.h

The last option guarded by this ifdef was removed in commit 68d534201733
("sf: Move SPI flash drivers to defconfig"). Remove the now empty
ifdef/endif block and the associated comment.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoarm64: mvebu: defconfig: enable CONFIG_AHCI_MVEBU
Ken Ma [Fri, 25 May 2018 07:49:27 +0000 (15:49 +0800)]
arm64: mvebu: defconfig: enable CONFIG_AHCI_MVEBU

This patch enables the new ahci mvebu driver for marvell arm64 platform
SOCs(A3k and A8k). And since AHCI_MVEBU selects SCSI_AHCI, so
"CONFIG_SCSI_AHCI=y" is removed from those default config files.

Signed-off-by: Ken Ma <make@marvell.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoata: ahci_mvebu: add scsi support
Ken Ma [Fri, 25 May 2018 07:49:26 +0000 (15:49 +0800)]
ata: ahci_mvebu: add scsi support

Mvebu AHCI is AHCI driver which uses SCSI under the hood.
This patch adjusts AHCI setup to support SCSI by creating
a SCSI device as a child. Since the functions of creating
SCSI device need the kconfig option DM_SCSI, so let
AHCI_MVEBU select DM_SCSI.

Signed-off-by: Ken Ma <make@marvell.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoata: ahci_mvebu: a8040 a0: remove bad port register offsets workarounds
David Sniatkiwicz [Fri, 25 May 2018 07:49:25 +0000 (15:49 +0800)]
ata: ahci_mvebu: a8040 a0: remove bad port register offsets workarounds

This workaround was added for A8040/7040 A0.
A8040/7040 A0 is no longer supported so this workaround
can be removed.

Signed-off-by: David Sniatkiwicz <davidsn@marvell.com>
Signed-off-by: Ken Ma <make@marvell.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoata: mvebu: move mvebu sata driver to drivers/ata directory
Ken Ma [Fri, 25 May 2018 07:49:24 +0000 (15:49 +0800)]
ata: mvebu: move mvebu sata driver to drivers/ata directory

Currently mvebu sata driver is in arch/arm/mach_mvebu directory, this
patch moves it to drivers/ata directory with renaming "sata.c" to
"ahci_mvebu.c" which is aligned to Linux.
New ahci driver's kconfig option is added as AHCI_MVEBU which selects
SCSI_AHCI and is based on AHCI.

Signed-off-by: Ken Ma <make@marvell.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agodts: mvebu: a80x0: Enable SD/eMMC interfaces
Konstantin Porotchkin [Fri, 25 May 2018 06:20:53 +0000 (14:20 +0800)]
dts: mvebu: a80x0: Enable SD/eMMC interfaces

Enable SDHCI interface on AP and CP0 in A80x0 DTS files

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Evan Wang <xswang@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agomvebu: pinctrl: Add SD/eMMC PHY selector to the driver
Konstantin Porotchkin [Fri, 25 May 2018 06:20:52 +0000 (14:20 +0800)]
mvebu: pinctrl: Add SD/eMMC PHY selector to the driver

When the pin control driver selects SD/eMMC function for
a pin group, there is additional configuration to be done
for this case - switch the PHY to work with SDHCI interface.
This patch adds the missing functionality into the pin
control driver.

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Evan Wang <xswang@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agomvebu: pinctrl: sync compatible string with Linux 4.17-rc4
Evan Wang [Fri, 25 May 2018 06:20:51 +0000 (14:20 +0800)]
mvebu: pinctrl: sync compatible string with Linux 4.17-rc4

For pinctrl driver of mvebu, the compatible strings
supported are defined differently from Linux version.
The patch aligned the compatible string with
Linux 4.17-rc4.

Signed-off-by: Evan Wang <xswang@marvell.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoARM: kirkwood: Add device-tree for keymile
Chris Packham [Thu, 17 May 2018 09:46:01 +0000 (21:46 +1200)]
ARM: kirkwood: Add device-tree for keymile

Import the dts files from Linux 4.17 and enable CONFIG_OF_CONTROL.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoARM: kirkwood: Add device-tree for netspace & inetspace
Chris Packham [Thu, 17 May 2018 09:46:00 +0000 (21:46 +1200)]
ARM: kirkwood: Add device-tree for netspace & inetspace

Import the dts files from Linux 4.17 and enable CONFIG_OF_CONTROL.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoARM: kirkwood: Add device-tree for lschlv2 & lsxhl
Chris Packham [Thu, 17 May 2018 09:45:59 +0000 (21:45 +1200)]
ARM: kirkwood: Add device-tree for lschlv2 & lsxhl

Import the dts files from Linux 4.17 and enable CONFIG_OF_CONTROL.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoARM: kirkwood: Add device-tree for ds109
Chris Packham [Thu, 17 May 2018 09:45:58 +0000 (21:45 +1200)]
ARM: kirkwood: Add device-tree for ds109

Import the dts files from Linux 4.17 and enable CONFIG_OF_CONTROL.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoARM: kirkwood: Add device-tree for dreamplug
Chris Packham [Thu, 17 May 2018 09:45:57 +0000 (21:45 +1200)]
ARM: kirkwood: Add device-tree for dreamplug

Import the dts file from Linux 4.17 and enable CONFIG_OF_CONTROL.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoARM: kirkwood: Add device-tree for d2net_v2 & net2big_v2
Chris Packham [Thu, 17 May 2018 09:45:56 +0000 (21:45 +1200)]
ARM: kirkwood: Add device-tree for d2net_v2 & net2big_v2

Import the dts files from Linux 4.17 and enable CONFIG_OF_CONTROL.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agoboard: turris_mox: Add fixed regulator support to defconfig
Marek BehĂșn [Wed, 16 May 2018 20:13:49 +0000 (22:13 +0200)]
board: turris_mox: Add fixed regulator support to defconfig

Without this USB3 won't work in U-Boot.

Signed-off-by: Marek Behun <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
6 years agosf: Add Macronix MX25U25635F ID
Marek Vasut [Thu, 17 May 2018 12:49:03 +0000 (14:49 +0200)]
sf: Add Macronix MX25U25635F ID

Add ID for the Macronix MX25U25635F flash.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agosf: Add Winbond W25Q256 ID
Marek Vasut [Wed, 16 May 2018 14:45:18 +0000 (16:45 +0200)]
sf: Add Winbond W25Q256 ID

Add ID for the Winbond W25Q256 flash.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agoconfigs: orangepi-prime: Enable USB OTG peripheral mode
Jagan Teki [Mon, 7 May 2018 07:33:51 +0000 (13:03 +0530)]
configs: orangepi-prime: Enable USB OTG peripheral mode

Enable USB_MUSB_GADGET which operate OTG in peripheral mode

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agoarm64: allwinner: h5: orangepi-prime: Sync usb otg nodes from Linux
Jagan Teki [Mon, 7 May 2018 07:33:50 +0000 (13:03 +0530)]
arm64: allwinner: h5: orangepi-prime: Sync usb otg nodes from Linux

orangepi-prime has usb otg routed host with either EHCI0/OHCI0
sync the same from Linux.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agoconfigs: orangepi-pc2: Enable USB OTG peripheral mode
Jagan Teki [Mon, 7 May 2018 07:33:49 +0000 (13:03 +0530)]
configs: orangepi-pc2: Enable USB OTG peripheral mode

Enable USB_MUSB_GADGET which operate OTG in peripheral mode

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agoarm64: allwinner: h5: orangepi-pc2: Sync usb otg nodes from Linux
Jagan Teki [Mon, 7 May 2018 07:33:48 +0000 (13:03 +0530)]
arm64: allwinner: h5: orangepi-pc2: Sync usb otg nodes from Linux

orangepi-pc2 has usb otg routed host with either EHCI0/OHCI0
sync the same from Linux.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agoarm64: allwinner: h5: orangepi-pc2: Order nodes in alphabetic
Jagan Teki [Mon, 7 May 2018 07:33:47 +0000 (13:03 +0530)]
arm64: allwinner: h5: orangepi-pc2: Order nodes in alphabetic

Order sun50i-h5-orangepi-pc2.dts nodes in alphabetic

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agoconfigs: bananapi-m2-plus: Enable USB OTG peripheral mode
Jagan Teki [Mon, 7 May 2018 07:33:46 +0000 (13:03 +0530)]
configs: bananapi-m2-plus: Enable USB OTG peripheral mode

Enable USB_MUSB_GADGET which operate OTG in peripheral mode

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agoARM: dts: sun8i-h3: bananapi-m2-plus: Sync usb otg nodes from Linux
Jagan Teki [Mon, 7 May 2018 07:33:45 +0000 (13:03 +0530)]
ARM: dts: sun8i-h3: bananapi-m2-plus: Sync usb otg nodes from Linux

Bananapi-m2-plus has usb otg routed host with either EHCI0/OHCI0
sync the same from Linux.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agoarm64: allwinner: a64: bananapi-m64: Sync usb host nodes from Linux
Jagan Teki [Mon, 7 May 2018 07:33:44 +0000 (13:03 +0530)]
arm64: allwinner: a64: bananapi-m64: Sync usb host nodes from Linux

Sync bananapi-m64 usb host nodes from Linux.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agoARM: dts: sun8i: a83t: Sync usbphy node from Linux
Jagan Teki [Mon, 7 May 2018 07:33:43 +0000 (13:03 +0530)]
ARM: dts: sun8i: a83t: Sync usbphy node from Linux

Sync sun8i-a83t usbphy node details from Linux.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agoconfigs: bananapi-m64: Enable USB OTG peripheral mode
Jagan Teki [Mon, 7 May 2018 07:33:42 +0000 (13:03 +0530)]
configs: bananapi-m64: Enable USB OTG peripheral mode

Enable USB_MUSB_GADGET which operate OTG in peripheral mode

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agoarm64: allwinner: a64: bananapi-m64: Sync usb_otg node from Linux
Jagan Teki [Mon, 7 May 2018 07:33:41 +0000 (13:03 +0530)]
arm64: allwinner: a64: bananapi-m64: Sync usb_otg node from Linux

Sync bananapi-m64 usb_otg node from Linux.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agosunxi: h3: Sync OTG and HCI nodes from Linux DT
Jun Nie [Mon, 7 May 2018 07:33:40 +0000 (13:03 +0530)]
sunxi: h3: Sync OTG and HCI nodes from Linux DT

Allwinner H3 have a dual-routed USB PHY0 -- routed to either OHCI/EHCI
or MUSB controller.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agosunxi: Drop legacy usb_phy.c
Jagan Teki [Fri, 25 May 2018 10:02:17 +0000 (15:32 +0530)]
sunxi: Drop legacy usb_phy.c

Allwinner PHY USB code is now part of generic-phy framework,
so drop existing legacy handling like arch/arm/mach-sunxi.c
and related code areas.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agousb: sunxi: Switch to use generic-phy
Jagan Teki [Mon, 7 May 2018 07:33:38 +0000 (13:03 +0530)]
usb: sunxi: Switch to use generic-phy

Allwinner USB PHY handling can be done through driver-model
generic-phy so add the generic-phy ops to relevant places
on host and musb sunxi driver and enable them in respective
SOC's.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agophy: sun4i-usb: Add a sunxi specific function for setting squelch-detect
Jagan Teki [Mon, 7 May 2018 07:33:37 +0000 (13:03 +0530)]
phy: sun4i-usb: Add a sunxi specific function for setting squelch-detect

The sunxi otg phy has a bug where it wrongly detects a high speed squelch
when reset on the root port gets de-asserted with a lo-speed device.

The workaround for this is to disable squelch detect before de-asserting
reset, and re-enabling it after the reset de-assert is done. Add a sunxi
specific phy function to allow the sunxi-musb glue to do this.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agoboard: sunxi: Use generic-phy for board_usb_cable_connected
Jagan Teki [Mon, 7 May 2018 07:33:36 +0000 (13:03 +0530)]
board: sunxi: Use generic-phy for board_usb_cable_connected

Allwinner PHY USB code is now part of generic-phy framework,
so use it in board_usb_cable_connected.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agodevice-tree-bindings: phy: Sync sun4i-usb-phy bindings
Jagan Teki [Wed, 9 May 2018 06:05:51 +0000 (11:35 +0530)]
device-tree-bindings: phy: Sync sun4i-usb-phy bindings

Sync sun4i-usb-phy bindings from Linux, since the
drivers/phy/allwinner/phy-sun4i-usb.c follow similar.

Sync changes from Linux with below commit:
"phy: sun4i-usb: add support for R40 USB PHY"
(sha1: f3d96f8d23d8e6d0b7642ee946b9b2ac3418fb4d)

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agophy: sun4i-usb: Add A23 USB PHY config
Jagan Teki [Mon, 7 May 2018 07:33:34 +0000 (13:03 +0530)]
phy: sun4i-usb: Add A23 USB PHY config

Allwinner A23 has 2 USB PHY's and 0x04 has phy ctrl offset.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agophy: sun4i-usb: Add A33 USB PHY config
Jagan Teki [Mon, 7 May 2018 07:33:33 +0000 (13:03 +0530)]
phy: sun4i-usb: Add A33 USB PHY config

Allwinner A33 has 2 USB PHY's and 0x10 has phy ctrl offset.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agophy: sun4i-usb: Add A31 PHY config
Jagan Teki [Mon, 7 May 2018 07:33:32 +0000 (13:03 +0530)]
phy: sun4i-usb: Add A31 PHY config

Allwinner A31 has 3 USB PHY's and rest similar to A10.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agophy: sun4i-usb: Add A10/A13/A20 PHY config
Jagan Teki [Mon, 7 May 2018 07:33:31 +0000 (13:03 +0530)]
phy: sun4i-usb: Add A10/A13/A20 PHY config

Add PHY configs for Allwinner A10/A13/A20 which are SUN4I.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agophy: sun4i-usb: Add A83T USB PHY config
Jagan Teki [Mon, 7 May 2018 07:33:30 +0000 (13:03 +0530)]
phy: sun4i-usb: Add A83T USB PHY config

Unlike, other Allwinner SUN4I Phy supporting SOC, A83T has
2 USB PHY's and second one is HSIC. So phy control need to
configure to handle these HSIC and SIDDQ requirement.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agophy: sun4i-usb: Add V3S PHY config
Jagan Teki [Mon, 7 May 2018 07:33:29 +0000 (13:03 +0530)]
phy: sun4i-usb: Add V3S PHY config

V3S has 1 USB PHY, rest are similar to A64.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agophy: sun4i-usb: Add H3/H5 PHY config
Jagan Teki [Mon, 7 May 2018 07:33:28 +0000 (13:03 +0530)]
phy: sun4i-usb: Add H3/H5 PHY config

H3/H5 has 4 USB PHY, rest are similar to A64.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agophy: sun4i-usb: Add id_detect and vbus_detect ops
Jagan Teki [Mon, 7 May 2018 07:33:27 +0000 (13:03 +0530)]
phy: sun4i-usb: Add id_detect and vbus_detect ops

ID and VBUS detection code require when musb changing
between Host and/or Peripheral modes.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agophy: Add Allwinner A64 USB PHY driver
Jagan Teki [Mon, 7 May 2018 07:33:26 +0000 (13:03 +0530)]
phy: Add Allwinner A64 USB PHY driver

USB PHY implementation for Allwinner SOC's can be handling
in to single driver with different phy configs.

This driver handle all Allwinner USB PHY's start from 4I to
50I(except 9I). Currently added A64 compatibility more will
add in next coming patches.

Current implementation is unable to get pinctrl, clock and reset
details from DT since the dm code on these will add it future.

Driver named as phy-sun4i-usb.c since the same PHY logic
work for all Allwinner SOC's start from 4I to A64 except 9I
with different phy configurations.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agomusb: sunxi: Add support for H3/H5/A64
Jagan Teki [Mon, 7 May 2018 07:33:25 +0000 (13:03 +0530)]
musb: sunxi: Add support for H3/H5/A64

Like other Allwinner SoC, the H3/H5/A64 is missing the config register
from the musb hardware block. Use a known working value for it
like other SoC.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agosunxi: clock: Fix OHCI clock gating for H3/H5
Chen-Yu Tsai [Mon, 7 May 2018 07:33:24 +0000 (13:03 +0530)]
sunxi: clock: Fix OHCI clock gating for H3/H5

Clock gating bits on H43/H5 were wrong, fix them.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agomusb: sunxi: Use BIT instead of numerical shift
Jagan Teki [Mon, 7 May 2018 07:33:23 +0000 (13:03 +0530)]
musb: sunxi: Use BIT instead of numerical shift

Use BIT is possible areas instead of numerical shift.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agomusb: sunxi: Add OTG device clkgate and reset for H3/H5
Jagan Teki [Mon, 7 May 2018 07:33:22 +0000 (13:03 +0530)]
musb: sunxi: Add OTG device clkgate and reset for H3/H5

Add OTG device clkgate and reset for H3/H5 through driver_data.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agosunxi: clock: Fix clock gating for H3/H5/A64
Jagan Teki [Mon, 7 May 2018 07:33:21 +0000 (13:03 +0530)]
sunxi: clock: Fix clock gating for H3/H5/A64

clock gating bits on a64 are different than H3_H5, so fixed
only required bits on clock_sun6i.h.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agomusb: sunxi: Add fifo config
Jagan Teki [Mon, 7 May 2018 07:33:20 +0000 (13:03 +0530)]
musb: sunxi: Add fifo config

Unlike other Allwinner SOC's H3/H5/V3s OTG support 4 endpoints
with relevant fifo configs, rest all have 5 endpoints.
So add the fifo configs and defer them based on driver_data.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agomusb: sunxi: Use simple way to fill musb_hdrc pdata
Jagan Teki [Mon, 7 May 2018 07:33:19 +0000 (13:03 +0530)]
musb: sunxi: Use simple way to fill musb_hdrc pdata

Filling musb_hdrc pdata using structure will unnecessary
add extra ifdefs, so fill them inside probe call for
better code understanding and get rid ifdefs using
devicetree compatible.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agomusb: sunxi: Add proper macros instead of numericals
Jagan Teki [Mon, 7 May 2018 07:33:18 +0000 (13:03 +0530)]
musb: sunxi: Add proper macros instead of numericals

- add proper macros for musb_config members
- use bool 'true' for multipoint and dyn_fifo instead of numerical 1

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agousb: sunxi: Simplify ccm reg base code
Jagan Teki [Mon, 7 May 2018 07:33:17 +0000 (13:03 +0530)]
usb: sunxi: Simplify ccm reg base code

Move struct sunxi_ccm_reg pointer to private structure
so-that accessing ccm reg base become more proper way
and avoid local initialization in each function.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
6 years agoadd FIT data-position & data-offset property support
Kelvin Cheung [Sat, 19 May 2018 10:21:37 +0000 (18:21 +0800)]
add FIT data-position & data-offset property support

Add FIT data-position & data-offset property support for bootm,
which were already supported in SPL.

Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com>
6 years agomalloc: Use malloc simple before malloc is fully initialized in memalign()
Ley Foon Tan [Fri, 18 May 2018 10:03:12 +0000 (18:03 +0800)]
malloc: Use malloc simple before malloc is fully initialized in memalign()

Follow implementation in mALLOc(). Check GD_FLG_FULL_MALLOC_INIT flag and use
malloc_simple if GD_FLG_FULL_MALLOC_INIT is unset. Adjust the malloc bytes
to align with the requested alignment.

The original memalign() function will access mchunkptr struct to adjust the
alignment if there is misalignment happen, but mchunkptr struct is not being
initialized before full malloc is initialized. This cause the system crash.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
6 years agommc: stm32_sdmmc2: Fix stm32_sdmmc2_start_cmd()
Patrice Chotard [Thu, 17 May 2018 14:53:57 +0000 (16:53 +0200)]
mmc: stm32_sdmmc2: Fix stm32_sdmmc2_start_cmd()

SDMMC_CMD_CPSMEN bit is wrongly check and set in
SDMMC_ARG register instead of SDMMC_CMD register.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agostm32mp1: use OTP to configure MAC address and serial number
Patrick Delaunay [Thu, 17 May 2018 13:24:07 +0000 (15:24 +0200)]
stm32mp1: use OTP to configure MAC address and serial number

Use OTP57 and 58 for MAC address
- OTP57 = MAC address  bits [31:0]
- OTP58 = MAC address  bit  [47:32] stored in OTP  LSB's

Use manufacture information in OTP13 to OTP15 to build unique
chip id saved in env variable "serial#"
(used for USB device enumeration)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agostm32mp1: add FUSE command support
Patrick Delaunay [Thu, 17 May 2018 13:24:06 +0000 (15:24 +0200)]
stm32mp1: add FUSE command support

Add support of fuse command (read/write/program/sense)
on bank 0 to access to BSEC SAFMEM (4096 OTP bits).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agostm32mp1: add bsec driver
Patrick Delaunay [Thu, 17 May 2018 13:24:05 +0000 (15:24 +0200)]
stm32mp1: add bsec driver

Add a MISC driver with read and write access to BSEC IP
(Boot and Security and OTP control)
- offset 0: shadowed values
- offset 0x80000000: OTP fuse box values (SAFMEM)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agostm32mp1: remove the second TAMP_BOOT_CONTEXT update
Patrick Delaunay [Thu, 17 May 2018 13:24:04 +0000 (15:24 +0200)]
stm32mp1: remove the second TAMP_BOOT_CONTEXT update

The register TAMP_BOOT_CONTEXT is already updated in
get_bootmode() in cpu.c and no need to be done
twice.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>