]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
6 years agophy: ti: Init node before reading
Michal Simek [Sat, 16 Mar 2019 11:02:57 +0000 (12:02 +0100)] 
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>
6 years agocommon: image-sig.c: Add manual relocation
T Karthik Reddy [Sat, 16 Mar 2019 09:53:03 +0000 (15:23 +0530)] 
common: image-sig.c: Add manual relocation

This patch adds manual relocation for struct checksum_algo & struct
crypto_algo structures.

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>
6 years agodrivers: crypto: rsa_mod_exp: Add manual relocation for ops->mod_exp()
T Karthik Reddy [Sat, 16 Mar 2019 09:53:02 +0000 (15:23 +0530)] 
drivers: crypto: rsa_mod_exp: Add manual relocation for ops->mod_exp()

This patch adds manual relocation for Modular Exponentiation if
CONFIG_NEEDS_MANUAL_RELOC is enabled.

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>
6 years agocommon: hash: Manually relocate struct hash_algo
T Karthik Reddy [Sat, 16 Mar 2019 09:53:01 +0000 (15:23 +0530)] 
common: hash: Manually relocate struct hash_algo

This patch adds manual relocation for struct hash_algo if
CONFIG_NEEDS_MANUAL_RELOC is enabled.

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>
6 years agonet: phy: Define init routine and register generic phy driver
Siva Durga Prasad Paladugu [Fri, 15 Mar 2019 12:16:47 +0000 (17:46 +0530)] 
net: phy: Define init routine and register generic phy driver

This patch define init routine for generic phy driver and registers it
using phy_register as this generic phy driver also needs to be relocated
incase of manual reloc.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agonet: phy: ti: Add support for 6-wire mode in SGMII configuration
Siva Durga Prasad Paladugu [Fri, 15 Mar 2019 12:16:46 +0000 (17:46 +0530)] 
net: phy: ti: Add support for 6-wire mode in SGMII configuration

This patch adds 6 wire mode supports which enables SGMII clock
to MAC from phy. The drivers gets this 6 wire mode info by reading
the property "ti,6-wire-mode" from DT.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agonet: xilinx_axiemac: Fill the phy node pointer in phydev
Siva Durga Prasad Paladugu [Fri, 15 Mar 2019 12:16:45 +0000 (17:46 +0530)] 
net: xilinx_axiemac: Fill the phy node pointer in phydev

This patch assings the phynode pointer to the phydev node
as it is needed later in the corresponding phy driver to read
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>
6 years agoarm64: zynqmp: Use zynqmp_mmio_read/write functions
T Karthik Reddy [Wed, 13 Mar 2019 14:54:18 +0000 (20:24 +0530)] 
arm64: zynqmp: Use zynqmp_mmio_read/write functions

Changed the return type of reset_reason() to int from u32, because
zynqmp_mmio_read/write() returns signed value on error.
Replaced readl and writel functions with zynqmp_mmio_read &
zynqmp_mmio_write functions to access RESET_REASON(CRL_APB) registers.

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>
6 years agotest: py: tests: Add py-test case for zynq aes loadp command
T Karthik Reddy [Tue, 12 Mar 2019 14:50:26 +0000 (20:20 +0530)] 
test: py: tests: Add py-test case for zynq aes loadp command

This patch adds py-test case for zynq aes loadp command. It tests
loading partial bitstream to DDR and tests loading partial bitstream
to PL using "zynq aes loadp" command. This test needs to be executed
only in bootmode, if not it wil be skipped.

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>
6 years agotest: py: tests: Correct zynq aes & rsa py-test cases
T Karthik Reddy [Tue, 12 Mar 2019 14:50:25 +0000 (20:20 +0530)] 
test: py: tests: Correct zynq aes & rsa py-test cases

This patch corrects zynq aes & rsa py-test cases as per changes in
zynq aes and rsa commands.

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>
6 years agotest: py: tests: Compare value instead of object
T Karthik Reddy [Tue, 12 Mar 2019 14:50:24 +0000 (20:20 +0530)] 
test: py: tests: Compare value instead of object

This patch corrects comparing value instead of comparing objects

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>
6 years agofpga: zynqpl: Flush dcache only for non-bitstream data
T Karthik Reddy [Tue, 12 Mar 2019 14:50:23 +0000 (20:20 +0530)] 
fpga: zynqpl: Flush dcache only for non-bitstream data

