]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
7 years agoarm64: add support for Ka-Ro TXSD-410E karo-txsd KARO-TXSD-2017-03-15
Lothar Waßmann [Wed, 15 Mar 2017 08:10:30 +0000 (09:10 +0100)]
arm64: add support for Ka-Ro TXSD-410E

The TXSD-410E is a SoM compatible to the Qualcomm Dragonboard410c but
in a form factor compatible with the TX module family manufactured by
Ka-Ro electronics GmbH.

7 years agocmd: net: add 'netdev' command to select a specific network interface
Lothar Waßmann [Wed, 15 Mar 2017 08:09:46 +0000 (09:09 +0100)]
cmd: net: add 'netdev' command to select a specific network interface

7 years agommc: whitespace cleanup; add () around macro args
Lothar Waßmann [Wed, 15 Mar 2017 08:08:23 +0000 (09:08 +0100)]
mmc: whitespace cleanup; add () around macro args

7 years agocmd: pmic: use pmic_reg_write()/pmic_reg_read() functions
Lothar Waßmann [Wed, 15 Mar 2017 08:06:19 +0000 (09:06 +0100)]
cmd: pmic: use pmic_reg_write()/pmic_reg_read() functions

7 years agocmd: pmic: print values with leading zeroes
Lothar Waßmann [Wed, 15 Mar 2017 08:05:51 +0000 (09:05 +0100)]
cmd: pmic: print values with leading zeroes

7 years agocmd: pmic: add missing parameter 'value' for 'write' subcommand to help message
Lothar Waßmann [Wed, 15 Mar 2017 08:04:34 +0000 (09:04 +0100)]
cmd: pmic: add missing parameter 'value' for 'write' subcommand to help message

7 years agocmd: pmic: use base 16 for command arguments
Lothar Waßmann [Wed, 15 Mar 2017 08:02:46 +0000 (09:02 +0100)]
cmd: pmic: use base 16 for command arguments

7 years agocmd: add command for accessing the RPM via SMD protocol
Lothar Waßmann [Tue, 14 Mar 2017 16:41:35 +0000 (17:41 +0100)]
cmd: add command for accessing the RPM via SMD protocol

This patch adds a command for accessing PMIC (e.g. PM8916) registers
via the Qualcomm Resource Power Manager (RPM) using the SMD protocol.

7 years agodrivers: spmi: msm: check PBL status before and after register accesses
Lothar Waßmann [Tue, 14 Mar 2017 11:49:28 +0000 (12:49 +0100)]
drivers: spmi: msm: check PBL status before and after register accesses

Some registers associated with the reset logic may not be written
to under certain circumstances (e.g. PON_SW_RESET_S2_CTL may not be
changed when PON_SW_RESET_S2_CTL2[SW_RESET_EN] is set).
The PON_PBL_STATUS register records errors when accessing those
registers. Check the PBL status before and after each SPMI register
access, to track invalid writes to the affected registers.

7 years agodrivers: spmi: msm: add support for multi register operations
Lothar Waßmann [Mon, 13 Mar 2017 15:37:59 +0000 (16:37 +0100)]
drivers: spmi: msm: add support for multi register operations

The SPMI protocol supports reading/writing multiple registers in one
bus access. Add the byte count to be transferred to the generic
read/write functions in dm_spmi_ops and create new functions
spmi_read()/spmi_write() to utilize this new functionality.

7 years agodrivers: spmi: msm: add timeout to function waiting for SPMI_STATUS_DONE
Lothar Waßmann [Mon, 13 Mar 2017 15:09:19 +0000 (16:09 +0100)]
drivers: spmi: msm: add timeout to function waiting for SPMI_STATUS_DONE

It is always a bad idea(TM) to wait indefinitely for any hardware
related operation to conclude. HW _will_ get faulty some day and don't
react as expected. Thus add a timeout to the loop waiting for
SPMI_STATUS_DONE to be set.

7 years agodrivers: spmi: msm: add support for PMIC Arbiter V2
Lothar Waßmann [Mon, 13 Mar 2017 15:08:26 +0000 (16:08 +0100)]
drivers: spmi: msm: add support for PMIC Arbiter V2

This patch adds support for the newer version of the PMIC Arbiter
found on e.g. MSM8916.

7 years agodrivers: spmi: msm: fix return values for errors in parameters
Lothar Waßmann [Mon, 13 Mar 2017 15:04:56 +0000 (16:04 +0100)]
drivers: spmi: msm: fix return values for errors in parameters

If an out-of-range usid or pid is passed to the
msm_spmi_{read|write}() functions, those currently return -EIO.
Since no actual I/O has taken place at this point, the error code is
misleading. Return the more appropriate -EINVAL in this case.

7 years agocmd: add support for Qualcomm SPMI bus access
Lothar Waßmann [Mon, 13 Mar 2017 15:03:57 +0000 (16:03 +0100)]
cmd: add support for Qualcomm SPMI bus access

This patch adds an 'spmi' command for low level access to the SPMI bus
similar to the 'i2c' command from which it was inspired.

7 years agomisc: add support for Qualcomm SMD protocol
Lothar Waßmann [Mon, 13 Mar 2017 15:01:24 +0000 (16:01 +0100)]
misc: add support for Qualcomm SMD protocol

7 years agomisc: add Qualcomm shared memory driver
Lothar Waßmann [Mon, 13 Mar 2017 15:00:37 +0000 (16:00 +0100)]
misc: add Qualcomm shared memory driver

7 years agocmd: booti: add support for gzipped image files
Lothar Waßmann [Mon, 13 Mar 2017 15:00:00 +0000 (16:00 +0100)]
cmd: booti: add support for gzipped image files

7 years agolcd: add support for LCD_COLOR32
Lothar Waßmann [Mon, 13 Mar 2017 14:57:10 +0000 (15:57 +0100)]
lcd: add support for LCD_COLOR32

7 years agodrivers/sysreset: fix check of address returned by dev_get_addr()
Lothar Waßmann [Mon, 13 Mar 2017 14:54:56 +0000 (15:54 +0100)]
drivers/sysreset: fix check of address returned by dev_get_addr()

dev_get_addr() returns either a valid I/O address or FDT_ADDR_T_NONE
(which happens to be defined as -1) but not NULL in case of error!

