summaryrefslogtreecommitdiff
path: root/drivers/phy/marvell/comphy.h
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2016-08-30 16:48:20 +0200
committerStefan Roese <sr@denx.de>2016-09-27 17:29:54 +0200
commitc0132f60059d4a6809341d54f2fe744db8790421 (patch)
tree90845c17f41919fb7ab0f06ba7ba0369c1207e42 /drivers/phy/marvell/comphy.h
parent01e62c7f11eb4c1fe814f109ecb34e1a176eb33b (diff)
downloadu-boot-imx-c0132f60059d4a6809341d54f2fe744db8790421.zip
u-boot-imx-c0132f60059d4a6809341d54f2fe744db8790421.tar.gz
u-boot-imx-c0132f60059d4a6809341d54f2fe744db8790421.tar.bz2
drivers/phy: Add Marvell SerDes / PHY drivers used on Armada 7K/8K
This version is based on the Marvell U-Boot version with this patch applied as latest patch: Git ID 7f408573: "fix: comphy: cp110: add comphy initialization for usb device mode" from 2016-07-05. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Nadav Haklai <nadavh@marvell.com> Cc: Neta Zur Hershkovits <neta@marvell.com> Cc: Kostya Porotchkin <kostap@marvell.com> Cc: Omri Itach <omrii@marvell.com> Cc: Igal Liberman <igall@marvell.com> Cc: Haim Boot <hayim@marvell.com> Cc: Hanna Hawa <hannah@marvell.com>
Diffstat (limited to 'drivers/phy/marvell/comphy.h')
-rw-r--r--drivers/phy/marvell/comphy.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/phy/marvell/comphy.h b/drivers/phy/marvell/comphy.h
index 5c50e9c..df5b7d5 100644
--- a/drivers/phy/marvell/comphy.h
+++ b/drivers/phy/marvell/comphy.h
@@ -60,6 +60,9 @@
#define COMMON_PHY_SD_CTRL1_RXAUI0_MASK \
(0x1 << COMMON_PHY_SD_CTRL1_RXAUI0_OFFSET)
+/* ToDo: Get this address via DT */
+#define MVEBU_CP0_REGS_BASE 0xF2000000UL
+
#define DFX_DEV_GEN_CTRL12 (MVEBU_CP0_REGS_BASE + 0x400280)
#define DFX_DEV_GEN_PCIE_CLK_SRC_OFFSET 7
#define DFX_DEV_GEN_PCIE_CLK_SRC_MASK \
@@ -117,10 +120,21 @@ static inline int comphy_a3700_init(struct chip_serdes_phy_config *ptr_chip_cfg,
return -1;
}
#endif
-int comphy_ap806_init(struct chip_serdes_phy_config *ptr_chip_cfg,
- struct comphy_map *serdes_map);
+
+#ifdef CONFIG_ARMADA_8K
int comphy_cp110_init(struct chip_serdes_phy_config *ptr_chip_cfg,
struct comphy_map *serdes_map);
+#else
+static inline int comphy_cp110_init(struct chip_serdes_phy_config *ptr_chip_cfg,
+ struct comphy_map *serdes_map)
+{
+ /*
+ * This function should never be called in this configuration, so
+ * lets return an error here.
+ */
+ return -1;
+}
+#endif
void comphy_dedicated_phys_init(void);