summaryrefslogtreecommitdiff
path: root/drivers/phy
diff options
context:
space:
mode:
authorMarek BehĂșn <marek.behun@nic.cz>2018-04-24 17:21:23 +0200
committerStefan Roese <sr@denx.de>2018-05-14 10:00:15 +0200
commit22f418935be4f5c6de26d2563a61d68136d80586 (patch)
tree539ce4cbf754dd0a6d9f370b6141ce7f4f7de9bd /drivers/phy
parent3282a3e75fbea752f96df63baaad4c7f7d14d3b6 (diff)
phy: marvell: a3700: Use comphy_mux on Armada 37xx.
Lane 0 supports SGMII1 and USB3. Lane 1 supports SGMII0 and PEX0. Lane 2 supports SATA0 and USB3. This is needed for Armada 37xx. This introduces new device tree bindings. AFAIK there is currently no driver for Armada 37xx comphy in Linux. When such a driver will be pushed into Linux, this will need to be rewritten accordingly. Signed-off-by: Marek Behun <marek.behun@nic.cz> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/marvell/comphy_a3700.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/phy/marvell/comphy_a3700.c b/drivers/phy/marvell/comphy_a3700.c
index 90e594fddc..bf68f5d6be 100644
--- a/drivers/phy/marvell/comphy_a3700.c
+++ b/drivers/phy/marvell/comphy_a3700.c
@@ -13,6 +13,38 @@
DECLARE_GLOBAL_DATA_PTR;
+struct comphy_mux_data a3700_comphy_mux_data[] = {
+/* Lane 0 */
+ {
+ 4,
+ {
+ { PHY_TYPE_UNCONNECTED, 0x0 },
+ { PHY_TYPE_SGMII1, 0x0 },
+ { PHY_TYPE_USB3_HOST0, 0x1 },
+ { PHY_TYPE_USB3_DEVICE, 0x1 }
+ }
+ },
+/* Lane 1 */
+ {
+ 3,
+ {
+ { PHY_TYPE_UNCONNECTED, 0x0},
+ { PHY_TYPE_SGMII0, 0x0},
+ { PHY_TYPE_PEX0, 0x1}
+ }
+ },
+/* Lane 2 */
+ {
+ 4,
+ {
+ { PHY_TYPE_UNCONNECTED, 0x0},
+ { PHY_TYPE_SATA0, 0x0},
+ { PHY_TYPE_USB3_HOST0, 0x1},
+ { PHY_TYPE_USB3_DEVICE, 0x1}
+ }
+ },
+};
+
struct sgmii_phy_init_data_fix {
u16 addr;
u16 value;
@@ -932,6 +964,10 @@ int comphy_a3700_init(struct chip_serdes_phy_config *chip_cfg,
debug_enter();
+ /* Initialize PHY mux */
+ chip_cfg->mux_data = a3700_comphy_mux_data;
+ comphy_mux_init(chip_cfg, serdes_map, COMPHY_SEL_ADDR);
+
for (lane = 0, comphy_map = serdes_map; lane < comphy_max_count;
lane++, comphy_map++) {
debug("Initialize serdes number %d\n", lane);