7 years agocommon: cli_readline: Ensure to call show_activity anytime U-Boot is waiting for...
Lothar Waßmann [Mon, 13 Mar 2017 14:52:43 +0000 (15:52 +0100)]
common: cli_readline: Ensure to call show_activity anytime U-Boot is waiting for console input

7 years agommc: fix data type of timer variables
Lothar Waßmann [Mon, 13 Mar 2017 10:19:51 +0000 (11:19 +0100)]
mmc: fix data type of timer variables

get_timer() returns an unsigned long value. This may be 64bit wide on
64bit archs. Storing this value in an unsigned int will cut off the
upper half of the value leading to miscalculation of the elapsed time,
if the upper 32bits of the current timestamp are non-zero.

7 years agoarm64: print pre-relocation addresses in register dump
Lothar Waßmann [Wed, 8 Mar 2017 15:13:38 +0000 (16:13 +0100)]
arm64: print pre-relocation addresses in register dump

The addresses in ELR and LR are not meaningful after relocation of
U-Boot. Print the pre-relocation values that can easily be matched
with the source code in the register dump.

7 years agoclk: arm: snapdragon: add () around macro args and fixup indentation
Lothar Waßmann [Wed, 8 Mar 2017 15:12:28 +0000 (16:12 +0100)]
clk: arm: snapdragon: add () around macro args and fixup indentation

7 years agousb: ether: indentation fixup
Lothar Waßmann [Wed, 8 Mar 2017 15:11:53 +0000 (16:11 +0100)]
usb: ether: indentation fixup

7 years agocommon: env: fixup comments and help text
Lothar Waßmann [Wed, 8 Mar 2017 15:00:30 +0000 (16:00 +0100)]
common: env: fixup comments and help text

7 years agocommon: cli_simple: don't repeat commands after <CTRL-C> from user
Lothar Waßmann [Wed, 8 Mar 2017 14:58:06 +0000 (15:58 +0100)]
common: cli_simple: don't repeat commands after <CTRL-C> from user

Prevent the last command from being repeated (by entering an empty
line) when the command was aborted by <CTRL-C>

7 years agonet: fix typo in comment
Lothar Waßmann [Wed, 8 Mar 2017 14:57:24 +0000 (15:57 +0100)]
net: fix typo in comment

7 years agousb: ehci: print error messages with printf() rather than debug()
Lothar Waßmann [Wed, 8 Mar 2017 14:54:22 +0000 (15:54 +0100)]
usb: ehci: print error messages with printf() rather than debug()

7 years agodm: blk: conditionally disable functions that don't play well with CONFIG_DM_MMC
Lothar Waßmann [Wed, 8 Mar 2017 14:50:47 +0000 (15:50 +0100)]
dm: blk: conditionally disable functions that don't play well with CONFIG_DM_MMC

blk_{read|write}_devnum() don't work with CONFIG_DM_MMC enabled.
Prevent use under these circumstances by making the function
definition depend on !CONFIG_DM_MMC

7 years agonet: usb: r8152: rewrite the transfer functions ensuring correct cache handling
Lothar Waßmann [Wed, 8 Mar 2017 14:32:30 +0000 (15:32 +0100)]
net: usb: r8152: rewrite the transfer functions ensuring correct cache handling

All data transfer to/from USB should be done via cache coherent
buffers. Rewrite the basic transfer functions to ensure this.

7 years agoarmv8: mmu: cleanup mm_region definition
Lothar Waßmann [Wed, 8 Mar 2017 14:19:26 +0000 (15:19 +0100)]
armv8: mmu: cleanup mm_region definition

 - use more user-friendly 'size' value representation
 - remove duplicated comments

7 years agogpio: msm: use sane default values for gpio-count
Lothar Waßmann [Wed, 8 Mar 2017 14:23:12 +0000 (15:23 +0100)]
gpio: msm: use sane default values for gpio-count

Use the well known default values for 'gpio-count' (effectively making
this property optional), so that the driver can be instantiated from a
Linux DTB which does not provide the 'gpio-count' property.

7 years agodm: gpio: print error messages from DT with printf() rather than hiding them behind...
Lothar Waßmann [Wed, 8 Mar 2017 14:18:22 +0000 (15:18 +0100)]
dm: gpio: print error messages from DT with printf() rather than hiding them behind debug()

7 years agodm: gpio: fix typo when checking get_open_drain function hook
Lothar Waßmann [Wed, 8 Mar 2017 14:16:30 +0000 (15:16 +0100)]
dm: gpio: fix typo when checking get_open_drain function hook

dm_gpio_get_open_drain() checks ops->set_open_drain rather than
ops->get_open_drain before calling the latter function.
Fix this obvious typo.

7 years agommc: sdhci: msm: add support for card detect and write protect GPIOs
Lothar Waßmann [Wed, 8 Mar 2017 14:14:19 +0000 (15:14 +0100)]
mmc: sdhci: msm: add support for card detect and write protect GPIOs

7 years agommc: sdhci: fix mmc busy timeout handling
Lothar Waßmann [Wed, 8 Mar 2017 14:04:35 +0000 (15:04 +0100)]
mmc: sdhci: fix mmc busy timeout handling

With eMMC there is a good chance, that the mmc device remains busy for
extended periods of time after certain operations.
The current approach to handle this was to increase the timeout for
all commands up to a maximum.

Rather than this, do an extended wait for !busy in the relevant case
only, not affecting the general mmc cmd busy timeout.

7 years agoarmv8: snapdragon: make dtbs more compatible with Linux
Lothar Waßmann [Wed, 8 Mar 2017 14:09:16 +0000 (15:09 +0100)]
armv8: snapdragon: make dtbs more compatible with Linux

Linux has a 'clocks' property in DTB to specify (a list of) clocks
required for a device. The snapdragon DTS file in U-Boot uses a
'clock' property for the same purpose.

Change this to 'clocks', so that the Linux DTB can also be used to
configure U-Boot devices.

7 years agommc: sdhci: make aligned_buffer static
Lothar Waßmann [Wed, 8 Mar 2017 14:03:30 +0000 (15:03 +0100)]
mmc: sdhci: make aligned_buffer static

7 years agofdt_support: fix obiwan error in OF_CHECK_COUNTS()
Lothar Waßmann [Wed, 8 Mar 2017 14:30:06 +0000 (15:30 +0100)]
fdt_support: fix obiwan error in OF_CHECK_COUNTS()