In case of aes decryption destination address range must be flushed
before transferring decrypted data to destination.

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>
6 years agoARM: zynq: Add zynq aes load & loadp commands
T Karthik Reddy [Tue, 12 Mar 2019 14:50:22 +0000 (20:20 +0530)] 
ARM: zynq: Add zynq aes load & loadp commands

Added support for zynq aes load & loadp commands which are broken by
mainline merge.

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>
6 years agoARM: zynq: Check zynq aes & rsa command parameters count
T Karthik Reddy [Tue, 12 Mar 2019 14:50:21 +0000 (20:20 +0530)] 
ARM: zynq: Check zynq aes & rsa command parameters count

This patch checks for zynq aes & rsa commands max parameters count. Also
checks minimum number of parameters count for aes command.

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>
6 years agofpga: zynqpl: Check fpga config completion
T Karthik Reddy [Tue, 12 Mar 2019 14:50:20 +0000 (20:20 +0530)] 
fpga: zynqpl: Check fpga config completion

This patch checks fpga config completion when a bitstream is loaded
into PL.

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>
6 years agofpga: zynqpl: Add bstype argument to zynq_decrypt_load()
T Karthik Reddy [Tue, 12 Mar 2019 14:50:19 +0000 (20:20 +0530)] 
fpga: zynqpl: Add bstype argument to zynq_decrypt_load()

This patch adds 'bstype' argument to zynq_decrypt_load() to specify whether
the input source is a bitstream/non-bitstream/partial bitstream image.

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>
6 years agoi2c: i2c_cdns: Fix below warnings with checker tool
Siva Durga Prasad Paladugu [Wed, 13 Mar 2019 04:11:17 +0000 (09:41 +0530)] 
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>
6 years agoarm64: zynqmp Add CONFIG_SF_DUAL_FLASH to zcu111 revA
T Karthik Reddy [Tue, 5 Mar 2019 04:58:27 +0000 (10:28 +0530)] 
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>
6 years agoxilinx: Add qspi boot command script for reference
Siva Durga Prasad Paladugu [Fri, 8 Mar 2019 07:43:26 +0000 (13:13 +0530)] 
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>
6 years agoi2c: i2c_cdns: Add support for handling arbitration lost
Siva Durga Prasad Paladugu [Thu, 7 Mar 2019 10:09:45 +0000 (15:39 +0530)] 
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>
6 years agoi2c: i2c_cdns: Fix clearing of all interrupts
Siva Durga Prasad Paladugu [Thu, 7 Mar 2019 10:09:44 +0000 (15:39 +0530)] 
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>
6 years agospi: zynqmp_gqspi: Fix tap delay values at 100MHz and 150MHz
Siva Durga Prasad Paladugu [Thu, 7 Mar 2019 10:38:48 +0000 (16:08 +0530)] 
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>
6 years agonet: phy: xilinx_gmii2rgmii: Add check for external phy detection
Siva Durga Prasad Paladugu [Tue, 26 Feb 2019 12:12:44 +0000 (17:42 +0530)] 
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>
6 years agonet: phy: Fix return value check phy_probe
Siva Durga Prasad Paladugu [Tue, 26 Feb 2019 12:12:43 +0000 (17:42 +0530)] 
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>
6 years agonet: phy: Reloc next and prev pointers inside phy_drivers
Siva Durga Prasad Paladugu [Tue, 26 Feb 2019 11:47:00 +0000 (17:17 +0530)] 
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>
6 years agoarm64: zynqmp: Remove eeprom setting
Michal Simek [Mon, 25 Feb 2019 09:01:22 +0000 (10:01 +0100)] 
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>
6 years agodts: xilinx: zynqmp: Use macro instead of hard-coded value of reset
Rajan Vaja [Wed, 20 Feb 2019 12:33:08 +0000 (04:33 -0800)] 
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>
6 years agodts: xilinx: zynqmp: Use macro instead of hard-coded value
Rajan Vaja [Wed, 20 Feb 2019 12:33:07 +0000 (04:33 -0800)] 
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>
6 years agodts: xilinx: Update zynqmp dts
Rajan Vaja [Fri, 15 Feb 2019 04:42:01 +0000 (20:42 -0800)] 
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>
6 years agoarm64: zynqmp: Add xlnx,zynqmp-clk.h binding header
Michal Simek [Fri, 22 Feb 2019 09:25:28 +0000 (10:25 +0100)] 
arm64: zynqmp: Add xlnx,zynqmp-clk.h binding header

