Commit Graph

50105 Commits

Author SHA1 Message Date
Siva Durga Prasad Paladugu
d8fc4b3b70 fs: Fix issue with finding files in FAT32 partition
This patch reverts the below commits which were actually revert
to upstream patches. The earlier reverts were peformed for fixing
the FAT16 issue in u-boot. But, with those previous reverts,
the actual and most used FAT32 was broken. The issue is that
u-boot is not able to find all files present in partition, it can
only be able to find few files in partition.
So, this patch workarounds this by reverting the below
commits.

Revert "fat/fs: convert to directory iterators"
(sha1: 9681876a0d)
Revert "fat/fs: move ls to generic implementation"
(sha1: 57bade5451)
Revert "fs/fat: fix case for FAT shortnames"
(sha1: f975d9c5c1)

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-11-19 12:52:30 +01:00
Paul Kocialkowski
8ff2ccd342 tools: Include U-Boot libfdt headers from their actual path
There are no headers for libfdt in lib/libfdt, as they are instead
located in scripts/dtc/libfdt. Specifying lib/libfdt for headers
inclusion in host tools results in using the system libfdt headers,
which is not what we want. Change this to the proper path.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-10-30 18:16:23 +01:00
Siva Durga Prasad Paladugu
f3fa65b663 arm64: zynqmp: Enable net configs for zc1275
This patch enable net configs for zc1275 board.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-10-12 15:34:05 +02:00
Siva Durga Prasad Paladugu
656cc51a97 arm64: zynqmp: Add ethernet node for zc1275 revB
This patch add ethernet node gem1 to zc1275 RevB.
GMII to RGMII converter sits between MAC and external
phy connected over GMII to MAC and RGMMI to external phy.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-10-12 15:34:05 +02:00
Siva Durga Prasad Paladugu
5eace0d907 net: phy: Add gmiitorgmii converter support
This patch adds support for gmiitorgmii converter.
This converter sits between the MAC and the external phy
MAC <==> GMII2RGMII <==> RGMII_PHY.
The ethernet driver probes this bridge and this bridge driver
probes real phy driver and invokes the real phy functionalities
as requested. This bridge just needs to be configured based on
real phy negotiated speed and duplex.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-10-12 15:34:05 +02:00
Siva Durga Prasad Paladugu
002b9dd69f net: phy: Move fixed link code to separate routine
This patch moves fixed-link functionality code to a separate
routine inorder to make it more modular and cleaner.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-10-12 15:34:05 +02:00
Michal Simek
c5aa7e5a97 cmd: kgdb: Enable kgdb only for PPC
Only PPC supports this option that's why there should be proper
dependency setup via Kconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-10-09 09:12:44 +02:00
Siva Durga Prasad Paladugu
71c34f69f3 arm64: zynqmp: Define CONFIG_MP through Kconfig
This patch removes CONFIG_MP definition from .h and
enables it through Kconfig as it was already moved to
Kconfig.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-10-08 08:45:49 +02:00
Siva Durga Prasad Paladugu
8fa6e8f4ac arm64: zynqmp: Add new command for TCM initialization
This patch adds new zynqmp command "zynqmp tcminit mode" to
initialize TCM. TCM needs to be initialized before accessing
to avoid ECC errors. This new command helps to perform
the same. It also makes tcm_init() as global and uses it for
doing the TCM initialization.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-10-05 14:41:13 +02:00
Siva Durga Prasad Paladugu
e9ceae3b6c arm64: zynqmp: Move TCM initialization to a separate routine
This patch moves TCM initialization to a separate routine to
make it modular and can be reused if required. It also prints
warning message now as it writes to TCM.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-10-05 14:41:13 +02:00
Siva Durga Prasad Paladugu
63efa8c24f net: zynq_gem: Add check for 64-bit dma support by hardware
This patch throws an error if 64-bit support is expected
but DMA hardware is not capable of 64-bit support. It also
prints a debug message if DMA is capable of 64-bit but not
using it.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-10-04 16:11:24 +02:00
Bin Meng
20306431d0 microblaze: bootm: Fix compiler warning
Fix build warning in arch/microblaze/lib/bootm.c with gcc 7.3.0:

  warning: this 'if' clause does not guard... [-Wmisleading-indentation]

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
2018-09-17 13:44:49 +02:00
Vipul Kumar
33c1d3a681 mmc: Moving macros to the common header file
This patch moves the following macros to the mmc.h
	define SD_HS_BUS_SPEED
	define MMC_DDR52_BUS_SPEED
	define MMC_HS_BUS_SPEED
	define MMC_MAX_BUS_SPEED

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-09-17 09:15:51 +02:00
Vipul Kumar
fff924bb1c mmc: sdhci: zynq: Added support to read Tap Delay values from DT
This patch added support to read ITAP and OTAP delay values from
he device tree. If the DT does not contain tap delay values, the
predefined values will be used for the same.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-09-17 09:15:47 +02:00
Siva Durga Prasad Paladugu
866d7ef232 arm: zynq: cse_qspi: Fix overwriting spi-rx-bus-width property
spi-rx-bus-width property is part of flash, so it should be moved
to flash node from qspi node. This patch fixes the incorrect read
of spi-rx-bus-width property by moving it to flash node.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-09-11 15:14:13 +02:00
Vipul Kumar
72a423f868 cmd: zynqrsa: Added support to authenticate image partition header
This patch added support to get image header info and authenticate
the header.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-09-11 15:14:13 +02:00
Siva Durga Prasad Paladugu
3505dab8ea arm64: zynqmp: Add support for encryption and decryption on data blob
This patch adds support for encryption and decryption on a given data
blob using different key sources such as userkey(KUP), device key and
PUF key. Inorder to support this a new zynqmp command(zynqmp aes) has
been introduced.

