]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
4 years agoMerge tag 'xilinx-for-v2021.01' of https://gitlab.denx.de/u-boot/custodians/u-boot...
Tom Rini [Thu, 24 Sep 2020 12:33:47 +0000 (08:33 -0400)]
Merge tag 'xilinx-for-v2021.01' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze into next

Xilinx changes for v2021.01

arm64:
- Support for bigger U-Boot images compiled with PIE

microblaze:
- Extend support for LE/BE systems

zynqmp:
- Refactor silicon ID detection code with using firmware interface
- Add support for saving variables based on bootmode

zynqmp-r5:
- Fix MPU mapping and defconfig setting.

xilinx:
- Minor driver changes: names alignment
- Enable UBIFS
- Minor DT and macros fixes
- Fix boot with appended DT
- Fix distro boot

cmd:
- pxe: Add fixing for platforms with manual relocation support

clk:
- fixed_rate: Add DM flag to support early boot on r5

fpga:
- zynqmppl: Use only firmware interface and enable SPL build

serial:
- uartlite: Enable for ARM systems and support endians

mmc:
- zynq: Fix indentation

net:
- gem: Support for multiple phys
- emac: Fix 64bit support and enable it for arm64

kconfig:
- Setup default values for Xilinx platforms
- Fix dependecies for Xilinx drivers
- Source board Kconfig only when platform is enabled
- Fix FPGA Kconfig entry with SPL
- Change some defconfig values

bindings:
- Add binding doc for vsc8531

4 years agoMerge branch 'mpc85xx-for-v2021.01' into next
Tom Rini [Thu, 24 Sep 2020 12:30:25 +0000 (08:30 -0400)]
Merge branch 'mpc85xx-for-v2021.01' into next

- Add DM_SPI, DM_SPI_FLASH support for powerpc platforms
- Add DM_ETH support on P1010RDB, P1020RDB, P2020RDB
- Remove some un-maintained powerpc platforms
- Add USB_STORAGE support in config

4 years agoconfigs: powerpc: add usb (host) mass storage support
Ran Wang [Tue, 30 Jun 2020 05:08:34 +0000 (13:08 +0800)]
configs: powerpc: add usb (host) mass storage support

commit 0cfccb54014b ("configs: Resync with savedefconfig")
removed CONFIG_USB_STORAGE from some powerpc platforms' defconfig
files, whicih would block the use case of system loading rootfs
from USB drives, add them back.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: Remove P5040DS secure boot configs
Priyanka Jain [Mon, 21 Sep 2020 06:26:45 +0000 (11:56 +0530)]
configs: Remove P5040DS secure boot configs

Remove NXP powerpc P5040DS secure boot configs as they are
no longer maintained.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard/freescale: Remove P5020DS board support
Priyanka Jain [Mon, 21 Sep 2020 06:26:44 +0000 (11:56 +0530)]
board/freescale: Remove P5020DS board support

Remove NXP powerpc P5020DS board support as it is no
longer maintained.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agopowerpc:Remove P4080DS secure boot configs
Priyanka Jain [Mon, 21 Sep 2020 06:26:43 +0000 (11:56 +0530)]
powerpc:Remove P4080DS secure boot configs

Remove NXP powerpc P4080DS secure boot configs as they are
no longer maintained.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: Remove P3041DS secure boot configs
Priyanka Jain [Mon, 21 Sep 2020 06:26:42 +0000 (11:56 +0530)]
configs: Remove P3041DS secure boot configs

Remove NXP powerpc P3041DS secure boot configs as they are
no longer maintained.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard/freescale: Remove P1024RDB board support
Priyanka Jain [Mon, 21 Sep 2020 06:26:41 +0000 (11:56 +0530)]
board/freescale: Remove P1024RDB board support

Remove NXP powerpc P1024RDB board support as it is no
longer maintained.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard/freescale: Remove P1021RDB board support
Priyanka Jain [Mon, 21 Sep 2020 10:06:25 +0000 (15:36 +0530)]
board/freescale: Remove P1021RDB board support

Remove NXP powerpc P1021RDB board support as it is no
longer maintained.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard/freescale: Remove P1020MBG board support
Priyanka Jain [Mon, 21 Sep 2020 06:26:39 +0000 (11:56 +0530)]
board/freescale: Remove P1020MBG board support

Remove NXP powerpc P1020MBG board support as it is no
longer maintained.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard/freescale: Remove P1020UTM board support
Priyanka Jain [Mon, 21 Sep 2020 06:26:38 +0000 (11:56 +0530)]
board/freescale: Remove P1020UTM board support

Remove NXP powerpc P1020UTM board support as it is no
longer maintained.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard/freescale: Remove P1025RDB board support
Priyanka Jain [Mon, 21 Sep 2020 10:05:16 +0000 (15:35 +0530)]
board/freescale: Remove P1025RDB board support