Add clk binding header.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agodt-bindings: arm64: zynqmp: Add power and reset macros
Michal Simek [Tue, 19 Feb 2019 10:32:24 +0000 (11:32 +0100)] 
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>
6 years agodtbo: Fix dtbo generation rules
Michal Simek [Mon, 11 Feb 2019 13:51:02 +0000 (14:51 +0100)] 
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>
6 years agodrivers: mtd: spi: Add support for ISSI flash parts
T Karthik Reddy [Mon, 11 Feb 2019 04:13:52 +0000 (09:43 +0530)] 
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>
6 years agoarm: zynq: Sync defconfigs with latest Kconfig structure
Michal Simek [Tue, 19 Feb 2019 11:13:48 +0000 (12:13 +0100)] 
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>
6 years agoarm64: zynqmp: Enable SPL_DRIVERS_MISC_SUPPORT by default
Michal Simek [Tue, 19 Feb 2019 11:14:48 +0000 (12:14 +0100)] 
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>
6 years agofirmware: Add Xilinx ZynqMP firmware driver
Rajan Vaja [Fri, 15 Feb 2019 12:45:32 +0000 (04:45 -0800)] 
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>
6 years agoarm64: zynqmp: dt: Sync DP83867 quirk with mainline
Harini Katakam [Wed, 13 Feb 2019 11:32:21 +0000 (17:02 +0530)] 
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>
6 years agoarm64: zynqmp: Enable networking for zc1275 revB
Michal Simek [Mon, 18 Feb 2019 08:31:06 +0000 (09:31 +0100)] 
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>
6 years agophy: net: Check that input interface type is gmii
Michal Simek [Fri, 15 Feb 2019 10:18:53 +0000 (11:18 +0100)] 
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>
6 years agophy: gmii2rgmii: Hardcode rgmii interface type
Michal Simek [Fri, 15 Feb 2019 10:24:17 +0000 (11:24 +0100)] 
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>
6 years agoxilinx: common: Sync messages with mainline
Michal Simek [Tue, 19 Feb 2019 10:19:10 +0000 (11:19 +0100)] 
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>
6 years agoarm64: zynqmp: Create fdtfile from compatible string
Michal Simek [Thu, 14 Feb 2019 12:14:30 +0000 (13:14 +0100)] 
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>
6 years agoxilinx: dts: Remove additional empty lines
Michal Simek [Wed, 13 Feb 2019 15:39:51 +0000 (16:39 +0100)] 
xilinx: dts: Remove additional empty lines

Trivial fix.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add reset-on-timeout for all boards and modify default timeout value
Mounika Grace Akula [Tue, 9 Oct 2018 15:22:50 +0000 (20:52 +0530)] 
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>
6 years agoarm64: dts: Fix various entry-method properties to reflect documentation
Amit Kucheria [Thu, 23 Aug 2018 08:53:29 +0000 (14:23 +0530)] 
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>
6 years agoarm64: zynqmp: Added device tree node for zynqmp-aes driver
Kalyani Akula [Wed, 10 Oct 2018 09:20:38 +0000 (14:50 +0530)] 
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>
6 years agoarm64: zynqmp: Modify ocm perf monitor slots
Daniel Steger [Fri, 11 Jan 2019 22:08:24 +0000 (14:08 -0800)] 
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>
6 years agoarm64: zynqmp: Added data cells to access efuse
Durga Challa [Thu, 11 Oct 2018 10:52:55 +0000 (16:22 +0530)] 
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>
6 years agoarm64: zynqmp: Keep SMMU disabled by default
Mubin Usman Sayyed [Wed, 5 Sep 2018 11:17:19 +0000 (16:47 +0530)] 
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>
6 years agoarm64: zynqmp: Make SMMU a separate node outside amba
Harini Katakam [Wed, 5 Sep 2018 11:17:26 +0000 (16:47 +0530)] 
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>
6 years agoarm64: zynqmp: Remove autodetected devices without description
Michal Simek [Wed, 13 Feb 2019 14:39:04 +0000 (15:39 +0100)] 
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>
6 years agoarm64: zynqmp: Fix i2c boot warning
Shubhrajyoti Datta [Mon, 3 Sep 2018 10:16:46 +0000 (15:46 +0530)] 
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>
6 years agoarm64: zynqmp: Change the spi-rx-bus-width property to x1
Venkatesh Yadav Abbarapu [Wed, 14 Nov 2018 11:50:18 +0000 (17:20 +0530)] 
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>
6 years agoarm64: zynqmp: Add in lpd, cci, ddr axi perf monitors
Daniel Steger [Fri, 11 Jan 2019 22:08:23 +0000 (14:08 -0800)] 
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>
6 years agoarm64: zynqmp: Modify LPD Watchdog clock
Mounika Grace Akula [Wed, 9 Jan 2019 05:40:20 +0000 (11:10 +0530)] 
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>
6 years agoarm64: zynqmp: Fix binding of hclk clock (gem nodes)
Mirela Simonovic [Mon, 17 Sep 2018 12:24:18 +0000 (14:24 +0200)] 
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>
6 years agoARM: dts: Use mmc@ instead sdhci@
Michal Simek [Wed, 26 Sep 2018 11:36:16 +0000 (13:36 +0200)] 
ARM: dts: Use mmc@ instead sdhci@

