Commit Graph

57063 Commits

Author SHA1 Message Date
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
Michal Simek
50c2e69cb0 arm64: versal: Remove one level of indentation in board_early_init_r()
Simplify code indentation.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:53:05 +01:00
Michal Simek
e7bb6fdec3 arm64: versal: Disable showing information about console
There is no need to see this info. It is just wasting of space/time.
It saves 308Bytes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:52:59 +01:00
Michal Simek
66ac88c9b9 arm64: versal: Remove OF_EMBED also from Mini configurations
There shouldn't be a need to use OF_EMBED for mini configurations too.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:51:06 +01:00
Siva Durga Prasad Paladugu
6937650a92 arm64: versal: Add mini OSPI configuration
This patch adds new mini configuration for Versal
which has only ospi enabled. This mini configration
is required to run u-boot from on chip memory with
ospi support.

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:51:06 +01:00
Siva Durga Prasad Paladugu
db84e84865 arm64: versal: Add mini qspi configuration
This patch adds new mini configuration for Versal
which has only qspi enabled. This mini configration
is required to run u-boot from on chip memory with
qspi support. This patch also adds all supported qspi
configurations for this mini version.

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:51:05 +01:00
Michal Simek
badd4b5b39 arm64: versal: Enable all SPI controllers available
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-27 08:51:05 +01:00
Siva Durga Prasad Paladugu
1497925b31 arm64: versal: Add OSPI driver support
This patch adds support for OSPI driver to Versal platforms.
It uses cadence qspi driver with octal support and defines
DMA hooks that are required for performing DMA read operations.

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:50:51 +01:00
Siva Durga Prasad Paladugu
77f9d1dde4 spi: cadence_qspi: Add Octal support
This patch adds Octal read support by setting the octal instruction
type in the read instruction register if controller supports it.

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:50:47 +01:00
Siva Durga Prasad Paladugu
f8e0279def spi: cadence_qspi: Add support for page program using STIG write
This patch supports page programming using STIG write. This is needed
if controller support only STIG writes for page program instead of
regular indirect write support. So, this patch gets the controller
capability from dt using "cdns,is-stig-pgm" property. This patch also
modifies stig write routine to support for page programming.

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:50:42 +01:00
Siva Durga Prasad Paladugu
075605d57e spi: cadence_qspi: Add support for DMA reads
This patch adds support for DMA read operation if controller
supports it which is determined by reading DT property "cdns,is-dma".
This patch provides hooks for vendor specific DMA routines as the
cadence qspi controller supports external DMA which is vendor specific.

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:50:38 +01:00
Siva Durga Prasad Paladugu
3629c717e2 spi: spi_flash: Add support for Micron OSPI device MT35XL512
This patch adds support for Micron OSPI flash device MT35Xl512.
This device supports Octal Read commands along with regular
SPI and Quad commands.

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:50:33 +01:00
Siva Durga Prasad Paladugu
2f7e82b674 spi: spi_flash: Add Octal read command support
This patch adds octal read command support if flash
device  and controller supports it.

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:50:28 +01:00
Michal Simek
f0fd90cf3d arm64: zynqmp: Fix nand/qspi boot command
If instance number is passed to func(, , 0) then it has to be reflected
by bootcmd_<name><instance number> command.
Do it in a more generic way that devtypel and instance numbers are taken
from parameters.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-13 13:30:46 +01:00
Michal Simek
86487c5ed3 ARM: zynq: Label eeprom test on zc702/zc706 as xfail
This test is going to fail on Qemu because eeprom is not wired there.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:02 +01:00
Michal Simek
50160c88ea spi: zynqmp_gqspi: Enable versal compatible string
Trivial patch.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:02 +01:00
Siva Durga Prasad Paladugu
72c5de0057 arm64: versal: Add mini eMMC configuration
This patch adds mini eMMC configuration which has only
emmc0 and emmc1 functionalities and can run from small
amount of memory. This is required for memory constraint
devices.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:02 +01:00
Michal Simek
fda3f96390 arm64: versal: Enable different ethernet phy for virt platform
This platform is going to become generic that's why it is necessary also
enable different PHY vendors.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:02 +01:00
Michal Simek
ac6fd0a277 arm64: versal: Enable dm command
It is useful to have this command enable to see which devices are
bind/probed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:02 +01:00
Michal Simek
aa494880b1 arm64: versal: Enable i2c cadence controller and i2c command
Enable communication over i2c.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:01 +01:00
Michal Simek
4b0df81788 arm64: versal: Setup DM_ETH/MMC if NET/MMC is enabled
Setup proper ETH/MMC dependency for the whole platform.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:01 +01:00
Siva Durga Prasad Paladugu
1197e1c9e4 arm64: versal: Add new Kconfig SYS_MEM_RSVD_FOR_MMU
This patch adds new config option which is used for
reserving a specific memory for MMU Table and in this
case we are using TCM for that purpose.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:01 +01:00
Siva Durga Prasad Paladugu
9db9c37ba0 arm: zynq: Update boot_targets based on bootmode
Update boot_targets based on bootmode to run corresponding
distroboot command first.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:01 +01:00
Siva Durga Prasad Paladugu
556ff7089f arm: zynq: Define distro boot commnads for qspi, nand and nor
This patch adds distro boot commands for qspi, nand and nor.
The distro boot commands now reads the script from flash offset
of 15.75MB and executes it.