Remove NXP powerpc P1025RDB board support as it is no
longer maintained.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: Remove P1010RDB secure boot configs
Priyanka Jain [Mon, 21 Sep 2020 06:26:36 +0000 (11:56 +0530)]
configs: Remove P1010RDB secure boot configs

Remove NXP powerpc P1010RDB secure boot configs as they are
no longer maintained.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard/freescale: Remove p1023rdb board support
Priyanka Jain [Mon, 21 Sep 2020 06:26:35 +0000 (11:56 +0530)]
board/freescale: Remove p1023rdb board support

Remove NXP powerpc p1023rdb board support as it is no
longer maintained.

Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: P2020RDB: Enable DM_ETH config
Hou Zhiqiang [Thu, 16 Jul 2020 10:09:25 +0000 (18:09 +0800)]
configs: P2020RDB: Enable DM_ETH config

Enable the DM_ETH and DM_MDIO config.

On P2020RDB, the eTSEC1 is connecting with a switch VSC7385,
so also enable the fixed PHY support.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: powerpc: p2020rdb: Add eTSEC DT nodes
Hou Zhiqiang [Mon, 21 Sep 2020 09:46:23 +0000 (15:16 +0530)]
dts: powerpc: p2020rdb: Add eTSEC DT nodes

P2020RDB implements 3 enhanced three-speed Ethernet controllers,
and the connection is shown below:
    eTSEC1: Connected to RGMII switch VSC7385
    eTSEC2: Connected to SGMII PHY VSC8221
    eTSEC3: Connected to SGMII PHY AR8021

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: P1010RDB: Enable DM_ETH config
Hou Zhiqiang [Thu, 16 Jul 2020 10:09:23 +0000 (18:09 +0800)]
configs: P1010RDB: Enable DM_ETH config

Enable the DM_ETH and DM_MDIO config.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agop1010rdb: Don't compile board_eth_init() for DM_ETH
Hou Zhiqiang [Mon, 21 Sep 2020 09:45:04 +0000 (15:15 +0530)]
p1010rdb: Don't compile board_eth_init() for DM_ETH

The board_eth_init() is only used by legacy ethernet driver framework,
so do not compile it when DM_ETH config has been selected.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: powerpc: p1010rdb: Add eTSEC DT nodes
Hou Zhiqiang [Mon, 21 Sep 2020 09:43:22 +0000 (15:13 +0530)]
dts: powerpc: p1010rdb: Add eTSEC DT nodes

P1010RDB implements 3 enhanced three-speed Ethernet controllers,
and the connection is shown below:
    eTSEC1: Connected to RGMII PHY AR8033
    eTSEC2: Connected to SGMII PHY AR8033
    eTSEC3: Connected to SGMII PHY AR8033

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: P1020RDB: Enable DM_ETH config
Hou Zhiqiang [Thu, 16 Jul 2020 10:09:20 +0000 (18:09 +0800)]
configs: P1020RDB: Enable DM_ETH config

Enable the DM_ETH and DM_MDIO config.

On P1020RDB, the eTSEC1 is connecting with a switch VSC7385,
so also enable the fixed PHY support.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agop1_p2_rdb: Don't compile board_eth_init() for DM_ETH
Hou Zhiqiang [Mon, 21 Sep 2020 09:24:03 +0000 (14:54 +0530)]
p1_p2_rdb: Don't compile board_eth_init() for DM_ETH

The board_eth_init() is only used by legacy ethernet driver framework,
so do not compile it when DM_ETH config has been selected.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: powerpc: p1020rdb: Add eTSEC DT nodes
Hou Zhiqiang [Mon, 21 Sep 2020 09:29:05 +0000 (14:59 +0530)]
dts: powerpc: p1020rdb: Add eTSEC DT nodes

P1020RDB implements 3 enhanced three-speed Ethernet controllers,
and the connection is shown below:
    eTSEC1: Connected to RGMII switch VSC7385
    eTSEC2: Connected to SGMII PHY VSC8221
    eTSEC3: Connected to SGMII PHY AR8021

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: p1_p2_rdb: Add the default address of vsc7385 firmware
Hou Zhiqiang [Thu, 16 Jul 2020 10:09:17 +0000 (18:09 +0800)]
configs: p1_p2_rdb: Add the default address of vsc7385 firmware

Add the environment 'vscfw_addr' to assign a default address for
vsc7385 firmware uploading.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofsl: p1_p2_rdb: Move vsc7835 firmware uploading to board_early_init_r()
Hou Zhiqiang [Thu, 16 Jul 2020 10:09:16 +0000 (18:09 +0800)]
fsl: p1_p2_rdb: Move vsc7835 firmware uploading to board_early_init_r()

