]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
6 years agotools: Include U-Boot libfdt headers from their actual path
Paul Kocialkowski [Fri, 2 Mar 2018 22:13:42 +0000 (23:13 +0100)] 
tools: Include U-Boot libfdt headers from their actual path

There are no headers for libfdt in lib/libfdt, as they are instead
located in scripts/dtc/libfdt. Specifying lib/libfdt for headers
inclusion in host tools results in using the system libfdt headers,
which is not what we want. Change this to the proper path.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
7 years agoarm64: zynqmp: Enable net configs for zc1275
Siva Durga Prasad Paladugu [Fri, 12 Oct 2018 11:25:37 +0000 (16:55 +0530)] 
arm64: zynqmp: Enable net configs for zc1275

This patch enable net configs for zc1275 board.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Add ethernet node for zc1275 revB
Siva Durga Prasad Paladugu [Fri, 12 Oct 2018 11:25:36 +0000 (16:55 +0530)] 
arm64: zynqmp: Add ethernet node for zc1275 revB

This patch add ethernet node gem1 to zc1275 RevB.
GMII to RGMII converter sits between MAC and external
phy connected over GMII to MAC and RGMMI to external phy.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: phy: Add gmiitorgmii converter support
Siva Durga Prasad Paladugu [Fri, 12 Oct 2018 11:25:35 +0000 (16:55 +0530)] 
net: phy: Add gmiitorgmii converter support

This patch adds support for gmiitorgmii converter.
This converter sits between the MAC and the external phy
MAC <==> GMII2RGMII <==> RGMII_PHY.
The ethernet driver probes this bridge and this bridge driver
probes real phy driver and invokes the real phy functionalities
as requested. This bridge just needs to be configured based on
real phy negotiated speed and duplex.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: phy: Move fixed link code to separate routine
Siva Durga Prasad Paladugu [Fri, 12 Oct 2018 11:25:34 +0000 (16:55 +0530)] 
net: phy: Move fixed link code to separate routine

This patch moves fixed-link functionality code to a separate
routine inorder to make it more modular and cleaner.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agocmd: kgdb: Enable kgdb only for PPC
Michal Simek [Thu, 4 Oct 2018 12:26:13 +0000 (14:26 +0200)] 
cmd: kgdb: Enable kgdb only for PPC

Only PPC supports this option that's why there should be proper
dependency setup via Kconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Define CONFIG_MP through Kconfig
Siva Durga Prasad Paladugu [Mon, 8 Oct 2018 05:31:31 +0000 (11:01 +0530)] 
arm64: zynqmp: Define CONFIG_MP through Kconfig

This patch removes CONFIG_MP definition from .h and
enables it through Kconfig as it was already moved to
Kconfig.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Add new command for TCM initialization
Siva Durga Prasad Paladugu [Fri, 5 Oct 2018 09:39:05 +0000 (15:09 +0530)] 
arm64: zynqmp: Add new command for TCM initialization

This patch adds new zynqmp command "zynqmp tcminit mode" to
initialize TCM. TCM needs to be initialized before accessing
to avoid ECC errors. This new command helps to perform
the same. It also makes tcm_init() as global and uses it for
doing the TCM initialization.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Move TCM initialization to a separate routine
Siva Durga Prasad Paladugu [Fri, 5 Oct 2018 09:39:04 +0000 (15:09 +0530)] 
arm64: zynqmp: Move TCM initialization to a separate routine

This patch moves TCM initialization to a separate routine to
make it modular and can be reused if required. It also prints
warning message now as it writes to TCM.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: zynq_gem: Add check for 64-bit dma support by hardware
Siva Durga Prasad Paladugu [Thu, 4 Oct 2018 12:39:38 +0000 (18:09 +0530)] 
net: zynq_gem: Add check for 64-bit dma support by hardware

This patch throws an error if 64-bit support is expected
but DMA hardware is not capable of 64-bit support. It also
prints a debug message if DMA is capable of 64-bit but not
using it.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agomicroblaze: bootm: Fix compiler warning
Bin Meng [Mon, 12 Feb 2018 09:54:37 +0000 (17:54 +0800)] 
microblaze: bootm: Fix compiler warning

Fix build warning in arch/microblaze/lib/bootm.c with gcc 7.3.0:

  warning: this 'if' clause does not guard... [-Wmisleading-indentation]

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: Moving macros to the common header file
Vipul Kumar [Mon, 10 Sep 2018 08:59:51 +0000 (14:29 +0530)] 
mmc: Moving macros to the common header file

This patch moves the following macros to the mmc.h
define SD_HS_BUS_SPEED
define MMC_DDR52_BUS_SPEED
define MMC_HS_BUS_SPEED
define MMC_MAX_BUS_SPEED

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: sdhci: zynq: Added support to read Tap Delay values from DT
Vipul Kumar [Mon, 10 Sep 2018 08:59:50 +0000 (14:29 +0530)] 
mmc: sdhci: zynq: Added support to read Tap Delay values from DT

This patch added support to read ITAP and OTAP delay values from
he device tree. If the DT does not contain tap delay values, the
predefined values will be used for the same.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm: zynq: cse_qspi: Fix overwriting spi-rx-bus-width property
Siva Durga Prasad Paladugu [Tue, 11 Sep 2018 09:39:56 +0000 (15:09 +0530)] 
arm: zynq: cse_qspi: Fix overwriting spi-rx-bus-width property

