summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-06-17 08:44:56 -0400
committerTom Rini <trini@konsulko.com>2021-06-17 08:44:56 -0400
commita298d4fbcdba1b38e48ea2af0fc5386cab2070da (patch)
tree95419b69fe8896407e65f293c74c44e7242ae56f /drivers
parent7e585b5a61cfa68e3f76e60fd9f373367c8566a9 (diff)
parentb7efcaff8bb5196b9271bcfaeb0a5f100b3867c2 (diff)
downloadu-boot-a298d4fbcdba1b38e48ea2af0fc5386cab2070da.tar.gz
u-boot-a298d4fbcdba1b38e48ea2af0fc5386cab2070da.tar.bz2
u-boot-a298d4fbcdba1b38e48ea2af0fc5386cab2070da.zip
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
- fsl-qoriq: Bug fixes related pfe, eth, thermal node, vid.c, cpu release, mmc, usb, env, etc for Layerscape boards - powerpc: Update Maintainers for some boards.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/Kconfig7
-rw-r--r--drivers/mmc/fsl_esdhc.c17
-rw-r--r--drivers/mmc/fsl_esdhc_imx.c7
-rw-r--r--drivers/net/pfe_eth/pfe_cmd.c2
-rw-r--r--drivers/net/pfe_eth/pfe_firmware.c60
-rw-r--r--drivers/net/tsec.c7
-rw-r--r--drivers/pci/pcie_layerscape_ep.c4
7 files changed, 91 insertions, 13 deletions
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 8901456967..0909f502a1 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -798,6 +798,13 @@ config FSL_ESDHC_33V_IO_RELIABILITY_WORKAROUND
This option assumes no hotplug, and u-boot has to make all the way to
to linux to use 1.8v UHS-I speed mode if has card.
+config FSL_ESDHC_VS33_NOT_SUPPORT
+ bool "3.3V power supply not supported"
+ depends on FSL_ESDHC
+ help
+ For eSDHC, power supply is through peripheral circuit. 3.3V support is
+ common. Select this if 3.3V power supply not supported.
+
config FSL_ESDHC_IMX
bool "Freescale/NXP i.MX eSDHC controller support"
help
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 7501fdb71e..1d98fa65c4 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2007, 2010-2011 Freescale Semiconductor, Inc
- * Copyright 2019-2020 NXP
+ * Copyright 2019-2021 NXP
* Andy Fleming
*
* Based vaguely on the pxa mmc code:
@@ -795,10 +795,21 @@ static void fsl_esdhc_get_cfg_common(struct fsl_esdhc_priv *priv,
u32 caps;
caps = esdhc_read32(&regs->hostcapblt);
+
+ /*
+ * For eSDHC, power supply is through peripheral circuit. Some eSDHC
+ * versions have value 0 of the bit but that does not reflect the
+ * truth. 3.3V is common for SD/MMC, and is supported for all boards
+ * with eSDHC in current u-boot. So, make 3.3V is supported in
+ * default in code. CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT can be enabled
+ * if future board does not support 3.3V.
+ */
+ caps |= HOSTCAPBLT_VS33;
+ if (IS_ENABLED(CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT))
+ caps &= ~HOSTCAPBLT_VS33;
+
if (IS_ENABLED(CONFIG_SYS_FSL_ERRATUM_ESDHC135))
caps &= ~(HOSTCAPBLT_SRS | HOSTCAPBLT_VS18 | HOSTCAPBLT_VS30);
- if (IS_ENABLED(CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33))
- caps |= HOSTCAPBLT_VS33;
if (caps & HOSTCAPBLT_VS18)
cfg->voltages |= MMC_VDD_165_195;
if (caps & HOSTCAPBLT_VS30)
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index a4675838e5..566ce046ae 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2007, 2010-2011 Freescale Semiconductor, Inc
- * Copyright 2019 NXP Semiconductors
+ * Copyright 2019, 2021 NXP
* Andy Fleming
* Yangbo Lu <yangbo.lu@nxp.com>
*
@@ -1234,11 +1234,6 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv,
ESDHC_HOSTCAPBLT_VS18 | ESDHC_HOSTCAPBLT_VS30);
#endif
-/* T4240 host controller capabilities register should have VS33 bit */
-#ifdef CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33
- caps = caps | ESDHC_HOSTCAPBLT_VS33;
-#endif
-
if (caps & ESDHC_HOSTCAPBLT_VS18)
voltage_caps |= MMC_VDD_165_195;
if (caps & ESDHC_HOSTCAPBLT_VS30)
diff --git a/drivers/net/pfe_eth/pfe_cmd.c b/drivers/net/pfe_eth/pfe_cmd.c
index 1e69525cb7..364750f65c 100644
--- a/drivers/net/pfe_eth/pfe_cmd.c
+++ b/drivers/net/pfe_eth/pfe_cmd.c
@@ -418,7 +418,7 @@ static void send_dummy_pkt_to_hif(void)
writel(buf, TMU_PHY_INQ_PKTINFO);
}
-static void pfe_command_stop(int argc, char *const argv[])
+void pfe_command_stop(int argc, char *const argv[])
{
int pfe_pe_id, hif_stop_loop = 10;
u32 rx_status;
diff --git a/drivers/net/pfe_eth/pfe_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c
index eee70a2e73..ac86e33c55 100644
--- a/drivers/net/pfe_eth/pfe_firmware.c
+++ b/drivers/net/pfe_eth/pfe_firmware.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2015-2016 Freescale Semiconductor, Inc.
- * Copyright 2017 NXP
+ * Copyright 2017,2021 NXP
*/
/*
@@ -262,7 +262,8 @@ int pfe_firmware_init(void)
uintptr_t pfe_img_addr = 0;
#endif
int ret = 0;
- int fw_count;
+ int fw_count, max_fw_count;
+ const char *p;
ret = pfe_spi_flash_init();
if (ret)
@@ -293,6 +294,61 @@ int pfe_firmware_init(void)
}
#endif
+ p = env_get("load_util");
+ if (!p) {
+ max_fw_count = 2;
+ } else {
+ max_fw_count = simple_strtoul(p, NULL, 10);
+ if (max_fw_count)
+ max_fw_count = 3;
+ else
+ max_fw_count = 2;
+ }
+
+ for (fw_count = 0; fw_count < max_fw_count; fw_count++) {
+ switch (fw_count) {
+ case 0:
+ pfe_firmware_name = "class_slowpath";
+ break;
+ case 1:
+ pfe_firmware_name = "tmu_slowpath";
+ break;
+ case 2:
+ pfe_firmware_name = "util_slowpath";
+ break;
+ }
+
+ if (pfe_get_fw(&raw_image_addr, &raw_image_size,
+ pfe_firmware_name)) {
+ printf("%s firmware couldn't be found in FIT image\n",
+ pfe_firmware_name);
+ break;
+ }
+ pfe_firmware = malloc(raw_image_size);
+ if (!pfe_firmware)
+ return -ENOMEM;
+ memcpy((void *)pfe_firmware, (void *)raw_image_addr,
+ raw_image_size);
+
+ switch (fw_count) {
+ case 0:
+ env_set_addr("class_elf_firmware", pfe_firmware);
+ env_set_addr("class_elf_size", (void *)raw_image_size);
+ break;
+ case 1:
+ env_set_addr("tmu_elf_firmware", pfe_firmware);
+ env_set_addr("tmu_elf_size", (void *)raw_image_size);
+ break;
+ case 2:
+ env_set_addr("util_elf_firmware", pfe_firmware);
+ env_set_addr("util_elf_size", (void *)raw_image_size);
+ break;
+ }
+ }
+
+ raw_image_addr = NULL;
+ pfe_firmware = NULL;
+ raw_image_size = 0;
for (fw_count = 0; fw_count < 2; fw_count++) {
if (fw_count == 0)
pfe_firmware_name = "class";
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index c68e4b7fb5..ee820aae15 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -828,6 +828,7 @@ int tsec_probe(struct udevice *dev)
const char *phy_mode;
ofnode parent, child;
fdt_addr_t reg;
+ u32 max_speed;
int ret;
data = (struct tsec_data *)dev_get_driver_data(dev);
@@ -893,8 +894,12 @@ int tsec_probe(struct udevice *dev)
}
priv->interface = pdata->phy_interface;
+ /* Check for speed limit, default is 1000Mbps */
+ max_speed = dev_read_u32_default(dev, "max-speed", 1000);
+
/* Initialize flags */
- priv->flags = TSEC_GIGABIT;
+ if (max_speed == 1000)
+ priv->flags = TSEC_GIGABIT;
if (priv->interface == PHY_INTERFACE_MODE_SGMII)
priv->flags |= TSEC_SGMII;
diff --git a/drivers/pci/pcie_layerscape_ep.c b/drivers/pci/pcie_layerscape_ep.c
index c7231635e4..f2813aeef6 100644
--- a/drivers/pci/pcie_layerscape_ep.c
+++ b/drivers/pci/pcie_layerscape_ep.c
@@ -269,6 +269,10 @@ static int ls_pcie_ep_probe(struct udevice *dev)
pcie->idx = ((unsigned long)pcie->dbi - PCIE_SYS_BASE_ADDR) /
PCIE_CCSR_SIZE;
+ /* This controller is disabled by RCW */
+ if (!is_serdes_configured(PCIE_SRDS_PRTCL(pcie->idx)))
+ return 0;
+
pcie->big_endian = fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
"big-endian");