'#size-cells' may well legally be zero, so adjust the comparison in
OF_CHECK_COUNTS() to reflect this.

7 years agofdt_support: improve error messages
Lothar Waßmann [Wed, 8 Mar 2017 14:27:29 +0000 (15:27 +0100)]
fdt_support: improve error messages

Include the actual offending values in the error message making the
output more meaningful.

7 years agofdt: print error messages with 'printf' rather than 'debug'
Lothar Waßmann [Wed, 8 Mar 2017 14:00:14 +0000 (15:00 +0100)]
fdt: print error messages with 'printf' rather than 'debug'

7 years agoMerge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Tue, 27 Sep 2016 16:47:25 +0000 (12:47 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra

7 years agoARM: tegra: flush caches via SMC call
Stephen Warren [Fri, 23 Sep 2016 23:43:49 +0000 (17:43 -0600)]
ARM: tegra: flush caches via SMC call

On Tegra186, it is necessary to perform an SMC to fully flush all caches;
flushing/cleaning by set/way is not enough. Implement the required hook
to make this happen.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoARM: tegra: fix ULPI PHY on Ventana and Seaboard
Stephen Warren [Thu, 15 Sep 2016 18:19:39 +0000 (12:19 -0600)]
ARM: tegra: fix ULPI PHY on Ventana and Seaboard

Commit ce02a71c2374 "tegra: dts: Sync tegra20 device tree files with
Linux" enabled the ULPI USB port on Ventana, but made no attempt to ensure
that U-Boot code could handle this. In practice, various code is missing,
and various configuration options are not enabled, which causes U-Boot to
hang when attempting to initialize this USB port. This patch enables ULPI
PHY support on Ventana, and adds the required pinmux setup for the port to
operate. Note that Ventana is so similar to Seaboard that this change is
made in the Seaboard board file, which is shared with Ventana.

Seaboard also has the ULPI USB port wired up in hardware, although to an
internal port that often doesn't have anything attached to it. However,
the DT nodes for the USB controller and PHY had different status property
values, so the port was not initialized by U-Boot. Fix this inconsistency,
and enable the ULPI port, just like in the Linux kernel DT. This likewise
requires enabling ULPI support in the Seaboard defconfig.

Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoARM: tegra: fix USB controller aliases
Stephen Warren [Thu, 15 Sep 2016 18:19:38 +0000 (12:19 -0600)]
ARM: tegra: fix USB controller aliases

Some boards have a different set of USB controllers enabled in DT than
the set referenced by /alias entries. This patch fixes that. For
example, this avoids the following message while booting on Ventana,
which is caused by the fact that the USB0 controller had no alias, and
defaulted to wanting a sequence number of 0, which was later explicitly
requested by the alias for USB controller 2.

USB2:   Device 'usb@c5008000': seq 0 is in use by 'usb@c5000000'

This didn't affect USB operation in any way though.

Related, there's no need for the USB controller aliases to have an order
that's different from the HW order, so re-order any aliases to match the
HW ordering. This has the benefit that since USB controller 0 is the only
one that supports device-mode in HW, and U-Boot only supports enabling
device move on controller 0, there's now good synergy in the ordering! For
Tegra20, that's not relevant at present since USB device mode doesn't work
correctly on that SoC, but it will save some head-scratching later.

This patch doesn't fix the colibri_t20 board, even though it has the same
issue, since Marcel already sent a patch for that.

Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-on: Harmony and Ventana

7 years agoARM: tegra: fix USB ULPI PHY reset signal inversion confusion
Stephen Warren [Thu, 15 Sep 2016 18:19:37 +0000 (12:19 -0600)]
ARM: tegra: fix USB ULPI PHY reset signal inversion confusion

USB ULPI PHY reset signals are typically active low. Consequently, they
should be marked as GPIO_ACTIVE_LOW in device tree, and indeed they are in
the Linux kernel DTs, and in DT properties that U-Boot doesn't yet use.
However, in DT properties that U-Boot does use, the value has been set to
0 (== GPIO_ACTIVE_HIGH) to work around a bug in U-Boot.

This change fixes the DT to correctly represent the HW, and fixes the
Tegra USB driver to cope with the fact that dm_gpio_set_value() internally
handles any inversions implied by the DT value GPIO_ACTIVE_LOW.

Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoi2c: tegra: only use new clock/reset APIs
Stephen Warren [Tue, 13 Sep 2016 16:46:02 +0000 (10:46 -0600)]
i2c: tegra: only use new clock/reset APIs

Now that the standard clock/reset APIs are available for all Tegra SoCs,
convert the I2C driver to use them exclusively, and remove any references
to the custom Tegra-specific APIs.

Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agommc: tegra: only use new clock/reset APIs
Stephen Warren [Tue, 13 Sep 2016 16:46:01 +0000 (10:46 -0600)]
mmc: tegra: only use new clock/reset APIs

Now that the standard clock/reset APIs are available for all Tegra SoCs,
convert the MMC driver to use them exclusively, and remove any references
to the custom Tegra-specific APIs.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoARM: tegra: enable standard clock/reset APIs everywhere
Stephen Warren [Tue, 13 Sep 2016 16:46:00 +0000 (10:46 -0600)]
ARM: tegra: enable standard clock/reset APIs everywhere

Implementations of the standard clock and reset APIs are available on all
Tegra SoCs now, so enable compilation of those uclasses.

Enable the Tegra CAR drivers for all SoCs prior to the BPMP being
available. This provides an implementation of those APIs everywhere.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoARM: tegra: fix clock_get_periph_rate() for UART clocks
Stephen Warren [Fri, 23 Sep 2016 22:44:51 +0000 (16:44 -0600)]
ARM: tegra: fix clock_get_periph_rate() for UART clocks

Make clock_get_periph_rate() return the correct value for UART clocks.

This change needs to be applied before the patches that enable CONFIG_CLK
for Tegra SoCs before Tegra186, since enabling that option causes
ns16550_serial_ofdata_to_platdata() to rely on clk_get_rate() for UART
clocks, and clk_get_rate() eventually calls clock_get_periph_rate().

This change is a rather horrible hack, as explained in the comment added
to the clock driver. I've tried fixing this correctly for all clocks as
described in that comment, but there's too much fallout elsewhere. I
believe the clock driver has a number of bugs which all cancel each-other
out, and unravelling that chain is too complex at present. This change is
the smallest change that fixes clock_get_periph_rate() for UART clocks
while guaranteeing no change in behaviour for any other clock, which
avoids other regressions.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoclock: implement a driver for the Tegra CAR
Stephen Warren [Tue, 13 Sep 2016 16:45:59 +0000 (10:45 -0600)]
clock: implement a driver for the Tegra CAR

Implement a clock uclass driver for the Tegra CAR. This allows clients to
use standard clock APIs on Tegra. This device is intended to be
instantiated by the core Tegra CAR driver, rather than being instantiated
directly from DT. The implementation uses the existing custom Tegra-
specific clock APIs to avoid coupling the series with significant
refactoring of the existing Tegra clock/clock code. The driver currently
only supports peripheral clocks, and avoids support for other clocks such
as PLLs and external clocks. This should be sufficient to convert over all
Tegra peripheral drivers, and avoids a complex implementation which calls
different Tegra-specific clock APIs based on the type of clock being
manipulated.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoreset: implement a driver for the Tegra CAR
Stephen Warren [Tue, 13 Sep 2016 16:45:58 +0000 (10:45 -0600)]
reset: implement a driver for the Tegra CAR

Implement a reset uclass driver for the Tegra CAR. This allows clients to
use standard reset APIs on Tegra. This device is intended to be
instantiated by the core Tegra CAR driver, rather than being instantiated
directly from DT. The implementation uses the existing custom Tegra-
specific reset APIs to avoid coupling the series with significant
refactoring of the existing Tegra clock/reset code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agomisc: implement Tegra CAR core driver
Stephen Warren [Tue, 13 Sep 2016 16:45:57 +0000 (10:45 -0600)]
misc: implement Tegra CAR core driver

The Tegra CAR (Clock And Reset) module provides control of most clocks
and reset signals within the Tegra SoC. This change implements a driver
for this module. However, since the module implements multiple kinds of
services (clocks, resets, perhaps more), all this driver does is bind
various sub-devices, which in turn provide the real services. This driver
is essentially an "MFD" (Multi-Function Device) in Linux kernel speak.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoARM: tegra: add APIs the clock uclass driver will need
Stephen Warren [Tue, 13 Sep 2016 16:45:56 +0000 (10:45 -0600)]
ARM: tegra: add APIs the clock uclass driver will need

A future patch will implement a clock uclass driver for Tegra. That driver
will call into Tegra's existing clock code to simplify the transition;
this avoids tieing the clock uclass patches into significant refactoring
of the existing custom clock API implementation.

Some of the Tegra clock APIs that manipulate peripheral clocks require
both the peripheral clock ID and parent clock ID to be passed in together.
However, the clock uclass API does not require any such "parent"
parameter, so the clock driver must determine this information itself.
This patch implements new Tegra- specific clock API
clock_get_periph_parent() for this purpose.

The new API is implemented in the core Tegra clock code rather than SoC-
specific clock code. The implementation uses various SoC-/clock-specific
data. That data is only available in SoC-specific clock code.
Consequently, two new internal APIs are added that enable the core clock
code to retrieve this information from the SoC-specific clock code. Due to
the structure of the Tegra clock code, this leads to some unfortunate code
duplication. However, this situation predates this patch.

Ideally, future work will de-duplicate the Tegra clock code, and migrate
it into drivers/clk/tegra. However, such refactoring is kept separate from
this series.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoARM: tegra: add peripheral clock init table
Stephen Warren [Tue, 13 Sep 2016 16:45:55 +0000 (10:45 -0600)]
ARM: tegra: add peripheral clock init table

Currently, Tegra peripheral drivers control two aspects of their HW module
clock(s):

1) The clock enable/rate for the peripheral clock itself.