mmc name is recommended based on devicetree specification.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoARM: dts: zynq: correct and improve the model property of dt files
Luis Araneda [Thu, 12 Jul 2018 04:10:20 +0000 (00:10 -0400)] 
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>
6 years agoARM: dts: zynq: Set correct manufacturer for ZedBoard and MicroZed boards
Luis Araneda [Thu, 12 Jul 2018 04:10:19 +0000 (00:10 -0400)] 
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>
6 years agoarm64: zynqmp: Remove board config files
Michal Simek [Wed, 13 Feb 2019 12:33:32 +0000 (13:33 +0100)] 
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>
6 years agoarm64: zynqmp: Remove SPD related configurations
Michal Simek [Wed, 13 Feb 2019 13:00:06 +0000 (14:00 +0100)] 
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>
6 years agoarm64: zynqmp: Fix logic around CONFIG_ZYNQ_SDHCI
Michal Simek [Wed, 13 Feb 2019 12:46:41 +0000 (13:46 +0100)] 
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>
6 years agoarm64: versal: Define board_late_init for versal
Siva Durga Prasad Paladugu [Thu, 31 Jan 2019 11:58:14 +0000 (17:28 +0530)] 
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>
6 years agoarm64: versal: Define distro boot commnads for qspi ospi and mmc
Siva Durga Prasad Paladugu [Thu, 31 Jan 2019 11:58:13 +0000 (17:28 +0530)] 
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>
6 years agoarm64: versal: Add mini configuration for Versal
Siva Durga Prasad Paladugu [Mon, 4 Feb 2019 10:48:29 +0000 (16:18 +0530)] 
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>
6 years agoarm64: versal: Move IOU_SWITCH_DIVISOR0 to Kconfig
Michal Simek [Mon, 28 Jan 2019 10:12:41 +0000 (11:12 +0100)] 
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>
6 years agoarm64: versal: Remove one level of indentation in board_early_init_r()
Michal Simek [Mon, 28 Jan 2019 10:08:00 +0000 (11:08 +0100)] 
arm64: versal: Remove one level of indentation in board_early_init_r()

Simplify code indentation.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: versal: Disable showing information about console
Michal Simek [Mon, 28 Jan 2019 09:47:33 +0000 (10:47 +0100)] 
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>
6 years agoarm64: versal: Remove OF_EMBED also from Mini configurations
Michal Simek [Mon, 28 Jan 2019 08:22:22 +0000 (09:22 +0100)] 
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>
6 years agoarm64: versal: Add mini OSPI configuration
Siva Durga Prasad Paladugu [Tue, 8 Jan 2019 16:17:28 +0000 (21:47 +0530)] 
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>
6 years agoarm64: versal: Add mini qspi configuration
Siva Durga Prasad Paladugu [Tue, 8 Jan 2019 16:17:27 +0000 (21:47 +0530)] 
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>
6 years agoarm64: versal: Enable all SPI controllers available
Michal Simek [Wed, 16 Jan 2019 15:57:12 +0000 (16:57 +0100)] 
arm64: versal: Enable all SPI controllers available

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: versal: Add OSPI driver support
Siva Durga Prasad Paladugu [Sat, 11 Aug 2018 08:52:40 +0000 (14:22 +0530)] 
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>
6 years agospi: cadence_qspi: Add Octal support
Siva Durga Prasad Paladugu [Sat, 11 Aug 2018 08:52:39 +0000 (14:22 +0530)] 
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>
6 years agospi: cadence_qspi: Add support for page program using STIG write
Siva Durga Prasad Paladugu [Sat, 11 Aug 2018 08:52:38 +0000 (14:22 +0530)] 
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>
6 years agospi: cadence_qspi: Add support for DMA reads
Siva Durga Prasad Paladugu [Sat, 11 Aug 2018 08:52:37 +0000 (14:22 +0530)] 
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>
6 years agospi: spi_flash: Add support for Micron OSPI device MT35XL512
Siva Durga Prasad Paladugu [Sat, 11 Aug 2018 08:52:36 +0000 (14:22 +0530)] 
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>
6 years agospi: spi_flash: Add Octal read command support
Siva Durga Prasad Paladugu [Sat, 11 Aug 2018 08:52:35 +0000 (14:22 +0530)] 
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>
6 years agoarm64: zynqmp: Fix nand/qspi boot command
Michal Simek [Wed, 13 Feb 2019 12:28:47 +0000 (13:28 +0100)] 
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>
6 years agoARM: zynq: Label eeprom test on zc702/zc706 as xfail
Michal Simek [Fri, 25 May 2018 08:26:54 +0000 (10:26 +0200)] 
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>
6 years agospi: zynqmp_gqspi: Enable versal compatible string
Michal Simek [Thu, 29 Nov 2018 07:48:28 +0000 (08:48 +0100)] 
spi: zynqmp_gqspi: Enable versal compatible string

