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>
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>
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>
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>
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
...
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
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>
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>
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>
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.
arm64: zynqmp: dwc3: add flag for supporting hibernation
This patch documents the snps,enable-hibernation devicetree
property , which enables the hibernation support for dwc3
driveer when operating in peripheral mode
Hyun Kwon [Fri, 9 Mar 2018 18:50:11 +0000 (10:50 -0800)]
arm64: zynqmp: dt: Add new ZynqMP DP changes
This removes old dt contents from all dts files for ZynqMP DisplayPort
and updates all with new bindings. Please note, some of these changes
are only build-tested.
Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Rajan Vaja [Fri, 23 Feb 2018 13:31:13 +0000 (05:31 -0800)]
drivers: pinctrl: Update ZynqMP pin control driver
Replace existng pin control driver with a new version
of ZyqnMP pin control driver. This driver queries pin
information from firmware and registers pin control
accordingly instead of using hard coded pin info.
New pin control driver creates group name from function name
by adding postfix so some group names are different than existing
group names. Deprecate old pin control driver and its DT bindings
and use new pin control DT binding in device tree.
Signed-off-by: Rajan Vaja <rajanv@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Rajan Vaja [Tue, 20 Feb 2018 12:28:37 +0000 (04:28 -0800)]
clk: zynqmp: Use firmware APIs in clock driver
In existing driver, clocks are registered statically.
Instead of using static clocks, get clock information
from firmware and register clocks accordinglly.
Firmware maintains database of all clocks avaiable for the
variant. So if there is any new clocks are avaiable for
specific variant or some clocks are not present in
variant, Linux driver would not need any change.
To contorl the clocks, use firmware APIs instead of
register read/write. This prevents direct clock control
from any single master(processor) shared between multiple
masters. Firmware can implement this APIs to manage
shared clocks.
Change clock IDs in dts based on new firmware IDs.
Signed-off-by: Tejas Patel <tejasp@xilinx.com> Signed-off-by: Rajan Vaja <rajanv@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>