From: Robert Marko <robert.marko@sartura.hr>
To: u-boot@lists.denx.de, sr@denx.de, pali@kernel.org, marek.behun@nic.cz
Cc: Robert Marko <robert.marko@sartura.hr>
Subject: [PATCH 2/4] net: mvneta: add SFP TX disable handling
Date: Wed, 23 Mar 2022 14:39:01 +0100 [thread overview]
Message-ID: <20220323133903.227676-2-robert.marko@sartura.hr> (raw)
In-Reply-To: <20220323133903.227676-1-robert.marko@sartura.hr>
Add support for handling SFP TX disable for MVNETA in the same fashion as
to what MVPP2 is doing in order to enable using SFP-s.
This allows using ethernet on SFP only boards.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
drivers/net/mvneta.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index 4a4268c2b2..53989d9f46 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -286,6 +286,7 @@ struct mvneta_port {
struct phy_device *phydev;
#if CONFIG_IS_ENABLED(DM_GPIO)
struct gpio_desc phy_reset_gpio;
+ struct gpio_desc phy_tx_disable_gpio;
#endif
struct mii_dev *bus;
};
@@ -1770,11 +1771,17 @@ static int mvneta_probe(struct udevice *dev)
gpio_request_by_name(dev, "phy-reset-gpios", 0,
&pp->phy_reset_gpio, GPIOD_IS_OUT);
+ gpio_request_by_name(dev, "marvell,sfp-tx-disable-gpio", 0,
+ &pp->phy_tx_disable_gpio, GPIOD_IS_OUT);
+
if (dm_gpio_is_valid(&pp->phy_reset_gpio)) {
dm_gpio_set_value(&pp->phy_reset_gpio, 1);
mdelay(10);
dm_gpio_set_value(&pp->phy_reset_gpio, 0);
}
+
+ if (dm_gpio_is_valid(&pp->phy_tx_disable_gpio))
+ dm_gpio_set_value(&pp->phy_tx_disable_gpio, 0);
#endif
return board_network_enable(bus);
--
2.35.1
next prev parent reply other threads:[~2022-03-23 13:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-23 13:39 [PATCH 1/4] arm: mvebu: dts: uDPU: update DTS Robert Marko
2022-03-23 13:39 ` Robert Marko [this message]
2022-03-23 15:20 ` [PATCH 2/4] net: mvneta: add SFP TX disable handling Marek Behún
2022-03-23 16:27 ` Robert Marko
2022-03-23 13:39 ` [PATCH 3/4] arm: mvebu: dts: uDPU: fix non-working networking Robert Marko
2022-03-23 13:39 ` [PATCH 4/4] mvebu: uDPU: update defconfig Robert Marko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220323133903.227676-2-robert.marko@sartura.hr \
--to=robert.marko@sartura.hr \
--cc=marek.behun@nic.cz \
--cc=pali@kernel.org \
--cc=sr@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.