Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-20 12:08:06 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-20 12:08:25 +0100
commit81c9fa16e4d0f052d9a86090739cc105e8f17b67 (patch)
treea6d24d6463dda559e819e0019bfdcd85dbe4f678
parent0cb5d714ed38ead4fca24acddc745605823a903c (diff)
phy: sun4i-usb: add support for missing USB PHY index
(bsc#1051510).
-rw-r--r--patches.drivers/phy-sun4i-usb-add-support-for-missing-USB-PHY-index.patch57
-rw-r--r--series.conf1
2 files changed, 58 insertions, 0 deletions
diff --git a/patches.drivers/phy-sun4i-usb-add-support-for-missing-USB-PHY-index.patch b/patches.drivers/phy-sun4i-usb-add-support-for-missing-USB-PHY-index.patch
new file mode 100644
index 0000000000..6d06de5f45
--- /dev/null
+++ b/patches.drivers/phy-sun4i-usb-add-support-for-missing-USB-PHY-index.patch
@@ -0,0 +1,57 @@
+From 2659392e5c08dff626e6db1d739adff58a94604d Mon Sep 17 00:00:00 2001
+From: Icenowy Zheng <icenowy@aosc.io>
+Date: Thu, 4 Oct 2018 20:28:47 +0800
+Subject: [PATCH] phy: sun4i-usb: add support for missing USB PHY index
+Git-commit: 2659392e5c08dff626e6db1d739adff58a94604d
+Patch-mainline: v5.0-rc1
+References: bsc#1051510
+
+The new Allwinner H6 SoC's USB2 PHY has two holes -- USB1 (which is a
+3.0 port with dedicated PHY) and USB2 (which doesn't exist at all).
+
+Add support for this kind of missing USB PHY index.
+
+Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
+Reviewed-by: Chen-Yu Tsai <wens@csie.org>
+Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/phy/allwinner/phy-sun4i-usb.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
+index d4dcd39b8d76..881078ff73f6 100644
+--- a/drivers/phy/allwinner/phy-sun4i-usb.c
++++ b/drivers/phy/allwinner/phy-sun4i-usb.c
+@@ -126,6 +126,7 @@ struct sun4i_usb_phy_cfg {
+ bool dedicated_clocks;
+ bool enable_pmu_unk1;
+ bool phy0_dual_route;
++ int missing_phys;
+ };
+
+ struct sun4i_usb_phy_data {
+@@ -646,6 +647,9 @@ static struct phy *sun4i_usb_phy_xlate(struct device *dev,
+ if (args->args[0] >= data->cfg->num_phys)
+ return ERR_PTR(-ENODEV);
+
++ if (data->cfg->missing_phys & BIT(args->args[0]))
++ return ERR_PTR(-ENODEV);
++
+ return data->phys[args->args[0]].phy;
+ }
+
+@@ -741,6 +745,9 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
+ struct sun4i_usb_phy *phy = data->phys + i;
+ char name[16];
+
++ if (data->cfg->missing_phys & BIT(i))
++ continue;
++
+ snprintf(name, sizeof(name), "usb%d_vbus", i);
+ phy->vbus = devm_regulator_get_optional(dev, name);
+ if (IS_ERR(phy->vbus)) {
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 97d455b136..a52abee5f4 100644
--- a/series.conf
+++ b/series.conf
@@ -20111,6 +20111,7 @@
patches.drivers/gpiolib-Fix-return-value-of-gpio_to_desc-stub-if-GPI.patch
patches.drivers/power-supply-olpc_battery-correct-the-temperature-un.patch
patches.drivers/usb-hub-delay-hub-autosuspend-if-USB3-port-is-still-.patch
+ patches.drivers/phy-sun4i-usb-add-support-for-missing-USB-PHY-index.patch
patches.drivers/usb-dwc3-Correct-the-logic-for-checking-TRB-full-in-.patch
patches.drivers/usb-mtu3-fix-the-issue-about-SetFeature-U1-U2_Enable.patch
patches.drivers/usb-dwc2-host-use-hrtimer-for-nak-retries.patch