From patchwork Fri Aug 30 07:40:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11123149 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 24FEB14DE for ; Fri, 30 Aug 2019 07:41:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0AC9022CE3 for ; Fri, 30 Aug 2019 07:41:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728117AbfH3HlL (ORCPT ); Fri, 30 Aug 2019 03:41:11 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:10160 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727854AbfH3HlL (ORCPT ); Fri, 30 Aug 2019 03:41:11 -0400 X-UUID: 89e8f8ff514044f780f222ecb40ce195-20190830 X-UUID: 89e8f8ff514044f780f222ecb40ce195-20190830 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 615170812; Fri, 30 Aug 2019 15:41:09 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 30 Aug 2019 15:41:03 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 30 Aug 2019 15:41:03 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Rob Herring CC: Mark Rutland , Matthias Brugger , Mathias Nyman , Chunfeng Yun , , , , , Subject: [PATCH v3 1/7] dt-bindings: usb: mtu3: support USB wakeup for MT8183 Date: Fri, 30 Aug 2019 15:40:48 +0800 Message-ID: <1567150854-30033-2-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1567150854-30033-1-git-send-email-chunfeng.yun@mediatek.com> References: <1567150854-30033-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 5648F664D3A45E38B21BD09BCDABB7717E65D2A36ED442D7A15BE200D4CF5ECA2000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Support USB wakeup by ip-sleep mode for MT8183 Signed-off-by: Chunfeng Yun Acked-by: Rob Herring --- v2~v3: no changes --- Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt index 3382b5cb471d..ed954bedcd2f 100644 --- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt +++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt @@ -48,6 +48,7 @@ Optional properties: "wakeup-source", and has two arguments: - the first one : register base address of the glue layer in syscon; - the second one : hardware version of the glue layer + - 0 : used by mt8183 etc - 1 : used by mt8173 etc - 2 : used by mt2712 etc - mediatek,u3p-dis-msk : mask to disable u3ports, bit0 for u3port0, From patchwork Fri Aug 30 07:40:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11123161 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D8C2C14DE for ; Fri, 30 Aug 2019 07:41:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B561322CE3 for ; Fri, 30 Aug 2019 07:41:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728535AbfH3Hlx (ORCPT ); Fri, 30 Aug 2019 03:41:53 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:6834 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727850AbfH3HlL (ORCPT ); Fri, 30 Aug 2019 03:41:11 -0400 X-UUID: ce7d44543744417aa03c9ca28e5b5118-20190830 X-UUID: ce7d44543744417aa03c9ca28e5b5118-20190830 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1227119480; Fri, 30 Aug 2019 15:41:07 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 30 Aug 2019 15:41:04 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 30 Aug 2019 15:41:04 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Rob Herring CC: Mark Rutland , Matthias Brugger , Mathias Nyman , Chunfeng Yun , , , , , Subject: [PATCH v3 2/7] dt-bindings: usb: mtk-xhci: support USB wakeup for MT8183 Date: Fri, 30 Aug 2019 15:40:49 +0800 Message-ID: <1567150854-30033-3-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1567150854-30033-1-git-send-email-chunfeng.yun@mediatek.com> References: <1567150854-30033-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 6C9C836D67E7B14D202054BEF9E7889287F1D85743C99B776EFFA6FE2D7BBD872000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Support USB wakeup by ip-sleep mode for MT8183 Signed-off-by: Chunfeng Yun Acked-by: Rob Herring --- v2~v3: no changes --- Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt index 266c2d917a28..9a0a9eb0456f 100644 --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt @@ -41,6 +41,7 @@ Optional properties: "wakeup-source", and has two arguments: - the first one : register base address of the glue layer in syscon; - the second one : hardware version of the glue layer + - 0 : used by mt8183 etc - 1 : used by mt8173 etc - 2 : used by mt2712 etc - mediatek,u3p-dis-msk : mask to disable u3ports, bit0 for u3port0, From patchwork Fri Aug 30 07:40:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11123147 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 70ABC14DE for ; Fri, 30 Aug 2019 07:41:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 57BC82342A for ; Fri, 30 Aug 2019 07:41:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728442AbfH3Hle (ORCPT ); Fri, 30 Aug 2019 03:41:34 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:5077 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726975AbfH3HlO (ORCPT ); Fri, 30 Aug 2019 03:41:14 -0400 X-UUID: db604b29063f487497010dbfd16a10cb-20190830 X-UUID: db604b29063f487497010dbfd16a10cb-20190830 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1778108743; Fri, 30 Aug 2019 15:41:08 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 30 Aug 2019 15:41:06 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 30 Aug 2019 15:41:05 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Rob Herring CC: Mark Rutland , Matthias Brugger , Mathias Nyman , Chunfeng Yun , , , , , Subject: [PATCH v3 3/7] usb: mtu3: support ip-sleep wakeup for MT8183 Date: Fri, 30 Aug 2019 15:40:50 +0800 Message-ID: <1567150854-30033-4-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1567150854-30033-1-git-send-email-chunfeng.yun@mediatek.com> References: <1567150854-30033-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: F74322B90E1477F19AF735F69436CA832E94AD1F20C9FF0287F2AC178D6C26032000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Support USB wakeup by ip-sleep mode for MT8183, it's similar to MT8173 Signed-off-by: Chunfeng Yun --- v3: changes micros define v2: no changes --- drivers/usb/mtu3/mtu3_host.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c index c871b94f3e6f..4f8208885ebd 100644 --- a/drivers/usb/mtu3/mtu3_host.c +++ b/drivers/usb/mtu3/mtu3_host.c @@ -18,6 +18,12 @@ #include "mtu3.h" #include "mtu3_dr.h" +/* mt8183 etc */ +#define PERI_WK_CTRL0 0x20 +#define WC0_IS_C(x) (((x) & 0xf) << 28) /* cycle debounce */ +#define WC0_IS_P BIT(12) /* polarity */ +#define WC0_IS_EN BIT(6) + /* mt8173 etc */ #define PERI_WK_CTRL1 0x4 #define WC1_IS_C(x) (((x) & 0xf) << 26) /* cycle debounce */ @@ -30,7 +36,8 @@ #define SSC_SPM_INT_EN BIT(1) enum ssusb_uwk_vers { - SSUSB_UWK_V1 = 1, + SSUSB_UWK_V0 = 0, + SSUSB_UWK_V1, SSUSB_UWK_V2, }; @@ -43,6 +50,11 @@ static void ssusb_wakeup_ip_sleep_set(struct ssusb_mtk *ssusb, bool enable) u32 reg, msk, val; switch (ssusb->uwk_vers) { + case SSUSB_UWK_V0: + reg = ssusb->uwk_reg_base + PERI_WK_CTRL0; + 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_V1: reg = ssusb->uwk_reg_base + PERI_WK_CTRL1; msk = WC1_IS_EN | WC1_IS_C(0xf) | WC1_IS_P; From patchwork Fri Aug 30 07:40:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11123155 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 42F861800 for ; Fri, 30 Aug 2019 07:41:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 261E022CE3 for ; Fri, 30 Aug 2019 07:41:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728465AbfH3Hlm (ORCPT ); Fri, 30 Aug 2019 03:41:42 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:12945 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728263AbfH3Hll (ORCPT ); Fri, 30 Aug 2019 03:41:41 -0400 X-UUID: 9833484203254332b3cccbd93e8fca5c-20190830 X-UUID: 9833484203254332b3cccbd93e8fca5c-20190830 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 406786229; Fri, 30 Aug 2019 15:41:09 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 30 Aug 2019 15:41:07 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 30 Aug 2019 15:41:06 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Rob Herring CC: Mark Rutland , Matthias Brugger , Mathias Nyman , Chunfeng Yun , , , , , Subject: [PATCH v3 4/7] usb: mtk-xhci: support ip-sleep wakeup for MT8183 Date: Fri, 30 Aug 2019 15:40:51 +0800 Message-ID: <1567150854-30033-5-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1567150854-30033-1-git-send-email-chunfeng.yun@mediatek.com> References: <1567150854-30033-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 0CC1AD750E0584FBAD4C3A1BDC6182D22AD563DBB0112078F6AB14F6D427608F2000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Support USB wakeup by ip-sleep mode for MT8183, it's similar to MT8173 Signed-off-by: Chunfeng Yun --- v3: change micros define v2: no changes --- drivers/usb/host/xhci-mtk.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c index 026fe18972d3..9b30a868a7ab 100644 --- a/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c @@ -57,6 +57,12 @@ #define CTRL_U2_FORCE_PLL_STB BIT(28) /* usb remote wakeup registers in syscon */ +/* mt8183 etc */ +#define PERI_WK_CTRL0 0x20 +#define WC0_IS_C(x) (((x) & 0xf) << 28) /* cycle debounce */ +#define WC0_IS_P BIT(12) /* polarity */ +#define WC0_IS_EN BIT(6) + /* mt8173 etc */ #define PERI_WK_CTRL1 0x4 #define WC1_IS_C(x) (((x) & 0xf) << 26) /* cycle debounce */ @@ -69,7 +75,8 @@ #define SSC_SPM_INT_EN BIT(1) enum ssusb_uwk_vers { - SSUSB_UWK_V1 = 1, + SSUSB_UWK_V0 = 0, + SSUSB_UWK_V1, SSUSB_UWK_V2, }; @@ -282,6 +289,11 @@ static void usb_wakeup_ip_sleep_set(struct xhci_hcd_mtk *mtk, bool enable) u32 reg, msk, val; switch (mtk->uwk_vers) { + case SSUSB_UWK_V0: + reg = mtk->uwk_reg_base + PERI_WK_CTRL0; + 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_V1: reg = mtk->uwk_reg_base + PERI_WK_CTRL1; msk = WC1_IS_EN | WC1_IS_C(0xf) | WC1_IS_P; From patchwork Fri Aug 30 07:40:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11123157 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 587C216B1 for ; Fri, 30 Aug 2019 07:41:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E39723429 for ; Fri, 30 Aug 2019 07:41:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726731AbfH3HlL (ORCPT ); Fri, 30 Aug 2019 03:41:11 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:25944 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727866AbfH3HlL (ORCPT ); Fri, 30 Aug 2019 03:41:11 -0400 X-UUID: fe5b99b60b2d4a3383b30f281390990b-20190830 X-UUID: fe5b99b60b2d4a3383b30f281390990b-20190830 Received: from mtkcas36.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 2133285241; Fri, 30 Aug 2019 15:41:10 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 30 Aug 2019 15:41:08 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 30 Aug 2019 15:41:07 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Rob Herring CC: Mark Rutland , Matthias Brugger , Mathias Nyman , Chunfeng Yun , , , , , Subject: [PATCH v3 5/7] arm64: dts: mt8183: add usb and phy nodes Date: Fri, 30 Aug 2019 15:40:52 +0800 Message-ID: <1567150854-30033-6-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1567150854-30033-1-git-send-email-chunfeng.yun@mediatek.com> References: <1567150854-30033-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: BF373ACC4DF95141A9EFF43D24165B9D0EC931E41FD4D9A927ECBA6E8C56F9A42000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add USB related nodes for MT8183, set it as host mode by default. Signed-off-by: Chunfeng Yun --- v2~v3: no changes --- arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 22 +++++++++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 55 +++++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts index d8e555cbb5d3..142ff52f0f42 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts @@ -6,7 +6,9 @@ */ /dts-v1/; +#include #include "mt8183.dtsi" +#include "mt6358.dtsi" / { model = "MediaTek MT8183 evaluation board"; @@ -24,6 +26,16 @@ chosen { stdout-path = "serial0:921600n8"; }; + + usb_vbus: regulator@0 { + compatible = "regulator-fixed"; + regulator-name = "p0_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&pio 42 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + }; }; &auxadc { @@ -135,6 +147,16 @@ }; +&ssusb { + vusb33-supply = <&mt6358_vusb_reg>; + dr_mode = "host"; + status = "okay"; +}; + +&usb_host { + status = "okay"; +}; + &uart0 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index c2749c4631bc..28da334237c6 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -8,6 +8,7 @@ #include #include #include +#include #include "mt8183-pinfunc.h" / { @@ -372,6 +373,35 @@ status = "disabled"; }; + ssusb: usb@11201000 { + compatible = "mediatek,mt8183-mtu3", "mediatek,mtu3"; + reg = <0 0x11201000 0 0x2e00>, + <0 0x11203e00 0 0x0100>; + reg-names = "mac", "ippc"; + interrupts = ; + phys = <&u2port0 PHY_TYPE_USB2>, + <&u3port0 PHY_TYPE_USB3>; + clocks = <&infracfg CLK_INFRA_UNIPRO_SCK>, + <&infracfg CLK_INFRA_USB>; + clock-names = "sys_ck", "ref_ck"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + status = "disabled"; + + usb_host: xhci@11200000 { + compatible = "mediatek,mt8183-xhci", + "mediatek,mtk-xhci"; + reg = <0 0x11200000 0 0x1000>; + reg-names = "mac"; + interrupts = ; + clocks = <&infracfg CLK_INFRA_UNIPRO_SCK>, + <&infracfg CLK_INFRA_USB>; + clock-names = "sys_ck", "ref_ck"; + status = "disabled"; + }; + }; + audiosys: syscon@11220000 { compatible = "mediatek,mt8183-audiosys", "syscon"; reg = <0 0x11220000 0 0x1000>; @@ -384,6 +414,31 @@ reg = <0 0x11f10000 0 0x1000>; }; + u3phy: usb-phy@11f40000 { + compatible = "mediatek,mt8183-tphy", + "mediatek,generic-tphy-v2"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0x11f40000 0x1000>; + status = "okay"; + + u2port0: usb-phy@0 { + reg = <0x0 0x700>; + clocks = <&clk26m>; + clock-names = "ref"; + #phy-cells = <1>; + status = "okay"; + }; + + u3port0: usb-phy@0700 { + reg = <0x0700 0x900>; + clocks = <&clk26m>; + clock-names = "ref"; + #phy-cells = <1>; + status = "okay"; + }; + }; + mfgcfg: syscon@13000000 { compatible = "mediatek,mt8183-mfgcfg", "syscon"; reg = <0 0x13000000 0 0x1000>; From patchwork Fri Aug 30 07:40:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11123145 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A768914DE for ; Fri, 30 Aug 2019 07:41:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E08D23426 for ; Fri, 30 Aug 2019 07:41:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728290AbfH3HlO (ORCPT ); Fri, 30 Aug 2019 03:41:14 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:3067 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727887AbfH3HlO (ORCPT ); Fri, 30 Aug 2019 03:41:14 -0400 X-UUID: f42814d68111448c986f6cefe92d81fa-20190830 X-UUID: f42814d68111448c986f6cefe92d81fa-20190830 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1839471834; Fri, 30 Aug 2019 15:41:11 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 30 Aug 2019 15:41:09 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 30 Aug 2019 15:41:08 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Rob Herring CC: Mark Rutland , Matthias Brugger , Mathias Nyman , Chunfeng Yun , , , , , Subject: [PATCH v3 6/7] arm64: dts: mt8183: enable USB remote wakeup Date: Fri, 30 Aug 2019 15:40:53 +0800 Message-ID: <1567150854-30033-7-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1567150854-30033-1-git-send-email-chunfeng.yun@mediatek.com> References: <1567150854-30033-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 1E1B670F99A285A7C3CB3FC2D312BC2B75886602C36DDB7B6204CBAE04CE82E32000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Enable USB remote wakeup for MT8183 Signed-off-by: Chunfeng Yun --- v3: remove '#reset-cells' v2: no changes --- arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 1 + arch/arm64/boot/dts/mediatek/mt8183.dtsi | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts index 142ff52f0f42..077256f3397b 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts @@ -150,6 +150,7 @@ &ssusb { vusb33-supply = <&mt6358_vusb_reg>; dr_mode = "host"; + wakeup-source; status = "okay"; }; diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index 28da334237c6..dc3e859849c7 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -215,6 +215,12 @@ #clock-cells = <1>; }; + pericfg: syscon@10003000 { + compatible = "mediatek,mt8183-pericfg", "syscon"; + reg = <0 0x10003000 0 0x1000>; + #clock-cells = <1>; + }; + pio: pinctrl@10005000 { compatible = "mediatek,mt8183-pinctrl"; reg = <0 0x10005000 0 0x1000>, @@ -384,6 +390,7 @@ clocks = <&infracfg CLK_INFRA_UNIPRO_SCK>, <&infracfg CLK_INFRA_USB>; clock-names = "sys_ck", "ref_ck"; + mediatek,syscon-wakeup = <&pericfg 0x400 0>; #address-cells = <2>; #size-cells = <2>; ranges; From patchwork Fri Aug 30 07:40:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11123141 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E91A914DE for ; Fri, 30 Aug 2019 07:41:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D11FE23426 for ; Fri, 30 Aug 2019 07:41:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728332AbfH3HlR (ORCPT ); Fri, 30 Aug 2019 03:41:17 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:31927 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727854AbfH3HlQ (ORCPT ); Fri, 30 Aug 2019 03:41:16 -0400 X-UUID: 31e272001e6647b7b7f64196f730eacb-20190830 X-UUID: 31e272001e6647b7b7f64196f730eacb-20190830 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 9569756; Fri, 30 Aug 2019 15:41:14 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 30 Aug 2019 15:41:10 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 30 Aug 2019 15:41:09 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Rob Herring CC: Mark Rutland , Matthias Brugger , Mathias Nyman , Chunfeng Yun , , , , , Subject: [PATCH v3 7/7] arm64: dts: mt8183: tune disconnect threshold of u2phy Date: Fri, 30 Aug 2019 15:40:54 +0800 Message-ID: <1567150854-30033-8-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1567150854-30033-1-git-send-email-chunfeng.yun@mediatek.com> References: <1567150854-30033-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: CCBFA59E6DD3D401F653311DC00B6A03FCCB12A28648BE00ECCE3A8A1C5C85292000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Set DISCTH to max-15, replace the default value 8, due to default disconnect threshold is lower than USB SPEC define Signed-off-by: Chunfeng Yun --- v3: no changes v2: new patch --- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index dc3e859849c7..5168e345ea3f 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -434,6 +434,7 @@ clocks = <&clk26m>; clock-names = "ref"; #phy-cells = <1>; + mediatek,discth = <15>; status = "okay"; };