Move vsc7835 firmware uploading to board_early_init_r(), so that
the switch also can work in DM eTSEC driver.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agompc8xxx: Don't compile board_eth_init() for DM_ETH
Hou Zhiqiang [Mon, 21 Sep 2020 09:38:45 +0000 (15:08 +0530)]
mpc8xxx: Don't compile board_eth_init() for DM_ETH

The cpu_eth_init() is only used by the legacy ethernet driver framework.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agonet: tsec: Add the compatible string "gianfar" support
Hou Zhiqiang [Thu, 16 Jul 2020 10:09:14 +0000 (18:09 +0800)]
net: tsec: Add the compatible string "gianfar" support

Add compatible string "gianfar" support and update the
device-tree-bindings doc.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agonet: tsec: Add fixed-link PHY support
Hou Zhiqiang [Thu, 16 Jul 2020 10:09:13 +0000 (18:09 +0800)]
net: tsec: Add fixed-link PHY support

The info of fixed-link PHY is described in DT node instead of
getting from MII, so detect the fixed-link PHY DT node first,
if it doesn't exist then probe the MII.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agonet: tsec: convert to use DM_MDIO when DM_ETH enabled
Hou Zhiqiang [Thu, 16 Jul 2020 10:09:12 +0000 (18:09 +0800)]
net: tsec: convert to use DM_MDIO when DM_ETH enabled

For the platforms on which the eTSEC driver uses DM_ETH, convert its
MDIO controller code to also use DM_MDIO.

Note that for handling the TBI PHY (the MAC PCS for SGMII), we still
don't register a udevice for it, since we can drive it locally and there
is no point in doing otherwise.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Reworked to fix gazerbeam config]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agonet: fsl_mdio: Correct the MII management register block address
Hou Zhiqiang [Thu, 16 Jul 2020 10:09:11 +0000 (18:09 +0800)]
net: fsl_mdio: Correct the MII management register block address

The MII management register block offset is different between
gianfar and etsec2 compatible devices, this patch is to fix
this issue by adding driver data for different compatible
string.

Fixes: 2932c5a802a9 ("net: tsec: fsl_mdio: add DM MDIO support")
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agonet: fsl_mdio: Change to use virtual address
Hou Zhiqiang [Thu, 16 Jul 2020 10:09:10 +0000 (18:09 +0800)]
net: fsl_mdio: Change to use virtual address

Use virtual address to access the MII block registers instead
of physical address.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: enable DM_MDIO for LS1021A-TWR and LS1021A-TSN
Vladimir Oltean [Thu, 16 Jul 2020 10:09:09 +0000 (18:09 +0800)]
configs: enable DM_MDIO for LS1021A-TWR and LS1021A-TSN

The tsec driver now requires DM_MDIO when DM_ETH is enabled. To avoid
build errors, enable DM_MDIO in these boards' configs before we actually
add DM_MDIO support to tsec.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agophy: make phy_connect_fixed work with a null mdio bus
Vladimir Oltean [Thu, 16 Jul 2020 10:09:08 +0000 (18:09 +0800)]
phy: make phy_connect_fixed work with a null mdio bus

It is utterly pointless to require an MDIO bus pointer for a fixed PHY
device. The fixed.c implementation does not require it, only
phy_device_create. Fix that.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: P1010RDB: Enable eSPI controller and SPI flash DM driver
Hou Zhiqiang [Thu, 4 Jun 2020 15:17:05 +0000 (23:17 +0800)]
configs: P1010RDB: Enable eSPI controller and SPI flash DM driver

Enable the DM_SPI and DM_SPI_FLASH in P1010RDB defconfigs except
SECBOOT defconfigs.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: P1010RDB: Add eSPI slave DT nodes
Hou Zhiqiang [Thu, 4 Jun 2020 15:17:04 +0000 (23:17 +0800)]
dts: P1010RDB: Add eSPI slave DT nodes

Add DT nodes for eSPI slave device SPI flash.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: P1010: Add eSPI controller DT node
Hou Zhiqiang [Thu, 4 Jun 2020 15:17:03 +0000 (23:17 +0800)]
dts: P1010: Add eSPI controller DT node

Add eSPI controller DT node for P1010.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: T4240RDB: Enable ESPI driver
Xiaowei Bao [Mon, 21 Sep 2020 07:21:19 +0000 (12:51 +0530)]
configs: T4240RDB: Enable ESPI driver

Enable the DM ESPI driver in T4240RDB defconfig.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: T4240RDB: Add ESPI slave device node
Xiaowei Bao [Thu, 4 Jun 2020 15:17:01 +0000 (23:17 +0800)]
dts: T4240RDB: Add ESPI slave device node