Command:
zynqmp aes srcaddr ivaddr len aesop keysrc dstaddr [keyaddr]\n"
	Encrypts or decrypts blob of data at src address and puts it\n"
	back to dstaddr using key and iv at keyaddr and ivaddr\n"
	respectively. keysrc values specifies from which source key\n"
	has to be used, it can be User/Device/PUF key. A value of 0\n"
	for KUP(user key),1 for DeviceKey and 2 for PUF key. The\n"
	aesop value would specify the operationwhich can be 0 for\n"
	decrypt and 1 for encrypt(1) operation\n";

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-09-07 13:38:07 +02:00
Masahiro Yamada
c8b3f9950a dm: add dev_read_u32()
dev_read_u32_default() always returns something even when the property
is missing.  So, it is impossible to do nothing in the case.  One
solution is to use ofnode_read_u32() instead, but adding dev_read_u32()
will be helpful.

BTW, Linux has an equvalent function, device_property_read_u32();
it is clearer that it reads a property.  I cannot understand the
behavior of dev_read_u32() from its name.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-09-07 13:16:40 +02:00
Michal Simek
a69df9c9b7 arm64: zynqmp: Remove ums command for ultra96
There is no USB_FUNCTION_MASS_STORAGE enabled that's why there is
compilation failure for this platform.
Better to remove this feature which is enabled in mainline
(ultra96 was cherry-picked from mainline).

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-09-07 10:19:36 +02:00
Siva Durga Prasad Paladugu
ffccb42313 zynqmp: mini_qspi: Fix overwriting spi-rx-bus-width property
spi-rx-bus-width property is part of flash, so it should be moved
to flash node from qspi node. This patch fixes the incorrect read
of spi-rx-bus-width property by moving it to flash node.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-09-05 14:08:08 +02:00
Vipul Kumar
9681876a0d Revert "fat/fs: convert to directory iterators"
This reverts commit 8eafae209c.

And drop a whole lot of ugly code!

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-09-05 14:08:08 +02:00
Vipul Kumar
57bade5451 Revert "fat/fs: move ls to generic implementation"
This reverts commit 89191d6267.

Add a generic implementation of 'ls' using opendir/readdir/closedir, and
replace fat's custom implementation.  Other filesystems should move to
the generic implementation after they add opendir/readdir/closedir
support.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-09-05 14:08:08 +02:00
Vipul Kumar
f975d9c5c1 Revert "fs/fat: fix case for FAT shortnames"
This reverts commit 21a24c3bf3.

