]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
8 years agoarm64: zynqmp: Sync defconfig location
Michal Simek [Tue, 1 Aug 2017 12:18:35 +0000 (14:18 +0200)] 
arm64: zynqmp: Sync defconfig location

xilinx_zynqmp_mini_qspi has incorrect location for one symbol.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: tapdelays: Remove usage of SD0_OTAPDLYENA and SD1_OTAPDLYENA
Siva Durga Prasad Paladugu [Tue, 1 Aug 2017 05:36:15 +0000 (11:06 +0530)] 
zynqmp: tapdelays: Remove usage of SD0_OTAPDLYENA and SD1_OTAPDLYENA

This patch removes usage SD0_OTAPDLYENA and SD1_OTAPDLYENA bits.
This bits have impact on functionality of RTL due to one issue in
RTL where SD0_OTAPDLYENA (Bit 6) has been wrongly connected to both
SD0 and SD1 instances. This makes SD1_OTPDLYENA redundant. Also, these
signals are not used anywhere in silicon and hence there is
really no need to set these bits.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: avoid out of buffer access
Heinrich Schuchardt [Sun, 30 Jul 2017 20:18:18 +0000 (22:18 +0200)] 
arm64: zynqmp: avoid out of buffer access

strncat(a, b, c) appends a maximum of c characters plus the 0 byte
to a.

In board_init we first write 4 characters plus 0 byte to version.
So only ZYNQMP_VERSION_SIZE - 5 additional characters fit into
version.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Add new psu_init* files for zcu104 with proper DP setup
Michal Simek [Wed, 26 Jul 2017 07:18:44 +0000 (09:18 +0200)] 
arm64: zynqmp: Add new psu_init* files for zcu104 with proper DP setup

Changes are related DP clock setup.
psu_init* are generated with Vivado v2017.3 with these paramaters:
-board zcu104 -build hdf -ddr ddr4auto2133_component -clk video

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Setup correct 2GB memory size for zcu104
Michal Simek [Wed, 26 Jul 2017 08:19:42 +0000 (10:19 +0200)] 
arm64: zynqmp: Setup correct 2GB memory size for zcu104

Documentation incorrectly stated that board has 4GB but it was incorrect
and board has only physical 2GB.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Remove additional phy-names for second GT lane
Michal Simek [Tue, 20 Jun 2017 10:43:52 +0000 (12:43 +0200)] 
arm64: zynqmp: Remove additional phy-names for second GT lane

This should be the part of:
"ARM64: zynqmp: zcu102: Use only one lane for DP"
(sha1: 0fef1fb0fd555a3fa2cb056b36b3245b15bf24b3)
where second GT line was removed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Enable watchdog by default
Shubhrajyoti Datta [Thu, 6 Apr 2017 06:58:14 +0000 (12:28 +0530)] 
arm64: zynqmp: Enable watchdog by default

Enable watchdog in dts for zcu102.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Use zcu102 revB dts file instead of revA
Michal Simek [Tue, 25 Jul 2017 10:55:22 +0000 (12:55 +0200)] 
arm64: zynqmp: Use zcu102 revB dts file instead of revA

Remove already fixed nodes from revB and also add compatible property
with rev1.0 string.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Add nvmem i2c decoding to zcu102 rev1.0
Michal Simek [Mon, 19 Jun 2017 12:29:35 +0000 (14:29 +0200)] 
arm64: zynqmp: Add nvmem i2c decoding to zcu102 rev1.0

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Move dts zcu102 to zcu102-revA
Michal Simek [Thu, 20 Jul 2017 08:58:50 +0000 (10:58 +0200)] 
arm64: zynqmp: Move dts zcu102 to zcu102-revA

Not using board revision is causing confusion about which board is
supported and tested. Mark dts files exactly with board revision which
was tested. When new board revision arives it can be symlink if SW view is
the same. Also add -revX suffix to compatible string because user space
tools are parsing this string and can change behavior depends of board
revision.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Label zcu106 with board revision
Michal Simek [Thu, 20 Jul 2017 08:53:15 +0000 (10:53 +0200)] 
arm64: zynqmp: Label zcu106 with board revision

Not using board revision is causing confusion about which board is
supported and tested. Mark dts files exactly with board revision which was
tested. When new board revision arives it can be symlink if SW view is
the same. Also add -revX suffix to compatible string because user space
tools are parsing this string and can change behavior depends of board
revision.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: usb: Correct IOMMU node for making SMMU work with USB
Anurag Kumar Vulisha [Tue, 20 Jun 2017 10:55:16 +0000 (16:25 +0530)] 
arm64: zynqmp: usb: Correct IOMMU node for making SMMU work with USB

This patch makes SMMU work by moving the iommus node under the dwc3 child
entry from parent node.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Add quirk for enabling workaround for BULK IN streams
Anurag Kumar Vulisha [Fri, 30 Jun 2017 10:28:09 +0000 (15:58 +0530)] 
arm64: zynqmp: Add quirk for enabling workaround for BULK IN streams

This patch adds support for enabling workaround for BULK IN stream
rings by adding "xhci-stream-quirk" flag to dts node. Enabling this
flag activates the timer for every BULK IN stream ring at the time
of queuing TRB's into BULK IN stream ring.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Add GUCTL1 flags for USB dwc3 controller
Anurag Kumar Vulisha [Wed, 10 May 2017 14:12:02 +0000 (19:42 +0530)] 
arm64: zynqmp: Add GUCTL1 flags for USB dwc3 controller