Add ESPI slave node for T4240RDB.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: T4240: Add ESPI DT nodes
Xiaowei Bao [Thu, 4 Jun 2020 15:17:00 +0000 (23:17 +0800)]
dts: T4240: Add ESPI DT nodes

Add ESPI controller DT node for T4240.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: T2080RDB: Enable ESPI driver
Xiaowei Bao [Mon, 21 Sep 2020 07:20:02 +0000 (12:50 +0530)]
configs: T2080RDB: Enable ESPI driver

Enable the DM ESPI driver in T2080RDB defconfig.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: T2080RDB: Add ESPI slave device node
Xiaowei Bao [Thu, 4 Jun 2020 15:16:58 +0000 (23:16 +0800)]
dts: T2080RDB: Add ESPI slave device node

Add ESPI slave node for T2080RDB.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: T1042D4RDB: Enable ESPI driver
Xiaowei Bao [Mon, 21 Sep 2020 07:18:41 +0000 (12:48 +0530)]
configs: T1042D4RDB: Enable ESPI driver

Enable the DM ESPI driver in T1042D4RDB defconfig.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: T1042D4RDB: Add ESPI slave device node
Xiaowei Bao [Thu, 4 Jun 2020 15:16:56 +0000 (23:16 +0800)]
dts: T1042D4RDB: Add ESPI slave device node

Add ESPI slave node for T1042D4RDB.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: T104x: Add ESPI DT nodes
Xiaowei Bao [Thu, 4 Jun 2020 15:16:55 +0000 (23:16 +0800)]
dts: T104x: Add ESPI DT nodes

Add ESPI controller DT node for T104x.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: T1024RDB: Enable ESPI driver
Xiaowei Bao [Mon, 21 Sep 2020 07:16:54 +0000 (12:46 +0530)]
configs: T1024RDB: Enable ESPI driver

Enable the DM ESPI driver in T1024RDB defconfig.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: T1024RDB: Add ESPI slave device node
Xiaowei Bao [Mon, 21 Sep 2020 07:13:20 +0000 (12:43 +0530)]
dts: T1024RDB: Add ESPI slave device node

Add ESPI slave node for T1024RDB.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: T102x: Add ESPI DT nodes
Xiaowei Bao [Thu, 4 Jun 2020 15:16:52 +0000 (23:16 +0800)]
dts: T102x: Add ESPI DT nodes

Add ESPI controller DT node for T102x.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: P5040DS: Enable ESPI driver
Xiaowei Bao [Thu, 4 Jun 2020 15:16:51 +0000 (23:16 +0800)]
configs: P5040DS: Enable ESPI driver

Enable the DM ESPI driver in P5040DS defconfig.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: P5040DS: Add ESPI slave device node
Xiaowei Bao [Mon, 21 Sep 2020 07:11:17 +0000 (12:41 +0530)]
dts: P5040DS: Add ESPI slave device node

Add ESPI slave node for P5040DS.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: P5040: Add ESPI DT nodes
Xiaowei Bao [Thu, 4 Jun 2020 15:16:49 +0000 (23:16 +0800)]
dts: P5040: Add ESPI DT nodes

Add ESPI controller DT node for P5040.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: P4080DS: Enable ESPI driver
Xiaowei Bao [Thu, 4 Jun 2020 15:16:48 +0000 (23:16 +0800)]
configs: P4080DS: Enable ESPI driver

Enable the DM ESPI driver in P4080DS defconfig.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: P4080DS: Add ESPI slave device node
Xiaowei Bao [Mon, 21 Sep 2020 06:59:04 +0000 (12:29 +0530)]
dts: P4080DS: Add ESPI slave device node

Add ESPI slave node for P4080DS.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: P4080: Add ESPI DT nodes
Xiaowei Bao [Thu, 4 Jun 2020 15:16:46 +0000 (23:16 +0800)]
dts: P4080: Add ESPI DT nodes

Add ESPI controller DT node for P4080.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: P3041DS: Enable ESPI driver
Xiaowei Bao [Thu, 4 Jun 2020 15:16:45 +0000 (23:16 +0800)]
configs: P3041DS: Enable ESPI driver

Enable the DM ESPI driver in P3041DS defconfig.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: P3041DS: Add ESPI slave device node
Xiaowei Bao [Mon, 21 Sep 2020 06:56:07 +0000 (12:26 +0530)]
dts: P3041DS: Add ESPI slave device node

Add ESPI slave node for P3041DS.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: P3041: Add ESPI DT nodes
Xiaowei Bao [Thu, 4 Jun 2020 15:16:43 +0000 (23:16 +0800)]
dts: P3041: Add ESPI DT nodes

Add ESPI controller DT node for P3041.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: P2041RDB: Enable ESPI driver
Xiaowei Bao [Thu, 4 Jun 2020 15:16:42 +0000 (23:16 +0800)]
configs: P2041RDB: Enable ESPI driver