2) The system-level clock tree setup, i.e. the clock parent.

Aspect 1 is reasonable, but aspect 2 is a system-level decision, not
something that an individual peripheral driver should in general know
about or influence. Such system-level knowledge ties the driver to a
specific SoC implementation, even when they use generic APIs for clock
manipulation, since they must have SoC-specific knowledge such as parent
clock IDs. Limited exceptions exist, such as where peripheral HW is
expected to dynamically switch between clock sources at run-time, such
as CPU clock scaling or display clock conflict management in a multi-head
scenario.

This patch enhances the Tegra core code to perform system-level clock
tree setup, in a similar fashion to the Linux kernel Tegra clock driver.
This will allow future patches to simplify peripheral drivers by removing
the clock parent setup logic.

This change is required prior to converting peripheral drivers to use the
standard clock APIs, since:

1) The clock uclass doesn't currently support a set_parent() operation.
Adding one is possible, but not necessary at the moment.

2) The clock APIs retrieve all clock IDs from device tree, and the DT
bindings for almost all peripherals only includes information about the
relevant peripheral clocks, and not any potential parent clocks.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoARM: tegra: pull Tegra210 SoC DT from Linux v4.7
Stephen Warren [Tue, 13 Sep 2016 16:45:54 +0000 (10:45 -0600)]
ARM: tegra: pull Tegra210 SoC DT from Linux v4.7

The primary benefit of this change is that it adds all missing clocks and
resets properties to peripherals. This will allow peripheral drivers to
migrate to the standard clock and reset APIs in the future.

Main changes:
* Brought in the correct Tegra210 CAR binding; the old file in U-Boot
  appears to be a renamed version of the Tegra124 bindings rather than
  the real Tegra210 version.
* Conversion of SPI and UART nodes to standard DMA bindings. U-Boot
  doesn't use DMA so isn't affected.
* Split of EHCI and USB PHY nodes. The EHCI nodes continue to contain all
  information required by U-Boot, so U-Boot is not affected.
* Conversion of many magic numbers to named defines.
* Addition of many nodes not used by U-Boot, including separation of the
  Tegra LIC (Legacy IRQ controller) and GIC.
* Node sort order fixes.

Remaining deltas relative to the Linux DT:
* U-Boot has enabled PCIe for Tegra210, but the kernel hasn't yet.
* The GPIO node compatible value in the kernel explicitly includes
  Tegra124 values whereas U-Boot does not. I'll send a kernel patch to
  correct this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoARM: tegra: pull Tegra124 SoC DT from Linux v4.7
