From patchwork Tue Mar 21 14:50:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 9636725 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 EB58D602D6 for ; Tue, 21 Mar 2017 14:51:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD5FD28338 for ; Tue, 21 Mar 2017 14:51:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D197728417; Tue, 21 Mar 2017 14:51:15 +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=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 D093F28405 for ; Tue, 21 Mar 2017 14:51:10 +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=nhw6StXuygarmRdUbfm3hEvbO5+VlkN9fjduUN5VQ8s=; b=lr/vcWRkLZtQXFKUlgJn5U0MXs p0d1Bg0rxW4uXUFT/N6tnc4JetgY9+FRLwtxpxuS94MrOWJJiwgkoOMlWeBrU0dFWt3IV9VikQtHP QybgkJgwvxYVfe+yneChTWh5h4QFLx0P502LQJOWLojP4yZgHfhXZVJ10l40rd5PvBpBcAqFsFAxi VrU7NwcxQ2LO+q519dFYDmQAF3cdCVASdg+S6X+JrHMu6pIj+Afc4WyiZeBgFR4He/ckkvyVgvBLB mCaEYHIjF8W/wFzvFEP71sQpCWYMlwDJtdNIlux5Gipe5+sKfL2tYrkgRx2nMEFDjOPUp/8RJkIkb mvjTd8CA==; 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 1cqL7o-0006zm-Vi; Tue, 21 Mar 2017 14:51:04 +0000 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cqL7L-0006PV-Gk for linux-arm-kernel@lists.infradead.org; Tue, 21 Mar 2017 14:50:38 +0000 Received: by mail-pf0-x243.google.com with SMTP id o126so22267889pfb.1 for ; Tue, 21 Mar 2017 07:50:15 -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=kkhVPxrBqKUs8gACyPf0PL1uXSvU17B7puZpXGrkRGA=; b=owUyR4MQnXRR9cFFKopFITOmEy6J+mjlaJnbbopenE5y1rcB1DsKKBsZ9+uT33D08X JcOhJpbGCSQYfgRbQGEuuSgWiG9aD15Bo0wN+HdfWR2i3wo9EZmIkwonBj3dw9pxuX5C 7GbJD2OG6pNfBir3JnHkjT029IdUyvRqKpjuuNscD7CO3RHHRC5SN5Wu5kGNw9OaNxSo eSrx42lZZqpuU+8J1xdGWaor53hwjaY6JFVxzRQs1eXwWHgp1n/NbxNEsqFT1Ep806b9 wkej7k/wWwkrxoYhHLlAypdILgp/Yo4zWz0H+JqZQkIU5oIwNT/gdQZw5WmnHeX9XFrT FZ8g== 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=kkhVPxrBqKUs8gACyPf0PL1uXSvU17B7puZpXGrkRGA=; b=aNRengF9RwO8lap8lKIaRLJIl9tMFPBsQBes3U43rri9cyvLAuJzMXaUtlIOq6fXAs inmCL1L59ZLhR1Nec1By3fRzz7980CItUcz4+a3eMp1GUn+YCLBUOAgb6dq8Ep9vnQIF sFpkXtxjXKvkRRJs+AtydHgNVnQUpEIFkMrAquf8IQNrescPeSiZgVfNbOmDryNFt1dW iCzTGsUPGuqznK3hxDka1+fr7iwp+8iJZRecrMRl+qv3eDiDWPU0Rj6qjbpjXpOep2kt 1D/8aUUCAXa2zUBMdP+/+MGgigKeKpHyKPREun4Cb7IOfKQLnCG2WlOMTVpB24ZEPptn HqIw== X-Gm-Message-State: AFeK/H2PwbOj8tU/w5cX5r/VVb0OtcM0HyRsObK4/xi3ZWAcLrJ8g0lwAgFraLiZjTtsiA== X-Received: by 10.84.238.207 with SMTP id l15mr22279571pln.90.1490107814546; Tue, 21 Mar 2017 07:50:14 -0700 (PDT) Received: from squirtle.lan (c-73-19-0-61.hsd1.wa.comcast.net. [73.19.0.61]) by smtp.gmail.com with ESMTPSA id d1sm40190339pfk.20.2017.03.21.07.50.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Mar 2017 07:50:13 -0700 (PDT) From: Andrey Smirnov To: Shawn Guo Subject: [PATCH v7 1/2] dt-bindings: Add GPCv2 power gating driver Date: Tue, 21 Mar 2017 07:50:03 -0700 Message-Id: <20170321145004.21265-2-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170321145004.21265-1-andrew.smirnov@gmail.com> References: <20170321145004.21265-1-andrew.smirnov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170321_075035_588613_94DCE320 X-CRM114-Status: GOOD ( 17.83 ) 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, Dong Aisheng , 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: Dong Aisheng 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