From patchwork Thu Sep 3 03:28:57 2020 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: 297746 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_BASE64_TEXT, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 755D8C433E2 for ; Thu, 3 Sep 2020 03:31:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4521B2072A for ; Thu, 3 Sep 2020 03:31:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="k7yITeuz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728043AbgICDb1 (ORCPT ); Wed, 2 Sep 2020 23:31:27 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:20248 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726814AbgICDb0 (ORCPT ); Wed, 2 Sep 2020 23:31:26 -0400 X-UUID: 9e659e22f642458dbc5337c05c54f431-20200903 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=hociBLiC64wu1IzlEev33FmaQGVirv5h4VmmTW9yoM8=; b=k7yITeuz0KU582V07H75BwE3yF+BIJEzxiPibfmNydKLgRBh10lm06dONh04fwmEHEYMB+BuqDujlC9Jo7hyhMH74k59QkEuCNsk3+u1Zub9TzJAlPn5amDb/TJflLmsvhpi8SnvHJwdhJgOzzwwE3ryrUF61Hs9IesUAtXqJ4o=; X-UUID: 9e659e22f642458dbc5337c05c54f431-20200903 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1268380734; Thu, 03 Sep 2020 11:31:18 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 3 Sep 2020 11:31:14 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 3 Sep 2020 11:31:16 +0800 From: Chunfeng Yun To: Zhanyong Wang CC: , , , , Chunfeng Yun Subject: [RFC PATCH 2/4] usb: xhci-mtk: add mt8192 wakeup Date: Thu, 3 Sep 2020 11:28:57 +0800 Message-ID: <1599103739-7873-2-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1599103739-7873-1-git-send-email-chunfeng.yun@mediatek.com> References: <1599103739-7873-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: FEB47EC28599F8900A1B88EC2B675D27B0B83DB643C6363D646DBF0A312870782000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Zhanyong Wang need to add wakeup solution as V3 since not support presently. Signed-off-by: Zhanyong Wang Signed-off-by: Chunfeng Yun --- drivers/usb/host/xhci-mtk.c | 9 +++++++++ 1 file changed, 9 insertions(+) mode change 100644 => 100755 drivers/usb/host/xhci-mtk.c -- 1.9.1 diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c old mode 100644 new mode 100755 index 4311d4c..d95221f --- a/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c @@ -68,9 +68,13 @@ #define SSC_IP_SLEEP_EN BIT(4) #define SSC_SPM_INT_EN BIT(1) +/* mt8192 etc */ +#define SSC_IP_SLEEP_EN_V3 BIT(6) + enum ssusb_uwk_vers { SSUSB_UWK_V1 = 1, SSUSB_UWK_V2, + SSUSB_UWK_V3, }; static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk) @@ -305,6 +309,11 @@ static void usb_wakeup_ip_sleep_set(struct xhci_hcd_mtk *mtk, bool enable) msk = SSC_IP_SLEEP_EN | SSC_SPM_INT_EN; val = enable ? msk : 0; break; + case SSUSB_UWK_V3: + reg = mtk->uwk_reg_base + PERI_SSUSB_SPM_CTRL; + msk = SSC_IP_SLEEP_EN_V3 | SSC_SPM_INT_EN; + val = enable ? msk : 0; + break; default: return; }