summaryrefslogtreecommitdiff
path: root/drivers/phy/marvell/comphy_core.c
diff options
context:
space:
mode:
authorMarek BehĂșn <marek.behun@nic.cz>2018-04-24 17:21:21 +0200
committerStefan Roese <sr@denx.de>2018-05-14 10:00:15 +0200
commit7586ac2b49dd3046868354201ab6a208c3a5b82c (patch)
treef22015dffc89ac087264c5fed6fda8c591e437e5 /drivers/phy/marvell/comphy_core.c
parent7d7f22fbd30ec925b278275bd8b950837d6d3c7e (diff)
phy: marvell: mux: Support nontrivial node order in selector register
Currently comphy_mux supports only trivial order of nodes in pin selector register, that is lane N on position N*bitcount. Add support for nontrivial order, with map stored in device tree property mux-lane-order. This is needed for Armada 37xx. As far as I know, there is no driver for Armada 37xx comphy in the kernel. When such a driver comes, this will need to be rewritten to support the device tree bindings from the kernel. Signed-off-by: Marek Behun <marek.behun@nic.cz> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/phy/marvell/comphy_core.c')
-rw-r--r--drivers/phy/marvell/comphy_core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/phy/marvell/comphy_core.c b/drivers/phy/marvell/comphy_core.c
index 17ab39c5d0..2622751f49 100644
--- a/drivers/phy/marvell/comphy_core.c
+++ b/drivers/phy/marvell/comphy_core.c
@@ -134,6 +134,10 @@ static int comphy_probe(struct udevice *dev)
return -EINVAL;
}
+ chip_cfg->comphy_mux_lane_order =
+ fdtdec_locate_array(blob, node, "mux-lane-order",
+ chip_cfg->comphy_lanes_count);
+
if (device_is_compatible(dev, "marvell,comphy-armada-3700"))
chip_cfg->ptr_comphy_chip_init = comphy_a3700_init;