Stephen Warren [Tue, 13 Sep 2016 16:45:53 +0000 (10:45 -0600)]
ARM: tegra: pull Tegra124 SoC DT from Linux v4.7

The primary benefit of this change is that it adds all missing clocks and
resets properties to peripherals. This will allow peripheral drivers to
migrate to the standard clock and reset APIs in the future.

Main changes:
* USB phy_type property is aligned with the kernel, so board files are
  updated so the final DT content doesn't change. I'm not convinved that
  Nyan uses HSIC phy_type. However, I'd rather this change be a no-op,
  and any DT bug-fixes be separate.
* Sync misc changes from the kernel: missing DT content, minor compatible
  value fixes, typos.

Remaining deltas relative to the Linux DT:
* U-Boot uses #address-cells/#size-cells of 1 whereas the kernel uses 2.
  I believe U-Boot's DT parsing currently assumes that these values match
  the physical address size, so I didn't synchronize this part of the DT.
* U-Boot uses the original XUSB PHY DT binding, wherease the kernel DT
  has moved to a newer version. Thus, XUSB client nodes include properties
  names phys and phy-names that do not appear in the kernel, and don't
  include pad definitions in the padctl node.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoARM: tegra: pull Tegra114 SoC DT from Linux v4.7
Stephen Warren [Tue, 13 Sep 2016 16:45:52 +0000 (10:45 -0600)]
ARM: tegra: pull Tegra114 SoC DT from Linux v4.7

The primary benefit of this change is that it adds all missing clocks and
resets properties to peripherals. This will allow peripheral drivers to
migrate to the standard clock and reset APIs in the future.

Main changes:
* Conversion of SPI nodes to standard DMA bindings. U-Boot doesn't use
  DMA so isn't affected.
* Split of EHCI and USB PHY nodes. The EHCI nodes continue to contain all
  information required by U-Boot, so U-Boot is not affected.
* Boards need to define the clk32k_in clock that feeds the Tegra PMC.
* Addition of tegra114-mc.h since tegra114.dtsi now includes it.
* Conversion of many magic numbers to named defines.
* Addition of many nodes not used by U-Boot.
* Node sort order fixes.

Remaining deltas relative to the Linux DT:
* USB node compatible values in U-Boot explicitly list Tegra114 values
  whereas the kernel does not. I'll send a kernel patch to correct this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoARM: tegra: pull Tegra30 SoC DT from Linux v4.7
Stephen Warren [Tue, 13 Sep 2016 16:45:51 +0000 (10:45 -0600)]
ARM: tegra: pull Tegra30 SoC DT from Linux v4.7

The primary benefit of this change is that it adds all missing clocks and
resets properties to peripherals. This will allow peripheral drivers to
migrate to the standard clock and reset APIs in the future.

Main changes:
* Modification of PCIe memory region addresses. The HW memory layout is
  programmable, so this should work fine, and Beaver PCIe was tested
  without issue.
* Removal of pcie_xclk from the PCIe node and clock binding header. This
  clock doesn't exist and isn't used; only a reset with this ID exists.
* Conversion of SPI nodes to standard DMA bindings. U-Boot doesn't use
  DMA so isn't affected.
* Split of EHCI and USB PHY nodes. The EHCI nodes continue to contain all
  information required by U-Boot, so U-Boot is not affected.
* Changed the phy_type value for the second USB port. This required board
  DTs to be updated to keep the same configuration.
* Boards need to define the clk32k_in clock that feeds the Tegra PMC.
* Addition of tegra30-mc.h since tegra30.dtsi now includes it.
* Conversion of many magic numbers to named defines.
* Addition of many nodes not used by U-Boot.
* Node sort order fixes.

Remaining deltas relative to the Linux DT:
* None.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoARM: tegra: pull Tegra20 SoC DT from Linux v4.7
Stephen Warren [Tue, 13 Sep 2016 16:45:50 +0000 (10:45 -0600)]
ARM: tegra: pull Tegra20 SoC DT from Linux v4.7

This brings in a few minor fixes since the last sync. The largest change
is the removal of the definition for TEGRA20_CLK_PCIE_XCLK. This clock
doesn't actually exist.

Remaining deltas:
* Addition of u-boot,dm-pre-reloc property to a couple of nodes.
* Addition of the NAND controller, which Linux doesn't yet support.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoARM: tegra: remove "0, " from DT unit addresses
Stephen Warren [Tue, 13 Sep 2016 16:45:49 +0000 (10:45 -0600)]
ARM: tegra: remove "0, " from DT unit addresses

Apparently the unit address in a DT node name is now supposed to be a
single integer value, rather than a comma-separated list of individual
cell values. Fix the U-Boot DTs to comply with this naming convention.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agommc: tegra: Add DM_MMC support to Tegra MMC driver
Tom Warren [Tue, 13 Sep 2016 16:45:48 +0000 (10:45 -0600)]
mmc: tegra: Add DM_MMC support to Tegra MMC driver

Convert the Tegra MMC driver to DM_MMC. Support for non-DM is removed
to avoid ifdefs in the code. DM_MMC is now enabled for all Tegra builds.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
(swarren, fixed some NULL pointer dereferences, removed extraneous
changes, rebased on various other changes, removed non-DM support etc.)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
7 years agoARM: tegra: set MMC pin mux in board_init()
Stephen Warren [Tue, 13 Sep 2016 16:45:47 +0000 (10:45 -0600)]
ARM: tegra: set MMC pin mux in board_init()

Most other pin mux is configured in this function. This removes the
need to do it in an MMC-specific initialization function, which is good
since that function is going away later in this series.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agommc: tegra: priv struct and naming cleanup
Stephen Warren [Tue, 13 Sep 2016 16:45:46 +0000 (10:45 -0600)]
mmc: tegra: priv struct and naming cleanup

struct mmc_host is a Tegra-specific structure, but the name implies it's
something defined by core MMC code, which is confusing. Rename it to
struct tegra_mmc_priv to make its purpose more obvious. The new name is
also more appropriate for a DM driver private data structure, which will
be relevant later in this series.

Nothing needs access to this type except the MMC driver itself. Move the
definition into the driver C file.

