All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mathias Nyman <mathias.nyman@intel.com>
Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	<linux-usb@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Eddie Hung <eddie.hung@mediatek.com>,
	Nicolas Boichat <drinkcat@chromium.org>
Subject: [PATCH 11/13] usb: mtu3: add support ip-sleep wakeup for MT8192
Date: Mon, 22 Mar 2021 11:13:50 +0800	[thread overview]
Message-ID: <1616382832-28450-11-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1616382832-28450-1-git-send-email-chunfeng.yun@mediatek.com>

Add add support ip-sleep wakeup for MT8192, it's a specific
revision, not follow IP rule.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/mtu3/mtu3_host.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
index e35b17e5f58e..601656f436a1 100644
--- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c
@@ -30,6 +30,10 @@
 #define WC0_IS_P	BIT(12)	/* polarity */
 #define WC0_IS_EN	BIT(6)
 
+/* mt8192 */
+#define WC0_SSUSB0_CDEN		BIT(6)
+#define WC0_IS_SPM_EN		BIT(1)
+
 /* mt2712 etc */
 #define PERI_SSUSB_SPM_CTRL	0x0
 #define SSC_IP_SLEEP_EN	BIT(4)
@@ -39,6 +43,7 @@ enum ssusb_uwk_vers {
 	SSUSB_UWK_V1 = 1,
 	SSUSB_UWK_V2,
 	SSUSB_UWK_V11 = 11,	/* specific revision 1.1 */
+	SSUSB_UWK_V12,		/* specific revision 1.2 */
 };
 
 /*
@@ -60,6 +65,11 @@ static void ssusb_wakeup_ip_sleep_set(struct ssusb_mtk *ssusb, bool enable)
 		msk = WC0_IS_EN | WC0_IS_C(0xf) | WC0_IS_P;
 		val = enable ? (WC0_IS_EN | WC0_IS_C(0x8)) : 0;
 		break;
+	case SSUSB_UWK_V12:
+		reg = ssusb->uwk_reg_base + PERI_WK_CTRL0;
+		msk = WC0_SSUSB0_CDEN | WC0_IS_SPM_EN;
+		val = enable ? msk : 0;
+		break;
 	case SSUSB_UWK_V2:
 		reg = ssusb->uwk_reg_base + PERI_SSUSB_SPM_CTRL;
 		msk = SSC_IP_SLEEP_EN | SSC_SPM_INT_EN;
-- 
2.18.0


WARNING: multiple messages have this Message-ID (diff)
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mathias Nyman <mathias.nyman@intel.com>
Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	<linux-usb@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	 <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Eddie Hung <eddie.hung@mediatek.com>,
	Nicolas Boichat <drinkcat@chromium.org>
Subject: [PATCH 11/13] usb: mtu3: add support ip-sleep wakeup for MT8192
Date: Mon, 22 Mar 2021 11:13:50 +0800	[thread overview]
Message-ID: <1616382832-28450-11-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1616382832-28450-1-git-send-email-chunfeng.yun@mediatek.com>

Add add support ip-sleep wakeup for MT8192, it's a specific
revision, not follow IP rule.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/mtu3/mtu3_host.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
index e35b17e5f58e..601656f436a1 100644
--- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c
@@ -30,6 +30,10 @@
 #define WC0_IS_P	BIT(12)	/* polarity */
 #define WC0_IS_EN	BIT(6)
 
+/* mt8192 */
+#define WC0_SSUSB0_CDEN		BIT(6)
+#define WC0_IS_SPM_EN		BIT(1)
+
 /* mt2712 etc */
 #define PERI_SSUSB_SPM_CTRL	0x0
 #define SSC_IP_SLEEP_EN	BIT(4)
@@ -39,6 +43,7 @@ enum ssusb_uwk_vers {
 	SSUSB_UWK_V1 = 1,
 	SSUSB_UWK_V2,
 	SSUSB_UWK_V11 = 11,	/* specific revision 1.1 */
+	SSUSB_UWK_V12,		/* specific revision 1.2 */
 };
 
 /*
@@ -60,6 +65,11 @@ static void ssusb_wakeup_ip_sleep_set(struct ssusb_mtk *ssusb, bool enable)
 		msk = WC0_IS_EN | WC0_IS_C(0xf) | WC0_IS_P;
 		val = enable ? (WC0_IS_EN | WC0_IS_C(0x8)) : 0;
 		break;
+	case SSUSB_UWK_V12:
+		reg = ssusb->uwk_reg_base + PERI_WK_CTRL0;
+		msk = WC0_SSUSB0_CDEN | WC0_IS_SPM_EN;
+		val = enable ? msk : 0;
+		break;
 	case SSUSB_UWK_V2:
 		reg = ssusb->uwk_reg_base + PERI_SSUSB_SPM_CTRL;
 		msk = SSC_IP_SLEEP_EN | SSC_SPM_INT_EN;
-- 
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mathias Nyman <mathias.nyman@intel.com>
Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	<linux-usb@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	 <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Eddie Hung <eddie.hung@mediatek.com>,
	Nicolas Boichat <drinkcat@chromium.org>
Subject: [PATCH 11/13] usb: mtu3: add support ip-sleep wakeup for MT8192
Date: Mon, 22 Mar 2021 11:13:50 +0800	[thread overview]
Message-ID: <1616382832-28450-11-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1616382832-28450-1-git-send-email-chunfeng.yun@mediatek.com>

Add add support ip-sleep wakeup for MT8192, it's a specific
revision, not follow IP rule.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/mtu3/mtu3_host.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
index e35b17e5f58e..601656f436a1 100644
--- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c
@@ -30,6 +30,10 @@
 #define WC0_IS_P	BIT(12)	/* polarity */
 #define WC0_IS_EN	BIT(6)
 
