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>
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>
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>
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>
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>
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>
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>
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>
This needs to be reverted as we still have to support these
targets for supporting zynq mini u-boot which will be used
for vivado programming.
Removed untested targets cse nand and cse nor.
Along with this below changes are required for cse qspi to
work properly.
1. Use DCC for zynq cse qspi target as this will
be used for programming purpose which may not
have serial hence DCC by default.
2. Remove unnecessary configs for QSPI as defining them
increases size for u-boot to run from OCM.
3. Define init stack pointer for cse qspi to avoid memory
corruption while relocating in OCM.
4. Add missing chosen node for cse qspi.
5. Enable SPL for cse_qspi target
Changes to get SPL working for cse_qspi target
a. BSS needs to be moved to OCM as DDR may not be
present for cse_qspi targets.
b. Provide sym link to ps7_init of zc706.
6. Disable bootdelay via Kconfig
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 23 May 2017 06:17:38 +0000 (08:17 +0200)]
arm64: zynqmp: Setup MIO34 to be routed to PMUFW
MIO34 is connected to kill signal which shutdown the board.
This change enables calling poweroff from u-boot.
poweroff worked from Linux because pinmuxing driver was changing it
but this change is necessary to be done in psu_init phase too.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 25 May 2017 14:08:43 +0000 (16:08 +0200)]
arm64: zynqmp: Add empty sleep.h file for psu_init* compilation
psu_init* contain sleep.h header which is not present in u-boot.
Instead of keep comment sleep.h in psu_init* it is easier to add empty
file which is included.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
zynq: Kconfig: Add Kconfig option for any DDR specific initialization
Add Kconfig option for ddr init as this might be required
in cases like ddr less systems where we want to skip ddrc
init and this option is useful for it.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 11 May 2017 12:52:57 +0000 (14:52 +0200)]
arm64: zynqmp: Do not use dot in platform defconfig
Python testing framework is not able to handle dot in name.
Different modules needs to be used.
That's why better change name to be aligned without dot in name.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 11 May 2017 11:53:45 +0000 (13:53 +0200)]
test: py: Disable sleep test for qemu targets
Qemu for arm32/arm64 has a problem with time setup.
That's why sleep test is failing. Add boardidentity marker to remove
specific boards from running that test.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 11 May 2017 11:40:28 +0000 (13:40 +0200)]
test: py: Also support detect capacity which is only one digit
If capacity is without dot "Capacity: 4 GiB" then current algorithm
was not able to detect it. Add or to regular expression to detect
capacity without dot.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 3 May 2017 14:22:30 +0000 (16:22 +0200)]
arm64: zynqmp: Remove CPU_RELEASE_ADDR macro
CPU_RELEASE_ADDR is used only when CONFIG_ARMV8_MULTIENTRY
is enabled. ZynqMP is running ATF which takes care about this
that's why no need to have this macro.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
nand: zynq: Send address cycles as per onfi parameter page
Send address cycles as per value read from onfi parameter
page for Read and write commands instead of using a
hard coded value. This may vary for different parts and
hence use it from onfi parameter page value.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This patch corrects the mtd initialization. With out this, it
results in wrong zynq_nand_info and nand_chip extraction and
hence failed nand operations. This patch fixes the issue of
nand on zynq boards.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Fix for : Seeing multiple 'INIT: Id "X0" respawning too fast: disabled for 5 minutes' messages and changing dom0_mem.
Some consoles mentioned in inittab are not present on the device. We get
the above message when inittab keeps respawning such a console.
Added SERIAL_CONSOLES_CHECK to meta-xilinx layer, which will check
for available consoles by reading /proc/consoles and remove non
existent consoles. This check removes hvc0 when booted via tftp
since /proc/consoles has xen0 and not hvc0. This patch fixes this
issue by renaming xen0 to hvc0 in /proc/consoles.
Renaming dom0-bootargs console to hvc0 and changing dom0_mem to be
consistant with petalinux configuration for tftp boot.
Signed-off-by: Bhargava Sreekantappa Gayathri <bhargava.sreekantappa-gayathri@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This patch adds support for ondie ecc. As of now
this adds support for micron parts which supports
ondie ecc.
Didnt found any better way to detect ondie ecc
support by a device except sorting out with
manufacture and device id's.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
zynq: Kconfig: Dont enable unnecessary configs by default
Dont enable unnecessary configs by default, instead enable
the required ones through defconfig. This patch moves configs
DM_ETH, DM_MMC, DM_MMC_OPS, BLK, GPIO to defconfigs. This saves
memory for memory constrained boards.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arm64: zynqmp: spl: fix dual SD controller support
When enabling both SDHCI controllers, spl_mmc.c would actually choose
device sdhci0 even if booted from sdhci1 (boot_device). This is because
spl_mmc_get_device_index(boot_device) expects BOOT_DEVICE_MMC2[_2] in
order to return index 1 instead of 0.
The #if defined(...) statement is copied from board/xilinx/zynqmp/zynqmp.c
So the key to properly enabling both controllers as boot sources is
defining both CONFIG_ZYNQ_SDHCI0 and CONFIG_ZYNQ_SDHCI1 in your board's
include/configs/*.h.
Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
tools: zynqmpimage: adjust ug1085 reference to v1.4 of the document
The chapter in which the table explaining the image format changed
chapter as the document evolved. This should help people track the
info down faster.
Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 23 Mar 2017 13:55:04 +0000 (14:55 +0100)]
test: py: Generate value in 02x format for i2c cases
If single digit random value was generated then it didn't match with
reading value because of fixed two digit format returning back from i2c md
command. Generate value in two digit format to fix this issue.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: spi_flash: Set 4byte mode in upper flash device
Set 4-byte mode in upper flash device as well incase of
dual stacked mode. This fixes the issue of read/write
failure to upper flash memory incase of dual stacked.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: spi_flash: Update spi flags incase of dual stacked mode
Update spi flags in case of dual stacked mode. Set upper page
access bit if accessing upper flash otherwise just clear it.
This will be used by driver to access upper flash.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
mmc: sdhci: Add support for sending ACMD12 if host supports it
Use auto transmission of stop command feature(ACMD12) if host
can support it by getting this info in the form of quirk from host
controller driver. This patch fixes the issue with specific
card(Sony SDHC class4 4GB) but however this can be applicable
to all if host controller has feature to support ACMD12.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 9 Mar 2017 13:59:49 +0000 (19:29 +0530)]
mmc: zynq: Do not probe driver if pwrseq is present
mmc-pwrseq property describes that device requires to run specific power
sequence to get device to work.
Detect this property and don't let driver to probe.
mmc-pwrseq require specific driver to be present.
This is the case on zcu100 which has sdio wifi chip which requires power
sequence.
Error log before:
MMC: Card did not respond to voltage select!
Card did not respond to voltage select!
sdhci@ff170000 - probe failed: -95
sdhci@ff160000: 0 (SD)Card did not respond to voltage select!
Fix SD xin_clk to be 200 MHz instead of 199Mhz.
Earlier, it was 199MHz as u-boot/Linux is not programming
tap delays, now it needs to be changed both u-boot and Linux
are programming tap delays.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 7 Mar 2017 09:46:09 +0000 (10:46 +0100)]
arm64: zynqmp: Fixing calling zynqmp_mmio_write in SPL
The bug was introduced by:
"mmc: sdhci: Invoke set_delay() in more generic way"
(sha1: 43f5b9729b7bc2ffdd3bcaf886324435538580e0)
which is calling tap delay programming which contains zynqmp_mmio_write.
By implementing zynqmp_mmio_write for SPL this problem is fixed.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Printing the first entry reset separately is no longer
needed as it now prints the entries with valid name and
timestamp zero. This removes duplicate printing of the reset
record.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
bootstage: print all entries even if recorded time is zero
Print all entries in boot stage report even if the recorded
time stamp is zero. This lets the user to know all the recorded
entries that are made into. This helps user to know if something
went wrong with timestamp for that entry.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board_f: Move mark_bootstage() to after timer_init()
Move mark_bootstage to after timer_init as timer will not be
intialized in case if CONFIG_TIMER is not defined and hence
invoke it in present place if CONFIG_TIMER is defined else
invoke it after timer_init.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Modify routine timer_get_boot_us(), as the base_time
will be stored in bss if initialized to zero(observed for
arm compilers, arm and arm64) and for most of the boards
bss was not initialized to zero before relocation and hence
causing a junk timestamp value in boot record if there is an
entry record before relocation(example would be board_init_f
entry). Also, as it is in bss which will be intialized to zero
after relocation, it causes the first entry after relocation
to be missed while printing bootstage report as the
timer_get_boot_us() returns zero if bss_time is zero.
This patch fixes the same by initialzing bss_time to 1 and also
returning current timestamp if bss_time is 1. Intializing it to
1 causes it to be placed in data section and hence no issues.
Before this patch:
ZynqMP> bootstage report
Timer summary in microseconds:
Mark Elapsed Stage
0 0 reset
491,000 491,000 id=64
516,000 25,000 id=65
522,000 6,000 main_loop
112,092,989,575,347,436,48112,092,989,575,342,216,48 board_init_f
After this patch:
ZynqMP> bootstage report
Timer summary in microseconds:
Mark Elapsed Stage
0 0 reset
9,969 9,969 board_init_f
1,227,000 1,217,031 board_init_r
1,713,000 486,000 id=64
1,733,000 20,000 id=65
1,735,000 2,000 main_loop
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
net: zynq_gem: Use wait_for_bit with non breakable
Use wait_for_bit to be non breakable as using it with
breakable causes issue of un interruptible auto negotiation.
This is due to the ctrlc pressed will taken for wait_for_bit()
abort during phy_read() and hence not coming out of
auto negotiation.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
mmc: zynq_sdhci: Initialize mmc immediately after probe
Initialize mmc immediately after probe as everything
required for mmc initialization was already setup and
intializing here shouldnt be a problem. In some cases
it is really required that mmc need to be intialized during
probe itself as boot process may access mmc/SD for reading
environment while booting.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arm64: zynqmp: Add support for verifying authenticated images
This patch adds supports for verifying authenticated images
using rsa hw engine.
The example sequence for verifying authenticated images is
as follows.
cmd: rsa: Add support for authenticationg images using rsa
This patch adds support to authenticate images using its
signature and public key. The signature will be generated
at host for the images using private key. u-boot uses this
signature and public key to authenticate the given image.
As of now, this patch supports only platform specific
verification using hw option.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
fpga: xilinx: Avoid using local intermediate buffer
Dont use local temporary buffer for printing out the
info instead use directly from memroy. This fixes the
issue of stack corruprion due to local buffer overflow.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 27 Feb 2017 07:11:38 +0000 (08:11 +0100)]
arm64: zynqmp: Use only earlycon bootargs instead of full one
This is the same patch as was done earlier.
Please look at Linux patch:
"arm64: zynqmp: Use only earlycon bootargs instead of full one"
(sha1: f3609c8d4af28b9cc22ca49bf8e529b582ec188c)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>