From patchwork Thu Mar 16 13:30:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 9628187 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 9BC136048C for ; Thu, 16 Mar 2017 13:31:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A1E528518 for ; Thu, 16 Mar 2017 13:31:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C398285EB; Thu, 16 Mar 2017 13:31:45 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham 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 3EF9028518 for ; Thu, 16 Mar 2017 13:31:44 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=IpnBo+j4JrUahW0VSd6bVgqFSVGK1eWdVPKem2S9DoE=; b=Tq7kejiPbgcNUJESr9Altx1TkN 2w99ZDeE1MJw1l1BycnUdJZCXr6SWd+PRHd5ceL0/KTp6HNRxL3QVJRpqe47qmVjGk/0m/TZkWp1Z 9XL44zjM8Rs38J+FBCT4rQfmDOG76MAIJgj5Ohc5ODUFf9SOQahGa/Uk8kyMIM8a8VTgHLUam9RK5 6GS9KmmIUBkbQIhM6O+0ZMy4sBP4/8xj5EUmzdQr3WMV6J8S5kJDY2qNZhwlUZpues0DJNbVRE0On ESzUtveamyiPGUuc704533JmASu9sa/4IBwbTCGziYPnJcbi2kdMCL/iDpoXFZbNYOI6Jz25BFGZ3 77ffRLwA==; 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 1coVVA-0001C2-L8; Thu, 16 Mar 2017 13:31:36 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1coVV4-00017C-Pd for linux-arm-kernel@lists.infradead.org; Thu, 16 Mar 2017 13:31:35 +0000 Received: by mail-pf0-x244.google.com with SMTP id p189so310024pfp.0 for ; Thu, 16 Mar 2017 06:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3NMtxiapnmM0/QQyXNV/QNYG8yRJ9gkPtwW5CJHQGHs=; b=TxfPlnDGzJPUixuHCL4bkmZDCIUh2/WgNX+kitsz9vqlp5IAdDq3MWTjPik4HYiVFQ ca3bE6Cdre3FBw6pFDn4Mnkm8Cst/vgxqQoXLqlWHBHboZQ07vgFF6YBhcN6zrrzlpA1 TRglhdpeW+bd1B5Frk2vViN2j3TnLocdRXBx/DtExvqWf7rm8MojuhcjVqHPX/Mv8o7o yPpQq9um5gq5h9gt++b+dAqiehTGLmn/kAuxB9SDaqUdfryzKS6HuES8O4LSjaBY0d0V meMzayrG8Skb6geTI3CWjK+yfUsiw4QOW9nTHqwSM8sS6JSPk8jGps1R/hPr6pCOm3Gd yPnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3NMtxiapnmM0/QQyXNV/QNYG8yRJ9gkPtwW5CJHQGHs=; b=pPk2RVJOBcWXo8qQBuIlcWJOVmnfCW0dsVZuM2EkMESBSH/efyAjxKtHSYghEDMgzL HtxaEPMnOUn6eVo6r9QmQdX/s78MAXntMViDTGbQIv7bhgki7lfewwVCPjwfAHwbpb0U XnQDOmEtOCvajTh+/RVWvw1qX6XRhSiMPlKV9qcAshW530s2cA5otFq2dhw+AGpcgCKb mbLCTI8cltVG5SGILXYfGOfJak2rrXkkiSnJw7NhnSdbYEl7RrztFqZ/AXPPWZ8MxaAM 5Ba96nn7W4h6N1HhGAAD/bTyfy9fpzXfZP8fTx3hH9ej1TBFsmfZEe2Ir5VCjhzVxPLN hnhg== X-Gm-Message-State: AFeK/H3vT/iww+dKPJWDlqY1/3Kt7tFMr1WPTEcy1yhsJSdDDBBCS1Uyv/w5GENmlIPmrQ== X-Received: by 10.84.231.201 with SMTP id g9mr12365639pln.91.1489671069514; Thu, 16 Mar 2017 06:31:09 -0700 (PDT) Received: from squirtle.lan ([2601:602:9400:8377:f0f2:a63b:2597:b3d9]) by smtp.gmail.com with ESMTPSA id t5sm10853652pgb.36.2017.03.16.06.31.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Mar 2017 06:31:08 -0700 (PDT) From: Andrey Smirnov To: shawnguo@kernel.org Subject: [PATCH v6 1/2] dt-bindings: Add GPCv2 power gating driver Date: Thu, 16 Mar 2017 06:30:49 -0700 Message-Id: <20170316133050.28471-2-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170316133050.28471-1-andrew.smirnov@gmail.com> References: <20170316133050.28471-1-andrew.smirnov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170316_063130_882717_683CD572 X-CRM114-Status: GOOD ( 17.28 ) X-BeenThere: linux-arm-kernel@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, Andrey Smirnov , linux-kernel@vger.kernel.org, Rob Herring , Fabio Estevam , yurovsky@gmail.com, linux-arm-kernel@lists.infradead.org, Lucas Stach MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add DT bindings for power domain driver for GPCv2 IP block found in i.MX7 SoCs. Cc: yurovsky@gmail.com Cc: Lucas Stach Cc: Rob Herring Cc: Mark Rutland Cc: Fabio Estevam Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Andrey Smirnov --- .../devicetree/bindings/power/fsl,imx-gpcv2.txt | 71 ++++++++++++++++++++++ include/dt-bindings/power/imx7-power.h | 18 ++++++ 2 files changed, 89 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/fsl,imx-gpcv2.txt create mode 100644 include/dt-bindings/power/imx7-power.h diff --git a/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.txt b/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.txt new file mode 100644 index 0000000..02f45c6 --- /dev/null +++ b/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.txt @@ -0,0 +1,71 @@ +Freescale i.MX General Power Controller v2 +========================================== + +The i.MX7S/D General Power Control (GPC) block contains Power Gating +Control (PGC) for various power domains. + +Required properties: + +- compatible: Should be "fsl,imx7d-gpc" + +- reg: should be register base and length as documented in the + datasheet + +- interrupts: Should contain GPC interrupt request 1 + +Power domains contained within GPC node are generic power domain +providers, documented in +Documentation/devicetree/bindings/power/power_domain.txt, which are +described as subnodes of the power gating controller 'pgc' node, +which, in turn, is expected to contain the following: + +Required properties: + +- reg: Power domain index. Valid values are defined in + include/dt-bindings/power/imx7-power.h + +- #power-domain-cells: Should be 0 + +Optional properties: + +- power-supply: Power supply used to power the domain + +Example: + + gpc: gpc@303a0000 { + compatible = "fsl,imx7d-gpc"; + reg = <0x303a0000 0x1000>; + interrupt-controller; + interrupts = ; + #interrupt-cells = <3>; + interrupt-parent = <&intc>; + + pgc { + #address-cells = <1>; + #size-cells = <0>; + + pgc_pcie_phy: power-domain@3 { + #power-domain-cells = <0>; + + reg = ; + power-supply = <®_1p0d>; + }; + }; + }; + + +Specifying power domain for IP modules +====================================== + +IP cores belonging to a power domain should contain a 'power-domains' +property that is a phandle for PGC node representing the domain. + +Example of a device that is part of the PCIE_PHY power domain: + + pcie: pcie@33800000 { + reg = <0x33800000 0x4000>, + <0x4ff00000 0x80000>; + /* ... */ + power-domains = <&pgc_pcie_phy>; + /* ... */ + }; diff --git a/include/dt-bindings/power/imx7-power.h b/include/dt-bindings/power/imx7-power.h new file mode 100644 index 0000000..eb70023 --- /dev/null +++ b/include/dt-bindings/power/imx7-power.h @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2017 Impinj + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __DT_BINDINGS_IMX7_POWER_H__ +#define __DT_BINDINGS_IMX7_POWER_H__ + +#define IMX7_POWER_DOMAIN_USB_HSIC_PHY 0 +#define IMX7_POWER_DOMAIN_USB_OTG2_PHY 1 +#define IMX7_POWER_DOMAIN_USB_OTG1_PHY 2 +#define IMX7_POWER_DOMAIN_PCIE_PHY 3 +#define IMX7_POWER_DOMAIN_MIPI_PHY 4 + +#endif