aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsuel Smith <ansuelsmth@gmail.com>2020-02-19 01:22:00 +0100
committerPetr Štetiar <ynezz@true.cz>2020-03-03 23:38:23 +0100
commit89423f6abf6d6a5046cdd7779661726ba83b796f (patch)
treec4359af548f6293cdb9768d88bab4ad3c23fad16
parente42aca06ab13fe6736624f56b37072cf432d2125 (diff)
downloadupstream-89423f6abf6d6a5046cdd7779661726ba83b796f.tar.gz
upstream-89423f6abf6d6a5046cdd7779661726ba83b796f.tar.bz2
upstream-89423f6abf6d6a5046cdd7779661726ba83b796f.zip
ipq806x: add patch to fix broken usb3
Due to changes in syscon driver, the phy dwc3 driver needs to use device_node_to_regmap since it has to skip the new introduced clk check. This fix broken usb3 on this target. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
-rw-r--r--target/linux/ipq806x/patches-5.4/0077-phy-dwc3-qcom-fix-kernel-5_4.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/target/linux/ipq806x/patches-5.4/0077-phy-dwc3-qcom-fix-kernel-5_4.patch b/target/linux/ipq806x/patches-5.4/0077-phy-dwc3-qcom-fix-kernel-5_4.patch
new file mode 100644
index 0000000000..11893ea11f
--- /dev/null
+++ b/target/linux/ipq806x/patches-5.4/0077-phy-dwc3-qcom-fix-kernel-5_4.patch
@@ -0,0 +1,29 @@
+--- a/drivers/phy/qualcomm/phy-qcom-dwc3.c
++++ b/drivers/phy/qualcomm/phy-qcom-dwc3.c
+@@ -491,7 +491,6 @@ static int qcom_dwc3_phy_probe(struct pl
+ struct qcom_dwc3_usb_phy *phy_dwc3;
+ struct phy_provider *phy_provider;
+ struct phy *generic_phy;
+- struct resource *res;
+ const struct of_device_id *match;
+ const struct qcom_dwc3_phy_drvdata *data;
+ struct device_node *np;
+@@ -505,7 +504,17 @@ static int qcom_dwc3_phy_probe(struct pl
+
+ phy_dwc3->dev = &pdev->dev;
+
+- phy_dwc3->base = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, "regmap");
++ np = of_parse_phandle(pdev->dev.of_node, "regmap", 0);
++ if (!np)
++ return -ENODEV;
++
++ if (!of_device_is_compatible(np, "syscon"))
++ return -EINVAL;
++
++ phy_dwc3->base = device_node_to_regmap(np);
++
++ of_node_put(np);
++
+ if (IS_ERR_OR_NULL(phy_dwc3->base))
+ return PTR_ERR_OR_ZERO(phy_dwc3->base) ? : -EINVAL;
+