Skip to contentSkip to conversation

phy: rockchip-snps-pcie3: only look for rockchip,pipe-grf on rk3588

PATCH Applied Aurelien Jarno 2 participants 2 messages Sep 27, 2022 – Sep 29, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: rockchip-snps-pcie3: only look for rockchip,pipe-grf on rk3588

The rockchip,pipe-grf property is only used on rk3588, but not on rk3568. Therefore this property is not present on rk3568 devices, leading to the following message:

rockchip-snps-pcie3-phy fe8c0000.phy: failed to find rockchip,pipe_grf regmap

Fix that by only looking for this property on rk3588.

Fixes 2e9bffc4f713d ("phy: rockchip: Support PCIe v3")
---
 drivers/phy/rockchip/phy-rockchip-snps-pcie3.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/phy/rockchip/phy-rockchip-snps-pcie3.c +9 -4
index 1917edda6b47..1dc12eb8dfd3 100644
@@ -257,10 +257,15 @@ static int rockchip_p3phy_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->phy_grf);
 	}
 
-	priv->pipe_grf = syscon_regmap_lookup_by_phandle(dev->of_node,
-							 "rockchip,pipe-grf");
-	if (IS_ERR(priv->pipe_grf))
-		dev_info(dev, "failed to find rockchip,pipe_grf regmap\n");
+	if (of_device_is_compatible(np, "rockchip,rk3588-pcie3-phy")) {
+		priv->pipe_grf =
+			syscon_regmap_lookup_by_phandle(dev->of_node,
+							"rockchip,pipe-grf");
+		if (IS_ERR(priv->pipe_grf))
+			dev_info(dev, "failed to find rockchip,pipe_grf regmap\n");
+	} else {
+		priv->pipe_grf = NULL;
+	}
 
 	priv->num_lanes = of_property_read_variable_u32_array(dev->of_node, "data-lanes",
 							     priv->lanes, 2,
Signature · 1 line
2.35.1
maintainer Applied
#1 lore raw
Quoted 7 lines · Aurelien Jarno

The rockchip,pipe-grf property is only used on rk3588, but not on rk3568. Therefore this property is not present on rk3568 devices, leading to the following message:

rockchip-snps-pcie3-phy fe8c0000.phy: failed to find rockchip,pipe_grf regmap

Fix that by only looking for this property on rk3588.

Applied, thanks

Signature · 1 line
~Vinod