Setup default location via script_offset_f to 15.75MB to match the most
xilinx reference boards for qspi, nand and set the same using
script_offset_nor to 0xE2EC0000 for nor.
256kB 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-12 09:43:01 +01:00
Michal Simek
0bbaa17208 xilinx: common: Remove !DM_i2C code for reading mac from eeprom
All platforms are converted to DM_I2C that's why there is no reason to
keep this code here.

Note: Update also Makefile till zc706_eeprom is updated.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:01 +01:00
Michal Simek
fe5fc97a08 ARM: zynq: Convert dlc20 and zc70x board to DM_I2C
All these board have also eeprom enabled that's why it is also enabled
via defconfig.
There is also no need to have zc70x specific config file that's why also
remove it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:01 +01:00
Michal Simek
320f5df6e2 arm64: zynqmp: Remove addresses for i2c controllers
All platforms have been converted to DM that's why there is no reason to
keep addresses in headers. They are all read from DT now.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:01 +01:00
Michal Simek
6a6f9b9a11 arm64: zynqmp: Switch all platfroms to DM_I2C
CONFIG_PCA953X is not needed because of PCA953X is integrated in gpio
subsystem already. That's why also remove CMD_PCA953X which is only for
this driver.

zcu102/zcu104-revC/zcu106/zcu111 contain links to eeprom which stores MAC address.

DM_I2C is not enabled for the whole SoC because it increase size for
mini configurations and there is no I2C symbol present to setup
dependencies.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:00 +01:00
Michal Simek
eddcdea06b ARM: zynq: Convert Syzygy to DM_I2C
Boards have only one controller enabled that's why move to DM_I2C is
easy.
Add also i2c alias for not to be shown as i2c bus -1 because alias
doesn't exist.
Config file points to MAC stored in eeprom but it is not listed that's
why I have added 24c08 part.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:00 +01:00
Michal Simek
ab386c7f00 xilinx: common: Add support for DM_I2C zynq_board_read_rom_ethaddr()
It is much easier to point to eeprom which stores information like MAC
address directly via DT. eeprom which contains this information is
pointed by /chosen/xlnx,eeprom parameter.

For example:
        chosen {
                bootargs = "earlycon";
                stdout-path = "serial0:115200n8";
+               xlnx,eeprom = &eeprom;
        };

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:00 +01:00
Michal Simek
58b43e5199 xilinx: Move zynq_board_read_rom_ethaddr to shared location
Zynq and ZynqMP are sharing similar code and there is no reason to do
code duplication. Move zynq_board_read_rom_ethaddr() to common file for
easier conversion to DM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:00 +01:00
Michal Simek
716d940c73 misc: i2c_eeprom: Add atmel,24c08 to the list
Linux kernel binding is using atmel,24c08 compatible string. On the
other hand there is atmel,24c08a which is not listed in the kernel.
Add compatible string without "a" suffix to be compatible with Linux
kernel binding.

These eeproms are available on several ZynqMP development boards.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:00 +01:00
Michal Simek
6968165f28 ARM: zynq: Convert Topic Miami to DM_I2C
Both boards have only controllers enabled that's why move to DM_I2C is
easy.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:00 +01:00
Michal Simek
c15fcae714 ARM: zynq: Disable i2c for Zybo/Zybo Z7
There is no i2c connected in base DT that's why disable I2C commands.
Also remove zynq_zybo which is not needed now.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-02-12 09:43:00 +01:00