Make sure all Tegra MMC functions are named tegra_mmc_*. Even though
they're all static, it's useful to have good naming so that symbol tables
are easy to interpret. A few functions aren't renamed by this patch since
they'll be deleted by a subsequent patch in this series.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agommc: tegra: don't use periph_id in pad_init_mmc()
Stephen Warren [Tue, 13 Sep 2016 16:45:45 +0000 (10:45 -0600)]
mmc: tegra: don't use periph_id in pad_init_mmc()

The MMC driver will soon be converted to use standard clock/reset APIs,
and so the periph_id field in the MMC device priv struct will disappear.
Rework the implementation of pad_init_mmc() to rely on this; using the
device register address is a much more direct test anyway.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agommc: tegra: move pad_init_mmc() into MMC driver
Stephen Warren [Tue, 13 Sep 2016 16:45:44 +0000 (10:45 -0600)]
mmc: tegra: move pad_init_mmc() into MMC driver

pad_init_mmc() is performing an SoC-specific operation, using registers
within the MMC controller. There's no reason to implement this code
outside the MMC driver, so move it inside the driver.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agommc: tegra: use correct alias for SDHCI/MMC nodes
Stephen Warren [Tue, 13 Sep 2016 16:45:43 +0000 (10:45 -0600)]
mmc: tegra: use correct alias for SDHCI/MMC nodes

The Tegra MMC driver currently honors "sdhci" entries in /aliases. The
MMC core however uses "mmc" entries in /aliases. This difference will be
relevant once the Tegra MMC driver is converted to DM, and the MMC core
handles alias lookups. To avoid issues during that conversion, fix the
Tegra MMC driver and all Tegra DTs to use the same alias name as the MMC
core does.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoARM: tegra: fdt: Add 'non-removable' property to all eMMC nodes
Tom Warren [Tue, 13 Sep 2016 16:45:42 +0000 (10:45 -0600)]
ARM: tegra: fdt: Add 'non-removable' property to all eMMC nodes

During debug of the DM_MMC changes to the Tegra MMC driver, I
noticed that the 'removable' property wasn't being set correctly
for the eMMC parts on most Tegra boards. Since the kernel DTS has
this property set correctly, it should be in U-Boot's Tegra DT too.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoARM: tegra: increase console buffer size and sys args num
Bryan Wu [Thu, 1 Sep 2016 23:49:57 +0000 (23:49 +0000)]
ARM: tegra: increase console buffer size and sys args num

The Linux-for-Tegra kernel uses a very long command line.

The default value of CONFIG_SYS_CBSIZE is too small to printf out the
long command line and causes a message like:
  bootarg overflow 602+0+0+1 > 512
on the console, and the board refuses to boot.

The default value of CONFIG_SYS_MAXARGS is too small to add a long
long command line, and the kernel won't boot without the complete
bootargs.

Increasing these two config options solves this problem.

Signed-off-by: Bryan Wu <pengw@nvidia.com>
Signed-off-by: Peter Chubb <Peter.Chubb@data61.csiro.au>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
7 years agoMerge git://www.denx.de/git/u-boot-marvell
Tom Rini [Tue, 27 Sep 2016 15:40:56 +0000 (11:40 -0400)]
Merge git://www.denx.de/git/u-boot-marvell

7 years agoarm64: mvebu: armada-7040-db.dts: Add I2C and SPI aliases
Stefan Roese [Wed, 31 Aug 2016 12:47:36 +0000 (14:47 +0200)]
arm64: mvebu: armada-7040-db.dts: Add I2C and SPI aliases

Add I2C and SPI aliases to enable usage in U-Boot.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Neta Zur Hershkovits <neta@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Omri Itach <omrii@marvell.com>
Cc: Igal Liberman <igall@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
7 years agoarm64: mvebu: Armada 7K/8K: Add COMPHY device tree nodes
Stefan Roese [Wed, 25 May 2016 07:06:29 +0000 (09:06 +0200)]
arm64: mvebu: Armada 7K/8K: Add COMPHY device tree nodes

This patch adds the COMPHY device tree nodes that are still missing to
the Armada 7K/8K dts files.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Neta Zur Hershkovits <neta@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Omri Itach <omrii@marvell.com>
Cc: Igal Liberman <igall@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
7 years agoarm64: mvebu: armada-ap806.dtsi: Add clock-frequency to UART DT node
Stefan Roese [Wed, 25 May 2016 06:34:47 +0000 (08:34 +0200)]
arm64: mvebu: armada-ap806.dtsi: Add clock-frequency to UART DT node

The clock frequency needs to be provided in the DT. Otherwise the driver
won't start in U-Boot.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Neta Zur Hershkovits <neta@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Omri Itach <omrii@marvell.com>
Cc: Igal Liberman <igall@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
7 years agoarm64: mvebu: Add Armada 7K db-88f7040 development board support
Stefan Roese [Wed, 25 May 2016 06:21:21 +0000 (08:21 +0200)]
arm64: mvebu: Add Armada 7K db-88f7040 development board support

This patch adds basic support for the Marvell Armada 7K DB-88F7040
development board. Supported are the following interfaces:
- UART
- SPI (incl. SPI NOR)
- I2C
- USB
- SATA / AHCI

Support for other interfaces will follow.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Neta Zur Hershkovits <neta@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Omri Itach <omrii@marvell.com>
Cc: Igal Liberman <igall@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
7 years agoarm64: mvebu: Add basic support for the Marvell Armada 7K/8K SoC
Stefan Roese [Wed, 25 May 2016 06:13:45 +0000 (08:13 +0200)]
arm64: mvebu: Add basic support for the Marvell Armada 7K/8K SoC

Compared to the Armada 3700, the Armada 7K and 8K are much more on the
high-end side: they use a dual Cortex-A72 or a quad Cortex-A72, as
opposed to the Cortex-A53 for the Armada 3700.

The Armada 7K and 8K also use a fairly unique architecture, internally
they are composed of several components:

- One AP (Application Processor), which contains the processor itself
  and a few core hardware blocks. The AP used in the Armada 7K and 8K
  is called AP806, and is available in two configurations:
  dual Cortex-A72 and quad Cortex-A72.
- One or two CP (Communication Processor), which contain most of the I/O
  interfaces (SATA, PCIe, Ethernet, etc.). The 7K family chips have one
  CP, while the 8K family chips integrate two CPs, providing two times
  the number of I/O interfaces available in the CP.
  The CP used in the 7K and 8K is called CP110.

