oweals/u-boot.git
4 years agoMerge branch '2019-10-24-UFS-support'
Tom Rini [Thu, 24 Oct 2019 13:51:48 +0000 (09:51 -0400)]
Merge branch '2019-10-24-UFS-support'

- Add Universal Flash Storage (UFS) support

4 years agoehci-mx6: Update EHCI driver to support OTG0 on i.MX7ULP
Ye Li [Thu, 24 Oct 2019 13:29:32 +0000 (10:29 -0300)]
ehci-mx6: Update EHCI driver to support OTG0 on i.MX7ULP

The ULP has two USB controllers. These two controllers have similar NC
registers layout as i.MX7D. But OTG0 uses UTMI PHY simliar as i.MX6, not
the integrated PHY on i.MX7D. The OTG1 needs off-chip HSIC PHY or ULPI PHY
to work.

This patch only supports OTG0 with UTMI PHY.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
4 years agousb: ehci-mx6: Fix bus enumeration for iMX7 SoCs
Igor Opaniuk [Thu, 10 Oct 2019 13:09:35 +0000 (16:09 +0300)]
usb: ehci-mx6: Fix bus enumeration for iMX7 SoCs

This fixes the issues with calculation of controller indexes in
ehci_usb_bind() for iMX7, as USB controllers on iMX7 SoCs aren't
placed next to each other, and their addresses incremented by 0x10000.

Example of USB nodes for iMX7S/D:

