Commit Graph

57096 Commits

Author SHA1 Message Date
Siva Durga Prasad Paladugu
b266b3847f i2c: i2c_cdns: Fix below warnings with checker tool
This patch fixes below warnings found with checker tool.
The variable len in i2c_msg struct is of unsigned type
and it is received as recv_count which is unsigned type
but it is checked with < 0 which is always false, hence
removed it.
The local variable curr_recv_count is declared as signed
type and compared aginst unsigned recv_count which is
incorrect. This is fixed by declaring it as unsigned type.

drivers/i2c/i2c-cdns.c: In function ‘cdns_i2c_read_data’:
drivers/i2c/i2c-cdns.c:317:18: warning: comparison of
unsigned expression < 0 is always false [-Wtype-limits]
  if ((recv_count < 0))
                  ^
drivers/i2c/i2c-cdns.c:340:24: warning: comparison of
integer expressions of different signedness:
‘u32’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]
  updatetx = recv_count > curr_recv_count;
                        ^
drivers/i2c/i2c-cdns.c:361:39: warning: comparison of
integer expressions of different signedness:
‘u32’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]
    while (readl(&regs->transfer_size) !=

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-13 15:19:21 +01:00
T Karthik Reddy
6fb02bbf50 arm64: zynqmp Add CONFIG_SF_DUAL_FLASH to zcu111 revA
This patch enables dual flash support for zcu111 board.

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-12 12:53:01 +01:00
Siva Durga Prasad Paladugu
be952808d6 xilinx: Add qspi boot command script for reference
Thsi patch adds qspiboot 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-12 12:53:01 +01:00
Siva Durga Prasad Paladugu
01ab10f790 i2c: i2c_cdns: Add support for handling arbitration lost
This patch adds support for handling arbitration lost
in case of multi master mode. When an arbitration lost
is detected, it retries for 10 times before failing.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-12 12:53:01 +01:00
Siva Durga Prasad Paladugu
505b978dab i2c: i2c_cdns: Fix clearing of all interrupts
The arbitration lost interrupt was not getting cleared
while clearing interrupts. This patch fixes this by adding
arbitration lost interrupt as well during clear. This patch
also removes hardcoded value and defined a macro for it.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-03-12 12:53:01 +01:00
Siva Durga Prasad Paladugu
225e20a440 spi: zynqmp_gqspi: Fix tap delay values at 100MHz and 150MHz
This patch fixes the tap delay values to be set at 100MHz and 150MHz
as per TRM by fixing the if condition to use <= 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-12 12:53:01 +01:00
Siva Durga Prasad Paladugu
195c620e34 net: phy: xilinx_gmii2rgmii: Add check for external phy detection
Add check if an external phy is detected or not before proceeding
further to config the external phy. This patch fixes the issue of
u-boot hang or reset, if u-boot is not able to communicate with
external connected over gmiitorgmii bridge.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:11 +01:00
Siva Durga Prasad Paladugu
e118badbd6 net: phy: Fix return value check phy_probe
Don't ignore return value of phy_probe() call as
the probe may fail and it needs to be reported.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:11 +01:00
Siva Durga Prasad Paladugu
260ac1c66d net: phy: Reloc next and prev pointers inside phy_drivers
This patch relocates the pointers inside phy_drivers incase
of manual reloc. Without this reloc, these points to invalid
pre relocation address and hence causes exception or hang.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:11 +01:00
Michal Simek
e168f3d231 arm64: zynqmp: Remove eeprom setting
By moving to DM_I2C there is no need to specify any eeprom configuration
because it is read from DT.

Reported-by: Sreeja Vadakattu <sreeja.vadakattu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:11 +01:00
Rajan Vaja
8b7bc7ccd1 dts: xilinx: zynqmp: Use macro instead of hard-coded value of reset
Use reset ID macros instead of hard-coded values.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:10 +01:00
Rajan Vaja
0a4e8524b7 dts: xilinx: zynqmp: Use macro instead of hard-coded value
Use clock ID macros instead of hard-coded values.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:10 +01:00
Rajan Vaja
cf9adf55b2 dts: xilinx: Update zynqmp dts
Update zynqmp dts files to sync with upstream binding.

Below DT nodes are updated:
* Firmware
* Clock
* zynqmp-power
* Power domain
* Reset
* Pinctrl

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:10 +01:00
Michal Simek
e5d628d1dd arm64: zynqmp: Add xlnx,zynqmp-clk.h binding header
Add clk binding header.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:10 +01:00
Michal Simek
5fe14a8bdb dt-bindings: arm64: zynqmp: Add power and reset macros
They will be used in next patches.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:10 +01:00
Michal Simek
7eff2fd8e8 dtbo: Fix dtbo generation rules
Take the first prerequisite (dts overlay file) instead of standard
input.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:10 +01:00
T Karthik Reddy
5f40810b66 drivers: mtd: spi: Add support for ISSI flash parts
This patch adds support for IS25LP512M, IS25WP512M flash parts.

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-02-27 08:53:10 +01:00
Michal Simek
c5d82bb00b arm: zynq: Sync defconfigs with latest Kconfig structure
Remove default values for SYS_MALLOC_F_LEN.
And remove ZYNQ_GEM_I2C_MAC_OFFSET for zybo.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:09 +01:00
Michal Simek
3dca07ebd7 arm64: zynqmp: Enable SPL_DRIVERS_MISC_SUPPORT by default
It will enable ZynqMP firmware driver for SPL to provide access to clock
driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:09 +01:00
Rajan Vaja
69a41b3e90 firmware: Add Xilinx ZynqMP firmware driver
Add simple ZynqMP firmware drive to populate
child nodes under zynqmp_firmware DT node.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:09 +01:00
Harini Katakam
0a1e859b93 arm64: zynqmp: dt: Sync DP83867 quirk with mainline
The DP83867 strap control workaround is already present in the
driver - use the same quirk.

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:09 +01:00
Michal Simek
313060bb59 arm64: zynqmp: Enable networking for zc1275 revB
reB has gmii to rgmii bridge enabled that's why enable also networking
and commands.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:09 +01:00
Michal Simek
e3a6f1b5f3 phy: net: Check that input interface type is gmii
There can't be any other interface as input. Only gmii is allowed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:09 +01:00
Michal Simek
25815c99c0 phy: gmii2rgmii: Hardcode rgmii interface type
gmii can't be passed to phy driver because from bridge should come up
rgmii.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:09 +01:00
Michal Simek
30cca07b1e xilinx: common: Sync messages with mainline
In mainline submissiong error value and one log has chagnes.
The patch is doing sync.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:08 +01:00
Michal Simek
24bbf51468 arm64: zynqmp: Create fdtfile from compatible string
distro boot expects that fdtfile name is setup for alternative DTB.
Create this file based on the first platform compatible string.
This should ensure that one rootfs can store multiple DTBs for different
boards.
Reflect structure which is used in Linux kernel. It means dtbs are
strored in xilinx folder.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
2019-02-27 08:53:08 +01:00
Michal Simek
1117b3e0ac xilinx: dts: Remove additional empty lines
Trivial fix.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:08 +01:00
Mounika Grace Akula
a1936e4883 arm64: zynqmp: Add reset-on-timeout for all boards and modify default timeout value
This patch adds reset-on-timeout to FPD WDT which will trigger an
interrupt to PMU when watchdog expiry happens and PMU takes the
necessary action. If this property is not enabled, reason will not be
known when watchdog expiry happens.
This patch also modifies the default timeout to 60 seconds. Reason is
that if u-boot enables WDT, it will set the timeout to 10 seconds and
this is not enough to boot till Linux and start the WDT application in
Linux. 60 seconds is the maximum safest value to boot till Linux and
start the WDT application.

Users need to change this timeout value to fit their needs.

Signed-off-by: Mounika Grace Akula <mounika.grace.akula@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:08 +01:00
Amit Kucheria
d2c95c4737 arm64: dts: Fix various entry-method properties to reflect documentation
The idle-states binding documentation[1] mentions that the
'entry-method' property is required on 64-bit platforms and must be
set to "psci".

Linux commit a13f18f59d26 ("Documentation: arm: Fix typo in the idle-states
bindings examples") attempted to fix this earlier but clearly more is
needed.

Linux docs:
Documentation/devicetree/bindings/arm/idle-states.txt (see
idle-states node)

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:08 +01:00
Kalyani Akula
bd52f59b9a arm64: zynqmp: Added device tree node for zynqmp-aes driver
This patch adds device node for zynqmp-aes driver

Signed-off-by: Kalyani Akula <kalyani.akula@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:08 +01:00
Daniel Steger
2e5c0578fd arm64: zynqmp: Modify ocm perf monitor slots
The current dt entry for the ocm performance monitor specifies
that there are 4 slots. This is incorrect. Page 372 of the
zynqmp trm describes the number of slots each apm supports.

Signed-off-by: Daniel Steger <daniel.steger@xilinx.com>
Reviewed-by: Shubhrajyoti Datta <Shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:08 +01:00
Durga Challa
ad283fc0f3 arm64: zynqmp: Added data cells to access efuse
This patch adds data cells under nvmem node to
read efuse memory

Signed-off-by: Durga Challa <vnsl.durga.challa@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:08 +01:00
Mubin Usman Sayyed
76e44aaf40 arm64: zynqmp: Keep SMMU disabled by default
SMMU adds overhead in mapping/un-mapping of DMA buffers. It
will degrade performance numbers for some of the peripherals.
Disabling SMMU to avoid the same.
Please check Xilinx documentation for more information.

Signed-off-by: Mubin Usman Sayyed <mubin.usman.sayyed@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:07 +01:00
Harini Katakam
2c3f2141f5 arm64: zynqmp: Make SMMU a separate node outside amba
Drivers dependent on IOMMU expect SMMU to be probed first and
in PM flow, suspended last and resumed first.

This can ideally be achieved by adding PM support in arm-smmu and
maintaining the above expected order. This series on LKML proposes
the same:
https://patchwork.ozlabs.org/cover/885035/

But this is still under review and would require pulling in more
framework changes on the current xilinx tree. Hence this patch
provides a temporary fix until the above solution is finalized.
The expected order is maintained by moving SMMU node outside amba node
in the devicetree.

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:07 +01:00
Michal Simek
e72b0244b0 arm64: zynqmp: Remove autodetected devices without description
It will never reach mainline that's why remove it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:07 +01:00
Shubhrajyoti Datta
2bec97c7c2 arm64: zynqmp: Fix i2c boot warning
Fix the below warning as the core looks for the compatible
string.

[    5.198919] i2c i2c-18: of_i2c: modalias failure on
/amba/i2c@ff030000/i2c-mux@75/i2c@3/dev@19
[    5.207454] i2c i2c-18: Failed to create I2C device for
/amba/i2c@ff030000/i2c-mux@75/i2c@3/dev@19
[    5.216394] i2c i2c-18: of_i2c: modalias failure on
/amba/i2c@ff030000/i2c-mux@75/i2c@3/dev@30
[    5.224986] i2c i2c-18: Failed to create I2C device for
/amba/i2c@ff030000/i2c-mux@75/i2c@3/dev@30
[    5.233927] i2c i2c-18: of_i2c: modalias failure on
/amba/i2c@ff030000/i2c-mux@75/i2c@3/dev@35
[    5.242527] i2c i2c-18: Failed to create I2C device for
/amba/i2c@ff030000/i2c-mux@75/i2c@3/dev@35
[    5.263880] i2c i2c-18: of_i2c: modalias failure on
/amba/i2c@ff030000/i2c-mux@75/i2c@3/dev@36
[    5.272477] i2c i2c-18: Failed to create I2C device for
/amba/i2c@ff030000/i2c-mux@75/i2c@3/dev@36
[    5.281415] i2c i2c-18: of_i2c: modalias failure on
/amba/i2c@ff030000/i2c-mux@75/i2c@3/dev@51
[    5.290008] i2c i2c-18: Failed to create I2C device for
/amba/i2c@ff030000/i2c-mux@75/i2c@3/dev@51

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:07 +01:00
Venkatesh Yadav Abbarapu
d4b5ee84f9 arm64: zynqmp: Change the spi-rx-bus-width property to x1
As per the zc1275 design x1 mode is enabled so changing the
spi-rx-bus-width property to x1.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:07 +01:00
Daniel Steger
2dbd1a5240 arm64: zynqmp: Add in lpd, cci, ddr axi perf monitors
The current zynqmp.dtsi does not include the axi performance
monitors for the lpd, cci, or ddr. This set of patches adds
in the missing dt entries for the ps apms.

Signed-off-by: Daniel Steger <daniel.steger@xilinx.com>
Reviewed-by: Shubhrajyoti Datta <Shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:07 +01:00
Mounika Grace Akula
3dbd903840 arm64: zynqmp: Modify LPD Watchdog clock
FPD watchdog clock should not be used for LPD watchdog. This patch
modifies the same to use the proper clock for LPD watchdog.

Signed-off-by: Mounika Grace Akula <mounika.grace.akula@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:07 +01:00
Mirela Simonovic
564339504c arm64: zynqmp: Fix binding of hclk clock (gem nodes)
This patch is required to fix binding of gem interface clocks to
system-level clock IDs that have changed. The gem0 clock IDs are now:
1) Clock ID 45 represents GEM0_TX clock
2) Clock ID 49 represents GEM0_RX clock
3) Clock ID 104 represents GEM0_REF clock

