aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2019-01-10 23:31:35 +0800
committerPetr Štetiar <ynezz@true.cz>2019-03-24 01:44:26 +0100
commitad8db1fa2e9111b22e94fbd149b27dee33291ff8 (patch)
treefed856d815fa70d43beff1adc09a47d953823ab1 /target/linux/generic/files/drivers
parentcf9900978af780226da2c1a178c7c6635e3793a0 (diff)
downloadupstream-ad8db1fa2e9111b22e94fbd149b27dee33291ff8.tar.gz
upstream-ad8db1fa2e9111b22e94fbd149b27dee33291ff8.tar.bz2
upstream-ad8db1fa2e9111b22e94fbd149b27dee33291ff8.zip
generic: ar8216: mdiodev: add qca,phy4-mii-enable option
This option allows setting phy4 as a phy connected directly to CPU. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/generic/files/drivers')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index c6e3a05299..f3cafc79a5 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -2574,6 +2574,12 @@ ar8xxx_mdiodev_probe(struct mdio_device *mdiodev)
swdev = &priv->dev;
swdev->alias = dev_name(&mdiodev->dev);
+
+ if (of_property_read_bool(priv->pdev->of_node, "qca,phy4-mii-enable")) {
+ priv->port4_phy = true;
+ swdev->ports--;
+ }
+
ret = register_switch(swdev, NULL);
if (ret)
goto free_priv;