All in all, this gives the following combinations:

- Armada 7020, which is a dual Cortex-A72 with one CP
- Armada 7040, which is a quad Cortex-A72 with one CP
- Armada 8020, which is a dual Cortex-A72 with two CPs
- Armada 8040, which is a quad Cortex-A72 with two CPs

This patch adds basic support for this ARMv8 based SoC into U-Boot.
Future patches will integrate other device drivers and board support,
starting with the Marvell DB-88F7040 development board.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Neta Zur Hershkovits <neta@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Omri Itach <omrii@marvell.com>
Cc: Igal Liberman <igall@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
7 years agoarm64: mvebu: Armada 7K/8K: Add Armada 7K/8K dts files
Stefan Roese [Wed, 25 May 2016 06:23:31 +0000 (08:23 +0200)]
arm64: mvebu: Armada 7K/8K: Add Armada 7K/8K dts files

This patch integrates the Armada 7K/8K dts files from the latest
submission on the linux-arm-kernel mailing list.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Neta Zur Hershkovits <neta@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Omri Itach <omrii@marvell.com>
Cc: Igal Liberman <igall@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
7 years agoahci: Make ahci_port_base() non-static to enable overwrite
Stefan Roese [Wed, 31 Aug 2016 08:02:15 +0000 (10:02 +0200)]
ahci: Make ahci_port_base() non-static to enable overwrite

To allow a board- / platform-specific ahci_port_base() function, this
patch removes "static inline" and adds __weak to this function. This
will be used by the upcoming Armada 7K/8K SATA / AHCI support, which
unfortunately needs a different port base address calculation.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Neta Zur Hershkovits <neta@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Omri Itach <omrii@marvell.com>
Cc: Igal Liberman <igall@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
7 years agousb: xhci-mvebu: Add Armada 8K to compatiblity list
Stefan Roese [Wed, 31 Aug 2016 04:48:56 +0000 (06:48 +0200)]
usb: xhci-mvebu: Add Armada 8K to compatiblity list

To enable this driver on Armada 7K/8K this patch adds the compatibility
property to the list.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Neta Zur Hershkovits <neta@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Omri Itach <omrii@marvell.com>
Cc: Igal Liberman <igall@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
7 years agodrivers/phy: Add Marvell SerDes / PHY drivers used on Armada 7K/8K
Stefan Roese [Tue, 30 Aug 2016 14:48:20 +0000 (16:48 +0200)]
drivers/phy: Add Marvell SerDes / PHY drivers used on Armada 7K/8K

This version is based on the Marvell U-Boot version with this patch
applied as latest patch:

Git ID 7f408573: "fix: comphy: cp110: add comphy initialization for usb
device mode" from 2016-07-05.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Neta Zur Hershkovits <neta@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Omri Itach <omrii@marvell.com>
Cc: Igal Liberman <igall@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
7 years agoarm64: mvebu: Add Armada 3700 db-88f3720 development board support
Stefan Roese [Tue, 17 May 2016 13:04:16 +0000 (15:04 +0200)]
arm64: mvebu: Add Armada 3700 db-88f3720 development board support

This patch adds basic support for the Marvell Armada 3700 DB-88F3720
development board. Supported are the following interfaces:
- UART
- SPI (incl. SPI NOR)
- I2C
- Ethernet

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
7 years agoarm64: mvebu: Add support for the Marvell Armada 3700 SoC
Stefan Roese [Tue, 17 May 2016 13:00:30 +0000 (15:00 +0200)]
arm64: mvebu: Add support for the Marvell Armada 3700 SoC

The Armada 3700 integrates the following interfaces (not complete list):
- Dual Cortex-A53 ARMv8
- USB 3.0
- SATA 3.0
- PCIe 2.0
- 2 x Gigabit Ethernet 1Gbps / 2.5Gbps
- ...

This patch adds basic support for this ARMv8 based SoC into U-Boot.
Future patches will integrate other device drivers and board support
for the Marvell DB-88F3720 development board.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
7 years agoarm64: mvebu: Armada 3700: Add USB device tree nodes
Stefan Roese [Fri, 26 Aug 2016 11:50:41 +0000 (13:50 +0200)]
arm64: mvebu: Armada 3700: Add USB device tree nodes

This patch adds the USB device tree nodes that are still missing to
the Armada 3700 dts files.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
7 years agoarm64: mvebu: Armada 3700: Add COMPHY device tree nodes
Stefan Roese [Fri, 26 Aug 2016 11:10:45 +0000 (13:10 +0200)]
arm64: mvebu: Armada 3700: Add COMPHY device tree nodes

This patch adds the COMPHY device tree nodes that are still missing to
the Armada 3700 dts files.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
7 years agoarm64: mvebu: Armada 3700: Add I2C device tree nodes
Stefan Roese [Thu, 21 Jul 2016 09:34:32 +0000 (11:34 +0200)]
arm64: mvebu: Armada 3700: Add I2C device tree nodes

This patch adds the I2C device tree nodes that are still missing to
the Armada 3700 dts files.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
7 years agoarm64: mvebu: Armada 3700: Add ethernet device tree nodes
Stefan Roese [Thu, 19 May 2016 15:45:20 +0000 (17:45 +0200)]
arm64: mvebu: Armada 3700: Add ethernet device tree nodes

This patch adds the ethernet device tree nodes that are still missing to
the Armada 3700 dts files.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
7 years agoarm64: mvebu: Armada 3700: Add SPI device tree nodes
Stefan Roese [Thu, 19 May 2016 08:41:01 +0000 (10:41 +0200)]
arm64: mvebu: Armada 3700: Add SPI device tree nodes

This patch adds the SPI device tree nodes that are still missing to
the Armada 3700 dts files.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
7 years agoarm64: mvebu: Armada 3700: Add Armada 37xx dts files
Stefan Roese [Tue, 17 May 2016 12:03:25 +0000 (14:03 +0200)]
arm64: mvebu: Armada 3700: Add Armada 37xx dts files