Noticed when comparing our output to linux.  There are some lcase bits
which control whether filename and/or extension should be downcase'd.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-09-05 14:08:07 +02:00
Siva Durga Prasad Paladugu
714418bebb fpga: zynqmp: Modify PL bitstream loading sequence
This patch modifies PL bitstream loading sequence as per
latest Xilfpga which supports all variants of bitstream images
generated from vivado and from bootgen. With this new change in
Xilfpga, uboot doesn't need to validate and swap bitstream as it will
be taken care inside Xilfpga. ZynqMP PL driver now checks for supporting
PMUFW version before skipping the validation and swap sequence as there
can be old PMUFW which doesn't supports this feature. In this case, driver
uses old way of PL bitstream loading sequence.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-24 14:20:31 +02:00
Siva Durga Prasad Paladugu
09d5bfc6c7 arm64: zynqmp: Return pmufw version for zynqmp_pmufw_version()
Modify the zynqmp_pmufw_version() routine to return PMUFW version so
that it can be reused wherever required. Get PMUFW version from PMU
only once at bootup and later just return stored value.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-24 14:20:31 +02:00
Siva Durga Prasad Paladugu
cba1f42854 arm64: zynqmp: Move PM version related macros to .h
This patch moves the PM version related macros to .h file so that
they can be reused in other files.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-24 14:20:30 +02:00
Michal Simek
bd611c502e arm64: zynqmp: Enable reset-on-timeout on zcu100
Reset the system when watchdog expires.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-24 14:20:30 +02:00
Michal Simek
fcef4906cb arm64: xilinx: Setup default number of chipselects for zcu100
There is only one chipselect on each connector.
Define it directly in board dts file.
There should be an option to use more chipselects via gpios.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-22 14:20:21 +02:00
Michal Simek
ecf2932208 arm: zynq: Drop #address-cells and #size-cells from gpio-keys
dtc is showing some warnings and this change was also done in
the Linux kernel as "Input: gpio-keys - clean up device tree binding
example"
with this fragment in commit message
"Drop #address-cells and #size-cells, which are not required by the
gpio-keys binding documentation, as button sub-nodes are not devices."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-22 14:20:21 +02:00
Michal Simek
04335c2d35 arm64: zynqmp: Wire spi-flash compatible string with flashes
Enable reading tx and rx buswidth from DT via spi-uclass.
To get these from uclass spi-flash compatible string has to be added
to flash node.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-22 14:20:20 +02:00
Michal Simek
856a938b3c arm64: zynqmp: Get 200MHz clock early for MMC
SPL MMC boot requires to have clock early.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-22 14:20:20 +02:00
Mubin Sayyed
07b7d04afd arm64: zynqmp: Enable smmu again
Now that, PM support has been added to the SMMU
driver, enable it back by default.

Following issues were observed with SMMU earlier,
 - After suspend/resume with FPD off,all peripherals
   registered with SMMU are failed to work.This issue
   has been resoved now.
 - SATA device detection is failed. This issue still
   persist.

This reverts commit 223c3aa24a63bb837169d7253fac666965383934.

Signed-off-by: Mubin Sayyed <mubin.usman.sayyed@xilinx.com
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-22 12:42:16 +02:00
Mubin Sayyed
064dc1dae3 arm64: zynqmp: Disable SMMU for SATA
Presently SATA device detection is failing when SMMU is enabled.
Disabling SMMU for SATA, till said issue is fixed from CEVA SATA
driver.

Signed-off-by: Mubin Sayyed <mubin.usman.sayyed@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-22 12:42:16 +02:00
Michal Simek
f74d2da118 arm64: zynqmp: Setup clock-output-names for si570 chips
If there are more instances of si570 clock-output-names property
should be used for differentiation of clock output.
The patch is adding this optional properties for all zynqmp boards with
si570 chip.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-22 12:42:16 +02:00
Michal Simek
10131122cd arm64: zynqmp: Disable ltc2952 poweroff chip
This chip is on the board but handling should be done via firmware not
via Linux driver. Changing status property to keep it in the tree to
describe it instead of removing this node completely.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-22 12:42:16 +02:00
Appana Durga Kedareswara rao
88fa8952cd arm64: zynqmp: Add support for pcap clock
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-22 12:42:16 +02:00
Michal Simek
6475f1405b arm64: zynqmp: List lpd watchdog in dtsi
There are use cases where lpd watchdog can be configured for APU use. By
design this IP should be listed in zynqmp.dtsi to make sure that node is
properly enabled by DTG.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-22 12:42:15 +02:00
Vipul Kumar
943d11089c zynq: dts: Added alias for usb node
This patch added alias for usb node in dts file.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-09 09:43:45 +02:00
Tom Rini
8e317e6492 zynqmp: Add avnet_ultra96_rev1_defconfig to the lits of boards
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-08-09 08:04:38 +02:00
Michal Simek
f844806e4e arm64: zynqmp: Add support for Avnet Ultra96
Avnet Ultra96 is rebranded Xilinx zcu100 revC/D. Add new defconfig files
and point to origin internal board name.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-09 08:04:38 +02:00
Vipul Kumar
6d73435ca4 mtd: spi-nor: Added support for low-density ISSI serial NOR flash
This patch added support for the following ISSI flash parts:
	-is25lp008d (8M/3.3V), is25wp008d (8M/1.8V)
	-is25lp016d (16M/3.3V), is25wp016d (16M/1.8V)
	-is25lp032d (32M/3.3V), is25wp032d (32M/1.8V)
	-is25wp064d (64M/1.8V)

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-07-24 14:24:58 +02:00
Vipul Kumar
e29d3a5a5b spi: xilinx_spi: Added support to read JEDEC-id twice at the boot time
This patch is for the startup block issue in the spi controller.
SPI clock is passing through STARTUP block to FLASH. STARTUP block
don't provide clock as soon as QSPI provides command. So, first
command fails.

