diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2021-01-14 12:13:49 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2021-01-14 12:34:20 +0100 |
commit | 6c90999e2e0dee6e5e0322b89e8e6fb6f76aecc9 (patch) | |
tree | bf909eecacb6c901e37b8969f1b79c61e16a0b54 /target/linux/bcm4908/patches-5.4/084-v5.6-0003-phy-usb-Put-USB-phys-into-IDDQ-on-suspend-to-save-po.patch | |
parent | fa02225ee656c18b084988246a0ad83fb202c374 (diff) | |
download | upstream-6c90999e2e0dee6e5e0322b89e8e6fb6f76aecc9.tar.gz upstream-6c90999e2e0dee6e5e0322b89e8e6fb6f76aecc9.tar.bz2 upstream-6c90999e2e0dee6e5e0322b89e8e6fb6f76aecc9.zip |
bcm4908: backport brcmstb USB PHY driver changes
This includes BCM4908 support
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/bcm4908/patches-5.4/084-v5.6-0003-phy-usb-Put-USB-phys-into-IDDQ-on-suspend-to-save-po.patch')
-rw-r--r-- | target/linux/bcm4908/patches-5.4/084-v5.6-0003-phy-usb-Put-USB-phys-into-IDDQ-on-suspend-to-save-po.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/target/linux/bcm4908/patches-5.4/084-v5.6-0003-phy-usb-Put-USB-phys-into-IDDQ-on-suspend-to-save-po.patch b/target/linux/bcm4908/patches-5.4/084-v5.6-0003-phy-usb-Put-USB-phys-into-IDDQ-on-suspend-to-save-po.patch new file mode 100644 index 0000000000..356e305460 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/084-v5.6-0003-phy-usb-Put-USB-phys-into-IDDQ-on-suspend-to-save-po.patch @@ -0,0 +1,51 @@ +From 6597af4e4835ec0709638d48f73c11b5c624790f Mon Sep 17 00:00:00 2001 +From: Al Cooper <alcooperx@gmail.com> +Date: Fri, 3 Jan 2020 13:18:01 -0500 +Subject: [PATCH] phy: usb: Put USB phys into IDDQ on suspend to save power in + S2 mode + +Currently the Phy driver will put the USB phys into the max +power saving mode (IDDQ) when there is no corresponding XHCI, EHCI +or OHCI client (through rmmod, unbind or if the driver is not +builtin). This change will also put the Phys into IDDQ mode +on suspend so that S2 will get the additional power savings. + +Signed-off-by: Al Cooper <alcooperx@gmail.com> +Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> +Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> +--- + drivers/phy/broadcom/phy-brcm-usb-init.c | 2 -- + drivers/phy/broadcom/phy-brcm-usb.c | 11 +++++++++-- + 2 files changed, 9 insertions(+), 4 deletions(-) + +--- a/drivers/phy/broadcom/phy-brcm-usb-init.c ++++ b/drivers/phy/broadcom/phy-brcm-usb-init.c +@@ -1002,8 +1002,6 @@ void brcm_usb_uninit_common(struct brcm_ + + void brcm_usb_uninit_eohci(struct brcm_usb_init_params *params) + { +- if (USB_CTRL_MASK_FAMILY(params, USB_PM, USB20_HC_RESETB)) +- USB_CTRL_UNSET_FAMILY(params, USB_PM, USB20_HC_RESETB); + } + + void brcm_usb_uninit_xhci(struct brcm_usb_init_params *params) +--- a/drivers/phy/broadcom/phy-brcm-usb.c ++++ b/drivers/phy/broadcom/phy-brcm-usb.c +@@ -381,8 +381,15 @@ static int brcm_usb_phy_suspend(struct d + struct brcm_usb_phy_data *priv = dev_get_drvdata(dev); + + if (priv->init_count) { +- clk_disable_unprepare(priv->usb_20_clk); +- clk_disable_unprepare(priv->usb_30_clk); ++ if (priv->phys[BRCM_USB_PHY_3_0].inited) ++ brcm_usb_uninit_xhci(&priv->ini); ++ if (priv->phys[BRCM_USB_PHY_2_0].inited) ++ brcm_usb_uninit_eohci(&priv->ini); ++ brcm_usb_uninit_common(&priv->ini); ++ if (priv->phys[BRCM_USB_PHY_3_0].inited) ++ clk_disable_unprepare(priv->usb_30_clk); ++ if (priv->phys[BRCM_USB_PHY_2_0].inited) ++ clk_disable_unprepare(priv->usb_20_clk); + } + return 0; + } |