This patch integrates the Armada 3700 dts files from the latest
submission on the linux-arm-kernel mailing list.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
7 years agodrivers/phy: Add Marvell SerDes / PHY drivers used on Armada 3k
Stefan Roese [Mon, 23 May 2016 09:12:05 +0000 (11:12 +0200)]
drivers/phy: Add Marvell SerDes / PHY drivers used on Armada 3k

This version is based on the Marvell U-Boot version with this patch
applied as latest patch:

Git ID 7f408573: "fix: comphy: cp110: add comphy initialization for usb
device mode" from 2016-07-05.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
7 years agousb: ehci: ehci-marvell.c: Add Armada 3700 support (ARMv8)
Stefan Roese [Mon, 18 Jul 2016 15:24:56 +0000 (17:24 +0200)]
usb: ehci: ehci-marvell.c: Add Armada 3700 support (ARMv8)

This patch adds DM based support for the Armada 3700 EHCI controller.
The address windows don't need to get configured in this case. The
difference here is detected via DT compatible property at runtime.

With this support and the DM xHCI driver, both XHCI and eHCI can be
used simultaniously on the MVEBU boards now.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Acked-by: Marek Vasut <marex@denx.de>
7 years agousb: xhci: Add Marvell MVEBU xHCI support
Stefan Roese [Thu, 14 Jul 2016 09:39:20 +0000 (11:39 +0200)]
usb: xhci: Add Marvell MVEBU xHCI support

This patch adds DM based support for the xHCI USB 3.0 controller
integrated in the Armada 3700 SoC. It may be extended to be used
by other MVEBU SoCs as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Acked-by: Marek Vasut <marex@denx.de>
7 years agonet: mvneta: Add support for Armada 3700 SoC
Stefan Roese [Thu, 19 May 2016 15:46:36 +0000 (17:46 +0200)]
net: mvneta: Add support for Armada 3700 SoC

This patch adds support for the Armada 3700 SoC to the Marvell mvneta
network driver.

Not like A380, in Armada3700, there are two layers of decode windows for GBE:
First layer is:  GbE Address window that resides inside the GBE unit,
Second layer is: Fabric address window which is located in the NIC400
                 (South Fabric).
To simplify the address decode configuration for Armada3700, we bypass the
first layer of GBE decode window by setting the first window to 4GB.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agonet: mvneta: Make driver 64bit safe
Stefan Roese [Thu, 19 May 2016 16:09:17 +0000 (18:09 +0200)]
net: mvneta: Make driver 64bit safe

The mvneta driver is also used on the ARMv8 64bit Armada 3700 SoC. This
patch fixes the compilation warnings seen on this 64bit platform.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agospi: Add driver for Marvell Armada 3700 SoC
Stefan Roese [Thu, 19 May 2016 13:56:44 +0000 (15:56 +0200)]
spi: Add driver for Marvell Armada 3700 SoC

The SPI IP core in the Marvell Armada 3700 is similar to the one in the
other Armada SoCs. But the differences are big enough that it makes
sense to introduce a new driver instead of cluttering the old
kirkwood driver with #ifdef's.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
7 years agoserial: Add serial_mvebu_a3700 for Armada 3700 SoC
Stefan Roese [Tue, 17 May 2016 14:36:00 +0000 (16:36 +0200)]
serial: Add serial_mvebu_a3700 for Armada 3700 SoC

The Armada 3700's UART is a simple serial port. It has a 32 bytes
Tx FIFO and a 64 bytes Rx FIFO integrated. This patch adds support
for this UART including the DEBUG UART functions for very early
debug output.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Kostya Porotchkin <kostap@marvell.com>
Cc: Wilson Ding <dingwei@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Hua Jing <jinghua@marvell.com>
Cc: Terry Zhou <bjzhou@marvell.com>
Cc: Hanna Hawa <hannah@marvell.com>
Cc: Haim Boot <hayim@marvell.com>
7 years agonet: mvneta: Round up top tx buffer boundaries for dcache ops
Stefan Roese [Thu, 25 Aug 2016 10:56:50 +0000 (12:56 +0200)]
net: mvneta: Round up top tx buffer boundaries for dcache ops

check_cache_range() warns that the top boundaries are not properly
aligned when flushing or invalidating the buffers and make these
operations fail.

This gets rid of the warnings:
CACHE: Misaligned operation at range ...

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-ubi
Tom Rini [Tue, 27 Sep 2016 14:47:37 +0000 (10:47 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-ubi

7 years agodfu: Migrate to Kconfig
Tom Rini [Mon, 19 Sep 2016 17:31:30 +0000 (13:31 -0400)]
dfu: Migrate to Kconfig

Introduce a hidden USB_FUNCTION_DFU Kconfig option and select it for
CMD_DFU (as we must have the DFU command enabled to do anything DFU).
Make all of the entries in drivers/dfu/Kconfig depend on CMD_DFU and add
options for all of the back end choices that DFU can make use of.

Cc: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
7 years agousb:gadget: Disallow DFU in SPL for now
Tom Rini [Tue, 27 Sep 2016 12:36:56 +0000 (08:36 -0400)]
usb:gadget: Disallow DFU in SPL for now

Previously, DFU was not built in for SPL and often disabled via the board
config.h file, in the SPL build.  By moving DFU to Kconfig we now need to
move this logic to the Makefile to continue to allow boards to fit within
their SPL size limit (until gcc 6 is more widespread and unused strings will
be discarded).

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoti_armv7_common.h: Adjust malloc pool size in all cases.
Tom Rini [Mon, 19 Sep 2016 17:05:34 +0000 (13:05 -0400)]
ti_armv7_common.h: Adjust malloc pool size in all cases.

Previously we had been adjusting CONFIG_SYS_MALLOC_LEN based on if
CONFIG_DFU_MMC has been set or not.  However, for quite some time this
has not been the case as we often include <configs/ti_armv7_common.h>
prior to setting CONFIG_DFU_MMC so we would always use 16MiB and then
not have enough room for to DFU files.  Given the amount of memory we
always have, setting a minimum size of 32MiB for malloc is reasonable.
However, in the SPL case not only do we not need that much we start
running into overlap problems and then will fail to boot.  Since we
don't need 16MiB in the SPL case, bring this down to 8MiB.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agocmd: ubi: add option to specify volume id
Ladislav Michl [Tue, 13 Sep 2016 05:14:01 +0000 (07:14 +0200)]
cmd: ubi: add option to specify volume id

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>