This patch added support to read JEDEC id in xilinx_spi_xfer ().

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-07-24 12:21:52 +02:00
Michal Simek
fb85ea1897 watchdog: cadence: Do not stop wdt in probe
Watchdog can be started before probe and u-boot should just take control
over it. That's why do not stop watchdog in probe to cover cases where
watchdog can expire before probe and start.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-07-24 11:36:01 +02:00
Michal Simek
876206949a watchdog: cdns: Add comment for expire_now function
IP itself has no reg/no bit which can be used for this functionality.
Add this note to the driver to make sure that none will be asking for
that. Current method is to setup 1s timeout and hang() which is done via
wdt_expire_now().

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-07-24 11:36:01 +02:00
Michal Simek
5976eb70ce arm: zynq: Try to enable the first watchdog via aliases
The same change as was done for zynqmp with this description:

Add support for enabling the first watchdog pointed via aliases.

DT fragment:
	aliases {
		...
		watchdog0= &watchdog0;
		watchdog1 = &watchdog_lpd;
		...
	};

<zynqmp example removed>

Till this patch the first watchdog found in DT was used and started
which is not enabling all possible configuration based on user request.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-07-24 11:36:01 +02:00
Michal Simek
ad0c5a5eb6 arm64: zynqmp: Try to enable the first watchdog via aliases
Add support for enabling the first watchdog pointed via aliases.

DT fragment:
	aliases {
		...
		watchdog0 = &watchdog0;
		watchdog1 = &watchdog_lpd;
		...
	};

dm tree fragment for above configuration with patch applied:
ZynqMP> dm tree
 Class    index  Probed  Driver      Name
-----------------------------------------
...
 watchdog    0  [   ]   cdns_wdt    |   |-- watchdog@ff150000
 watchdog    1  [ + ]   cdns_wdt    |   `-- watchdog@fd4d0000
...

dm uclass fragment:
ZynqMP> dm uclass
...
uclass 75: watchdog
0   watchdog@ff150000 @ 7df02f40, seq -1, (req 1)
1 * watchdog@fd4d0000 @ 7df02ff0, seq 0, (req 0)
...

It is visible that index 1 is IP with seq 0 which means that FPD
watchdog (@fd4d0000) is in DT below LPD watchdog (@ff150000).

Till this patch the first watchdog found in DT was used and started
which is not enabling all possible configuration based on user request.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-07-24 11:36:01 +02:00
Michal Simek
8805055554 microblaze: Do not call timer init that early
Timer needs to be converted to DM but as of now it can't be called so
early because intc controller is not ready. Call it later in board_r.c.
Before this patch timer_init is called twice which is wrong.
The patch is blocking initialization before relocation.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-24 11:36:01 +02:00
Michal Simek
78dc54cf17 gpio: zynq: Fix typo in one error message
Just fix error message.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-07-24 11:36:00 +02:00
Michal Simek
e2e336b6d8 watchdog: dm: Change uclass name to watchdog and enable DM_UC_FLAG_SEQ_ALIAS
uclass name is used by dev_read_alias_seq which return seq number when
aliases are used.

Code fragment:
168 int dev_read_alias_seq(struct udevice *dev, int *devnump)
169 {
170         ofnode node = dev_ofnode(dev);
171         const char *uc_name = dev->uclass->uc_drv->name;
172         int ret;
173
174         if (ofnode_is_np(node)) {
175                 ret = of_alias_get_id(ofnode_to_np(node), uc_name);

Also this patch enables DM_UC_FLAG_SEQ_ALIAS to be in sync with Linux
which is also using watchdog name for watchdog aliases.

drivers/watchdog/watchdog_core.c:215:
 ret = of_alias_get_id(wdd->parent->of_node, "watchdog");

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-24 11:36:00 +02:00
Vipul Kumar
cf4ffc1bfa arm64: zynqmp: Added support of mmio read and write commands
This patch added support of mmio read and write commands. These commands
can be used to read and write registers from the u-boot command line.
It can be useful in debugging.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-07-16 16:00:38 +02:00