Enable the DM ESPI driver in P2041RDB defconfig.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: P2041RDB: Add ESPI slave device node
Xiaowei Bao [Mon, 21 Sep 2020 06:46:50 +0000 (12:16 +0530)]
dts: P2041RDB: Add ESPI slave device node

Add ESPI slave node for P2041RDB.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: P2041: Add ESPI DT nodes
Xiaowei Bao [Thu, 4 Jun 2020 15:16:40 +0000 (23:16 +0800)]
dts: P2041: Add ESPI DT nodes

Add ESPI controller DT node for P2041.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: P2020RDB: Enable ESPI driver
Xiaowei Bao [Thu, 4 Jun 2020 15:16:39 +0000 (23:16 +0800)]
configs: P2020RDB: Enable ESPI driver

Enable the DM ESPI driver in P2020RDB defconfig.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: P2020RDB: Add ESPI slave device node
Xiaowei Bao [Thu, 4 Jun 2020 15:16:38 +0000 (23:16 +0800)]
dts: P2020RDB: Add ESPI slave device node

Add ESPI slave node for P2020RDB.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: P2020: Add ESPI DT nodes
Xiaowei Bao [Thu, 4 Jun 2020 15:16:37 +0000 (23:16 +0800)]
dts: P2020: Add ESPI DT nodes

Add ESPI controller DT node for P2020.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: P1020RDB: Enable ESPI driver
Xiaowei Bao [Thu, 4 Jun 2020 15:16:36 +0000 (23:16 +0800)]
configs: P1020RDB: Enable ESPI driver

Enable the DM ESPI driver in P1020RDB defconfig.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: P1020RDB: Add ESPI slave device node
Xiaowei Bao [Thu, 4 Jun 2020 15:16:35 +0000 (23:16 +0800)]
dts: P1020RDB: Add ESPI slave device node

Add ESPI slave node for P1020RDB.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodts: P1020: Add ESPI DT nodes
Xiaowei Bao [Thu, 4 Jun 2020 15:16:34 +0000 (23:16 +0800)]
dts: P1020: Add ESPI DT nodes

Add ESPI controller DT node for P1020.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: enable espi device module in T2080QDS
Chuanhua Han [Mon, 21 Sep 2020 06:40:16 +0000 (12:10 +0530)]
configs: enable espi device module in T2080QDS

This patch is to enable  espi DM for T2080QDS in uboot

Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com>
Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agopowerpc: dts: t2080qds: add espi slave nodes support
Chuanhua Han [Thu, 4 Jun 2020 15:16:32 +0000 (23:16 +0800)]
powerpc: dts: t2080qds: add espi slave nodes support

Add espi slave nodes  to support t2080qds.

Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com>
Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agopowerpc: dts: t2080: add espi controller node support
Chuanhua Han [Thu, 4 Jun 2020 15:16:31 +0000 (23:16 +0800)]
powerpc: dts: t2080: add espi controller node support

Add espi controller node to support t2080.

Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com>
Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoclk: fixed-rate: Enable DM_FLAG_PRE_RELOC flag
Michal Simek [Wed, 16 Sep 2020 11:20:55 +0000 (13:20 +0200)]
clk: fixed-rate: Enable DM_FLAG_PRE_RELOC flag

fixed-rate driver is not different from clk_fixed_factor and it is required
very early in boot that's why setup flag for it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoxilinx: zynqmp-r5: Increase amount of MALLOC space
Michal Simek [Wed, 16 Sep 2020 11:35:03 +0000 (13:35 +0200)]
xilinx: zynqmp-r5: Increase amount of MALLOC space

There is not enough space for early allocation. That's why increase it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agocmd: pxe: Add relocation to pxe_sub cmds
T Karthik Reddy [Wed, 16 Sep 2020 07:13:56 +0000 (01:13 -0600)]
cmd: pxe: Add relocation to pxe_sub cmds

pxe sub commands need to be manually relocated for architectures which
enables MANUAL_RELOC as Microblaze.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoxilinx: versal: Fix compilation error when !CONFIG_NET
Michal Simek [Wed, 16 Sep 2020 08:14:01 +0000 (10:14 +0200)]
xilinx: versal: Fix compilation error when !CONFIG_NET

PXE and DHCP shouldn't be listed when commands are not enabled that's why
handle it in the same way as is done for Zynq and ZynqMP.

Fixes: ec48b6c991f4 ("arm64: versal: Add support for new Xilinx Versal ACAPs")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoxilinx: r5: Fix MPU setting for R5
Michal Simek [Mon, 14 Sep 2020 14:33:46 +0000 (16:33 +0200)]
xilinx: r5: Fix MPU setting for R5