spi-rx-bus-width property is part of flash, so it should be moved
to flash node from qspi node. This patch fixes the incorrect read
of spi-rx-bus-width property by moving it to flash node.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agocmd: zynqrsa: Added support to authenticate image partition header
Vipul Kumar [Mon, 10 Sep 2018 12:02:18 +0000 (17:32 +0530)] 
cmd: zynqrsa: Added support to authenticate image partition header

This patch added support to get image header info and authenticate
the header.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Add support for encryption and decryption on data blob
Siva Durga Prasad Paladugu [Thu, 6 Sep 2018 11:04:44 +0000 (16:34 +0530)] 
arm64: zynqmp: Add support for encryption and decryption on data blob

This patch adds support for encryption and decryption on a given data
blob using different key sources such as userkey(KUP), device key and
PUF key. Inorder to support this a new zynqmp command(zynqmp aes) has
been introduced.

Command:
zynqmp aes srcaddr ivaddr len aesop keysrc dstaddr [keyaddr]\n"
Encrypts or decrypts blob of data at src address and puts it\n"
back to dstaddr using key and iv at keyaddr and ivaddr\n"
respectively. keysrc values specifies from which source key\n"
has to be used, it can be User/Device/PUF key. A value of 0\n"
for KUP(user key),1 for DeviceKey and 2 for PUF key. The\n"
aesop value would specify the operationwhich can be 0 for\n"
decrypt and 1 for encrypt(1) operation\n";

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodm: add dev_read_u32()
Masahiro Yamada [Fri, 29 Dec 2017 17:00:05 +0000 (02:00 +0900)] 
dm: add dev_read_u32()

dev_read_u32_default() always returns something even when the property
is missing.  So, it is impossible to do nothing in the case.  One
solution is to use ofnode_read_u32() instead, but adding dev_read_u32()
will be helpful.

BTW, Linux has an equvalent function, device_property_read_u32();
it is clearer that it reads a property.  I cannot understand the
behavior of dev_read_u32() from its name.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoarm64: zynqmp: Remove ums command for ultra96
Michal Simek [Fri, 7 Sep 2018 08:19:36 +0000 (10:19 +0200)] 
arm64: zynqmp: Remove ums command for ultra96

There is no USB_FUNCTION_MASS_STORAGE enabled that's why there is
compilation failure for this platform.
Better to remove this feature which is enabled in mainline
(ultra96 was cherry-picked from mainline).

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agozynqmp: mini_qspi: Fix overwriting spi-rx-bus-width property
Siva Durga Prasad Paladugu [Wed, 5 Sep 2018 11:35:40 +0000 (17:05 +0530)] 
zynqmp: mini_qspi: Fix overwriting spi-rx-bus-width property

spi-rx-bus-width property is part of flash, so it should be moved
to flash node from qspi node. This patch fixes the incorrect read
of spi-rx-bus-width property by moving it to flash node.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoRevert "fat/fs: convert to directory iterators"
Vipul Kumar [Wed, 5 Sep 2018 10:02:23 +0000 (15:32 +0530)] 
Revert "fat/fs: convert to directory iterators"

This reverts commit 8eafae209c35932d9a6560809c55ee4641534236.

And drop a whole lot of ugly code!

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoRevert "fat/fs: move ls to generic implementation"
Vipul Kumar [Wed, 5 Sep 2018 10:02:22 +0000 (15:32 +0530)] 
Revert "fat/fs: move ls to generic implementation"

This reverts commit 89191d626793490b579e1d36e7d7a4464a20f9f6.

Add a generic implementation of 'ls' using opendir/readdir/closedir, and
replace fat's custom implementation.  Other filesystems should move to
the generic implementation after they add opendir/readdir/closedir
support.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoRevert "fs/fat: fix case for FAT shortnames"
Vipul Kumar [Wed, 5 Sep 2018 10:02:21 +0000 (15:32 +0530)] 
Revert "fs/fat: fix case for FAT shortnames"

This reverts commit 21a24c3bf35bac83d66ce4a48eb0c7dd8a7227cb.

Noticed when comparing our output to linux.  There are some lcase bits
which control whether filename and/or extension should be downcase'd.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agofpga: zynqmp: Modify PL bitstream loading sequence
Siva Durga Prasad Paladugu [Tue, 21 Aug 2018 10:14:50 +0000 (15:44 +0530)] 
fpga: zynqmp: Modify PL bitstream loading sequence

This patch modifies PL bitstream loading sequence as per
latest Xilfpga which supports all variants of bitstream images
generated from vivado and from bootgen. With this new change in
Xilfpga, uboot doesn't need to validate and swap bitstream as it will
be taken care inside Xilfpga. ZynqMP PL driver now checks for supporting
PMUFW version before skipping the validation and swap sequence as there
can be old PMUFW which doesn't supports this feature. In this case, driver
uses old way of PL bitstream loading sequence.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Return pmufw version for zynqmp_pmufw_version()
Siva Durga Prasad Paladugu [Tue, 21 Aug 2018 10:14:49 +0000 (15:44 +0530)] 
arm64: zynqmp: Return pmufw version for zynqmp_pmufw_version()

Modify the zynqmp_pmufw_version() routine to return PMUFW version so
that it can be reused wherever required. Get PMUFW version from PMU
only once at bootup and later just return stored value.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Move PM version related macros to .h
Siva Durga Prasad Paladugu [Tue, 21 Aug 2018 10:14:48 +0000 (15:44 +0530)] 
arm64: zynqmp: Move PM version related macros to .h

This patch moves the PM version related macros to .h file so that
they can be reused in other files.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Enable reset-on-timeout on zcu100
Michal Simek [Wed, 22 Aug 2018 11:01:03 +0000 (13:01 +0200)] 
arm64: zynqmp: Enable reset-on-timeout on zcu100