usbotg1: usb@30b10000 {
    compatible = "fsl,imx7d-usb", "fsl,imx27-usb";
    reg = <0x30b10000 0x200>;
           ^^^^^^^^^^
....
usbotg2: usb@30b20000 {
    compatible = "fsl,imx7d-usb", "fsl,imx27-usb";
    reg = <0x30b20000 0x200>;
           ^^^^^^^^^^
....

usbh: usb@30b30000 {
    compatible = "fsl,imx7d-usb", "fsl,imx27-usb";
    reg = <0x30b30000 0x200>;
           ^^^^^^^^^^
....

Which was leading to usb enumeration issues:
Colibri iMX7 # usb start
starting USB...
Bus usb@30b10000: USB EHCI 1.00
Bus usb@30b20000: probe failed, error -22
scanning bus usb@30b10000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Fixes: 501547cec1("usb: ehci-mx6: Fix bus enumeration for DM case")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agomicroblaze: Fix tab indentation in start.S
Michal Simek [Mon, 21 Oct 2019 10:20:16 +0000 (12:20 +0200)]
microblaze: Fix tab indentation in start.S

Use tab instead of spaces.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agocommon: command: Fix manual relocation for repeatable command
Michal Simek [Mon, 21 Oct 2019 10:54:20 +0000 (12:54 +0200)]
common: command: Fix manual relocation for repeatable command

All platforms which are using MANUAL_RELOC are jumping back to origin
location when repeatable command is called. The reason is that cmd_rep link
is not updated properly. Issue can be reproduced by rewriting origin
U-Boot location through (for example) file download by tftp command.

Fixes: 80a48dd47e3b ("common: command: Rework the 'cmd is repeatable' logic")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agomicroblaze: Unify Linux bootm process
Michal Simek [Thu, 17 Oct 2019 11:16:56 +0000 (13:16 +0200)]
microblaze: Unify Linux bootm process

Record two bootstages and add "Starting kernel" message to have standard
handoff message between U-Boot and OS.
Also use debug() instead of #ifdef DEBUG to clean the code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agomicroblaze: Fix FDT message in boot_prep_linux()
Michal Simek [Thu, 17 Oct 2019 12:12:48 +0000 (14:12 +0200)]
microblaze: Fix FDT message in boot_prep_linux()

There is no need to show FDT message in regular flow that's why switch it
to debug level.

Fixes: 0905046050b0 ("microblaze: Switch to generic bootm implementation")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add support for e-a2197-00 System Controller
Michal Simek [Tue, 15 Oct 2019 10:37:20 +0000 (12:37 +0200)]
arm64: zynqmp: Add support for e-a2197-00 System Controller

Add support for System Controller available on e-a2197-00 base board.
System is very similar to p-a2197-00 board.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Enables SPI_FLASH_BAR
Michal Simek [Tue, 15 Oct 2019 10:07:30 +0000 (12:07 +0200)]
arm64: zynqmp: Enables SPI_FLASH_BAR

Enable the SPI flash Bank/Extended address register support for all ZynqMP
boards.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoARM: zynq: Disable fdt and evn exist for cse_qspi
Michal Simek [Tue, 15 Oct 2019 11:03:50 +0000 (13:03 +0200)]
ARM: zynq: Disable fdt and evn exist for cse_qspi

Mini u-boot should be really small that's why it is necessary to disable
all unneeded configs.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoARM: zynq: Remove unused board_early_init_f()
Michal Simek [Tue, 15 Oct 2019 11:06:32 +0000 (13:06 +0200)]
ARM: zynq: Remove unused board_early_init_f()

board_early_init_f added by commit e6cc3b25d721
("arm: zynq: Wire watchdog internals") is no longer needed that's why
remove it also with Kconfig enabling.

Fixes: ccd063e9812a ("watchdog: Move watchdog_dev to data section (BSS may not be cleared)")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoARM: zynq: Dont use 4K sector size support for mini qspi configuration
Michal Simek [Tue, 15 Oct 2019 11:04:14 +0000 (13:04 +0200)]
ARM: zynq: Dont use 4K sector size support for mini qspi configuration

This patch removes 4K sector size support for Zynq mini qspi configuration
in favour of fast erase speed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Dont use 4K sector size support for mini qspi configuration
Siva Durga Prasad Paladugu [Mon, 22 Jul 2019 17:44:02 +0000 (23:14 +0530)]
arm64: zynqmp: Dont use 4K sector size support for mini qspi configuration

This patch removes 4K sector size support for ZynqMP mini qspi
configuration in favour of fast erase speed.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Enable Micrel phy support for xilinx zc1275 revB
Siva Durga Prasad Paladugu [Sat, 16 Mar 2019 12:21:26 +0000 (17:51 +0530)]
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>
4 years agoarm64: versal: Enable BDI for mini mtest configuration
Michal Simek [Mon, 27 May 2019 12:55:01 +0000 (14:55 +0200)]
arm64: versal: Enable BDI for mini mtest configuration

bdi is useful to see how memory is mapped.
Also enable 3 memory banks to be mapped.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add support for zcu216
Michal Simek [Tue, 6 Aug 2019 10:07:10 +0000 (12:07 +0200)]
arm64: zynqmp: Add support for zcu216

zcu104/6 defconfig was used as source. Standard features are enabled.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add support for m-a2197-03
Michal Simek [Fri, 28 Jun 2019 11:53:45 +0000 (13:53 +0200)]
arm64: zynqmp: Add support for m-a2197-03

It is based on m-a2197-01 with some changes in i2c intrastructure.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add support for m-a2197-02
Michal Simek [Fri, 28 Jun 2019 11:18:50 +0000 (13:18 +0200)]
arm64: zynqmp: Add support for m-a2197-02

It is based on m-a2197-01 with some changes in i2c intrastructure.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: List lpd watchdog in dtsi
Michal Simek [Wed, 18 Jul 2018 07:25:43 +0000 (09:25 +0200)]
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>
4 years agoarm64: zynqmp: Use power header in zynqmp.dtsi
Michal Simek [Mon, 14 Oct 2019 13:56:31 +0000 (15:56 +0200)]
arm64: zynqmp: Use power header in zynqmp.dtsi

Use power header and add power-domains property.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Use reset header in zynqmp.dtsi
Michal Simek [Mon, 14 Oct 2019 13:55:53 +0000 (15:55 +0200)]
arm64: zynqmp: Use reset header in zynqmp.dtsi

Wire reset-controller and use macros from reset header.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agodt-bindings: arm64: zynqmp: Add power and reset headers
Michal Simek [Tue, 19 Feb 2019 10:32:24 +0000 (11:32 +0100)]
dt-bindings: arm64: zynqmp: Add power and reset headers

Add power and reset headers to be sources by ZynqMP dtses.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Use backward compatible string for gem
Michal Simek [Tue, 27 Mar 2018 10:53:37 +0000 (12:53 +0200)]
arm64: zynqmp: Use backward compatible string for gem

Add backward compatible string for gem ("cdns,gem").

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Switch to xlnx-zynqmp-clk header
Michal Simek [Mon, 14 Oct 2019 13:42:03 +0000 (15:42 +0200)]
arm64: zynqmp: Switch to xlnx-zynqmp-clk header

Use prepared header instead of hardcoded values.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agodt-bindings: clock: zynqmp: Add clk header
Rajan Vaja [Fri, 22 Feb 2019 12:16:24 +0000 (04:16 -0800)]
dt-bindings: clock: zynqmp: Add clk header

Add dt clock header which can be included by dtses. And also use zynqmp-clk
compatible string.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Update nand device tree node properties
Naga Sureshkumar Relli [Mon, 23 Jan 2017 10:50:37 +0000 (16:20 +0530)]
arm64: zynqmp: Update nand device tree node properties

This patch updates the nand device tree node properties as per
updated driver.

Signed-off-by: Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Fix DT style for ipi mailbox
Michal Simek [Mon, 14 Oct 2019 13:52:17 +0000 (15:52 +0200)]
arm64: zynqmp: Fix DT style for ipi mailbox

Remove additional empty space.

Fixes: 95497afada58 ("arm64: zynqmp: add firmware and mailbox node to DT")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agozynqmp: configs: Add single nand flash mini u-boot configuration
T Karthik Reddy [Fri, 26 Apr 2019 10:34:44 +0000 (16:04 +0530)]
zynqmp: configs: Add single nand flash mini u-boot configuration

This patch adds configuration for single nand flash mini u-boot.

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>
4 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>
4 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>
4 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>
4 years agoARM: dt: Also clean dtbo files
Michal Simek [Mon, 26 Aug 2019 10:25:30 +0000 (12:25 +0200)]
ARM: dt: Also clean dtbo files

dtbo files can be also generated that's why also clean them.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Do not remove dpll_prog from psu_init
Michal Simek [Thu, 6 Jun 2019 11:39:53 +0000 (13:39 +0200)]
arm64: zynqmp: Do not remove dpll_prog from psu_init

dpll_prog is available in some psu_init files that's why this function
should stay there.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: versal: Fix sdhci node address for versal-mini-emmc1
Michal Simek [Tue, 1 Oct 2019 13:52:35 +0000 (15:52 +0200)]
arm64: versal: Fix sdhci node address for versal-mini-emmc1

Add missing trailing 0 to mach node name address with reg property.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agospi: zynqmp: Remove unused platform headers
Michal Simek [Mon, 14 Oct 2019 10:55:47 +0000 (12:55 +0200)]
spi: zynqmp: Remove unused platform headers

There is no reason to include clk.h and hardware.h headers.
Driver doesn't require them.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: versal: Enable UHS support
Siva Durga Prasad Paladugu [Wed, 7 Aug 2019 07:33:18 +0000 (13:03 +0530)]
arm64: versal: Enable UHS support

This patch enables UHS support for Versal platforms.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: versal: Enable bit stream loading support for versal platform.
Siva Durga Prasad Paladugu [Mon, 5 Aug 2019 10:25:00 +0000 (15:55 +0530)]
arm64: versal: Enable bit stream loading support for versal platform.

This patch enables bitstream loading support for Versal platform.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: versal: Update boot delay to perform autoboot
Siva Durga Prasad Paladugu [Sat, 27 Apr 2019 05:47:04 +0000 (11:17 +0530)]
arm64: versal: Update boot delay to perform autoboot

Update boot delay to 5 for performing autoboot.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: versal: Increase SYS_MALLOC_F_LEN
Siva Durga Prasad Paladugu [Tue, 2 Jul 2019 11:14:17 +0000 (16:44 +0530)]
arm64: versal: Increase SYS_MALLOC_F_LEN

This patch increases SYS_MALLOC_F_LEN as the versal clock
driver needs to be probed before relocation itself inorder
to get required clocks before relocation.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: versal: Enable CLK command
Siva Durga Prasad Paladugu [Sun, 23 Jun 2019 06:54:59 +0000 (12:24 +0530)]
arm64: versal: Enable CLK command

Enables clock command for dumping clocks.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: versal: Enable USB driver support
Michal Simek [Mon, 14 Oct 2019 11:01:14 +0000 (13:01 +0200)]
arm64: versal: Enable USB driver support

This patch adds usb host and device mode support for Xilinx
Versal virtual platform. By default USB host functionality
is enabled. To use in usb device mode, set dr_mode property
in DT to peripheral.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: versal: Enable LIBFDT_OVERLAY
Michal Simek [Mon, 7 Oct 2019 08:33:23 +0000 (10:33 +0200)]
arm64: versal: Enable LIBFDT_OVERLAY

Enable device tree overlay to build all dtbs for Versal with -@ flag to
enable applying overlays.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Enable iio-hwmon for ina226 on zcu100
Michal Simek [Mon, 26 Aug 2019 07:30:34 +0000 (09:30 +0200)]
arm64: zynqmp: Enable iio-hwmon for ina226 on zcu100

ina226 hwmon driver is deprecated and it is recommended to use new iio
based driver. The patch is enabling iio-hwmon driver to export
functionality from IIO to hwmon interface to be able to use lm-sensors
package.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Turn comment to gpio-line-names
Michal Simek [Tue, 12 Mar 2019 09:15:27 +0000 (10:15 +0100)]
arm64: zynqmp: Turn comment to gpio-line-names

Label gpio lines properly.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add label property to all ina226 on zcu102
Michal Simek [Mon, 26 Aug 2019 08:20:07 +0000 (10:20 +0200)]
arm64: zynqmp: Add label property to all ina226 on zcu102

Label property is adding capability to distiguish chips from each other
when iio framework is used.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Enable iio-hwmon for ina226 on zcu102
Michal Simek [Fri, 16 Aug 2019 08:42:42 +0000 (10:42 +0200)]
arm64: zynqmp: Enable iio-hwmon for ina226 on zcu102

ina226 hwmon driver is deprecated and it is recommended to use new iio
based driver. The patch is enabling iio-hwmon driver to export
functionality from IIO to hwmon interface to be able to use lm-sensors
package.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: dt: Add optional gpio phy reset properties
Harini Katakam [Wed, 13 Mar 2019 14:11:19 +0000 (19:41 +0530)]
arm64: zynqmp: dt: Add optional gpio phy reset properties

Add gpio phy reset via I2C expander TCA6416 on board ZCU102.
A warning call trace is observer in probe when this reset is called
from context that can sleep. Keep this commented until that is
resolved in phylib.

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: dt: Add missing DP83867 quirk
Harini Katakam [Wed, 13 Feb 2019 11:32:21 +0000 (17:02 +0530)]
arm64: zynqmp: dt: Add missing DP83867 quirk

The DP83867 strap control workaround is already present in Linux kernel
mainline binding. All these Xilinx boards require this quirk.

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Enable fpd_dma for zcu104 platforms
Michal Simek [Thu, 7 Mar 2019 07:15:52 +0000 (08:15 +0100)]
arm64: zynqmp: Enable fpd_dma for zcu104 platforms

Enable fpd_dma for these boards.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Enable iio-hwmon for ina226 on zcu104
Michal Simek [Mon, 26 Aug 2019 07:40:23 +0000 (09:40 +0200)]
arm64: zynqmp: Enable iio-hwmon for ina226 on zcu104

ina226 hwmon driver is deprecated and it is recommended to use new iio
based driver. The patch is enabling iio-hwmon driver to export
functionality from IIO to hwmon interface to be able to use lm-sensors
package.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add label property to all ina226 on zcu106
Michal Simek [Mon, 26 Aug 2019 08:18:13 +0000 (10:18 +0200)]
arm64: zynqmp: Add label property to all ina226 on zcu106

Label property is adding capability to distiguish chips from each other
when iio framework is used.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Enable iio-hwmon for ina226 on zcu106
Michal Simek [Mon, 26 Aug 2019 07:46:36 +0000 (09:46 +0200)]
arm64: zynqmp: Enable iio-hwmon for ina226 on zcu106

ina226 hwmon driver is deprecated and it is recommended to use new iio
based driver. The patch is enabling iio-hwmon driver to export
functionality from IIO to hwmon interface to be able to use lm-sensors
package.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Fix the si570 clock frequency on zcu111
Venkatesh Yadav Abbarapu [Thu, 5 Sep 2019 03:00:38 +0000 (08:30 +0530)]
arm64: zynqmp: Fix the si570 clock frequency on zcu111

The si570 clock frequency should be 156.25MHz as per datasheet.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add label property to all ina226 on zcu111
Michal Simek [Mon, 26 Aug 2019 08:00:26 +0000 (10:00 +0200)]
arm64: zynqmp: Add label property to all ina226 on zcu111

Label property is adding capability to distiguish chips from each other
when iio framework is used.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Enable iio-hwmon for ina226 on zcu111
Michal Simek [Mon, 26 Aug 2019 07:45:03 +0000 (09:45 +0200)]
arm64: zynqmp: Enable iio-hwmon for ina226 on zcu111

ina226 hwmon driver is deprecated and it is recommended to use new iio
based driver. The patch is enabling iio-hwmon driver to export
functionality from IIO to hwmon interface to be able to use lm-sensors
package.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: dt: Delete no-1-8-v property from zcu102-rev1.0
T Karthik Reddy [Wed, 28 Aug 2019 09:30:57 +0000 (03:30 -0600)]
arm64: zynqmp: dt: Delete no-1-8-v property from zcu102-rev1.0

Currently zcu102 Rev1.0 board includes RevA sdhci dt node which has
no-1-8-v property. Since Rev1.0 has level shifters delete this
property to enable support for 1.8v.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Remove fixme about memory size on zynqmp-p-a2197
Michal Simek [Mon, 14 Oct 2019 08:35:03 +0000 (10:35 +0200)]
arm64: zynqmp: Remove fixme about memory size on zynqmp-p-a2197

System controller has 2GB of memory and fixme can be removed now.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Sync si570 setup and clock names
Michal Simek [Tue, 25 Jun 2019 06:55:52 +0000 (08:55 +0200)]
arm64: zynqmp: Sync si570 setup and clock names

Setup proper si570 names and default factory setup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Fix m-a2197-01 DT based on latest schematics
Michal Simek [Fri, 28 Jun 2019 11:52:09 +0000 (13:52 +0200)]
arm64: zynqmp: Fix m-a2197-01 DT based on latest schematics

Remove some FIXMEs and align it with latest schematics.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Switch spi-flash to jedec,spi-nor on m-a2197
Michal Simek [Wed, 7 Aug 2019 07:58:29 +0000 (09:58 +0200)]
arm64: zynqmp: Switch spi-flash to jedec,spi-nor on m-a2197

Mainline has done this switch and there is no reason not to switch it too.

Mainline U-Boot patch which has done that switch:
"dts: switch spi-flash to jedec, spi-nor compatible"
(sha1: ffd4c7c2ecb745586239eb98d5dc0fe5e6ebe3bd)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add label property to all ina226 on m-a2197-01
Michal Simek [Mon, 26 Aug 2019 09:10:48 +0000 (11:10 +0200)]
arm64: zynqmp: Add label property to all ina226 on m-a2197-01

Label property is adding capability to distiguish chips from each other
when iio framework is used.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Enable iio-hwmon for ina226 on m-a2197-01
Michal Simek [Mon, 26 Aug 2019 09:09:54 +0000 (11:09 +0200)]
arm64: zynqmp: Enable iio-hwmon for ina226 on m-a2197-01

ina226 hwmon driver is deprecated and it is recommended to use new iio
based driver. The patch is enabling iio-hwmon driver to export
functionality from IIO to hwmon interface to be able to use lm-sensors
package.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Fix typo in zynqmp-p-a2197-00-revA
Michal Simek [Mon, 14 Oct 2019 08:27:42 +0000 (10:27 +0200)]
arm64: zynqmp: Fix typo in zynqmp-p-a2197-00-revA

Trivial fix but not detected by checkpatch.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Added new tps53679 compatible string for a2197-0x boards
Nishant Mittal [Wed, 24 Jul 2019 09:28:52 +0000 (14:58 +0530)]
arm64: zynqmp: Added new tps53679 compatible string for a2197-0x boards

Added tps53679 compatible string to tps53681. They are both compatible to
each other and tps53679 has Linux driver already.

Signed-off-by: Nishant Mittal <nishant.mittal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Fix i2c address of u70 on p-a2197-00 board
Nishant Mittal [Wed, 24 Jul 2019 09:28:52 +0000 (14:58 +0530)]
arm64: zynqmp: Fix i2c address of u70 on p-a2197-00 board

tps53681 is i2c address 0x60 not 0xc0.

Signed-off-by: Nishant Mittal <nishant.mittal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Add label property to all ina226 on g-a2197-00
Michal Simek [Mon, 26 Aug 2019 09:10:36 +0000 (11:10 +0200)]
arm64: zynqmp: Add label property to all ina226 on g-a2197-00

Label property is adding capability to distiguish chips from each other
when iio framework is used.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Enable iio-hwmon for ina226 on g-a2197-00
Michal Simek [Mon, 26 Aug 2019 09:09:42 +0000 (11:09 +0200)]
arm64: zynqmp: Enable iio-hwmon for ina226 on g-a2197-00

ina226 hwmon driver is deprecated and it is recommended to use new iio
based driver. The patch is enabling iio-hwmon driver to export
functionality from IIO to hwmon interface to be able to use lm-sensors
package.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Use ethernet-phy as node name for ethernet phys
Michal Simek [Thu, 8 Aug 2019 10:44:22 +0000 (12:44 +0200)]
arm64: zynqmp: Use ethernet-phy as node name for ethernet phys

Ethernet phys based on devicetree specification should be using
ethernet-phy@ node name instead of pure phy@.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Sync names for SC with Versal
Michal Simek [Fri, 28 Jun 2019 11:16:10 +0000 (13:16 +0200)]
arm64: zynqmp: Sync names for SC with Versal

ZynqMP based System controller is present on Versal boards. This patch is
aligning names with Versal to follow the spec.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoARM: zynq: Add missing pl353-smc node
Michal Simek [Mon, 14 Oct 2019 08:14:07 +0000 (10:14 +0200)]
ARM: zynq: Add missing pl353-smc node

DT binding was reviewed in Linux by commit b0b41af12a1b
("dt-bindings: memory: Add pl353 smc controller devicetree binding
information") that's why this fragment can be also added to U-Boot
repository.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoARM: zynq: Move BOOTM_NETBSD to Kconfig
Michal Simek [Mon, 14 Oct 2019 07:38:39 +0000 (09:38 +0200)]
ARM: zynq: Move BOOTM_NETBSD to Kconfig

The commit 4b0bcfa7c4ec ("Kconfig: Migrate CONFIG_BOOTM_* options")
moved BOOTM_ options to Kconfig that's why align zynq defconfig with it.

Disabling NETBSD was done by commit d6f48ea5ce18
("ARM: zynq: Do not enable NETBSD support by default").

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: versal: Enable GPIO command for Versal
Michal Simek [Mon, 14 Oct 2019 07:46:47 +0000 (09:46 +0200)]
arm64: versal: Enable GPIO command for Versal

Enable GPIO command for Xilinx Versal platform. Driver is updated that's
why it can be used directly. Driver is enabled by default through Kconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agogpio: zynq: Add gpio driver support for PMC gpio
Shubhrajyoti Datta [Wed, 18 Sep 2019 06:40:31 +0000 (12:10 +0530)]
gpio: zynq: Add gpio driver support for PMC gpio

This patch adds support for gpio driver for pmc gpio.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agogpio: zynq: Add gpio driver support for Versal
Ashok Reddy Soma [Mon, 16 Sep 2019 09:35:16 +0000 (03:35 -0600)]
gpio: zynq: Add gpio driver support for Versal

This patch adds support for gpio driver for versal platform

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agofirmware: zynqmp: Clean up zynqmp_power_probe
Michal Simek [Thu, 10 Oct 2019 09:26:16 +0000 (11:26 +0200)]
firmware: zynqmp: Clean up zynqmp_power_probe

Fix error debug messages to be more accurate and aligned with debug message
style in the whole file.
And do not initialize ret variable because it is initialized later on and
it is just additional step.

Fixes: 1327d1678bd2 ("firmware: zynqmp: Add zynqmp-power support")
Reported-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
4 years agofirmware: zynqmp: Report error when xilinx_pm_request called from EL3
Michal Simek [Thu, 10 Oct 2019 09:09:15 +0000 (11:09 +0200)]
firmware: zynqmp: Report error when xilinx_pm_request called from EL3

Function should report error when called in EL3 context. Also report it as
error instead 0 (success).

Reported-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
4 years agoarm64: zynqmp: Convert invoke_smc() to xilinx_pm_request()
Michal Simek [Fri, 4 Oct 2019 13:35:45 +0000 (15:35 +0200)]
arm64: zynqmp: Convert invoke_smc() to xilinx_pm_request()

Remove macros which use PM_SIP_SVC offset and convert invoke_smc() to
xilinx_pm_request() which do calculation with PM_SIP_SVC already.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: versal: Rename versal_pm_request to xilinx_pm_request
Michal Simek [Fri, 4 Oct 2019 13:52:43 +0000 (15:52 +0200)]
arm64: versal: Rename versal_pm_request to xilinx_pm_request

Use generic name instead of Versal specific because this should be also
used on ZynqMP.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: xilinx: Move firmware functions from platform to driver
Michal Simek [Fri, 4 Oct 2019 13:45:29 +0000 (15:45 +0200)]
arm64: xilinx: Move firmware functions from platform to driver

versal_pm_request() and invoke_smc() are almost the same. Only one
difference is that versal_pm_request is adding PM_SIP_SVC offset to api_id.
The patch is moving platform implementation to firmware driver code for
synchronization.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
4 years agoarm64: versal: Clean pm_api_id usage
Michal Simek [Fri, 4 Oct 2019 13:25:18 +0000 (15:25 +0200)]
arm64: versal: Clean pm_api_id usage

Copy enum values from platform code to firmware code. IDs are shared
between ZynqMP and Versal.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Thu, 24 Oct 2019 11:32:21 +0000 (07:32 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell

- Add support for HyperBus Memory Controller of TI's J721e
  and AM654 SoCs (Vignesh)

4 years agoMAINTAINERS: add MICROCHIP_FLEXCOM to at91
Eugen Hristev [Wed, 9 Oct 2019 09:23:46 +0000 (09:23 +0000)]
MAINTAINERS: add MICROCHIP_FLEXCOM to at91

Add microchip flexcom driver to at91.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
4 years agoconfigs: sam9x60ek: enable microchip_flexcom, i2c and eeprom
Eugen Hristev [Wed, 9 Oct 2019 09:23:44 +0000 (09:23 +0000)]
configs: sam9x60ek: enable microchip_flexcom, i2c and eeprom

enable driver model for i2c, eeprom for mac retrieval from eeprom i2c memory,
and microchip_flexcom driver.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
4 years agoboard: sam9x60ek: add support for MAC address retrieval
Eugen Hristev [Wed, 9 Oct 2019 09:23:43 +0000 (09:23 +0000)]
board: sam9x60ek: add support for MAC address retrieval

Retrieve mac address from i2c eeprom at boot time.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
4 years agoARM: dts: sam9x60ek: add i2c0 as flexcom0 subnode and eeprom memory
Eugen Hristev [Wed, 9 Oct 2019 09:23:41 +0000 (09:23 +0000)]
ARM: dts: sam9x60ek: add i2c0 as flexcom0 subnode and eeprom memory

Add i2c0 bus as subnode to flx0.
Add eeprom memory as slave device to i2c0.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
4 years agoARM: dts: sam9x60: add flx0 node
Eugen Hristev [Wed, 9 Oct 2019 09:23:40 +0000 (09:23 +0000)]
ARM: dts: sam9x60: add flx0 node

Add node for Flexcom0.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
4 years agomisc: microchip_flexcom: introduce microchip_flexcom driver
Eugen Hristev [Wed, 9 Oct 2019 09:23:39 +0000 (09:23 +0000)]
misc: microchip_flexcom: introduce microchip_flexcom driver

The Microchip Flexcom is just a wrapper which embeds a SPI controller,
an I2C controller and an USART.
Only one function can be used at a time and is chosen at boot time according
to the device tree.
The bindings are kept as in Linux.
The driver registers to MISC_UCLASS.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
4 years agoconfigs: sei610: khadas-vim3 : disable Gadget support for the DWC3
Jean-Jacques Hiblot [Thu, 24 Oct 2019 08:15:40 +0000 (10:15 +0200)]
configs: sei610: khadas-vim3 : disable Gadget support for the DWC3

Those platform use the DWC2 controller for the gadget support and the
DWC3 for host-only operations.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
4 years agoARM: DTS: keystone: complete the description of the USB PHY devices
Jean-Jacques Hiblot [Wed, 11 Sep 2019 09:33:58 +0000 (11:33 +0200)]
ARM: DTS: keystone: complete the description of the USB PHY devices

As the PHY driver now handles the transitions of USB power domain, we
must add this information in the node of each PHY.
Also, the phy are expected in the "phys" property, not "usb-phys".
Also add the aliases for the USB ports on boards with more than a single
port.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
4 years agoconfigs: k2g_evm_defconfig: disable XHCI_DWC3 and enable KEYSTONE_USB_PHY
Jean-Jacques Hiblot [Wed, 11 Sep 2019 09:33:57 +0000 (11:33 +0200)]
configs: k2g_evm_defconfig: disable XHCI_DWC3 and enable KEYSTONE_USB_PHY

KEYSTONE_USB_PHY is now required for proper USB operations.
XHCI_DWC3 can be disabled as the xhci-dwc3 is not used anymore
USB_DWC3_GADGET can also be removed, it is now selected automatically.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
4 years agophy: keystone-usb: handle the transition of the USB power domain
Jean-Jacques Hiblot [Wed, 11 Sep 2019 09:33:56 +0000 (11:33 +0200)]
phy: keystone-usb: handle the transition of the USB power domain

There is no proper power domain support for the keystone platforms.
However we need to turn off the USB domains before jumping to linux or it
fail to boot (observed with k2e and k2l platforms).
This can be done in the PHY driver as it is dedicated only to the keystone
platforms and matches the required on/off sequence.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
4 years agoARM: keystone: Do not enable the USB power domains at the board level
Jean-Jacques Hiblot [Wed, 11 Sep 2019 09:33:55 +0000 (11:33 +0200)]
ARM: keystone: Do not enable the USB power domains at the board level

This breaks linux boot sequence.
Observed on k2e and k2l platforms.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
4 years agoARM: keystone: increase PSC timeout
Jean-Jacques Hiblot [Wed, 11 Sep 2019 09:33:54 +0000 (11:33 +0200)]
ARM: keystone: increase PSC timeout

Turning off the USB clocks may take longer than 100us.
Increase the timeout to 100ms.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
4 years agousb: dwc3: Kconfig: get rid of obsolete mode selection
Jean-Jacques Hiblot [Wed, 11 Sep 2019 09:33:53 +0000 (11:33 +0200)]
usb: dwc3: Kconfig: get rid of obsolete mode selection

The mode selection for the DWC3 is kind of obsolete. The driver does not
have to be host only or gadget only. This choice is confusing.
All the remaining callers of dwc3_uboot_init() explicitly set dr_mode
before calling the function, so none rely on a default behavior.

Remove the choice menu and keep only the USB_DWC3_GADGET option. Enable it
by default if USB_GADGET and USB_DWC3 are enabled.
It must be disabled for the evb-rk3328 as it uses DWC2 for the gadget and
DWC3 for the host.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
4 years agousb: dwc3: Add dwc3_of_parse() to get quirks information from DT
Jean-Jacques Hiblot [Wed, 11 Sep 2019 09:33:52 +0000 (11:33 +0200)]
usb: dwc3: Add dwc3_of_parse() to get quirks information from DT

Add a new function that read quirk and configuration information from the
DT. The goal is to allow platforms using their own version of DWC3 driver
to migrate to the generic DWC3 driver.
The function is adapted from the function dwc3_get_properties() in the
linux dwc3 driver introduced in commit c5ac6116db35d.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
4 years agousb: dwc3-generic: if no max speed is specified in DT, assume super speed
Jean-Jacques Hiblot [Wed, 11 Sep 2019 09:33:51 +0000 (11:33 +0200)]
usb: dwc3-generic: if no max speed is specified in DT, assume super speed

There is no need to fail if the maximum speed is not specified.
If the speed is not specified, do the same as linux and assume super speed.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
4 years agousb: dwc3-generic: add a new host driver that uses the dwc3 core
Jean-Jacques Hiblot [Wed, 11 Sep 2019 09:33:50 +0000 (11:33 +0200)]
usb: dwc3-generic: add a new host driver that uses the dwc3 core

Currently the host driver used by dwc3-generic is "xhci-dwc3". This is
a functional driver but it doesn't use the dwc3 core and, in particular,
it lacks some bits that may be important.
For example on the k2 platforms, it is important that the phy are properly
suspended when the USB is not used anymore. The dwc3 core also has a
partial support for quirks.
The new driver can be used as a drop-in replacement for "xhci-dwc3".

In terms of implementation, it may seem strange that 2 private structures
dwc3_generic_host_priv and dwc3_generic_priv) are used. The reason for this
is simply that the xhci layer expects a struct xhci_ctrl at the beginning
of the private data and it seemed wasteful to include it also for the
peripheral case.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
4 years agousb: dwc3-generic: factorize code
Jean-Jacques Hiblot [Wed, 11 Sep 2019 09:33:49 +0000 (11:33 +0200)]
usb: dwc3-generic: factorize code

Factor code for re-usability.
This is another step toward adding host support.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
4 years agousb: dwc3-generic: use platdata
Jean-Jacques Hiblot [Wed, 11 Sep 2019 09:33:48 +0000 (11:33 +0200)]
usb: dwc3-generic: use platdata

Separate platform data from the private data.
This is one step toward adding host support.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
4 years agousb: dwc3: always use the inlined version of dwc3_host_init/dwc3_host_exit
Jean-Jacques Hiblot [Wed, 11 Sep 2019 09:33:47 +0000 (11:33 +0200)]
usb: dwc3: always use the inlined version of dwc3_host_init/dwc3_host_exit

No one is actually implementing those functions.
We could remove calls to these altogether, but it does not really hurt to
keep the empty inlined version at the moment and it satisfies a symmetry
with the gadget mode.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>