Trivial patch.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: versal: Add mini eMMC configuration
Siva Durga Prasad Paladugu [Tue, 8 Jan 2019 16:17:29 +0000 (21:47 +0530)] 
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>
6 years agoarm64: versal: Enable different ethernet phy for virt platform
Michal Simek [Thu, 17 Jan 2019 08:22:37 +0000 (09:22 +0100)] 
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>
6 years agoarm64: versal: Enable dm command
Michal Simek [Wed, 16 Jan 2019 15:52:19 +0000 (16:52 +0100)] 
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>
6 years agoarm64: versal: Enable i2c cadence controller and i2c command
Michal Simek [Wed, 16 Jan 2019 15:50:17 +0000 (16:50 +0100)] 
arm64: versal: Enable i2c cadence controller and i2c command

Enable communication over i2c.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: versal: Setup DM_ETH/MMC if NET/MMC is enabled
Michal Simek [Tue, 15 Jan 2019 07:52:46 +0000 (08:52 +0100)] 
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>
6 years agoarm64: versal: Add new Kconfig SYS_MEM_RSVD_FOR_MMU
Siva Durga Prasad Paladugu [Tue, 8 Jan 2019 16:17:26 +0000 (21:47 +0530)] 
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>
6 years agoarm: zynq: Update boot_targets based on bootmode
Siva Durga Prasad Paladugu [Fri, 25 Jan 2019 11:36:06 +0000 (17:06 +0530)] 
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>
6 years agoarm: zynq: Define distro boot commnads for qspi, nand and nor
Siva Durga Prasad Paladugu [Fri, 25 Jan 2019 11:36:05 +0000 (17:06 +0530)] 
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>
6 years agoxilinx: common: Remove !DM_i2C code for reading mac from eeprom
Michal Simek [Tue, 22 Jan 2019 14:55:46 +0000 (15:55 +0100)] 
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>
6 years agoARM: zynq: Convert dlc20 and zc70x board to DM_I2C
Michal Simek [Tue, 22 Jan 2019 13:43:04 +0000 (14:43 +0100)] 
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>
6 years agoarm64: zynqmp: Remove addresses for i2c controllers
Michal Simek [Fri, 18 Jan 2019 08:09:40 +0000 (09:09 +0100)] 
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>
6 years agoarm64: zynqmp: Switch all platfroms to DM_I2C
Michal Simek [Fri, 18 Jan 2019 08:10:39 +0000 (09:10 +0100)] 
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>
6 years agoARM: zynq: Convert Syzygy to DM_I2C
Michal Simek [Tue, 22 Jan 2019 13:12:54 +0000 (14:12 +0100)] 
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>
6 years agoxilinx: common: Add support for DM_I2C zynq_board_read_rom_ethaddr()
Michal Simek [Mon, 21 Jan 2019 15:29:07 +0000 (16:29 +0100)] 
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>
6 years agoxilinx: Move zynq_board_read_rom_ethaddr to shared location
Michal Simek [Mon, 21 Jan 2019 14:25:02 +0000 (15:25 +0100)] 
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>
6 years agomisc: i2c_eeprom: Add atmel,24c08 to the list
Michal Simek [Mon, 21 Jan 2019 12:53:05 +0000 (13:53 +0100)] 
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>
6 years agoARM: zynq: Convert Topic Miami to DM_I2C
Michal Simek [Tue, 22 Jan 2019 14:47:52 +0000 (15:47 +0100)] 
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>
6 years agoARM: zynq: Disable i2c for Zybo/Zybo Z7
Michal Simek [Tue, 22 Jan 2019 13:04:20 +0000 (14:04 +0100)] 
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>
6 years agoi2c: mux: Generate longer i2c mux name
Michal Simek [Thu, 31 Jan 2019 15:31:03 +0000 (16:31 +0100)] 
i2c: mux: Generate longer i2c mux name