Clock IDs for other gems changed similarly, e.g. for i in {1, 2, 3}
GEMi_TX = GEM0_TX + i, etc. Other clock IDs have not changed.

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <willw@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:06 +01:00
Michal Simek
8acc58e682 ARM: dts: Use mmc@ instead sdhci@
mmc name is recommended based on devicetree specification.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:06 +01:00
Luis Araneda
9e1709b753 ARM: dts: zynq: correct and improve the model property of dt files
Replace the current value of the model property by a more accurate
description of each board (which includes the manufacturer), as some
of the boards had the same value ("Xilinx Zynq")

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:06 +01:00
Luis Araneda
34848612c7 ARM: dts: zynq: Set correct manufacturer for ZedBoard and MicroZed boards
Both boards are made by Avnet, Inc. So add an additional
value to the compatible property

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:06 +01:00
Michal Simek
a2693deda2 arm64: zynqmp: Remove board config files
All options have been moved to Kconfig and there is no need to have
board header files. Mini configurations require them that's why they are
still there.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:06 +01:00
Michal Simek
2870c65923 arm64: zynqmp: Remove SPD related configurations
SPD autodetection hasn't been enabled that's why there is zero size
difference if that options are enabled/disabled.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:06 +01:00
Michal Simek
ed71603f97 arm64: zynqmp: Fix logic around CONFIG_ZYNQ_SDHCI
Replace SDHCI controller listing by Kconfig symbol to let SPL know that
this board is using multiple SDHCIs controllers.
Kconfig help message should explain why this is needed.
Origin symbols were used in full u-boot but with moving to distro boot
this was fixed already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:06 +01:00
Siva Durga Prasad Paladugu
3fa08cbf61 arm64: versal: Define board_late_init for versal
Define board_late_init which performs bootmode detection
and prepares corresponding distro boot commaand sequence.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:06 +01:00
Siva Durga Prasad Paladugu
ba79c783d8 arm64: versal: Define distro boot commnads for qspi ospi and mmc
This patch adds distro boot commands for qspi, ospi and mmc.
The distro boot commands now reads the script from flash offset
of 63.5MB  for qspi and ospi and executes it. For mmc its same
as generic distro boot command. As either one of the qspi or ospi can
exist on hardware, defined a single distroboot command as xspi
that works for both.

Setup default location via script_offset_f to 63.5MB to match the most
xilinx reference boards for qspi, ospi for now.
512kB allocated space for script size (script_size_f) should be more
than enough to cover custom boot logic.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:05 +01:00
Siva Durga Prasad Paladugu
f9b4db4700 arm64: versal: Add mini configuration for Versal
This patch adds new mini target for versal.
This configuration is very minimal in size which runs
from OCM. It contains support for mtest which can be
used for running DDR memory tests.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:05 +01:00
Michal Simek
bf04cef4aa arm64: versal: Move IOU_SWITCH_DIVISOR0 to Kconfig
Move hardcoded IOU_SWITCH_DIVISOR0 to Kconfig to be able to set it up
for different platforms.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:05 +01:00