summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-09-04 10:09:14 -0400
committerTom Rini <trini@konsulko.com>2020-09-04 10:09:14 -0400
commite5df264e7aaca0d94428586837a1f70a23479d16 (patch)
tree782e909a558d8646e795e53cdf831d463f87869e
parent9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426 (diff)
parent3e5420e99aa026cf4c6889d695e8e1e250c6d996 (diff)
downloadu-boot-e5df264e7aaca0d94428586837a1f70a23479d16.tar.gz
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
- Fix SATA issue on Armada 3720 - Enable more SPI NOR chips in espressobin defconfig
-rw-r--r--configs/mvebu_espressobin-88f3720_defconfig2
-rw-r--r--drivers/phy/marvell/comphy_a3700.c33
2 files changed, 16 insertions, 19 deletions
diff --git a/configs/mvebu_espressobin-88f3720_defconfig b/configs/mvebu_espressobin-88f3720_defconfig
index 0c1c92d4ff..ec32906408 100644
--- a/configs/mvebu_espressobin-88f3720_defconfig
+++ b/configs/mvebu_espressobin-88f3720_defconfig
@@ -55,6 +55,8 @@ CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_SPI_FLASH_GIGADEVICE=y
+CONFIG_SPI_FLASH_ISSI=y
CONFIG_PHYLIB=y
CONFIG_PHY_MARVELL=y
CONFIG_PHY_GIGE=y
diff --git a/drivers/phy/marvell/comphy_a3700.c b/drivers/phy/marvell/comphy_a3700.c
index dc188c44e0..4606de6f48 100644
--- a/drivers/phy/marvell/comphy_a3700.c
+++ b/drivers/phy/marvell/comphy_a3700.c
@@ -273,16 +273,23 @@ static void reg_set_indirect(u32 reg, u16 data, u16 mask)
*
* return: 1 if PLL locked (OK), 0 otherwise (FAIL)
*/
-static int comphy_sata_power_up(void)
+static int comphy_sata_power_up(u32 invert)
{
int ret;
+ u32 data = 0;
debug_enter();
/*
- * 0. Swap SATA TX lines
+ * 0. Check the Polarity invert bits
*/
- reg_set_indirect(vphy_sync_pattern_reg, bs_txd_inv, bs_txd_inv);
+ if (invert & PHY_POLARITY_TXD_INVERT)
+ data |= bs_txd_inv;
+
+ if (invert & PHY_POLARITY_RXD_INVERT)
+ data |= bs_rxd_inv;
+
+ reg_set_indirect(vphy_sync_pattern_reg, data, bs_txd_inv | bs_rxd_inv);
/*
* 1. Select 40-bit data width width
@@ -925,22 +932,6 @@ void comphy_dedicated_phys_init(void)
}
node = fdt_node_offset_by_compatible(blob, -1,
- "marvell,armada-3700-ahci");
- if (node > 0) {
- if (fdtdec_get_is_enabled(blob, node)) {
- ret = comphy_sata_power_up();
- if (!ret)
- printf("Failed to initialize SATA PHY\n");
- else
- debug("SATA PHY init succeed\n");
- } else {
- debug("SATA node is disabled\n");
- }
- } else {
- debug("No SATA node in DT\n");
- }
-
- node = fdt_node_offset_by_compatible(blob, -1,
"marvell,armada-8k-sdhci");
if (node <= 0) {
node = fdt_node_offset_by_compatible(
@@ -1007,6 +998,10 @@ int comphy_a3700_init(struct chip_serdes_phy_config *chip_cfg,
comphy_map->invert);
break;
+ case PHY_TYPE_SATA0:
+ ret = comphy_sata_power_up(comphy_map->invert);
+ break;
+
default:
debug("Unknown SerDes type, skip initialize SerDes %d\n",
lane);