Map all resource for R5 to operate properly.
The patch is done based on the commit 23f7b1a77602 ("armv7R: K3: am654:
Enable MPU regions") which also map the whole 4GB at first and then change
mapping for DDR.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoxilinx: r5: Disable EFI loader
Michal Simek [Mon, 14 Sep 2020 14:27:56 +0000 (16:27 +0200)]
xilinx: r5: Disable EFI loader

Xilinx ZynqMP R5 configuration is quite minimal and there is no reason to
enable EFI for it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agospl: Kconfig: Record proper dependency for SPL_ATF
Michal Simek [Thu, 3 Sep 2020 09:23:39 +0000 (11:23 +0200)]
spl: Kconfig: Record proper dependency for SPL_ATF

ATF support was all the time based on FIT image support but this dependency
is not recorded anywhere.
For !SPL_FIT && SPL_ATF there is compilation error:
common/spl/spl.c: In function 'board_init_r':
common/spl/spl.c:689:26: error: 'struct spl_image_info' has no member named 'fdt_addr'
  689 |   spl_fixup_fdt(spl_image.fdt_addr);

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoxilinx: Disable CONFIG_EFI_LOADER_BOUNCE_BUFFER for ZynqMP/Versal
Michal Simek [Tue, 8 Sep 2020 11:11:02 +0000 (13:11 +0200)]
xilinx: Disable CONFIG_EFI_LOADER_BOUNCE_BUFFER for ZynqMP/Versal

Both SOCs shouldn't have any problem with 64bit dma accesses. Also with PIE
enabled when u-boot is placed above 4GB without any memory mapped below 4GB
address space efi_memory_init() call is failing due to missing memory node.

For this two reason disable this option for ZynqMP and Versal.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agommc: zynq: Fix incorrect indentation
Michal Simek [Mon, 14 Sep 2020 11:00:40 +0000 (13:00 +0200)]
mmc: zynq: Fix incorrect indentation

Trivial fix.

Fixes: d1f4e39d58db ("mmc: zynq_sdhci: Add support for SD3.0"
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agofpga: zynqmp: Protect zynqmp_loads() for SPL
Michal Simek [Thu, 10 Sep 2020 10:57:16 +0000 (12:57 +0200)]
fpga: zynqmp: Protect zynqmp_loads() for SPL

if conditions should match.

Fixes: a18d09ea384f ("fpga: zynqmp: Add secure bitstream loading for ZynqMP")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agofpga: kconfig: Rename SPL_FPGA_SUPPORT to SPL_FPGA
Michal Simek [Wed, 9 Sep 2020 12:41:56 +0000 (14:41 +0200)]
fpga: kconfig: Rename SPL_FPGA_SUPPORT to SPL_FPGA

The patch does sed 's/SPL_FPGA_SUPPORT/SPL_FPGA/g' but also fixing Makefile
and zynqmp.c to simplify if/endif logic in zynqmp.c.

This change is mostly done to be able to use CONFIG_IS_ENABLED macro and
obj-$(CONFIG_$(SPL_)FPGA) in Makefile. For them symbols need to be in sync.

And removing one line from Topic Miami boards which is not needed because
symbol is not enabled via Kconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agofpga: zynqmp: Get rid of ZYNQMP_SIP_SVC* macros
Michal Simek [Wed, 9 Sep 2020 11:25:40 +0000 (13:25 +0200)]
fpga: zynqmp: Get rid of ZYNQMP_SIP_SVC* macros

There is no need to use these macros because enum pm_api_id can be used
instead.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoxilinx: common: Do not save fdt_blob to bss section
Michal Simek [Fri, 4 Sep 2020 14:21:47 +0000 (16:21 +0200)]
xilinx: common: Do not save fdt_blob to bss section

For SPL flow without specifying address for DT loading DTB is automatically
appended behind U-Boot code. Specifically _end symbol is used. Just behind
it there is place for bss section.
It means if early code is using static variable and there is a write to
this variable DTB file is corrupted if variable is located between DTB
start and end.
In this particular case offset of this variable from bss section start is
very small (0x40) that's why DT is currupted which breaks this boot flow.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoARM: zynqmp: Fix SPL_DM_SPI dependencies
Michal Simek [Wed, 19 Aug 2020 08:30:39 +0000 (10:30 +0200)]
ARM: zynqmp: Fix SPL_DM_SPI dependencies

Add missing dependencies for DM_SPI_FLASH.
Kconfig reports it as:
WARNING: unmet direct dependencies detected for SPL_DM_SPI_FLASH
  Depends on [n]: SPL [=n] && SPL_DM [=n]
  Selected by [y]:
  - ARCH_ZYNQMP [=y] && <choice> && SPL_DM_SPI [=y]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: versal: Generate position-independent pre-relocation code
Michal Simek [Wed, 8 Jan 2020 11:36:47 +0000 (12:36 +0100)]
arm64: versal: Generate position-independent pre-relocation code

Enable position independent pre-relocation to let users options to put
u-boot to different locations.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoxilinx: zynqmp: Add support for saving variables
Michal Simek [Thu, 30 Jul 2020 11:37:49 +0000 (13:37 +0200)]
xilinx: zynqmp: Add support for saving variables

Enabling saving variables to MMC(FAT), NAND, SPI based on primary bootmode.
Maybe that logic can be tuned for more complicated use cases and better
tested for different bootmodes.

Tested on zcu104 to SD(FAT) and JTAG(NOWHERE).

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoxilinx: zynqmp: Get zynqmp_get_bootmode() out of CONFIG_BOARD_LATE_INIT
Michal Simek [Thu, 20 Aug 2020 08:54:45 +0000 (10:54 +0200)]
xilinx: zynqmp: Get zynqmp_get_bootmode() out of CONFIG_BOARD_LATE_INIT

This function will be also used by different code.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoxilinx: zynqmp: Remove one static variable
Michal Simek [Wed, 5 Aug 2020 10:41:35 +0000 (12:41 +0200)]
xilinx: zynqmp: Remove one static variable

There is no reason to have name variable saved in BSS section when it
doesn't need to be really used. That's why remove static from variable
definition and use strdup() to duplicate string with exact size from malloc
area instead.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoxilinx: zynqmp: Add missing 43/46/47dr ID codes
Michal Simek [Fri, 11 Sep 2020 07:22:15 +0000 (09:22 +0200)]
xilinx: zynqmp: Add missing 43/46/47dr ID codes

Add support for 43/46/47dr devices.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoxilinx: zynqmp: refactor silicon name function
Ibai Erkiaga [Tue, 4 Aug 2020 22:17:31 +0000 (23:17 +0100)]
xilinx: zynqmp: refactor silicon name function

Current algorithm used to get the silicon name is bit complicated and
hard to follow. Updated to use more straightforward mechanism based on
the Device ID code table (Table 1-2). The full IDCODE register is used
(except device revision bits [31:28]) to get the device name and IDCODE2
value is used for identifying the variant.

Additionally to make the algorithm bit more clear it also save some space
as the devices table is slightly bit smaller.

Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoxilinx: versal: Enable AXI ethernet driver
Ashok Reddy Soma [Thu, 13 Aug 2020 09:42:56 +0000 (03:42 -0600)]
xilinx: versal: Enable AXI ethernet driver

Enable AXI ethernet driver for Versal platforms.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agonet: xilinx: axi_emac: Typecast flush_cache arguments
Ashok Reddy Soma [Thu, 3 Sep 2020 14:36:44 +0000 (08:36 -0600)]
net: xilinx: axi_emac: Typecast flush_cache arguments

flush_cache() arguments are not type casted to take care of 64 bit
systems. Use phys_addr_t to type cast for it to work properly for 32 bit
and 64 bit systems.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
4 years agonet: xilinx: axi_emac: Fix dma descriptors for 64bit and compilation warnings
Ashok Reddy Soma [Thu, 3 Sep 2020 14:36:43 +0000 (08:36 -0600)]
net: xilinx: axi_emac: Fix dma descriptors for 64bit and compilation warnings

There are compilation warnings showing up when we compile AXI ethernet
driver for 64bit architectures. Fix them, so that it works on both 32
and 64 bit architectures.

DMA descriptors are not taking care of 64bit addresses. To fix it,
change axidma_bd members as below:

next ==> next_desc
reserverd1 ==> next_desc_msb
phys ==> buf_addr
reserverd2 ==> buf_addr_msb

and update next_desc and buf_addr with lower 32 bits of the addresses,
update next_desc_msb and buf_addr_msb with upper 32 bits of the 64bit
addresses.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
4 years agoinclude: dt-bindings: Add MSCC header
Harini Katakam [Tue, 8 Sep 2020 09:52:36 +0000 (15:22 +0530)]
include: dt-bindings: Add MSCC header

Add MSCC header with delay definitions for VSC8531 and associated
family devices.

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm64: zynqmp: Change bl2_plat_get_bl31_params() guarding
Michal Simek [Thu, 3 Sep 2020 08:47:49 +0000 (10:47 +0200)]
arm64: zynqmp: Change bl2_plat_get_bl31_params() guarding

It was protected just for SPL_OS_BOOT but this function is only called when
SPL_ATF is enabled that's why change macro name.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agonand: Kconfig: Change dependency for NAND_ARASAN
Michal Simek [Wed, 19 Aug 2020 07:59:52 +0000 (09:59 +0200)]
nand: Kconfig: Change dependency for NAND_ARASAN

NAND_ARASAN selecting DM_MTD uunconditionally. Driver can be enabled with
!DM that's why Kconfig it showing it as error:

WARNING: unmet direct dependencies detected for DM_MTD
  Depends on [n]: DM [=n]
  Selected by [y]:
  - NAND_ARASAN [=y] && MTD_RAW_NAND [=y]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agoarm64: zynqmp: Correct value of shunt resistor for VCCINT and VCC_SOC
Saeed Nowshadi [Tue, 4 Aug 2020 06:24:05 +0000 (23:24 -0700)]
arm64: zynqmp: Correct value of shunt resistor for VCCINT and VCC_SOC

Value of shunt resistor for INA226s that monitor VCCINT and VCC_SOC power
rails are incorrect.  This patch corrects those values.

Signed-off-by: Saeed Nowshadi <saeed.nowshadi@xilinx.com>
4 years agoarm64: zynqmp: Add device tree node for 2nd mux on I2C1 bus
Saeed Nowshadi [Tue, 4 Aug 2020 06:24:04 +0000 (23:24 -0700)]
arm64: zynqmp: Add device tree node for 2nd mux on I2C1 bus

There is 2nd pca9548 mux on I2C1 bus that controls SFP0, SFP1, and QSFP1
ports. Channel 0 and 1 are connected to J287 connector for SFP0 & SFP1, and
channel 2 is connected to J288 connector for QSFP1.

Signed-off-by: Saeed Nowshadi <saeed.nowshadi@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoxilinx: Enable uartlite driver for Versal/ZynqMP
T Karthik Reddy [Fri, 14 Aug 2020 09:02:17 +0000 (03:02 -0600)]
xilinx: Enable uartlite driver for Versal/ZynqMP

Add CONFIG_XILINX_UARTLITE config to versal/zynqmp defconfig to
enable uartlite driver support by default.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoserial: uartlite: Add support to work with any endianness
T Karthik Reddy [Fri, 14 Aug 2020 09:02:15 +0000 (03:02 -0600)]
serial: uartlite: Add support to work with any endianness

This endinness changes are taken from linux uartlite driver.
Reset TX fifo in control register and check TX fifo empty
flag in lower byte of the status register to detect if it
is a little endian system. Based on this check, program the
registers with le32 or be32 through out the driver.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoconfigs: xilinx: Enable configs required for ubifs
Ashok Reddy Soma [Thu, 20 Aug 2020 10:51:38 +0000 (04:51 -0600)]
configs: xilinx: Enable configs required for ubifs

Enable required configs for using ubifs in uboot.

UBIFS testing procedure from u-boot:
Let's say we have two partitions in dt as below and want to format
partition1 "images" with ubifs.

partition@0 {
label = "boot";
reg = <0x0 0x1000000>;
};

partition@1 {
label = "images";
reg = <0x1000000 0x7000000>;
};

We will format the partition from linux and copy some files and access
from uboot later.
First thing, in linux config disable CONFIG_MTD_SPI_NOR_USE_4K_SECTORS.
this is required as ubifs expects min LEB size as 15*1024 bytes.

Use below commands in linux to format "images" partition with ubifs.

ubiformat /dev/mtd1
ubiattach /dev/ubi_ctrl -m 1
ubimkvol /dev/ubi0 -N images -m
mount -t ubifs ubi0:images /mnt

We can copy files to /mnt and unmount it.

To access this ubifs partition from uboot, run below commands.
(Don't forget to probe device before, e.g. sf probe 0 0 0)

setenv mtdids "nor0=nor0"
setenv mtdparts "mtdparts=nor0:16m(boot),112m(images)"
ubi part images
ubifsmount ubi0:images

make sure we match "mtdparts" to whatever is given in dt w.r.t partition
sizes.

"mtdparts" command will list the mtd partitions in u-boot.

Once ubifs is mounted, we can use "ubifsls" to list the files in that
partition and use "ubifsload <addr> <filename>" to load files from ubifs
partition to DDR.

Reading information about mtd layout from DT is not supported.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agomicroblaze: Add support for little/big endian in/out api's
T Karthik Reddy [Fri, 21 Aug 2020 04:35:33 +0000 (22:35 -0600)]
microblaze: Add support for little/big endian in/out api's

Add read/write memory utilities for 16 and 32 bits. Add these
api's for both little and big endian systems similar to arm
architecture.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoboard: xilinx: Enable changing default DTB pick up address
Michal Simek [Thu, 20 Aug 2020 12:02:47 +0000 (14:02 +0200)]
board: xilinx: Enable changing default DTB pick up address

U-Boot on xilinx boards is checking one address where DTB can be placed as
the first location for DTB. Originally this code was developed for Versal
where QEMU was putting generated DTB for U-Boot to use.
The patch enables changing this address which is necessary for cases where
default address is pointing to location (DDR) which is not present. The
access to this location can cause exception.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>