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: 846536 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yv2td6fVdz9sP9 for ; Sat, 9 Dec 2017 19:48:25 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751113AbdLIIsM (ORCPT ); Sat, 9 Dec 2017 03:48:12 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:46471 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751184AbdLIIrB (ORCPT ); Sat, 9 Dec 2017 03:47:01 -0500 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 CC: Mark Rutland , Greg Kroah-Hartman , Catalin Marinas , Will Deacon , Chunfeng Yun , Jean Delvare , Sean Wang , , , , , 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 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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>; + ... +}; +