Reset the system when watchdog expires.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: xilinx: Setup default number of chipselects for zcu100
Michal Simek [Thu, 31 May 2018 07:50:10 +0000 (09:50 +0200)] 
arm64: xilinx: Setup default number of chipselects for zcu100

There is only one chipselect on each connector.
Define it directly in board dts file.
There should be an option to use more chipselects via gpios.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm: zynq: Drop #address-cells and #size-cells from gpio-keys
Michal Simek [Fri, 8 Jun 2018 07:36:12 +0000 (09:36 +0200)] 
arm: zynq: Drop #address-cells and #size-cells from gpio-keys

dtc is showing some warnings and this change was also done in
the Linux kernel as "Input: gpio-keys - clean up device tree binding
example"
with this fragment in commit message
"Drop #address-cells and #size-cells, which are not required by the
gpio-keys binding documentation, as button sub-nodes are not devices."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Wire spi-flash compatible string with flashes
Michal Simek [Thu, 26 Jul 2018 10:43:42 +0000 (12:43 +0200)] 
arm64: zynqmp: Wire spi-flash compatible string with flashes

Enable reading tx and rx buswidth from DT via spi-uclass.
To get these from uclass spi-flash compatible string has to be added
to flash node.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Get 200MHz clock early for MMC
Michal Simek [Wed, 4 Apr 2018 08:41:35 +0000 (10:41 +0200)] 
arm64: zynqmp: Get 200MHz clock early for MMC

SPL MMC boot requires to have clock early.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Enable smmu again
Mubin Sayyed [Wed, 13 Jun 2018 10:45:02 +0000 (16:15 +0530)] 
arm64: zynqmp: Enable smmu again

Now that, PM support has been added to the SMMU
driver, enable it back by default.

Following issues were observed with SMMU earlier,
 - After suspend/resume with FPD off,all peripherals
   registered with SMMU are failed to work.This issue
   has been resoved now.
 - SATA device detection is failed. This issue still
   persist.

This reverts commit 223c3aa24a63bb837169d7253fac666965383934.

Signed-off-by: Mubin Sayyed <mubin.usman.sayyed@xilinx.com
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Disable SMMU for SATA
Mubin Sayyed [Wed, 13 Jun 2018 10:45:01 +0000 (16:15 +0530)] 
arm64: zynqmp: Disable SMMU for SATA

Presently SATA device detection is failing when SMMU is enabled.
Disabling SMMU for SATA, till said issue is fixed from CEVA SATA
driver.

Signed-off-by: Mubin Sayyed <mubin.usman.sayyed@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Setup clock-output-names for si570 chips
Michal Simek [Wed, 18 Jul 2018 10:10:02 +0000 (12:10 +0200)] 
arm64: zynqmp: Setup clock-output-names for si570 chips

If there are more instances of si570 clock-output-names property
should be used for differentiation of clock output.
The patch is adding this optional properties for all zynqmp boards with
si570 chip.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Disable ltc2952 poweroff chip
Michal Simek [Tue, 10 Jul 2018 08:18:29 +0000 (10:18 +0200)] 
arm64: zynqmp: Disable ltc2952 poweroff chip

This chip is on the board but handling should be done via firmware not
via Linux driver. Changing status property to keep it in the tree to
describe it instead of removing this node completely.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Add support for pcap clock
Appana Durga Kedareswara rao [Thu, 9 Aug 2018 09:00:44 +0000 (14:30 +0530)] 
arm64: zynqmp: Add support for pcap clock

Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: List lpd watchdog in dtsi
Michal Simek [Wed, 18 Jul 2018 07:25:43 +0000 (09:25 +0200)] 
arm64: zynqmp: List lpd watchdog in dtsi

There are use cases where lpd watchdog can be configured for APU use. By
design this IP should be listed in zynqmp.dtsi to make sure that node is
properly enabled by DTG.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agozynq: dts: Added alias for usb node
Vipul Kumar [Tue, 7 Aug 2018 11:00:04 +0000 (16:30 +0530)] 
zynq: dts: Added alias for usb node

This patch added alias for usb node in dts file.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agozynqmp: Add avnet_ultra96_rev1_defconfig to the lits of boards
Tom Rini [Tue, 7 Aug 2018 15:36:39 +0000 (11:36 -0400)] 
zynqmp: Add avnet_ultra96_rev1_defconfig to the lits of boards

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoarm64: zynqmp: Add support for Avnet Ultra96
Michal Simek [Tue, 24 Jul 2018 14:27:00 +0000 (16:27 +0200)] 
arm64: zynqmp: Add support for Avnet Ultra96

Avnet Ultra96 is rebranded Xilinx zcu100 revC/D. Add new defconfig files
and point to origin internal board name.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agomtd: spi-nor: Added support for low-density ISSI serial NOR flash
Vipul Kumar [Tue, 24 Jul 2018 09:47:21 +0000 (15:17 +0530)] 
mtd: spi-nor: Added support for low-density ISSI serial NOR flash

This patch added support for the following ISSI flash parts:
-is25lp008d (8M/3.3V), is25wp008d (8M/1.8V)
-is25lp016d (16M/3.3V), is25wp016d (16M/1.8V)
-is25lp032d (32M/3.3V), is25wp032d (32M/1.8V)
-is25wp064d (64M/1.8V)

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agospi: xilinx_spi: Added support to read JEDEC-id twice at the boot time
Vipul Kumar [Sat, 30 Jun 2018 02:45:19 +0000 (08:15 +0530)] 
spi: xilinx_spi: Added support to read JEDEC-id twice at the boot time

