From: Frank Wang <frank.wang-TNX95d0MmH7DzftRWevZcw@public.gmane.org> To: heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org, marex-ynQEQJNshbs@public.gmane.org, bmeng.cn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, philipp.tomsich-SN7IsUiht6C/RdPyistoZJqQE7yCjDx5@public.gmane.org, klaus.goger-SN7IsUiht6C/RdPyistoZJqQE7yCjDx5@public.gmane.org, jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org, sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org Cc: jianing.ren-TNX95d0MmH7DzftRWevZcw@public.gmane.org, Frank Wang <frank.wang-TNX95d0MmH7DzftRWevZcw@public.gmane.org>, marek.belisko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, wmc-TNX95d0MmH7DzftRWevZcw@public.gmane.org, u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org, william.wu-TNX95d0MmH7DzftRWevZcw@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org, chenjh-TNX95d0MmH7DzftRWevZcw@public.gmane.org Subject: [PATCH v5 07/16] usb: dwc3: add dis_enblslpm_quirk Date: Wed, 13 May 2020 15:15:37 +0800 [thread overview] Message-ID: <20200513071546.5560-3-frank.wang@rock-chips.com> (raw) In-Reply-To: <20200513071546.5560-1-frank.wang-TNX95d0MmH7DzftRWevZcw@public.gmane.org> Add a quirk to clear the GUSB2PHYCFG.ENBLSLPM bit, which controls whether the PHY receives the suspend signal from the controller. Refer to commit ec791d149bca("usb: dwc3: Add dis_enblslpm_quirk") in Linux Kernel. Signed-off-by: Frank Wang <frank.wang-TNX95d0MmH7DzftRWevZcw@public.gmane.org> Reviewed-by: Kever Yang <kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org> Reviewed-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> Tested-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> --- drivers/usb/dwc3/core.c | 6 ++++++ drivers/usb/dwc3/core.h | 2 ++ include/dwc3-uboot.h | 1 + 3 files changed, 9 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 0972e458eb..20be617fd4 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -398,6 +398,9 @@ static void dwc3_phy_setup(struct dwc3 *dwc) if (dwc->dis_u2_susphy_quirk) reg &= ~DWC3_GUSB2PHYCFG_SUSPHY; + if (dwc->dis_enblslpm_quirk) + reg &= ~DWC3_GUSB2PHYCFG_ENBLSLPM; + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); mdelay(100); @@ -719,6 +722,7 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev) dwc->dis_u3_susphy_quirk = dwc3_dev->dis_u3_susphy_quirk; dwc->dis_u2_susphy_quirk = dwc3_dev->dis_u2_susphy_quirk; dwc->dis_del_phy_power_chg_quirk = dwc3_dev->dis_del_phy_power_chg_quirk; + dwc->dis_enblslpm_quirk = dwc3_dev->dis_enblslpm_quirk; dwc->tx_de_emphasis_quirk = dwc3_dev->tx_de_emphasis_quirk; if (dwc3_dev->tx_de_emphasis) @@ -926,6 +930,8 @@ void dwc3_of_parse(struct dwc3 *dwc) "snps,dis_u2_susphy_quirk"); dwc->dis_del_phy_power_chg_quirk = dev_read_bool(dev, "snps,dis-del-phy-power-chg-quirk"); + dwc->dis_enblslpm_quirk = dev_read_bool(dev, + "snps,dis_enblslpm_quirk"); dwc->tx_de_emphasis_quirk = dev_read_bool(dev, "snps,tx_de_emphasis_quirk"); tmp = dev_read_u8_array_ptr(dev, "snps,tx_de_emphasis", 1); diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 7f45a9c459..e76e357f1e 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -162,6 +162,7 @@ /* Global USB2 PHY Configuration Register */ #define DWC3_GUSB2PHYCFG_PHYSOFTRST (1 << 31) #define DWC3_GUSB2PHYCFG_SUSPHY (1 << 6) +#define DWC3_GUSB2PHYCFG_ENBLSLPM (1 << 8) #define DWC3_GUSB2PHYCFG_PHYIF(n) ((n) << 3) #define DWC3_GUSB2PHYCFG_PHYIF_MASK DWC3_GUSB2PHYCFG_PHYIF(1) #define DWC3_GUSB2PHYCFG_USBTRDTIM(n) ((n) << 10) @@ -822,6 +823,7 @@ struct dwc3 { unsigned dis_u3_susphy_quirk:1; unsigned dis_u2_susphy_quirk:1; unsigned dis_del_phy_power_chg_quirk:1; + unsigned dis_enblslpm_quirk:1; unsigned tx_de_emphasis_quirk:1; unsigned tx_de_emphasis:2; diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h index ecae34bf06..98d51e05e1 100644 --- a/include/dwc3-uboot.h +++ b/include/dwc3-uboot.h @@ -34,6 +34,7 @@ struct dwc3_device { unsigned dis_u3_susphy_quirk; unsigned dis_u2_susphy_quirk; unsigned dis_del_phy_power_chg_quirk; + unsigned dis_enblslpm_quirk; unsigned tx_de_emphasis_quirk; unsigned tx_de_emphasis; int index; -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Frank Wang <frank.wang@rock-chips.com> To: u-boot@lists.denx.de Subject: [PATCH v5 07/16] usb: dwc3: add dis_enblslpm_quirk Date: Wed, 13 May 2020 15:15:37 +0800 [thread overview] Message-ID: <20200513071546.5560-3-frank.wang@rock-chips.com> (raw) In-Reply-To: <20200513071546.5560-1-frank.wang@rock-chips.com> Add a quirk to clear the GUSB2PHYCFG.ENBLSLPM bit, which controls whether the PHY receives the suspend signal from the controller. Refer to commit ec791d149bca("usb: dwc3: Add dis_enblslpm_quirk") in Linux Kernel. Signed-off-by: Frank Wang <frank.wang@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com> --- drivers/usb/dwc3/core.c | 6 ++++++ drivers/usb/dwc3/core.h | 2 ++ include/dwc3-uboot.h | 1 + 3 files changed, 9 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 0972e458eb..20be617fd4 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -398,6 +398,9 @@ static void dwc3_phy_setup(struct dwc3 *dwc) if (dwc->dis_u2_susphy_quirk) reg &= ~DWC3_GUSB2PHYCFG_SUSPHY; + if (dwc->dis_enblslpm_quirk) + reg &= ~DWC3_GUSB2PHYCFG_ENBLSLPM; + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); mdelay(100); @@ -719,6 +722,7 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev) dwc->dis_u3_susphy_quirk = dwc3_dev->dis_u3_susphy_quirk; dwc->dis_u2_susphy_quirk = dwc3_dev->dis_u2_susphy_quirk; dwc->dis_del_phy_power_chg_quirk = dwc3_dev->dis_del_phy_power_chg_quirk; + dwc->dis_enblslpm_quirk = dwc3_dev->dis_enblslpm_quirk; dwc->tx_de_emphasis_quirk = dwc3_dev->tx_de_emphasis_quirk; if (dwc3_dev->tx_de_emphasis) @@ -926,6 +930,8 @@ void dwc3_of_parse(struct dwc3 *dwc) "snps,dis_u2_susphy_quirk"); dwc->dis_del_phy_power_chg_quirk = dev_read_bool(dev, "snps,dis-del-phy-power-chg-quirk"); + dwc->dis_enblslpm_quirk = dev_read_bool(dev, + "snps,dis_enblslpm_quirk"); dwc->tx_de_emphasis_quirk = dev_read_bool(dev, "snps,tx_de_emphasis_quirk"); tmp = dev_read_u8_array_ptr(dev, "snps,tx_de_emphasis", 1); diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 7f45a9c459..e76e357f1e 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -162,6 +162,7 @@ /* Global USB2 PHY Configuration Register */ #define DWC3_GUSB2PHYCFG_PHYSOFTRST (1 << 31) #define DWC3_GUSB2PHYCFG_SUSPHY (1 << 6) +#define DWC3_GUSB2PHYCFG_ENBLSLPM (1 << 8) #define DWC3_GUSB2PHYCFG_PHYIF(n) ((n) << 3) #define DWC3_GUSB2PHYCFG_PHYIF_MASK DWC3_GUSB2PHYCFG_PHYIF(1) #define DWC3_GUSB2PHYCFG_USBTRDTIM(n) ((n) << 10) @@ -822,6 +823,7 @@ struct dwc3 { unsigned dis_u3_susphy_quirk:1; unsigned dis_u2_susphy_quirk:1; unsigned dis_del_phy_power_chg_quirk:1; + unsigned dis_enblslpm_quirk:1; unsigned tx_de_emphasis_quirk:1; unsigned tx_de_emphasis:2; diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h index ecae34bf06..98d51e05e1 100644 --- a/include/dwc3-uboot.h +++ b/include/dwc3-uboot.h @@ -34,6 +34,7 @@ struct dwc3_device { unsigned dis_u3_susphy_quirk; unsigned dis_u2_susphy_quirk; unsigned dis_del_phy_power_chg_quirk; + unsigned dis_enblslpm_quirk; unsigned tx_de_emphasis_quirk; unsigned tx_de_emphasis; int index; -- 2.17.1
next prev parent reply other threads:[~2020-05-13 7:15 UTC|newest] Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-13 7:13 [PATCH v5 00/16] Add Rockchip RK3399 USB3.0 Host support Frank Wang 2020-05-13 7:13 ` Frank Wang 2020-05-13 7:13 ` [PATCH v5 01/16] clk: rk3399: Enable/Disable the USB2PHY clk Frank Wang 2020-05-13 7:13 ` Frank Wang 2020-05-15 2:15 ` Kever Yang 2020-05-15 2:15 ` Kever Yang [not found] ` <20200513071344.5430-1-frank.wang-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2020-05-13 7:13 ` [PATCH v5 02/16] clk: rk3399: Set empty for TCPHY assigned-clocks Frank Wang 2020-05-13 7:13 ` Frank Wang 2020-05-15 2:15 ` Kever Yang 2020-05-15 2:15 ` Kever Yang 2020-05-13 7:13 ` [PATCH v5 03/16] clk: rk3399: Enable/Disable TCPHY clocks Frank Wang 2020-05-13 7:13 ` Frank Wang [not found] ` <20200513071344.5430-4-frank.wang-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2020-05-15 2:15 ` Kever Yang 2020-05-15 2:15 ` Kever Yang 2020-05-13 7:13 ` [PATCH v5 04/16] phy: rockchip: Add Rockchip USB2PHY driver Frank Wang 2020-05-13 7:13 ` Frank Wang 2020-05-15 2:16 ` Kever Yang 2020-05-15 2:16 ` Kever Yang 2020-05-13 7:17 ` [PATCH v5 15/16] configs: evb-rk3399: update support usb3.0 host Frank Wang 2020-05-13 7:17 ` Frank Wang 2020-05-15 2:50 ` Kever Yang 2020-05-15 2:50 ` Kever Yang 2020-05-13 7:18 ` [PATCH v5 16/16] roc-rk3399-pc: Enable USB3.0 Host Frank Wang 2020-05-13 7:18 ` Frank Wang 2020-05-15 2:51 ` Kever Yang 2020-05-15 2:51 ` Kever Yang 2020-05-13 7:15 ` [PATCH v5 05/16] arm64: dts: rk3399: Move u2phy into root port Frank Wang 2020-05-13 7:15 ` Frank Wang [not found] ` <20200513071546.5560-1-frank.wang-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2020-05-13 7:15 ` [PATCH v5 06/16] phy: rockchip: Add Rockchip USB TypeC PHY driver Frank Wang 2020-05-13 7:15 ` Frank Wang 2020-05-15 2:40 ` Kever Yang 2020-05-15 2:40 ` Kever Yang 2020-05-13 7:15 ` Frank Wang [this message] 2020-05-13 7:15 ` [PATCH v5 07/16] usb: dwc3: add dis_enblslpm_quirk Frank Wang 2020-05-13 7:15 ` [PATCH v5 08/16] usb: dwc3: add dis_u2_freeclk_exists_quirk Frank Wang 2020-05-13 7:15 ` Frank Wang 2020-05-13 7:15 ` [PATCH v5 09/16] usb: dwc3: Add disable u2mac linestate check quirk Frank Wang 2020-05-13 7:15 ` Frank Wang [not found] ` <20200513071546.5560-5-frank.wang-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2020-05-15 2:48 ` Kever Yang 2020-05-15 2:48 ` Kever Yang 2020-05-15 2:40 ` [PATCH v5 05/16] arm64: dts: rk3399: Move u2phy into root port Kever Yang 2020-05-15 2:40 ` Kever Yang [not found] ` <2ec538ea-9ca2-92b7-3b57-be96862f3117-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2020-05-26 3:49 ` Frank Wang 2020-05-26 3:49 ` Frank Wang 2020-05-13 7:17 ` [PATCH v5 10/16] usb: dwc3: Enable AutoRetry feature in the controller Frank Wang 2020-05-13 7:17 ` Frank Wang [not found] ` <20200513071710.5651-1-frank.wang-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2020-05-13 7:17 ` [PATCH v5 11/16] usb: dwc3: amend UTMI/UTMIW phy interface setup Frank Wang 2020-05-13 7:17 ` Frank Wang 2020-05-13 7:17 ` [PATCH v5 12/16] usb: dwc3: add make compatible for rockchip platform Frank Wang 2020-05-13 7:17 ` Frank Wang 2020-05-15 2:49 ` Kever Yang 2020-05-15 2:49 ` Kever Yang 2020-05-13 7:17 ` [PATCH v5 13/16] driver: usb: drop legacy rockchip xhci driver Frank Wang 2020-05-13 7:17 ` Frank Wang 2020-05-15 2:50 ` Kever Yang 2020-05-15 2:50 ` Kever Yang 2020-05-13 7:17 ` [PATCH v5 14/16] ARM: dts: rk3399-evb: usb3.0 host support Frank Wang 2020-05-13 7:17 ` Frank Wang [not found] ` <20200513071710.5651-5-frank.wang-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2020-05-15 2:50 ` [PATCH v5 14/16] ARM: dts: rk3399-evb: usb3.0 host support【请注意,邮件由linux-rockchip-bounces+kever.yang=rock-chips.com@lists.infradead.org代发】 Kever Yang 2020-05-15 2:50 ` Kever Yang 2020-05-15 2:49 ` [PATCH v5 10/16] usb: dwc3: Enable AutoRetry feature in the controller Kever Yang 2020-05-15 2:49 ` Kever Yang 2020-05-25 9:06 ` [PATCH v5 00/16] Add Rockchip RK3399 USB3.0 Host support Marcin Juszkiewicz 2020-05-25 9:24 ` Jagan Teki 2020-05-25 9:27 ` Marcin Juszkiewicz 2020-05-25 9:32 ` Jagan Teki 2020-05-25 9:36 ` Marcin Juszkiewicz 2020-05-26 4:17 ` Jagan Teki
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200513071546.5560-3-frank.wang@rock-chips.com \ --to=frank.wang-tnx95d0mmh7dzftrwevzcw@public.gmane.org \ --cc=bmeng.cn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \ --cc=chenjh-TNX95d0MmH7DzftRWevZcw@public.gmane.org \ --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \ --cc=jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org \ --cc=jianing.ren-TNX95d0MmH7DzftRWevZcw@public.gmane.org \ --cc=kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org \ --cc=klaus.goger-SN7IsUiht6C/RdPyistoZJqQE7yCjDx5@public.gmane.org \ --cc=linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org \ --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=marek.belisko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \ --cc=marex-ynQEQJNshbs@public.gmane.org \ --cc=philipp.tomsich-SN7IsUiht6C/RdPyistoZJqQE7yCjDx5@public.gmane.org \ --cc=sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \ --cc=u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org \ --cc=william.wu-TNX95d0MmH7DzftRWevZcw@public.gmane.org \ --cc=wmc-TNX95d0MmH7DzftRWevZcw@public.gmane.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.