+/* mt8192 */
+#define WC0_SSUSB0_CDEN		BIT(6)
+#define WC0_IS_SPM_EN		BIT(1)
+
 /* mt2712 etc */
 #define PERI_SSUSB_SPM_CTRL	0x0
 #define SSC_IP_SLEEP_EN	BIT(4)
@@ -39,6 +43,7 @@ enum ssusb_uwk_vers {
 	SSUSB_UWK_V1 = 1,
 	SSUSB_UWK_V2,
 	SSUSB_UWK_V11 = 11,	/* specific revision 1.1 */
+	SSUSB_UWK_V12,		/* specific revision 1.2 */
 };
 
 /*
@@ -60,6 +65,11 @@ static void ssusb_wakeup_ip_sleep_set(struct ssusb_mtk *ssusb, bool enable)
 		msk = WC0_IS_EN | WC0_IS_C(0xf) | WC0_IS_P;
 		val = enable ? (WC0_IS_EN | WC0_IS_C(0x8)) : 0;
 		break;
+	case SSUSB_UWK_V12:
+		reg = ssusb->uwk_reg_base + PERI_WK_CTRL0;
+		msk = WC0_SSUSB0_CDEN | WC0_IS_SPM_EN;
+		val = enable ? msk : 0;
+		break;
 	case SSUSB_UWK_V2:
 		reg = ssusb->uwk_reg_base + PERI_SSUSB_SPM_CTRL;
 		msk = SSC_IP_SLEEP_EN | SSC_SPM_INT_EN;
-- 
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-03-22  3:15 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22  3:13 [PATCH 01/13] dt-bindings: usb: mtk-xhci: support property usb2-lpm-disable Chunfeng Yun
2021-03-22  3:13 ` Chunfeng Yun
2021-03-22  3:13 ` Chunfeng Yun
2021-03-22  3:13 ` [PATCH 02/13] dt-bindings: usb: mtk-xhci: add support wakeup for mt8183 and mt8192 Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13 ` [PATCH 03/13] dt-bindings: usb: mtu3: " Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13 ` [PATCH 04/13] usb: xhci-mtk: fix broken streams issue on 0.96 xHCI Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13 ` [PATCH 05/13] usb: xhci-mtk: support quirk to disable usb2 lpm Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13 ` [PATCH 06/13] usb: xhci-mtk: support ip-sleep wakeup for MT8183 Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  8:54   ` Sergei Shtylyov
2021-03-22  8:54     ` Sergei Shtylyov
2021-03-22  8:54     ` Sergei Shtylyov
2021-03-23  2:39     ` Chunfeng Yun
2021-03-23  2:39       ` Chunfeng Yun
2021-03-23  2:39       ` Chunfeng Yun
2021-03-23  9:07   ` kernel test robot
2021-03-23  9:07     ` kernel test robot
2021-03-23  9:07     ` kernel test robot
2021-03-23  9:07     ` kernel test robot
2021-03-22  3:13 ` [PATCH 07/13] usb: xhci-mtk: add support ip-sleep wakeup for mT8192 Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  8:58   ` Sergei Shtylyov
2021-03-22  8:58     ` Sergei Shtylyov
2021-03-22  8:58     ` Sergei Shtylyov
2021-03-23  2:39     ` Chunfeng Yun
2021-03-23  2:39       ` Chunfeng Yun
2021-03-23  2:39       ` Chunfeng Yun
2021-03-22  3:13 ` [PATCH 08/13] usb: xhci-mtk: drop CONFIG_OF Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13 ` [PATCH 09/13] usb: xhci-mtk: remove MODULE_ALIAS Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13 ` [PATCH 10/13] usb: mtu3: support ip-sleep wakeup for MT8183 Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  8:57   ` Sergei Shtylyov
2021-03-22  8:57     ` Sergei Shtylyov
2021-03-22  8:57     ` Sergei Shtylyov
2021-03-23  2:40     ` Chunfeng Yun
2021-03-23  2:40       ` Chunfeng Yun
2021-03-23  2:40       ` Chunfeng Yun
2021-03-22 17:51   ` kernel test robot
2021-03-22 17:51     ` kernel test robot
2021-03-22 17:51     ` kernel test robot
2021-03-22 17:51     ` kernel test robot
2021-03-23  9:14   ` kernel test robot
2021-03-23  9:14     ` kernel test robot
2021-03-23  9:14     ` kernel test robot
2021-03-23  9:14     ` kernel test robot
2021-03-22  3:13 ` Chunfeng Yun [this message]
2021-03-22  3:13   ` [PATCH 11/13] usb: mtu3: add support ip-sleep wakeup for MT8192 Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13 ` [PATCH 12/13] usb: mtu3: drop CONFIG_OF Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13 ` [PATCH 13/13] arm64: dts: mt8183: update wakeup register offset Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun
2021-03-22  3:13   ` Chunfeng Yun

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=1616382832-28450-11-git-send-email-chunfeng.yun@mediatek.com \
    --to=chunfeng.yun@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=drinkcat@chromium.org \
    --cc=eddie.hung@mediatek.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.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: link
Be 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.