This patch is for the startup block issue in the spi controller.
SPI clock is passing through STARTUP block to FLASH. STARTUP block
don't provide clock as soon as QSPI provides command. So, first
command fails.

This patch added support to read JEDEC id in xilinx_spi_xfer ().

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agowatchdog: cadence: Do not stop wdt in probe
Michal Simek [Tue, 17 Jul 2018 11:17:39 +0000 (13:17 +0200)] 
watchdog: cadence: Do not stop wdt in probe

Watchdog can be started before probe and u-boot should just take control
over it. That's why do not stop watchdog in probe to cover cases where
watchdog can expire before probe and start.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agowatchdog: cdns: Add comment for expire_now function
Michal Simek [Mon, 16 Jul 2018 11:34:55 +0000 (13:34 +0200)] 
watchdog: cdns: Add comment for expire_now function

IP itself has no reg/no bit which can be used for this functionality.
Add this note to the driver to make sure that none will be asking for
that. Current method is to setup 1s timeout and hang() which is done via
wdt_expire_now().

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm: zynq: Try to enable the first watchdog via aliases
Michal Simek [Wed, 11 Jul 2018 06:35:22 +0000 (08:35 +0200)] 
arm: zynq: Try to enable the first watchdog via aliases

The same change as was done for zynqmp with this description:

Add support for enabling the first watchdog pointed via aliases.

DT fragment:
aliases {
...
watchdog0= &watchdog0;
watchdog1 = &watchdog_lpd;
...
};

<zynqmp example removed>

Till this patch the first watchdog found in DT was used and started
which is not enabling all possible configuration based on user request.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Try to enable the first watchdog via aliases
Michal Simek [Wed, 11 Jul 2018 06:30:07 +0000 (08:30 +0200)] 
arm64: zynqmp: Try to enable the first watchdog via aliases

Add support for enabling the first watchdog pointed via aliases.

DT fragment:
aliases {
...
watchdog0 = &watchdog0;
watchdog1 = &watchdog_lpd;
...
};

dm tree fragment for above configuration with patch applied:
ZynqMP> dm tree
 Class    index  Probed  Driver      Name