For !DM case busses are listed as
ZynqMP> i2c bus
Bus 0: zynq_0
Bus 1: zynq_0->PCA9544A@0x75:0
Bus 2: zynq_0->PCA9544A@0x75:1
Bus 3: zynq_0->PCA9544A@0x75:2
Bus 4: zynq_1
Bus 5: zynq_1->PCA9548@0x74:0
Bus 6: zynq_1->PCA9548@0x74:1
Bus 7: zynq_1->PCA9548@0x74:2
Bus 8: zynq_1->PCA9548@0x74:3
Bus 9: zynq_1->PCA9548@0x74:4
Bus 10: zynq_1->PCA9548@0x75:0
Bus 11: zynq_1->PCA9548@0x75:1
Bus 12: zynq_1->PCA9548@0x75:2
Bus 13: zynq_1->PCA9548@0x75:3
Bus 14: zynq_1->PCA9548@0x75:4
Bus 15: zynq_1->PCA9548@0x75:5
Bus 16: zynq_1->PCA9548@0x75:6
Bus 17: zynq_1->PCA9548@0x75:7

where is exactly describing i2c bus topology.
By moving to DM case i2c mux buses are using names from DT and because
i2c-muxes describing sub busses with the same names like i2c@0, etc it
is hard to identify which bus is where.
Linux is adding topology information to i2c-mux busses to identify them
better.
This patch is doing the same and composing bus name with topology
information.

When patch is applied with topology information on zcu102-revA.
ZynqMP> i2c bus
Bus 0: i2c@ff020000
   20: gpio@20, offset len 1, flags 0
   21: gpio@21, offset len 1, flags 0
   75: i2c-mux@75, offset len 1, flags 0
Bus 2: i2c@ff020000->i2c-mux@75->i2c@0
Bus 3: i2c@ff020000->i2c-mux@75->i2c@1
Bus 4: i2c@ff020000->i2c-mux@75->i2c@2
Bus 1: i2c@ff030000  (active 1)
   74: i2c-mux@74, offset len 1, flags 0
   75: i2c-mux@75, offset len 1, flags 0
Bus 5: i2c@ff030000->i2c-mux@74->i2c@0  (active 5)
   54: eeprom@54, offset len 1, flags 0
Bus 6: i2c@ff030000->i2c-mux@74->i2c@1
Bus 7: i2c@ff030000->i2c-mux@74->i2c@2
Bus 8: i2c@ff030000->i2c-mux@74->i2c@3
Bus 9: i2c@ff030000->i2c-mux@74->i2c@4
Bus 10: i2c@ff030000->i2c-mux@75->i2c@0
Bus 11: i2c@ff030000->i2c-mux@75->i2c@1
Bus 12: i2c@ff030000->i2c-mux@75->i2c@2
Bus 13: i2c@ff030000->i2c-mux@75->i2c@3
Bus 14: i2c@ff030000->i2c-mux@75->i2c@4
Bus 15: i2c@ff030000->i2c-mux@75->i2c@5
Bus 16: i2c@ff030000->i2c-mux@75->i2c@6
Bus 17: i2c@ff030000->i2c-mux@75->i2c@7

Behavior before the patch is applied.
ZynqMP> i2c bus
Bus 0: i2c@ff020000
   20: gpio@20, offset len 1, flags 0
   21: gpio@21, offset len 1, flags 0
   75: i2c-mux@75, offset len 1, flags 0
Bus 2: i2c@0
Bus 3: i2c@1
Bus 4: i2c@2
Bus 1: i2c@ff030000  (active 1)
   74: i2c-mux@74, offset len 1, flags 0
   75: i2c-mux@75, offset len 1, flags 0
Bus 5: i2c@0  (active 5)
   54: eeprom@54, offset len 1, flags 0
Bus 6: i2c@1
Bus 7: i2c@2
Bus 8: i2c@3
Bus 9: i2c@4
Bus 10: i2c@0
Bus 11: i2c@1
Bus 12: i2c@2
Bus 13: i2c@3
Bus 14: i2c@4
Bus 15: i2c@5
Bus 16: i2c@6
Bus 17: i2c@7

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>