This patch updates the device tree binding properties for programming
GUCTL1 register bit 9 & 10 for adding HW workarounds in dwc3 controller.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Enabled CCI support for USB
Manish Narani [Mon, 27 Mar 2017 12:17:00 +0000 (17:47 +0530)] 
arm64: zynqmp: Enabled CCI support for USB

This patch adds CCI support for USB when CCI is enabled in design.
This patch also adds 'reg' property for Xilinx USB 3.0 IP. The 'reg'
property is added in order to modify a register in that to enable
coherency in Hardware.

Also add address to unit name to avoid dtc warning

Signed-off-by: Manish Narani <mnarani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: sdhci: set host quirk2 for no 1.8V support for 1.0 silicon
Manish Narani [Wed, 19 Jul 2017 15:46:33 +0000 (21:16 +0530)] 
arm64: zynqmp: sdhci: set host quirk2 for no 1.8V support for 1.0 silicon

This patch sets host quirk2 bit field for No 1.8V supported in case of
1.0 silicon. The 1.0 silicon doesn't have support for UHS-I modes. This
property will ensure the SD runs on High Speed mode.

Signed-off-by: Manish Narani <mnarani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Add SMMU support for SATA IP
Anurag Kumar Vulisha [Tue, 4 Jul 2017 14:33:42 +0000 (20:03 +0530)] 
arm64: zynqmp: Add SMMU support for SATA IP

AXI master interface in CEVA AHCI controller requires two unique
Write/Read ID tags per port. This is because, ahci controller uses
different AXI ID[3:0] bits for identifying non-data transfers(like
reading descriptors, updating PRD tables, etc) and data transfers
(like sending/receiving FIS).To make SMMU work with SATA we need to
add correct SMMU stream id for SATA. SMMU stream id for SATA is
determined based on the AXI ID[1:0] as shown below

SATA SMMU ID =  <TBU number>, 0011, 00, 00, AXI ID[1:0]
Note: SATA in  ZynqMp uses TBU1 so TBU number = 0x1, so
      SMMU ID = 001, 0011, 00, 00, AXI ID[1:0]

Since we have four different AXI ID[3:0] (2 for port0 & 2 for port1
as said above) we get four different SMMU stream id's combinations
for SATA. These AXI ID can be configured using PAXIC register.
In this patch we assumed the below AXI ID values

 Read ID/ Write ID for Non-Data Port0 transfers = 0
 Read ID/ Write ID for Data Port0 transfers = 1
 Read ID/ Write ID for Non-Data Port1 transfers = 2
 Read ID/ Write ID for Data Port1 transfers = 3

Based on the above values,SMMU stream ID's for SATA will be 0x4c0 &
0x4c1 for PORT0, 0x4c2 & 0x4c3 for PORT1. These values needed to be
added to iommus dts property. This patch does the same.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: dts: xilinx: fix PCI bus dtc warnings
Rob Herring [Wed, 22 Mar 2017 02:03:13 +0000 (21:03 -0500)] 
arm64: dts: xilinx: fix PCI bus dtc warnings

dtc recently added PCI bus checks. Fix these warnings.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Fpga region should have different cells sizes
Michal Simek [Wed, 5 Jul 2017 13:50:42 +0000 (15:50 +0200)] 
arm64: zynqmp: Fpga region should have different cells sizes

Address and size cells should be 2/2 instead of 1/1.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Label whole PL part as fpga_full region
Nava kishore Manne [Mon, 22 May 2017 06:35:17 +0000 (12:05 +0530)] 
arm64: zynqmp: Label whole PL part as fpga_full region

This will simplify dt overlay structure for the whole PL.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Reduced min-residency time for idle state node
Jolly Shah [Wed, 14 Jun 2017 22:03:52 +0000 (15:03 -0700)] 
arm64: zynqmp: Reduced min-residency time for idle state node

Changed min-residence to 10ms(was 100 ms) for cpu-sleep-0.
Tried lower values 5ms and 8ms and it worked fine with Debug Off.
But to accommodate PM Debug On case, 10 ms is required. With this
change, low power idle state is into effect more frequently.
Measured boot time with PM debugs On and Off. No change observed
compared to 100ms value.

Signed-off-by: Jolly Shah <jollys@xilinx.com>
Acked-by: Will Wong <willw@xilinx.com>
Tested-by: Koteswararao Nayudu <kotin@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Remove leading 0s from mtd table for spi flashes
Michal Simek [Wed, 5 Jul 2017 12:50:44 +0000 (14:50 +0200)] 
arm64: zynqmp: Remove leading 0s from mtd table for spi flashes

dtc reports issues with it.
arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dtb: Warning
(unit_address_format): Node
/amba/spi@ff040000/spi0_flash0@0/spi0_flash0@00000000 unit name should
not have leading 0s
arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dtb: Warning
(unit_address_format): Node
/amba/spi@ff050000/spi1_flash0@0/spi1_flash0@00000000 unit name should
not have leading 0s
arch/arm64/boot/dts/xilinx/zynqmp-ep108.dtb: Warning
(unit_address_format): Node
/amba/spi@ff040000/spi0_flash0@0/spi0_flash0@00000000 unit name should
not have leading 0s
arch/arm64/boot/dts/xilinx/zynqmp-ep108.dtb: Warning
(unit_address_format): Node
/amba/spi@ff050000/spi1_flash0@0/spi1_flash0@00000000 unit name should
not have leading 0s

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Move nodes which have no reg property out of bus
Michal Simek [Wed, 5 Jul 2017 12:51:42 +0000 (14:51 +0200)] 
arm64: zynqmp: Move nodes which have no reg property out of bus

