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>
Michal Simek [Mon, 13 Feb 2017 12:24:27 +0000 (13:24 +0100)]
arm64: zynqmp: Fix tps65086 pmic i2c entry
Enable pmic i2c and gpio controller.
There is also regulator part which can be enabled
and it is question what that brings up.
This is done for firmware version detection.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
devicetree: ccf: Correct USB bus and ref clock nodes
Usb "bus_clk" & "ref_clk" nodes are wrongly mapped.
This patch fixes the USB0/1 bus and ref clock nodes and fixes
the error shown below
[ 39.216536] xhci-hcd xhci-hcd.0.auto: Stopped the command ring failed, maybe the host is dead
[ 39.241437] xhci-hcd xhci-hcd.0.auto: Abort command ring failed
[ 39.247391] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
Michal Simek [Fri, 24 Feb 2017 08:35:42 +0000 (09:35 +0100)]
arm64: zynqmp: Setup default bootargs with clk_ignore_unused
Add default bootargs to u-boot not change all DTS files.
The important part is clk_ignore_unused which caused that clocks which
are unused won't be asked for disabling.
The problem lies in CCF design which is accessing clock tree directly.
It means when there is another master in the system Linux can disable
clock for IPs which this master uses because there is no
synchronization.
That's why solution for now is do not disable any unused clock because it
can be used by someone else.
earlycon is enabled by default for all dtses in the Linux kernel that's
why it is added here too.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Alistair Francis [Fri, 17 Feb 2017 18:49:58 +0000 (10:49 -0800)]
arm64: zynqmp: Update dom0 bootargs to allow device passthrough
Dom0 has access to all of the clocks and turns off clocks that it isn't
using. This breaks device passthrough for other guests. This patch tells
Dom0 to not disable the clocks allowing device passthrough.
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
fpga: Extend loads command to load all secure images
Extend loads command to loads to load all secure images
by providing an option to specify the secure image type
whose valueof 0 corresponds to authenticated image type
and 1 to encrypted image stype.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Alistair Francis [Tue, 14 Feb 2017 23:06:56 +0000 (15:06 -0800)]
arm64: zynqmp: Increase fdt size during Xen boot
If we are modifying the device tree to perform a Xen boot we need a
larger device tree then the default fdt resize command gives us.
To avoid having to resize it multiple times increase the fdt resize
size.
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 15 Feb 2017 07:22:04 +0000 (08:22 +0100)]
microblaze: Build only DTBs for selected target
Adding more targets to repository requires some additional
changes not simply just adding config file, defconfig and dts.
This patch makes this process easier by building only
particular DTB which is selected via defconfig
that Makefile doesn't need to contain all dts files in the repository.
Reported-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>