Thread (12 messages) 12 messages, 5 authors, 2022-12-03

Re: [PATCH 2/2] ethernet: stmicro: stmmac: Add SGMII/QSGMII support for RK3568

From: Andrew Lunn <andrew@lunn.ch>
Date: 2022-11-29 18:32:19
Also in: linux-arm-kernel, linux-devicetree, lkml

quoted
-static int phy_power_on(struct rk_priv_data *bsp_priv, bool enable)
+static int rk_gmac_phy_power_on(struct rk_priv_data *bsp_priv, bool enable)
 {
 	struct regulator *ldo = bsp_priv->regulator;
 	int ret;
@@ -1728,6 +1909,18 @@ static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev,
 							"rockchip,grf");
 	bsp_priv->php_grf = syscon_regmap_lookup_by_phandle(dev->of_node,
 							    "rockchip,php-grf");
+	bsp_priv->xpcs = syscon_regmap_lookup_by_phandle(dev->of_node,
+							 "rockchip,xpcs");
+	if (!IS_ERR(bsp_priv->xpcs)) {
+		struct phy *comphy;
+
+		comphy = devm_of_phy_get(&pdev->dev, dev->of_node, NULL);
So instead of having PHY driver, you added a syscon and implemented PHY
driver here. No. Make a proper PHY driver.
I'm also thinking there should be a proper pcs driver in drivers/net/pcs.

    Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help