Commit Graph

57161 Commits

Author SHA1 Message Date
Luca Ceresoli
6b6f167a3d 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: 35e2b92344 ("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>
2019-06-04 13:38:45 +02:00
Siva Durga Prasad Paladugu
117aa8e082 arm64: zynqmp: Enable spi flash split read
This patch enables spi flash spilt read for ZynqMP
platform.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-06-04 13:12:07 +02:00
Siva Durga Prasad Paladugu
c744e9e6f6 mtd: spi: Split read transactions per bank
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>
2019-06-04 12:48:10 +02:00
Siva Durga Prasad Paladugu
b3e44ab427 mmc: sdhci: Move ZYNQ_HISPD_BROKEN to Kconfig
This patch moves CONFIG_ZYNQ_HISPD_BROKEN to Kconfig

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-06-04 12:47:15 +02:00
Wojciech Tatarski
c379a08eb5 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>
2019-06-04 12:47:15 +02:00
Wojciech Tatarski
d7432d93b4 spi: zynqmp_gqspi: DMA transfers should be world aligned
According to Zynq US+ TRM all the data transfers are word aligned. So
there is no reason to round up size of DMA transfer to ARCH_DMA_MINALIGN
(0x40)

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>
2019-06-04 12:47:15 +02:00
T Karthik Reddy
08d9db9b5c drivers: usb: dwc3: setup phy before dwc3 core soft reset
Phy setup should be done before dwc3 soft core reset as it is done
in linux & this fixes unreliable detection of usb cable on host side.

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>
2019-06-04 12:47:15 +02:00
T Karthik Reddy
67f7f4461a usb: composite: add BOS descriptor support to composite framework
To add usb-3.0 support to peripheral device add BOS & SS capability
descriptors to gadget composite framework.

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>
2019-06-04 12:47:15 +02:00
Siva Durga Prasad Paladugu
9bafead6b7 mtd: spi_flash: Add device mt35ux02g to spi flash ids list
This patch adds new spi flash device mt35ux02g to spi
flash ids table.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-06-04 12:47:15 +02:00
Siva Durga Prasad Paladugu
9ba61fc244 spi: Add support for 4Byte addressing commands
Thsi patch adds support for 4-byte addressing Read, write
and erase commands.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
2019-06-04 12:47:15 +02:00
Siva Durga Prasad Paladugu
c879ab6c71 spi: cadence_qspi: Fix stig write issue
This patch fixes the stig programming issue by checking
the status and flag status register register for every
write.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
2019-06-04 12:47:15 +02:00
Jean-Jacques Hiblot
04447beb4b Makefile.lib: include /__symbols__ in dtb if OF_LIBFDT_OVERLAY is enabled
In order to apply an overlay to a DTB. The DTB must have been generated
with the option '-@'.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-06-04 12:47:15 +02:00
Siva Durga Prasad Paladugu
2eed60a06a usb: dwc3: Add versal compatibility string to dwc3 glue ids
Xilinx Versal platform uses dwc3 and hence its compatible string
needs to be added to dwc3 glue ids.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-06-04 12:44:49 +02:00
Siva Durga Prasad Paladugu
0b5d399336 usb: dwc3: Read phy suspend quirk from DT
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>
2019-06-04 12:44:49 +02:00
Robert P. J. Day
adf40b1dde ARM: zynq: delete long-dead CONFIG_USB_CABLE_CHECK
This Kbuild option disappeared way back in 2014:

 commit 75504e9592
 Author: Mateusz Zalega <m.zalega@samsung.com>
 Date:   Wed Apr 30 13:07:48 2014 +0200

    ... snip ...

    CONFIG_USB_CABLE_CHECK was removed.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-06-04 12:44:49 +02:00
Michal Simek
b187660f2e net: gem: Remove DECLARE_GLOBAL_DATA_PTR from gem driver
GD is not used anywhere that's why there is no reason to have this macro
in the driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-06-04 12:44:49 +02:00
Siva Durga Prasad Paladugu
ae80b8ce89 mtd: spi: Add octal read flag for part mt35xu512g
This patch adds octal read support for flash
mt35xu512g.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-06-04 12:44:49 +02:00
Michal Simek
1e436da456 net: gem: Remove phy autodetection code
There is no reason to detect phy when core is doing it for us.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Series-to: uboot
---
Based on https://lists.denx.de/pipermail/u-boot/2019-March/363225.html
2019-06-04 12:44:49 +02:00
Hannes Schmelzer
f89b5cc3ef 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>
2019-06-04 12:44:49 +02:00
T Karthik Reddy
d895ac5e94 arm64: zynqmp: Enable 2 NAND chips support for zynqmp_mini_nand
This patch enables 2 nand chips support for zynqmp mini nand

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>
2019-04-29 08:13:21 -07:00
Siva Durga Prasad Paladugu
f87a183900 arm64: versal: Update boot delay to perform autoboot
Update boot delay to 5 for performing autoboot. This patch
also updates counter frequency to value 2720000 as used
by QEMU.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-04-28 08:19:02 -07:00
T Karthik Reddy
179c30deb7 zynqmp: configs: Add single nand flash mini u-boot configuration
This patch adds configuration for single nand flash mini u-boot.

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>
2019-04-26 10:09:33 -07:00
T Karthik Reddy
871a49254f common: command: Print FPGA error value in hexadecimal
This patch prints returned FPGA error value in hexadecimal instead of
decimal.

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>
2019-04-25 14:34:38 -07:00
Vikhyat Goyal
7b3b24ddbe mtd: spi: Add support for Macronix flash parts
Adds support for mx25u51245f,mx66u2g45g and mx66l2g45g flash parts.

Signed-off-by: Vikhyat Goyal <vikhyat.goyal@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-04-16 10:42:25 +02:00
Siva Durga Prasad Paladugu
6cb094f4bd 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>
2019-04-01 10:51:55 +02:00
Jean-Jacques Hiblot
b43da3d470 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>
2019-04-01 10:51:55 +02:00
Siva Durga Prasad Paladugu
fea5b86e04 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>
2019-03-27 15:49:19 +01:00
T Karthik Reddy
dd625be2e7 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>
2019-03-27 15:49:19 +01:00
Siva Durga Prasad Paladugu
7c614fc895 xilinx: Add sd boot command script for reference
This patch adds sdboot command script for reference.
This can be converetd into uboot script using mkimage and
use for booting.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-27 15:49:19 +01:00
Michal Simek
b92f1c7a03 Makefile: Prioritize external dtb if defined
Prioritize external dtb if its passed via EXT_DTB
than the dtb that was built in the tree. With this
patch it appends the specified external dtb to
the u-boot image.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
2019-03-25 15:39:06 +01:00
Siva Durga Prasad Paladugu
13eb663508 arm: zynq: Add an info message about post config
Post configuration cant be run at u-boot as u-boot
didn't has any info about the design.So,this patch
adds an info message that post config was not run
and needs to be run manually if needed.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-25 15:39:06 +01:00
Siva Durga Prasad Paladugu
9c8e7f4769 arm64: zynqmp: Add idcode for new RFSoC silicon ZU39DR
This patch adds "zu39dr" to the list of zynqmp devices
The zu39DR is the new RFSoC silicon with id value of 0x66.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-25 15:39:06 +01:00
Siva Durga Prasad Paladugu
cebc700b71 spi: zynqmp_gqspi: Fix tap delay values
There is no need of read modify write for tapdelay settings
ans hence remove the read operations while setting tapdelays.
Also, correct tapdelay value settings at 40MHZ by modifying
the if check to <= instead of <.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-22 11:24:27 +01:00
Siva Durga Prasad Paladugu
3aa57bd9e2 net: phy: ti: Use ofnode api to read phy property
Fix incorrect read of phy property "ti,6-wire-mode"
by using ofnode api instead of dev read.
All other phy properties in of_init() routine were
also read using ofnode APIs.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-22 11:24:07 +01:00
Rajan Vaja
e80b0044d6 include: dt-binding: clock: Rename file name
Rename file name of ZynqMP clk dt-bindings to align with
file name of reset and power dt-bindings.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-19 13:32:24 +01:00
Michal Simek
568a335428 .gitignore: Ignore regenerated *.dtbo files
*.dtbo are dt overlays files which should be also ignored as *.dtb.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-19 13:32:23 +01:00
Jyotheeswar Reddy Mutthareddyvari
3ca3e7fc2a arm64: zynqmp: Enable fclk nodes
CCF requires all PL IPs to have CCF compliant drivers and manage the clocks
they depend on. Currently not all PL IP drivers are CCF compliant and some
IPs may not have drivers. Since CCF accounts only for clock usage by CCF
compliant drivers, PL clocks may be gated and could cause malfunction of PL
IPs/Drivers that are not CCF compliant. So, keep all PL clocks always
enabled by enabling fclk nodes.
For cases which require active PL clock management, it should first be
ensured that all IPs have CCF compliant drivers and then fclk nodes can
be disabled.

Signed-off-by: Jyotheeswar Reddy Mutthareddyvari <jyotheeswar.reddy.mutthareddyvari@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-19 13:32:23 +01:00
Anurag Kumar Vulisha
9c21aeb78c arm64: dts: zynqmp: Add interrupt-names property into dwc3 node
This patch adds the "interrupt-names" property for providing
names to the interrupt ids used in dwc3 dts node

Signed-off-by: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-19 13:32:23 +01:00
Harini Katakam
39f604e2fd arm64: dts: zynqmp: Add optional gpio phy reset properties
Add gpio phy reset via I2C expander TCA6416 on board ZCU102.
A warning call trace is observer in probe when this reset is called
from context that can sleep. Keep this commented until that is
resolved in phylib.

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-19 13:01:56 +01:00
Michal Simek
00caea2145 arm64: zynqmp: Turn comment to gpio-line-names
Label gpio lines properly.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-19 13:01:19 +01:00
Michal Simek
fc2bc6508e arm64: zynqmp: Enable fpd_dma for zcu104 platforms
Enable fpd_dma for these boards.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-19 13:00:27 +01:00
Siva Durga Prasad Paladugu
f326702628 arm64: xilinx: zynqmp: Remove unneeded configs
Remove unneeded configs from mini qspi configuration
so that it saves space for this mini configuration.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-19 12:54:33 +01:00
Siva Durga Prasad Paladugu
92a55754fb arm64: zynqmp: Remove zynqmp-mini-qspi.dtsi file
This patch removes zynqmp-mini-qspi.dtsi files as it has
same content as zynqmp-mini-qspi.dts file and there is no
need to maintain two, if .dts can be included in all files
instead of .dtsi. So, this patch removes .dtsi inclusion with
.dts in all files.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-19 12:54:24 +01:00
Siva Durga Prasad Paladugu
b7fcedeee7 arm64: zynqmp: Define label for flash node
Define a label for flash node so that it can be
referenced easily as required.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-19 12:54:14 +01:00
Siva Durga Prasad Paladugu
de155c3795 arm64: zynqmp: Add spi-flash compatible string to flash node
spi-flash compatible string is needed for reading tx and rx bus
widths, hence add this compatible string to flash node.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-19 12:54:06 +01:00
Siva Durga Prasad Paladugu
5ff8217836 arm64: zynqmp: Enable Micrel phy support for xilinx zc1275 revB
This patch enables Micrel phy support for Xilinx ZynqMP zc1275
revB board.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-16 14:02:37 +01:00
Siva Durga Prasad Paladugu
8563ced8a0 net: phy: xilinx_gmii2rgmii: Fill node pointer for external phy
This patch fills external phy node pointer so that it will
be used in its driver to read its phy properties from DT.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-16 14:02:37 +01:00
Siva Durga Prasad Paladugu
bf09e558d1 net: phy: xilinx_gmii2rgmii: Define readext and writeext routines
This patch defines writeext and readext routines and hooks
them for xilinx gmii2rgmii phy driver. These routines will
invokes corresponding external phy routines if defined.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-16 14:02:37 +01:00
Siva Durga Prasad Paladugu
b351de58a9 net: phy: micrel_ksz90x1: switch to use ofnode apis
phydev->node is phy node, phydev->dev->node is controller
and that current code is likely reading the properties from
controller node and not from phy. So, Use PHY API phy_get_ofnode()
helper to get PHY DT node and use ofnode_read_u32_default() to
read properties in phy node.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Changes for v2:
- Updated description
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-16 14:02:37 +01:00
Michal Simek
602f217c49 phy: ti: Init node before reading
There is a need to fill node before clk_output_sel is setup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
2019-03-16 13:42:50 +01:00