This patch increases SYS_MALLOC_F_LEN as the versal clock
driver needs to be probed before relocation itself inorder
to get required clocks before relocation.
This patch updates the following properties in ospi node
-> reg - Linux driver expects AHB base addr in reg property.
- Fixed length of controller register set.
-> interrupt - Corrected the interrupt number for ospi.
-> cdns,fifo-depth - Corrected ospi fifo-depth property.
Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
This patch adds new jtag distro boot command to look for bootscript file
in DDR and execute it first incase of jtag bootmode.
This patch also updates scriptaddr to 512MB as there is high of script
corruption incase of bigger kernel image.
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This patch adds clock driver support for Versal
platform. The clock driver queries and performs
clock operations using PLM firmware by communicating
with it using SMC calls.
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
T Karthik Reddy [Wed, 19 Jun 2019 09:36:45 +0000 (15:06 +0530)]
zynqmp: Set sd boot device number to sdbootdev
In case of multiple sd devices to identify proper sd boot device
assign "sdbootdev" variable with device sequence number. While
auto-booting "sdboot" picks appropriate sd device from "sdbootdev".
This fix is for old way auto-boot process, it will be
deprecated in 2020.1 & all the functionality will be removed.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
T Karthik Reddy [Mon, 10 Jun 2019 04:04:04 +0000 (09:34 +0530)]
mmc: zynq_sdhci: Move UHS mode macros
This patch moves UHS mode macros from mmc.h to zynq_sdhci.c.
Moving UHS mode macros in mmc.h avoids redefinition of macros when
xenon_sdhci.c is compiled.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 27 Mar 2019 19:14:19 +0000 (20:14 +0100)]
arm64: zynqmp: Add System Controller for a2197-g/p
Similar SCs but different wiring.
- dc_i2c is connected to X-PRC cards that's why label is required to have
an option to hook up some devices.
- Exactly identify i2c devices on x-prc boards.
In case of missing i2c connection devices won't be accessible.
- USB 0 should be device mode with super speed.
- USB 1 should be host mode.
- Fix i2c mux reset pin entry - commented, not verified.
- Fix i2c1 eeprom compatible string - it is an ST 128Kbit device.
Need to use atmel fallback.
- Fix si570 I2C slave address and add corresponding part numbers.
- Enable AMS for system monitoring.
- phy reset property should be commented because it will throw a
warning dump when called from context that can sleep.
No support for phys property (zynqmp phy driver) with SGMII.
Add is-internal-pcspma property required by uboot.
Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Michal Simek [Mon, 15 Apr 2019 11:54:09 +0000 (13:54 +0200)]
cmd: fru: Add basic fru format generator
Idea is to have something what can be used for board bringup from
generic board perspective.
There is a violation compare to spec that FRU ID is ASCII8 instead of
binary format but this is really for having something to pass boot and
boot to OS which has better generating options.
Also time should be filled properly.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Fri, 12 Apr 2019 09:37:02 +0000 (11:37 +0200)]
cmd: fru: Move fru_data to data section instead of bss section
I didn't fully check it but I think that there is an issue to use FIT
images with dtb again when bss section is cleared. U-Boot copy just
origin DTB and if embedded_dtb_select() doesn't find new DTB then can't
go back to origin DTB file.
Move this structure to data section for now.
It should be allocated by malloc anyway.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This patch adds support for fru commands "fru capture"
and "fru display". The fru capture parses the FRU table
present at an address and stores in a structure for later
use. The fru display prints the content of captured structured
in a readable format.
As of now, it supports only common header and board area of FRU.
Also, its supports only English language code and ASCII8 format.
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Luca Ceresoli [Fri, 24 May 2019 13:40:02 +0000 (15:40 +0200)]
arm64: zynqmp: add tool to minimize psu_init_gpl.c files
This script transforms a pair of psu_init_gpl.c and .h files produced by
the Xilinx Vivado tool for ZynqMP into a smaller psu_init_gpl.c file that
is almost checkpatch compliant.
Based on a script by Michal Simek.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This patch adds usb host and device mode support for Xilinx
Versal virtual platform. By default USB host functionality
is enabled. To use in usb device mode, set dr_mode property
in DT to peripheral.
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Luca Ceresoli [Tue, 21 May 2019 16:06:44 +0000 (18:06 +0200)]
arm64: zynqmp: add tool to convert PMU config object .c to binary
The recently-added ZYNQMP_SPL_PM_CFG_OBJ_FILE option allows SPL to load a
PMUFW configuration object from a binary blob. However the configuration
object is produced by Xilinx proprietary tools as a C source file and no
tool exists to easily convert it to a binary blob in an embedded Linux
build system for U-Boot to use.
Add a simple Python script to do the conversion.
It is definitely not a complete C language parser, but it is enough to
parse the known patterns generated by Xilinx tools, including:
- defines
- literal integers, optionally with a 'U' suffix
- bitwise OR between them
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Luca Ceresoli [Tue, 21 May 2019 16:06:43 +0000 (18:06 +0200)]
arm64: zynqmp: spl: install a PMU firmware config object at runtime
Optionally allow U-Boot to load a configuration object into the Power
Management Unit (PMU) firmware on Xilinx ZynqMP.
The configuration object is required by the PMU FW to enable most SoC
peripherals. So far the only way to boot using U-Boot SPL was to hard-code
the configuration object in the PMU firmware. Allow a different boot
process, where the PMU FW is equal for any ZynqMP chip and its
configuration is passed at runtime by U-Boot SPL.
All the code for Inter-processor communication with the PMU is isolated in
a new file (pmu_ipc.c). The code is inspired by the same feature as
implemented in the Xilinx First Stage Bootloader (FSBL) and Arm Trusted
Firmware:
Ibai Erkiaga [Wed, 15 May 2019 21:10:04 +0000 (22:10 +0100)]
Kconfig: fix FIT offset prompt text
The current prompt text for FIT external offset is identical to
SYS_TEXT_BASE which might confuse the users. Provided more accurate
description for the prompt text.
Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com> Reviewed-by: Marek Vasut <marex@denx.de>
arm64: zynqmp: fix preprocessor check for SPL_ZYNQMP_TWO_SDHCI
A missing CONFIG_ prefix while checking for this Kconfig variable makes the
check always fail. Fix it. While there also switch from the '#if defined'
form to the '#ifdef' form as the other checks in this function.
Fixes: 35e2b92344b1 ("arm64: zynqmp: Fix logic around CONFIG_ZYNQ_SDHCI") Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
The patch splits the read transaction into multiple
read transactions which means incase of read requested
across multiple banks, it splits and sends one read per
bank. This can be enabled using new config option
CONFIG_SPI_FLASH_SPLIT_READ.
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
spi: zynqmp_gqspi: do not round immediate_data field
Immediate_data is 8 bit value in generic FIFO command. When fields
data_xfer=1 and exponent=0 this field specifies the absolute number of data
bytes to read into the RXFIFO. Values from range 0xfd to 0xff are rounded
up to 0x100. It causes overwriting the next bit field which is data_xfer.
According to Zynq US+ TRM only DMA transfers should be word aligned. So
there is no reason to round up the immediate_data field.
Signed-off-by: Wojciech Tatarski <wtatarski@antmicro.com> Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com> Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This patch reads the suspend phy quirk from DT property
"snps,dis_u2_susphy_quirk" and update in dwc3 structure.
This suspend phy quirk will disable suspend functionality
of phy.
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Hannes Schmelzer [Fri, 29 Mar 2019 08:54:05 +0000 (09:54 +0100)]
net: phy: implement fallback mechanism for negative phy adresses
Negative phy-addresses can occour if the caller function was not able to
determine a valid phy address (from device-tree for example). In this
case we catch this here and search for ANY phy device on the given mdio-
bus.
Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
usb: dwc3: Handle case where setup_phy is not needed
If CONFIG_PHY is not enabled then the dwc3_setup_phy()
returns ENOTSUPP which can be still valid and intentional
so modify error check to handle this -ENOTSUPP.
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
usb: udc-uclass: Fixed problem when no alias is defined in DT
commit 801f1fa442 "dm: usb: udc: Use SEQ_ALIAS to index the USB gadget
ports" changed the way the udevice if found. It uses the alias to find
a udevice for a given USB port number. In the commit log it was stated
that if no alias is provided, the bind order will be used instead. However
it doesn't work. Fixing this by adding a call to uclass_get_device() if
uclass_get_device_by_seq() fails.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Tested-by: Vignesh R <vigneshr@ti.com>
net: zynq_gem: Modify phy supported features after max-speed was set
The phydev supported features were reset in phy_set_supported() so,
move the setting of driver supported features after this so that it
wont lost in phy_set_supported().
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
T Karthik Reddy [Wed, 27 Mar 2019 06:15:45 +0000 (11:45 +0530)]
drivers: mtd: spi: Check SPI_TX_QUAD mode if RD_QUADIO flag is set
This patch checks for SPI_TX_QUAD mode if RD_QUADIO flag is set, as
RD_QUADIO uses 4 lines for TX. If SPI_TX_QUAD mode is not set then
CMD_READ_QUAD_IO_FAST should not be used.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>