-----------------------------------------
...
 watchdog    0  [   ]   cdns_wdt    |   |-- watchdog@ff150000
 watchdog    1  [ + ]   cdns_wdt    |   `-- watchdog@fd4d0000
...

dm uclass fragment:
ZynqMP> dm uclass
...
uclass 75: watchdog
0   watchdog@ff150000 @ 7df02f40, seq -1, (req 1)
1 * watchdog@fd4d0000 @ 7df02ff0, seq 0, (req 0)
...

It is visible that index 1 is IP with seq 0 which means that FPD
watchdog (@fd4d0000) is in DT below LPD watchdog (@ff150000).

Till this patch the first watchdog found in DT was used and started
which is not enabling all possible configuration based on user request.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agomicroblaze: Do not call timer init that early
Michal Simek [Wed, 11 Jul 2018 12:08:26 +0000 (14:08 +0200)] 
microblaze: Do not call timer init that early

Timer needs to be converted to DM but as of now it can't be called so
early because intc controller is not ready. Call it later in board_r.c.
Before this patch timer_init is called twice which is wrong.
The patch is blocking initialization before relocation.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agogpio: zynq: Fix typo in one error message
Michal Simek [Thu, 12 Jul 2018 10:30:34 +0000 (12:30 +0200)] 
gpio: zynq: Fix typo in one error message

Just fix error message.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agowatchdog: dm: Change uclass name to watchdog and enable DM_UC_FLAG_SEQ_ALIAS
Michal Simek [Wed, 11 Jul 2018 06:24:43 +0000 (08:24 +0200)] 
watchdog: dm: Change uclass name to watchdog and enable DM_UC_FLAG_SEQ_ALIAS

uclass name is used by dev_read_alias_seq which return seq number when
aliases are used.

Code fragment:
168 int dev_read_alias_seq(struct udevice *dev, int *devnump)
169 {
170         ofnode node = dev_ofnode(dev);
171         const char *uc_name = dev->uclass->uc_drv->name;
172         int ret;
173
174         if (ofnode_is_np(node)) {
175                 ret = of_alias_get_id(ofnode_to_np(node), uc_name);

Also this patch enables DM_UC_FLAG_SEQ_ALIAS to be in sync with Linux
which is also using watchdog name for watchdog aliases.

drivers/watchdog/watchdog_core.c:215:
 ret = of_alias_get_id(wdd->parent->of_node, "watchdog");

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarm64: zynqmp: Added support of mmio read and write commands
Vipul Kumar [Mon, 16 Jul 2018 12:34:22 +0000 (18:04 +0530)] 
arm64: zynqmp: Added support of mmio read and write commands

This patch added support of mmio read and write commands. These commands
can be used to read and write registers from the u-boot command line.
It can be useful in debugging.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Changed zynqmp command to handle subcommands with U_BOOT_CMD_MKENT
Vipul Kumar [Wed, 11 Jul 2018 09:48:28 +0000 (15:18 +0530)] 
arm64: zynqmp: Changed zynqmp command to handle subcommands with U_BOOT_CMD_MKENT

This patch changed zynqmp command to handle subcommands with
U_BOOT_CMD_MKENT.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agonet: zynq_gem: Added 64-bit addressing support
Vipul Kumar [Wed, 11 Jul 2018 06:13:19 +0000 (11:43 +0530)] 
net: zynq_gem: Added 64-bit addressing support

This patch added 64-bit addressing support for zynq gem.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agospi: zynqmp_qspi: Added 64-bit addressing support for qspi
Vipul Kumar [Wed, 11 Jul 2018 06:13:18 +0000 (11:43 +0530)] 
spi: zynqmp_qspi: Added 64-bit addressing support for qspi

This patch added 64-bit addressing support for zynqmp qspi.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoclk: zynqmp: Fixed the same if/else part error reported by coverity
Vipul Kumar [Wed, 27 Jun 2018 05:14:45 +0000 (10:44 +0530)] 
clk: zynqmp: Fixed the same if/else part error reported by coverity

This patch fixed the same if/else part error by adding the required
source select on the basis of is_pre_src check.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm/arm64: zynq/zynqmp: pass the PS init file as a kconfig variable
Luca Ceresoli [Fri, 22 Jun 2018 10:40:16 +0000 (12:40 +0200)] 
arm/arm64: zynq/zynqmp: pass the PS init file as a kconfig variable

U-Boot needs to link ps7_init_gpl.c on Zynq or psu_init_gpl.c on
ZynqMP (PS init for short). The current logic to locate this file for
both platforms is:

 1. if a board-specific file exists in
    board/xilinx/zynq[mp]/$(CONFIG_DEFAULT_DEVICE_TREE)/ps?_init_gpl.c
    then use it
 2. otherwise use board/xilinx/zynq/ps?_init_gpl.c

In the latter case the file does not exist in the U-Boot sources and
must be copied in the source tree from the outside before starting the
build. This is typical when it is generated from Xilinx tools while
developing a custom hardware. However making sure that a
board-specific file is _not_ found (and used) requires some trickery
such as removing or overwriting all PS init files (e.g.: the current
meta-xilinx yocto layer).

This generates a few problems:

 * if the source tree is shared among different out-of-tree builds,
   they will pollute (and potentially corrupt) each other
 * the source tree cannot be read-only
 * any buildsystem must add a command to copy the PS init file binary
 * overwriting or deleting files in the source tree is ugly as hell

Simplify usage by allowing to pass the path to the desired PS init
file in kconfig variable XILINX_PS_INIT_FILE. It can be an absolute
path or relative to $(srctree). If the variable is set, the
user-specified file will always be used without being copied
around. If the the variable is left empty, for backward compatibility
fall back to the old behaviour.

Since the issue is the same for Zynq and ZynqMP, add one kconfig
variable in a common place and use it for both.

Also use the new kconfig help text to document all the ways to give
U-Boot the PS init file.

Build-tested with all combinations of:
 - platform: zynq or zynqmp
 - PS init file: from XILINX_PS_INIT_FILE (absolute, relative path,
   non-existing), in-tree board-specific, in board/xilinx/zynq[mp]/
 - building in-tree, in subdir, in other directory

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: accept an absolute path for PMUFW_INIT_FILE
Luca Ceresoli [Mon, 4 Jun 2018 10:21:01 +0000 (12:21 +0200)] 
arm64: zynqmp: accept an absolute path for PMUFW_INIT_FILE

The value of PMUFW_INIT_FILE is prefixed with "$(srctree)/", thus
forcing it to be a relative path inside the U-Boot source tree. Since
the PMUFW is a binary file generated outside of U-Boot, the PMUFW
binary must be copied inside the U-Boot source tree before the
build.

This generates a few problems:

 * if the source tree is shared among different out-of-tree builds,
   they will pollute (and potentially corrupt) each other
 * the source tree cannot be read-only
 * any buildsystem must add a command to copy the PMUFW binary
 * putting an externally-generated binary in the source tree is ugly
   as hell

Avoid these problems by accepting an absolute path for
PMUFW_INIT_FILE. This would be as simple as removing the "$(srctree)/"
prefix, but in order to keep backward compatibility we rather use the
shell and readlink to get the absolute path even when starting from a
relative path.

Since 'readlink -f' produces an empty string if the file does not
exist, we also add a check to ensure the file configured in
PMUFW_INIT_FILE exists. Otherwise the build would exit successfully,
but produce a boot.bin without PMUFW as if PMUFW_INIT_FILE were empty.

Tested in the 12 possible combinations of:
 - PMUFW_INIT_FILE empty, relative, absolute, non-existing
 - building in-tree, in subdir, in other directory

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Emmanuel Vadot <manu@bidouilliste.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: sdhci: Fixed non high-spped mode issue
Vipul Kumar [Thu, 14 Jun 2018 05:15:53 +0000 (10:45 +0530)] 
mmc: sdhci: Fixed non high-spped mode issue

This patch added SDHCI_QUIRK_BROKEN_HISPD_MODE to force the sdhci
host-controller to non high-speed mode when CONFIG_ZYNQ_HISPD_BROKEN
is defined.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agospi: zynq_qspi: Fixed incorrect return value error
Vipul Kumar [Thu, 14 Jun 2018 06:46:13 +0000 (12:16 +0530)] 
spi: zynq_qspi: Fixed incorrect return value error

This patch replaced "return 0" with "return status" to fix the
incorrect return value error reported by the coverity.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agogpio: zynq: Do not check unsigned type that is >= 0
Michal Simek [Wed, 13 Jun 2018 07:05:51 +0000 (09:05 +0200)] 
gpio: zynq: Do not check unsigned type that is >= 0

There is no reason to check that unsigned type that is >= 0.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Wire watchdog internals
Michal Simek [Thu, 19 Apr 2018 13:43:38 +0000 (15:43 +0200)] 
arm64: zynqmp: Wire watchdog internals

Enable watchdog in full U-Boot.

Similar changes were done by:
"arm: zynq: Wire watchdog internals"
(sha1: e6cc3b25d721c3001019f8b44bfaae2a57255162)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agowatchdog: cadence: Use live-tree functions
Michal Simek [Wed, 16 May 2018 08:57:27 +0000 (10:57 +0200)] 
watchdog: cadence: Use live-tree functions

Use live-tree functions.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agowatchdog: cadence: Show used timeout value
Michal Simek [Thu, 19 Apr 2018 13:22:04 +0000 (15:22 +0200)] 
watchdog: cadence: Show used timeout value

Debug message was showing timeout value which was passed to start
function but there is a checking if this value can be setup.
The patch is moving this debug printf function below checking.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agowatchdog: cadence: Remove useless ioremap
Michal Simek [Thu, 19 Apr 2018 11:51:50 +0000 (13:51 +0200)] 
watchdog: cadence: Remove useless ioremap

There is no need to call ioremap. Also reg pointer is completely unused
in the driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm: zynq: Wire watchdog internals
Michal Simek [Wed, 21 Feb 2018 16:04:28 +0000 (17:04 +0100)] 
arm: zynq: Wire watchdog internals

Watchdog is only enabled in full u-boot. Adoption for SPL should be also
done because that's the right place where watchdog should be enabled.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agowatchdog: Add Cadence watchdog driver
Shreenidhi Shedi [Wed, 21 Feb 2018 15:50:20 +0000 (16:50 +0100)] 
watchdog: Add Cadence watchdog driver

This IP can be found on Zynq and ZynqMP devices.
The driver was tested with reset-on-timeout; feature.

Also adding WATCHDOG symbol to Kconfig because it is required.

Signed-off-by: Shreenidhi Shedi <imshedi@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm: zynq: Added defconfig to enable save env in eeprom
Vipul Kumar [Wed, 30 May 2018 05:36:16 +0000 (11:06 +0530)] 
arm: zynq: Added defconfig to enable save env in eeprom

This patch created defconfig to enable save env in eeprom. After this
patch, user can use zynq_zc706_eeprom_defconfig to enable
CONFIG_ENV_IS_IN_EEPROM.
Also, this patch defined CONFIG_ENV_SIZE for eeprom on the basis
of it's size.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Add TTC clocks
Rajan Vaja [Wed, 25 Apr 2018 12:34:04 +0000 (05:34 -0700)] 
arm64: zynqmp: Add TTC clocks

PS clock(LPD_APB_CLK) is default clock for TTC. Add this clock
entry in TTC nodes.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Disable WP on zcu111
Michal Simek [Wed, 4 Apr 2018 12:08:24 +0000 (14:08 +0200)] 
arm64: zynqmp: Disable WP on zcu111

On this board there is SD slot without WP connected.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Remove broken-cd from zcu100-revC
Michal Simek [Mon, 28 May 2018 13:19:02 +0000 (15:19 +0200)] 
arm64: zynqmp: Remove broken-cd from zcu100-revC

Card detect bit was broken on revA and it is working fine with revC
board that's why this property can be removed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Add ina226 to zcu104 revC
Michal Simek [Tue, 29 May 2018 12:45:13 +0000 (14:45 +0200)] 
arm64: zynqmp: Add ina226 to zcu104 revC

Add new ina226 chip present on i2c bus which wasn't on revA.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agopy: tests: Mark scsi reset test as xfail
Michal Simek [Mon, 28 May 2018 10:26:22 +0000 (12:26 +0200)] 
py: tests: Mark scsi reset test as xfail

Sandbox travis targets enable SCSI commands but without any HDD
connected that's why that commands fails. Mark them as xfail to keep
travis happy till there is better/mainline solution.

Also remove i2c dependency which is not there.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agodefconfigs: Disable ISO_PARTITIONS for amXXXX
Michal Simek [Mon, 28 May 2018 07:08:44 +0000 (09:08 +0200)] 
defconfigs: Disable ISO_PARTITIONS for amXXXX

Disable ISO_PARTITIONS for two amXXXX targets to keep travis happy
about SPL size.
These commands are enabled via DISTRO default in mainline that's why
this change is aligned.

Error message:
arm-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 540 bytes

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agopy: tests: Extend timeout for qspi read twice test
Michal Simek [Thu, 24 May 2018 12:19:36 +0000 (14:19 +0200)] 
py: tests: Extend timeout for qspi read twice test

On some systems reading the whole qspi can take longer than default
timeout.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agopy: tests: Mark mii tests as xfail
Michal Simek [Fri, 25 May 2018 12:06:20 +0000 (14:06 +0200)] 
py: tests: Mark mii tests as xfail

On systems which have mii commands enabled but there is no ethernet
controller these commands fails. For example zcu100, sanbox.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agopy: tests: Add missing net dependencies
Michal Simek [Thu, 24 May 2018 08:04:19 +0000 (10:04 +0200)] 
py: tests: Add missing net dependencies

boot_config2 requires net to be enabled.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm: zynq: Remove spl fpga support
Michal Simek [Thu, 24 May 2018 10:29:45 +0000 (12:29 +0200)] 
arm: zynq: Remove spl fpga support

This is not the way how this should be implemented.
Right now there is fit image format which should be extended to cover
this feature.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agousb: dwc3: Fix travis issues caused by DM_USB code
Michal Simek [Fri, 18 May 2018 11:47:29 +0000 (13:47 +0200)] 
usb: dwc3: Fix travis issues caused by DM_USB code

Edison board requires dwc3_uboot to be availabe when DM_USB is enabled.
Also dwc3-omap is missing pointer to devm_kzalloc function.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoFix misaligned buffer in env_fat_save
Alex Kiernan [Wed, 7 Feb 2018 20:01:54 +0000 (20:01 +0000)] 
Fix misaligned buffer in env_fat_save

When saving the environment on a platform which has DMA alignment
larger than the natural alignment, env_fat_save triggers a debug
message in file_fat_write:

  Saving Environment to FAT... writing uboot.env
  FAT: Misaligned buffer address (9df1c8e0)
  OK

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
7 years agocmd: zynqrsa: Added support to load non-encrypted bitstream
Vipul Kumar [Wed, 9 May 2018 13:40:31 +0000 (19:10 +0530)] 
cmd: zynqrsa: Added support to load non-encrypted bitstream

zynqrsa programs the PL when a partition includes an authenticated
and encrypted bitstream. However, if the partition is only
authenticated there is no PL programming operation because
there was no support to load only authenticated bitstream.

This patch added support to load only authenticated bitstream.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agopytest: Add pytest case for zynqrsa command
Siva Durga Prasad Paladugu [Thu, 3 May 2018 11:15:01 +0000 (16:45 +0530)] 
pytest: Add pytest case for zynqrsa command

This patch adds pytest case for zynqrsa command
This test runs only in bootmodes other than jtag
It tests authentication of images with valid keys
and invalid keys as well.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agocmd: zynqrsa: Dont use ppk info from image
Siva Durga Prasad Paladugu [Thu, 3 May 2018 11:15:00 +0000 (16:45 +0530)] 
cmd: zynqrsa: Dont use ppk info from image

This patch removes usage of PPK info from image as it
is supposed to use the verified key residing in OCM for
verificationof SPK. u-boot is already reading PPK data
from OCM, so removing the code of reading from image should
be sufficient. The PPK was actually verified and placed in
OCM by bootrom during boot.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: sdhci: add SDHCI_QUIRK_BROKEN_HISPD_MODE
Hannes Schmelzer [Wed, 7 Mar 2018 07:00:56 +0000 (08:00 +0100)] 
mmc: sdhci: add SDHCI_QUIRK_BROKEN_HISPD_MODE

Some IP-core implementations of the SDHCI have different troubles on the
silicon where they are placed.

On ZYNQ platform for example Xilinx doesn't accept the hold timing of an
eMMC chip which operates in High-Speed mode and must be forced to
operate in non high-speed mode. To get rid of this
"SDHCI_QUIRK_BROKEN_HISPD_MODE" is introduced.

For more details about this refer to the Xilinx answer-recor #59999
https://www.xilinx.com/support/answers/59999.html

This commit:
- doesn't set HISPD bit on the host-conroller
- reflects this fact within the host-controller capabilities

Upon this the layer above (mmc-driver) can setup the card correctly.

Otherwise the MMC card will be switched into high-speed mode and causes
possible timing violation on the host-controller side.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
7 years agommc: Changed the datatype of the variable to handle 64-bit arch
Vipul Kumar [Thu, 3 May 2018 06:50:54 +0000 (12:20 +0530)] 
mmc: Changed the datatype of the variable to handle 64-bit arch

This patch changed the datatype of variable "start" from uint to ulong
to work properly on 64-bit machines as well. Also the return type of
get_timer() function is ulong.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Fix address for tca6416_u97 chip on zcu104
Michal Simek [Tue, 29 May 2018 13:28:43 +0000 (15:28 +0200)] 
arm64: zynqmp: Fix address for tca6416_u97 chip on zcu104

I2c address is not 0x21 but 0x20. This patch is fixing both revA and
revC boards.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agospi: xilinx_spi: Increment tx and rx pointers only if they are valid
Siva Durga Prasad Paladugu [Fri, 4 May 2018 11:53:50 +0000 (17:23 +0530)] 
spi: xilinx_spi: Increment tx and rx pointers only if they are valid

This patch increments tx and rx buf pointers only if they are valid,
otherwise, they dont need to be incremented and its of no use.
Moreover, this patch fixes the issue of inconsistent processor
hang on AC701 while performing operations to spi flash due to these
incorrect operations on rxbuf when it is null.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agocmd: zynqrsa: Added support to load bitstream
Vipul Kumar [Wed, 25 Apr 2018 09:57:53 +0000 (15:27 +0530)] 
cmd: zynqrsa: Added support to load bitstream

This patch added support to check whether the bitstream is full
or none. On the basis of that, it loads the bitstream. Only
full bitstream loading is supported because we don't have a way
to identify it based on data in boot.bin format.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: env: Added support to save env to spi
Vipul Kumar [Wed, 25 Apr 2018 11:08:21 +0000 (16:38 +0530)] 
arm64: zynqmp: env: Added support to save env to spi

This patch added support to save environment to spi. User
need to enable CONFIG_ENV_IS_IN_SPI_FLASH. This patch also
added support to enable CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET
and CONFIG_ENV_SECT_SIZE through Kconfig.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agomini-uboot: cse-nor: Enabled CONFIG_MTD_NOR_FLASH for nor in defconfig
Vipul Kumar [Wed, 25 Apr 2018 09:11:45 +0000 (14:41 +0530)] 
mini-uboot: cse-nor: Enabled CONFIG_MTD_NOR_FLASH for nor in defconfig

In mainline with e856bdcf commit, CONFIG_SYS_NO_FLASH renamed to
CONFIG_MTD_NOR_FLASH. And this config was not enabled for cse-nor
and hence nor programming was getting fail as it was not able to
unprotect sector for programming.

This patch fixed this issue. After enabling CONFIG_MTD_NOR_FLASH,
flash programming is working fine.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agomtd: spi: Set the current bank of flash to zero after doing clear bar
Vipul Kumar [Fri, 20 Apr 2018 05:06:23 +0000 (10:36 +0530)] 
mtd: spi: Set the current bank of flash to zero after doing clear bar

clean_bar() function selecting bank zero but not setting the
flash current bank to zero. After erase operation, bank zero is selected
but the flash current bank is pointing to bank one. So, during
write operation, while trying to write bank one, it actually writes in
bank zero.
This patch fixed this issue by setting the current bank of flash
to zero after doing clear_bar() after erase, write and read operations.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm: zynq: Enable debug_uart_init in spl when enabled
Michal Simek [Thu, 19 Apr 2018 10:36:48 +0000 (12:36 +0200)] 
arm: zynq: Enable debug_uart_init in spl when enabled

In past this code was commented and was used for debug purpose.
But there is no reason not to enabled it based on macros.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Setup MMU map for DDR at run time
Nitin Jain [Fri, 20 Apr 2018 07:00:40 +0000 (12:30 +0530)] 
arm64: zynqmp: Setup MMU map for DDR at run time

This patch used for filling the MMU map for DDR at run time based
information read from Device Tree or automatically detected from static
configuration.

Signed-off-by: Nitin Jain <nitin.jain@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agocmd: zynqaes: check aes engine enabled
Ibai Erkiaga [Thu, 5 Apr 2018 12:19:27 +0000 (05:19 -0700)] 
cmd: zynqaes: check aes engine enabled

AES engine cannot be used if has not been enabled at boot time
with an encrypted boot image.

Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agospi: spi_flash: Don't read bank address register in 4-byte mode
Siva Durga Prasad Paladugu [Fri, 13 Apr 2018 11:13:16 +0000 (16:43 +0530)] 
spi: spi_flash: Don't read bank address register in 4-byte mode

There is no need to read bank address register when working
in 4-byte mode and hence bypass it.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agozynqmp: spi: Added support for IO mode
Moon John C [Fri, 13 Apr 2018 07:40:46 +0000 (13:10 +0530)] 
zynqmp: spi: Added support for IO mode

This patch added support for device tree "has-io-mode" flag.
This forced the driver to use IO mode instead of DMA. This
flag is necessary for UBIFS to operate correctly with SPI-NOR
devices.

Signed-off-by: Moon John C <John.Moon2@ngc.com>
Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agofpga: Fix travis build issues with sys_proto.h inclusion
Siva Durga Prasad Paladugu [Fri, 13 Apr 2018 06:45:50 +0000 (12:15 +0530)] 
fpga: Fix travis build issues with sys_proto.h inclusion

This patch fixes the travis build issue for platforms which dont
have sys_proto.h.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: Resolve the mmc build issues for other platmorms
Siva Durga Prasad Paladugu [Fri, 13 Apr 2018 06:45:49 +0000 (12:15 +0530)] 
mmc: Resolve the mmc build issues for other platmorms

This patch resolve the build issues for mmc while
building for other platforms(eg-s5p_goni).

Signed-off-by: Nitin Jain <nitin.jain@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agospi: spi_flash: Handle dualparallel case for macronix flash
Siva Durga Prasad Paladugu [Fri, 13 Apr 2018 06:38:54 +0000 (12:08 +0530)] 
spi: spi_flash: Handle dualparallel case for macronix flash

This patch handles the dual parallel case while
preserving the QEB bit for macronix flash devices.
This fixes the issue of DMA timeout during probe
of macronix flash devices in dual parallel mode.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoarm64: zynqmp: Remove uneeded empty line from psu_init* files
Michal Simek [Thu, 12 Apr 2018 08:20:05 +0000 (10:20 +0200)] 
arm64: zynqmp: Remove uneeded empty line from psu_init* files

Remove additional and useless newline which was fixed with upstreaming.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoscsi: ceva: Convert driver to use UCLASS_AHCI instead of SCSI
Michal Simek [Fri, 6 Apr 2018 11:32:52 +0000 (13:32 +0200)] 
scsi: ceva: Convert driver to use UCLASS_AHCI instead of SCSI

In v2018 the patch
"dm: ahci: Correct uclass private data"
(sha1: bfc1c6b4838501d10aa48c0e92eaf70976f4b2dd)
was causing an issue for ceva_sata.
But this issue is not in v2018.05-rc1 but still converting to
UCLASS_AHCI would make more sense.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agoRevert "scsi: Add per-device private data for scsi uclass"
Michal Simek [Fri, 6 Apr 2018 11:55:30 +0000 (13:55 +0200)] 
Revert "scsi: Add per-device private data for scsi uclass"

This reverts commit df365a0d76352c4b675444c660cc4eb53b36d51e.

The reason is that next patch is converting ceva driver to UCLASS_AHCI
which is also fixing issue introduced by reported patch.

In mainline there is another fix for that.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
7 years agommc: Added support to switch emmc to correct frequency
Vipul Kumar [Mon, 9 Apr 2018 12:45:16 +0000 (18:15 +0530)] 
mmc: Added support to switch emmc to correct frequency

When no-1-8-v is added in device tree, it slows down emmc to 25MHz.
This patch fixed this issue by setting correct emmc frequency.
Now, after adding no-1-8-v is added in device tree, it slows down emmc
to 52MHz.

Signed-off-by: Vipul Kumar <vipulk@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>