Commit Graph

57117 Commits

Author SHA1 Message Date
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
T Karthik Reddy
8fa84d44db 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>
2019-03-16 11:09:53 +01:00
T Karthik Reddy
bd7859cacf 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>
2019-03-16 11:09:53 +01:00
T Karthik Reddy
e50395850f 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>
2019-03-16 11:09:52 +01:00
Siva Durga Prasad Paladugu
4b04f47297 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>
2019-03-15 17:43:22 +01:00
Siva Durga Prasad Paladugu
6bc04dc1d6 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>
2019-03-15 14:53:20 +01:00
Siva Durga Prasad Paladugu
1d44a0b44b 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>
2019-03-15 14:53:20 +01:00
T Karthik Reddy
e3c00d0191 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>
2019-03-13 15:57:58 +01:00
T Karthik Reddy
506e730462 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>
2019-03-13 15:19:22 +01:00
T Karthik Reddy
f5fbd45ddb 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>
2019-03-13 15:19:22 +01:00
T Karthik Reddy
9eb4a87785 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>
2019-03-13 15:19:21 +01:00
T Karthik Reddy
ebf24fb076 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>
2019-03-13 15:19:21 +01:00
T Karthik Reddy
3a460ecd96 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>
2019-03-13 15:19:21 +01:00
T Karthik Reddy
a464203cca 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>
2019-03-13 15:19:21 +01:00
T Karthik Reddy
a3d1bdb137 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>
2019-03-13 15:19:21 +01:00
T Karthik Reddy
8658eadb39 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>
2019-03-13 15:19:21 +01:00
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