Nodes without reg properties shouldn't be placed in amba node.
Move them out.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Change clock name for dp_aclk
Michal Simek [Fri, 7 Jul 2017 09:15:49 +0000 (11:15 +0200)] 
arm64: zynqmp: Change clock name for dp_aclk

dp_aclk is using clock0 as node name and dp_aclk as reference
which is really bad thing to do. This patch is changing node name to
dp_aclk.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Add gpio line names to zcu100 revB and revC
Michal Simek [Wed, 19 Jul 2017 08:09:01 +0000 (10:09 +0200)] 
arm64: zynqmp: Add gpio line names to zcu100 revB and revC

Add gpio line names for fixed PS part. This can be reused by new
libgpiod library (https://github.com/brgl/libgpiod).
Examples are also available at tools/gpio.

EMIO gpio PL part needs to be generated to cover current HW design.
By purpose there is MIO/EMIO separation for easier EMIO description.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Remove no-1-8-v property to add UHS-I support for SD
Siva Durga Prasad Paladugu [Tue, 25 Jul 2017 06:21:40 +0000 (11:51 +0530)] 
arm64: zynqmp: Remove no-1-8-v property to add UHS-I support for SD

This patch removes the property 'no-1-8-v' to add support
for Running SD in UHS-I mode. This will enable SD to operate
at 1.8V and maximum of 200MHz frequency if the SD card supports
the same

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agommc: zynq_sdhci: Add quirk no 1.8v for silicon version 1.0
Siva Durga Prasad Paladugu [Tue, 25 Jul 2017 06:21:39 +0000 (11:51 +0530)] 
mmc: zynq_sdhci: Add quirk no 1.8v for silicon version 1.0

This patch adds quirk no 1.8v for silicon version 1.0 as 1.0
silicon doesnt support UHS.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Make chip_id routine to handle based on el.
Siva Durga Prasad Paladugu [Tue, 25 Jul 2017 06:21:37 +0000 (11:51 +0530)] 
arm64: zynqmp: Make chip_id routine to handle based on el.

Modify chip_id() routine such that to handle based on
the current el. Also make it available even if FPGA is
not enabled in system such it can be used always.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Make chip_id a global routine()
Siva Durga Prasad Paladugu [Tue, 25 Jul 2017 06:21:38 +0000 (11:51 +0530)] 
arm64: zynqmp: Make chip_id a global routine()

This patch makes chip_id() as a global routine so that
it can be used in other places as required.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Modify chip_id routine to get either idcode or version
Siva Durga Prasad Paladugu [Tue, 25 Jul 2017 06:21:36 +0000 (11:51 +0530)] 
arm64: zynqmp: Modify chip_id routine to get either idcode or version

This patch modifies the chip_id routine to get either idcode or
silicon version based on the argument received.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agommc: Work in UHS modes even if card already switched to UHS
Siva Durga Prasad Paladugu [Tue, 25 Jul 2017 06:21:35 +0000 (11:51 +0530)] 
mmc: Work in UHS modes even if card already switched to UHS

This patch adds support for swicthing to UHS mode even if
the card already switched to UHS modes.
This patch fixes an issue where it is not able to power
cycle the SD card. Due to this once the card is initialized
in UHS-I mode it cannot be reinitialized in UHS-I mode again.
So to solve this issue there are some checks that are made in
place to ensure that the card operates in UHS-I mode even on
reinitialization. This will enable the SD host controller to
run SD at 200MHz in uboot even if the bootloader was running
at 200MHz.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm: zynq: Increase init ram size by 4K
Siva Durga Prasad Paladugu [Mon, 24 Jul 2017 11:23:15 +0000 (16:53 +0530)] 
arm: zynq: Increase init ram size by 4K

Increase init ram size by 4K such that more
stack space will be available during intialization
as the present stackspace is not sufficient if DEBUG
option is enabled and causes system hang.
Increasing init ram size provides sufficient stack space
during init even if DEBUG enabled and solves the hange
issue.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agonet: zynq_gem: Do not return -ENOSYS on success
Olliver Schinagl [Mon, 3 Apr 2017 14:18:53 +0000 (16:18 +0200)] 
net: zynq_gem: Do not return -ENOSYS on success

The .read_rom_hwaddr net_ops hook does not check the return value, which
is why it was never caught that we are currently returning 0 if the
read_rom_hwaddr function return -ENOSYS and -ENOSYS otherwise.

In this case we can simplify this by just returning the result of the
function.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm: zynq: Remove SPL ethernet options
Michal Simek [Tue, 18 Jul 2017 11:30:50 +0000 (13:30 +0200)] 
arm: zynq: Remove SPL ethernet options

These options were there for testing and it never worked.
This patch is just remove untested options.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agotest: py: Add mtest command
Michal Simek [Tue, 18 Jul 2017 09:33:16 +0000 (11:33 +0200)] 
test: py: Add mtest command

Simply command for running mtest.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agotest: py: Fix nand command dependencies
Michal Simek [Tue, 18 Jul 2017 09:32:12 +0000 (11:32 +0200)] 
test: py: Fix nand command dependencies

It should be a list of dependencies not all of them below each other
where only last one is taken.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agotest: py: Fix global variable usage in nand test
Michal Simek [Tue, 18 Jul 2017 07:32:24 +0000 (09:32 +0200)] 
test: py: Fix global variable usage in nand test

This patch fixes these warnings:
items/home/monstr/data/disk/u-boot/test/py/tests/test_nand.py:81:
SyntaxWarning: name 'total_size' is assigned to before global
declaration
  global total_size
/home/monstr/data/disk/u-boot/test/py/tests/test_nand.py:90:
SyntaxWarning: name 'nand_detected' is used prior to global declaration
  global nand_detected
items/home/monstr/data/disk/u-boot/test/py/tests/test_qspi.py:58:
SyntaxWarning: name 'qspi_detected' is used prior to global declaration
  global qspi_detected

Global declaration should be prior usage.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynq: cse_nor: Add support for zynq cse nor
Siva Durga Prasad Paladugu [Tue, 18 Jul 2017 07:21:32 +0000 (12:51 +0530)] 
zynq: cse_nor: Add support for zynq cse nor

This patch adds support for cse nor target which is
used mini u-boot with NOR which can run from OCM.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynq: cfi: Fix nor issue for Zynq
Siva Durga Prasad Paladugu [Tue, 18 Jul 2017 07:21:31 +0000 (12:51 +0530)] 
zynq: cfi: Fix nor issue for Zynq

There is a hack needed in cfi_flash.c for zynq
This patch adds back the same through defconfig
to get NOR working on zynq.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Add psu_init for zcu100-revC
Michal Simek [Fri, 30 Jun 2017 06:56:20 +0000 (08:56 +0200)] 
arm64: zynqmp: Add psu_init for zcu100-revC

RevC has 2GB memory and this is needed for configuration.

There were two warnings which were fixed as the part of this patch.
board/xilinx/zynqmp/zynqmp-zcu100-revC/psu_init_gpl.c: In function
‘psu_ddr_phybringup_data’:
board/xilinx/zynqmp/zynqmp-zcu100-revC/psu_init_gpl.c:20205:15: warning:
unused variable ‘tmp_regval’ [-Wunused-variable]
  unsigned int tmp_regval = 0;
               ^~~~~~~~~~
At top level:
board/xilinx/zynqmp/zynqmp-zcu100-revC/psu_init_gpl.c:20514:13: warning:
‘dpll_prog’ defined but not used [-Wunused-function]
 static void dpll_prog(int ddr_pll_fbdiv, int d_lock_dly, int
d_lock_cnt,

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Enable DT overlay command for zcu100-revB
Michal Simek [Wed, 28 Jun 2017 09:07:08 +0000 (11:07 +0200)] 
arm64: zynqmp: Enable DT overlay command for zcu100-revB

Enable DT overlay to do experiments.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agocmd: fdt: Print error message when fdt application fails
Stefan Agner [Tue, 20 Dec 2016 14:58:45 +0000 (15:58 +0100)] 
cmd: fdt: Print error message when fdt application fails

There are lots of reason why a FDT application might fail, the
error code might give an indication. Let the error code translate
in a error string so users can try to understand what went wrong.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agofdt: Bring in changes from v1.4.4
Simon Glass [Tue, 28 Mar 2017 16:23:31 +0000 (10:23 -0600)] 
fdt: Bring in changes from v1.4.4

This a few minor changes down from upstream since the last sync.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agolibfdt: Correct fdt handling of overlays without fixups and base trees without symbols
David Gibson [Tue, 20 Dec 2016 14:58:44 +0000 (15:58 +0100)] 
libfdt: Correct fdt handling of overlays without fixups and base trees without symbols

The fdt_overlay_apply() function purports to support the edge cases where
an overlay has no fixups to be applied, or a base tree which has no
symbols (the latter can only work if the former is also true).  However it
gets it wrong in a couple of small ways:

  * In the no fixups case, it doesn't fail immediately, but will attempt
    fdt_for_each_property_offset() giving -FDT_ERR_NOTFOUND as the node
    offset, which will fail.  Instead it should succeed immediately, since
    there's nothing to do.
  * In the case of no symbols, it again doesn't fail immediately.  However
    if there is an actual fixup it will fail with an unexpected error,
    because -FDT_ERR_NOTFOUND is passed to fdt_getprop() when attempting to
    look up the symbols.  We should instead return -FDT_ERR_NOTFOUND
    directly.

Both of these errors lead to the code returning misleading error codes in
failing cases.

[ DTC commit: 7d8ef6e1db9794f72805a0855f4f7f12fadd03d3 ]

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoarm64: zynqmp: Add mini u-boot configuration with mtest
Michal Simek [Wed, 12 Jul 2017 09:25:49 +0000 (11:25 +0200)] 
arm64: zynqmp: Add mini u-boot configuration with mtest

The purpose of this configuration is to run u-boot out of OCM which
memory test enabled. This is used for platform bringup for running DDR
memory test.
This configuration is reusing setting for MINI QSPI.

Also prepare zynqmp-mini folder where psu_init_gpl* should be added if
mini u-boot configuration should configure the whole SoC.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Add Kconfig option for adding psu_init to binary
Michal Simek [Wed, 12 Jul 2017 11:21:27 +0000 (13:21 +0200)] 
arm64: zynqmp: Add Kconfig option for adding psu_init to binary

There is a need to include psu_init also in mini u-boot configuration
that's why handle psu_init via Kconfig property.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Call psu_init from board_early_init_f
Michal Simek [Wed, 12 Jul 2017 11:08:41 +0000 (13:08 +0200)] 
arm64: zynqmp: Call psu_init from board_early_init_f

For some mini platforms there could be a need to include psu_init.
That's why move it to board file instead of spl only file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Do not unset options which are not used
Michal Simek [Wed, 12 Jul 2017 09:20:58 +0000 (11:20 +0200)] 
arm64: zynqmp: Do not unset options which are not used

There is no need to remove memtest start/end. It is used only when mtest
command is enabled which is not the case for existing mini zynqmp
configurations.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: zcu104: Add revA to board compatible string
Michal Simek [Fri, 14 Jul 2017 07:03:50 +0000 (09:03 +0200)] 
zynqmp: zcu104: Add revA to board compatible string

Having also revision in compatible string is needed for user space SW.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: mini_emmc: Update mini emmc configuration
Siva Durga Prasad Paladugu [Thu, 13 Jul 2017 13:31:14 +0000 (19:01 +0530)] 
zynqmp: mini_emmc: Update mini emmc configuration

Dont define env in fat and related configs for mini
configuration of eMMC.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agodefconfig: zynqmp_mini: qspi: Use TCM memory for MMU table
Siva Durga Prasad Paladugu [Thu, 13 Jul 2017 13:31:13 +0000 (19:01 +0530)] 
defconfig: zynqmp_mini: qspi: Use TCM memory for MMU table

Allocating MMU in OCM takes up more space and u-boot
cant fit in it with MMU. So, use TCM for MMU table
by pointing tlb address to TCM while booting.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: Remove ifdef around zynqmp mmio read and write rotuines
Siva Durga Prasad Paladugu [Thu, 13 Jul 2017 13:31:12 +0000 (19:01 +0530)] 
zynqmp: Remove ifdef around zynqmp mmio read and write rotuines

This patch removes ifdef around mmio read and write rotuines
and make them a single routine by checking the current el.
This patch helps to remove ifdef around invoke_smc as well.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: Provide a Kconfig option to use specified memory for MMU table
Siva Durga Prasad Paladugu [Thu, 13 Jul 2017 13:31:11 +0000 (19:01 +0530)] 
zynqmp: Provide a Kconfig option to use specified memory for MMU table

This patch provides a Kconfig option to use specified
memory for MMU table using reserve_mmu platform specific
routine. Here we used TCM space for MMU table.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: Provide a Kconfig option to define OCM and TCM in MMU
Siva Durga Prasad Paladugu [Thu, 13 Jul 2017 13:31:10 +0000 (19:01 +0530)] 
zynqmp: Provide a Kconfig option to define OCM and TCM in MMU

This patch provides an option to include OCM and TCM memory
into MMU table with corresponding memory attributes.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm: zynqmp: Define a way to intialize TCM
Siva Durga Prasad Paladugu [Thu, 13 Jul 2017 13:31:09 +0000 (19:01 +0530)] 
arm: zynqmp: Define a way to intialize TCM

TCM on ZynqMP needs to be intialized in a sequence
and this patch provides a global routine to perform
this as per requirement.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agocommon: board_f: Make reserve_mmu a weak function
Siva Durga Prasad Paladugu [Thu, 13 Jul 2017 13:31:08 +0000 (19:01 +0530)] 
common: board_f: Make reserve_mmu a weak function

Make reserve_mmu a weak so that it provides an option
to customize this routine as per platform need

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agospi: zynqmp_qspi: Remove unnecessary freq variable
Siva Durga Prasad Paladugu [Fri, 7 Jul 2017 08:46:57 +0000 (14:16 +0530)] 
spi: zynqmp_qspi: Remove unnecessary freq variable

This patch removes unused variable freq from priv structure
and corrects the speed_hz calculation. Also corrects debug
message.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agospi: zynqmp_qspi: Send dummy cycles separately as per dummy bytes
Siva Durga Prasad Paladugu [Fri, 7 Jul 2017 08:46:56 +0000 (14:16 +0530)] 
spi: zynqmp_qspi: Send dummy cycles separately as per dummy bytes

Add dummy cycles as separte entry in generic fifo by breaking
the cmd+address+dummy into cmd+address as one entry and dummy
as another entry.
As per controller spec, immediate data filled as dummy entry
in generic fifo represent dummy cycles.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agospi: spi_flash: Add dummy bytes info to spi slave structure
Siva Durga Prasad Paladugu [Fri, 7 Jul 2017 08:46:55 +0000 (14:16 +0530)] 
spi: spi_flash: Add dummy bytes info to spi slave structure

This patch adds and fills dummy bytes in spi_slave structure
to inform driver as driver needs to be aware of number of
dummy cycles that need to be sent.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agospi: zynqmp_qspi: Program tapdelays based on required frequency
Siva Durga Prasad Paladugu [Fri, 7 Jul 2017 08:46:54 +0000 (14:16 +0530)] 
spi: zynqmp_qspi: Program tapdelays based on required frequency

This patch adds support of prgramming tap delays required
as per input frequencies.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agospi: zynqmp_qspi: Use clock framework for calculating qspi clock
Siva Durga Prasad Paladugu [Fri, 7 Jul 2017 08:46:53 +0000 (14:16 +0530)] 
spi: zynqmp_qspi: Use clock framework for calculating qspi clock

This patchh uses clock framework and calculates qspi input
clock frequency instead of harcoded value.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Do not setup time if already setup
Michal Simek [Wed, 12 Jul 2017 08:32:18 +0000 (10:32 +0200)] 
arm64: zynqmp: Do not setup time if already setup

Newer psu_init_gpl.c/h contain clock setup. Detect if
reference clock is active. If yes, skip timer setup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: zcu104: Update dts based on u-boot detection
Michal Simek [Wed, 12 Jul 2017 07:23:21 +0000 (09:23 +0200)] 
zynqmp: zcu104: Update dts based on u-boot detection

- update i2c addresses
- irps5401 address assignment can wrong in connection to part assigning
- tca6416 not detected
- update qspi part information
- use qspi as single device

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: zcu104: Clear information about eth mac in eeprom
Michal Simek [Wed, 12 Jul 2017 07:08:22 +0000 (09:08 +0200)] 
zynqmp: zcu104: Clear information about eth mac in eeprom

On revA there is nothing in eeprom that's why clear this part
of setting.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: zcu104: Use i2c pca9548 instead of pca9544
Michal Simek [Wed, 12 Jul 2017 07:05:47 +0000 (09:05 +0200)] 
zynqmp: zcu104: Use i2c pca9548 instead of pca9544

Board has pca9548 instead of pca9544. It was typo in this setting.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: zcu104: Fix ethernet phy address
Michal Simek [Wed, 12 Jul 2017 06:51:01 +0000 (08:51 +0200)] 
zynqmp: zcu104: Fix ethernet phy address

Ethernet phy is at address 0xc instead of 21.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: zcu104: Update psu_init_gpl
Michal Simek [Wed, 12 Jul 2017 06:12:06 +0000 (08:12 +0200)] 
zynqmp: zcu104: Update psu_init_gpl

Origin psu_init_gpl had incorrect ddr setting. Use updated one.
Also use __maybe_unused for dpll_prog.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agodts: zynqmp_mini: Add dts files for all mini u-boot qspi configurations
Siva Durga Prasad Paladugu [Tue, 11 Jul 2017 13:11:29 +0000 (18:41 +0530)] 
dts: zynqmp_mini: Add dts files for all mini u-boot qspi configurations

This patch adds dts files for all qspi configurations of ZynqMP mini
u-boot. This lets user to compile the required qspi configuration
image by specifying the DEVICE_TREE=<dts filename> along with make.

This patch renames zynqmp-mini-qspi dts to dtsi so that
it will be used in respective dts files. This also
needs to update defconfig and make files respectively

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agodts: zynq_cse: Add dts files for all mini u-boot qspi configurations
Siva Durga Prasad Paladugu [Tue, 11 Jul 2017 13:11:27 +0000 (18:41 +0530)] 
dts: zynq_cse: Add dts files for all mini u-boot qspi configurations

This patch adds dts files for all qspi configurations of mini
u-boot. This lets user to compile the required qspi configuration
image by specifying the DEVICE_TREE=<dts filename> along with make.

This patch also renames zynq-cse-qspi dts to dtsi so that
it will be used in respective dts files. This also
needs to update defconfig and make files respectively.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agodts: zynq_cse: qspi: Make QSPI single by default
Siva Durga Prasad Paladugu [Tue, 11 Jul 2017 13:11:26 +0000 (18:41 +0530)] 
dts: zynq_cse: qspi: Make QSPI single by default

Remove is-dual property to make this dts as single
by default.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Add separate boot command for EMMC boot
Tomasz Gorochowik [Wed, 5 Jul 2017 12:35:41 +0000 (14:35 +0200)] 
arm64: zynqmp: Add separate boot command for EMMC boot

Set modeboot to 'emmcboot' when booting from EMMC. For now, this command
still runs sdboot underneath so effectively nothing changes for the
default environment, however having a separate modeboot makes it much
easier to use custom boot commands in real life scenarios where actual
differentiation between SD boot and EMMC boot is required.

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Add no-1-8-v property to sdhci node (zcu106)
Siva Durga Prasad Paladugu [Fri, 30 Jun 2017 12:44:56 +0000 (18:14 +0530)] 
arm64: zynqmp: Add no-1-8-v property to sdhci node (zcu106)

This patch add no-1-8-v property to sdhci node and this
property helps to avoid going to SD3.0. This is needed
for zcu106 as it seems to be causing an issue on some
boards and hence added this as workaround until it
is rootcaused and fixed.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agospi: spi_flash: Fix the incorrect check for going to 3-byte mode
Siva Durga Prasad Paladugu [Fri, 30 Jun 2017 11:16:00 +0000 (16:46 +0530)] 
spi: spi_flash: Fix the incorrect check for going to 3-byte mode

It should go to 3-byte mode if flash size is less than or
equal to 16MiB. This patch corrects the if condition for
going to 3-byte mode.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Add support Xilinx zcu100 revC
Michal Simek [Mon, 26 Jun 2017 08:44:17 +0000 (10:44 +0200)] 
arm64: zynqmp: Add support Xilinx zcu100 revC

Add support for new board revision
- Increase amount of memory to 2G
- Removed shared IRQs to push button and PMIC.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Fix SVD mask for getting chip ID
Michal Simek [Wed, 28 Jun 2017 13:40:32 +0000 (15:40 +0200)] 
arm64: zynqmp: Fix SVD mask for getting chip ID

Mask should start from the first bit - using 0xe is just wrong.
3bits are used that's why 0x7 mask is correct.
This patch is fixing silicon ID code detection. Previous behavior was
that bit0 was completely ignored.
Issue was found on 2eg chip detection.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agodefconfig: zynqmp: mini_nand: Enable Nand command support
Siva Durga Prasad Paladugu [Wed, 21 Jun 2017 12:19:03 +0000 (17:49 +0530)] 
defconfig: zynqmp: mini_nand: Enable Nand command support

This patch enables nand command support for
ZynqMP mini nand.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: mini: Disable unnecessary configs
Siva Durga Prasad Paladugu [Wed, 21 Jun 2017 12:19:02 +0000 (17:49 +0530)] 
zynqmp: mini: Disable unnecessary configs

This patch disables  the unnecessary configs as this
would save memory for mini configurations.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynqmp: mini: Update Zynqmp mini qspi defconfig
Siva Durga Prasad Paladugu [Wed, 21 Jun 2017 12:19:01 +0000 (17:49 +0530)] 
zynqmp: mini: Update Zynqmp mini qspi defconfig

This patch updates zynqmp mini configuration for qspi
as required with latest u-boot.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Enable IIO hwmon sensors
Michal Simek [Thu, 25 May 2017 13:08:36 +0000 (15:08 +0200)] 
arm64: zynqmp: Enable IIO hwmon sensors

Wire PS ams sensors with hwmon sensors to have quick way how to read
information about chip from sensors tools and others(gkrellm).
Using iio-hwmon is deprecated but still valid option how to do it.
When iio framework is better integrated in standard tools this should be
changed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Add bluetooth-power led trigger to ds5 led
Michal Simek [Thu, 1 Jun 2017 06:17:25 +0000 (08:17 +0200)] 
arm64: zynqmp: Add bluetooth-power led trigger to ds5 led

This patch assign ds5 led to show software status of BT interface.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Remove kim and btwilink from zcu100 revB
Michal Simek [Thu, 1 Jun 2017 06:11:42 +0000 (08:11 +0200)] 
arm64: zynqmp: Remove kim and btwilink from zcu100 revB

kim and btwilink are obsolete drivers and they shouldn't be used.
Record bt_power led via gpio-leds driver to simplify bt
enabling/disabling handling via sysfs which exactly points to certain
gpio which is also allocated for this purpose.
By default enable BT at startup time.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agonet: xilinx_axi: Add axi ethernet support on Zynq and ZynqMP
Siva Durga Prasad Paladugu [Thu, 22 Jun 2017 05:44:56 +0000 (11:14 +0530)] 
net: xilinx_axi: Add axi ethernet support on Zynq and ZynqMP

This patch adds support of axi ethernet for Zynq and ZynqMP
platforms. The endianess conversion is not needed here and
hence io operations are performed using writel and readl
directly for Zynq and ZynqMP.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agonet: xilinx_axi: Read dma address using fdtdec_get_addr
Siva Durga Prasad Paladugu [Thu, 22 Jun 2017 05:44:55 +0000 (11:14 +0530)] 
net: xilinx_axi: Read dma address using fdtdec_get_addr

Read dma address using fdtdec_get_addr as it checks for
address cells and size cells and reads the adddress
properly. fdtdec_get_int always assume address is of int
size which goes wrong if using it on 64-bit architecture.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Add support for Xilinx zcu104 board
Michal Simek [Tue, 20 Jun 2017 12:26:01 +0000 (14:26 +0200)] 
arm64: zynqmp: Add support for Xilinx zcu104 board

Add also psu_init files build with v2017.3 daily latest tools
for da6-c1156.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Add support for Xilinx zc1232 board
Michal Simek [Tue, 20 Jun 2017 14:21:14 +0000 (16:21 +0200)] 
arm64: zynqmp: Add support for Xilinx zc1232 board

This patch adds support for Xilinx zc1232 board.
The defconfig for compilation is xilinx_zynqmp_zc1232_revA_defconfig

Only QSPI(single) and uarts are wired on this board.
Sata is enabled based on request because it is connected to
Bullseye headers (4-lane GT cable header to SMA cables) where
a SMA-to-SATA adapter can be connected to get sata to work.

Add __maybe_unused attribute to dpll_prog and psu_init_xppu_aper_ram
to avoid compilation warnings.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agommc: Set buswidth before switching the timing mode
Siva Durga Prasad Paladugu [Fri, 16 Jun 2017 10:56:18 +0000 (16:26 +0530)] 
mmc: Set buswidth before switching the timing mode

Buswidth should be set before performing timing mode switch
incase of HS200 and hence not required to set buswdith again
after switch to HS200. This patch solves the issue timing
mode switch failure in some scenarios.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynq: cse_nand: Add support for cse nand target
Siva Durga Prasad Paladugu [Thu, 8 Jun 2017 06:03:38 +0000 (11:33 +0530)] 
zynq: cse_nand: Add support for cse nand target

This patch adds support for cse nand which is used as
mini u-boot for nand flash programming purpose.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynq: cse_qspi: Move config SYS_NO_FLASH to defconfig
Siva Durga Prasad Paladugu [Thu, 8 Jun 2017 06:03:37 +0000 (11:33 +0530)] 
zynq: cse_qspi: Move config SYS_NO_FLASH to defconfig

Define CONFIG_SYS_NO_FLASH through defconfig as it was
done same for all other zynq targets.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynq: zynq_cse: Dont define SDRAM base and size in .h
Siva Durga Prasad Paladugu [Thu, 8 Jun 2017 06:03:36 +0000 (11:33 +0530)] 
zynq: zynq_cse: Dont define SDRAM base and size in .h

Dont define SDRAM base address and size in .h file as it
can get same from dts

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agolib: fdtdec: Fill initial ram top with DDR start value from dt
Siva Durga Prasad Paladugu [Thu, 8 Jun 2017 06:03:35 +0000 (11:33 +0530)] 
lib: fdtdec: Fill initial ram top with DDR start value from dt

Fill initial ram top with DDR base addr value from DT as not filling
it here always assumes it as zero while calculating relocation
offset and hence lead to failures in somecases. This will assumed
as zero if CONFIG_SYS_SDRAM_BASE is not defined.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agofpga: zynqmp: Add support to use devicekey for encrypted bitstreams
Siva Durga Prasad Paladugu [Sat, 17 Jun 2017 06:32:48 +0000 (12:02 +0530)] 
fpga: zynqmp: Add support to use devicekey for encrypted bitstreams

Add support to use devicekey for loading encrypted bitstreams.
Getting keyaddr and size values of 0xFFFFFFFF determines it to
use devicekey(like efuse) and there by update appropriate flag
before invoking smc.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agocmd: fpga: Update loads command help to handle devicekey support
Siva Durga Prasad Paladugu [Sat, 17 Jun 2017 06:32:47 +0000 (12:02 +0530)] 
cmd: fpga: Update loads command help to handle devicekey support

This patch updates the fpga loads command help to handle a case
where user wants to use devicekey for loading encrypted bitstreams
instead of userkey. The key address and size should be sent as
0xFFFFFFFF to let fpga driver to use devicekey.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agonet: zynq_gem: Fix misleading indentation warning
Siva Durga Prasad Paladugu [Sat, 17 Jun 2017 06:50:23 +0000 (12:20 +0530)] 
net: zynq_gem: Fix misleading indentation warning

Fixes the below warning
drivers/net/zynq_gem.c: In function ‘zynq_gem_init’:
drivers/net/zynq_gem.c:463:2: warning: this ‘if’ clause
does not guard... [-Wmisleading-indentation]
  if (!priv->emio)
  ^~
drivers/net/zynq_gem.c:469:3: note: ...this statement,
but the latter is misleadingly indented as if it
is guarded by the ‘if’
   if (IS_ERR_VALUE(ret))

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agotest: pytest: Add pytest support for Nand
Siva Durga Prasad Paladugu [Tue, 30 May 2017 14:49:53 +0000 (20:19 +0530)] 
test: pytest: Add pytest support for Nand

This adds support for nand test cases,ss of now
it adds support for some commands such as info,
bad, erase, read and write.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: zynqmp: Enable poweroff command for zcu100_revB
Michal Simek [Fri, 2 Jun 2017 06:29:35 +0000 (08:29 +0200)] 
arm64: zynqmp: Enable poweroff command for zcu100_revB

zcu100 can be powered off that's why enabling this command in u-boot to
have this functionality in place.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARMv8: Add support for poweroff via PSCI
Michal Simek [Mon, 29 May 2017 07:11:32 +0000 (09:11 +0200)] 
ARMv8: Add support for poweroff via PSCI

Add support for calling poweroff in case of psci is wired.
Based on the same solution as is used for reset.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Move all logic in to fwcall.c as other ARMs implement poweroff
via PMIC]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoKconfig: Add description for CMD_POWEROFF
Michal Simek [Mon, 5 Jun 2017 06:28:17 +0000 (08:28 +0200)] 
Kconfig: Add description for CMD_POWEROFF

Add poweroff description to Kconfig to make it selectable
via menuconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoarm64: zynqmp: Add comment about level shifter mode v1
Michal Simek [Thu, 2 Mar 2017 10:02:55 +0000 (11:02 +0100)] 
arm64: zynqmp: Add comment about level shifter mode v1

Silicon v1 didn't support SD boot mode with level shifter.
Because system can't boot any error message is not shown
that's why comment is just a record if someone tries to debug it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agodts: zynqmp: Add maximum-speed property to dwc3 node
Siva Durga Prasad Paladugu [Mon, 15 May 2017 11:52:40 +0000 (17:22 +0530)] 
dts: zynqmp: Add maximum-speed property to dwc3 node

Add maximum-speed property to dwc3 node of zcu102 dts
This property needs to defined as per latest USB DM
patches. This fixes the issue of usb on zcu102
board.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoarm64: Add NOLOAD attribute NOLOAD to .bss sections
Michal Simek [Mon, 22 May 2017 07:15:33 +0000 (09:15 +0200)] 
arm64: Add NOLOAD attribute NOLOAD to .bss sections

Mark explicitly bss sections to not be loaded at
run time.
The similar patch was done in past by:
"Fix linker scripts: add NOLOAD atribute to .bss/.sbss sections"
(sha1: 64134f011254123618798ff77c42ba196b2ec485)

The problem is related to latest toolchain added to Xilinx
v2017.1 design tools where jtag loader is trying to access
ununitialized memory.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>