From patchwork Sat Dec 9 08:45:31 2017 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: 10103613 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6BD7560329 for ; Sat, 9 Dec 2017 08:48:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B1F728FF6 for ; Sat, 9 Dec 2017 08:48:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 501FF29011; Sat, 9 Dec 2017 08:48:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4ECA128FF6 for ; Sat, 9 Dec 2017 08:48:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8t5Qa/yWwPxtcVkHxYCf2YEWTlvZpYHqqoG8PwVssh0=; b=uzP779MI4NEN6C JVR4fS9r9efSWYS1WVzZQdPnojtw3CLxCcF9wHMyPkSUb/LP0mw7EwbCTMlaNS3hjKXL7z+/bLiej 9xhCdvFjpm9DMOALTCWDEiwuYL5UwhjMvfxHonqLjxdODxHy0e9WiT46U8IDdFte91ZxGC2XUmQVm bykbNyLWyu2BIZXu/8sAW3YRfPNPjPBY6Miss9kq99pyWCgG2r8Z2CbuX3oe+PYMI2eqQO7mUYI55 78rsiVDXR9XApt99NAEfl41S2c+6YGx4s+PqHXTOSxNVrma8iKTrrHhyDHsXSRCFOAO96ERqEavlt yg7i4ECY1KZJvEEyY8hw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eNann-0007rL-IR; Sat, 09 Dec 2017 08:48:07 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eNan7-0007Bv-PT; Sat, 09 Dec 2017 08:47:27 +0000 X-UUID: 8c13ad9aad20453aa4ea04d17d24326d-20171209 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 691584701; Sat, 09 Dec 2017 16:46:56 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Sat, 9 Dec 2017 16:46:54 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Sat, 9 Dec 2017 16:46:54 +0800 From: Chunfeng Yun To: Rob Herring , Felipe Balbi , Matthias Brugger , Mathias Nyman Subject: [PATCH 2/7] dt-bindings: soc: mediatek: add bindings document for USB wakeup Date: Sat, 9 Dec 2017 16:45:31 +0800 Message-ID: <1512809136-2779-3-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1512809136-2779-1-git-send-email-chunfeng.yun@mediatek.com> References: <1512809136-2779-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171209_004726_027332_E54B6879 X-CRM114-Status: GOOD ( 14.45 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, linux-usb@vger.kernel.org, Greg Kroah-Hartman , Sean Wang , Will Deacon , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Catalin Marinas , Chunfeng Yun , Jean Delvare Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This adds bindings document for the SSUSB-SPM glue layer driver found in MediaTek SoCs which is used to support usb remote wakeup. Signed-off-by: Chunfeng Yun --- .../bindings/soc/mediatek/usb-wakeup.txt | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/mediatek/usb-wakeup.txt diff --git a/Documentation/devicetree/bindings/soc/mediatek/usb-wakeup.txt b/Documentation/devicetree/bindings/soc/mediatek/usb-wakeup.txt new file mode 100644 index 0000000..313d927 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/mediatek/usb-wakeup.txt @@ -0,0 +1,77 @@ +MediaTek USB Wakeup binding +----------------------------- + +The SSUSB-SPM glue layer is used to control some signals of USB +wakeup, such as IP-SLEEP, LINE-STATE, IDDIG etc, which are mutually +exclusive. + +Required properties (controller (parent) node): +- compatible: Should be one of: + - "mediatek,-uwk","mediatek,usb-wk-v1" + soc-model is the name of SoC, supports one of: + - mt8173, mt8176 + - "mediatek,-uwk","mediatek,usb-wk-v2" + soc-model is the name of SoC, supports one of: + - mt2712 + +- mediatek,wkc: must contain a syscon phandle, such as pericfg controller +- #address-cells : should be '1' +- #size-cells : should be '1' + +Required nodes: a sub-node is required for each glue layer provided for + each SSUSB IP. Address range information including the usual 'reg' + property is used inside these nodes to describe the controller's + topology. + +Required properties (glue layer (child) node): +- reg: address and length of the register set within the syscon which is + assigned to @mediatek,wkc. +- #mediatek,uwk-cells: should be 1 (see the second example), cell after + glue layer phandle is wakeup type from: + - MTU_WK_IP_SLEEP + - MTU_WK_LINE_STATE + The wakeup types defined in + - include/dt-bindings/soc/mediatek,usb-wakeup.h + + +Example: + +usb_wakeup: uwk@0 { + compatible = "mediatek,mt2712-uwk","mediatek,usb-wk-v2"; + mediatek,wkc = <&pericfg>; + #address-cells = <1>; + #size-cells = <1>; + status = "okay"; + + usb_wk0: uwk@510 { + reg = <0x510 0x4>; + #mediatek,uwk-cells = <1>; + status = "okay"; + }; + + usb_wk1: uwk@514 { + reg = <0x514 0x4>; + #mediatek,uwk-cells = <1>; + status = "okay"; + }; +}; + + +Specifying wakeup control of devices +--------------------------------- + +Device nodes should specify the configuration required in their +"mediatek,uwks" property, containing a phandle to the glue layer +node and a wakeup type, because each USB controller has just one +glue layer for wakeup, so only one phandle is supported; + +Example: + +#include + +usb_host1: xhci@112c0000 { + ... + mediatek,uwks = <&usb_wk2 MTU_WK_IP_SLEEP>; + ... +}; +