From patchwork Tue Mar 14 15:05:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 9623683 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 995F3604CC for ; Tue, 14 Mar 2017 15:16:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89E6B28512 for ; Tue, 14 Mar 2017 15:16:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CF772858D; Tue, 14 Mar 2017 15:16:50 +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 F181228512 for ; Tue, 14 Mar 2017 15:16:49 +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=tBTUIRFnEztJ0FwYHzZPJb6ba5 zSGjTr40k+mWedfPzR6GD89M1ze6J1c4LoiTKh0y6bqwTHei+FrjWdsGEaoknB1iOXDgLGiWXiS9o 5UUe6fwKCBz62UEcCYmrNn7kgBBG4VyAleXK/dad5a6Ro2pBY6EPNv6t6G4aoWNiCTIEXhI7U9o7C 7uLHApCS+BO0QzBKhBK9O4+rY58mlqlrqJikDDdQW3VC7omhEebcJWeQN4pASrE4DvIJPZJt5MUIx MXZ7n3djeMSPODMAqUTSfRjTGkd++2GlwE3ZxkHmzw270hNZnYoW0IWSDxBwBn5dJjZJqooSFIqRv ZXoQpkUg==; 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 1cnoBr-0001fN-Nz; Tue, 14 Mar 2017 15:16:47 +0000 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cno1j-0003rY-GZ for linux-arm-kernel@lists.infradead.org; Tue, 14 Mar 2017 15:06:25 +0000 Received: by mail-pg0-x244.google.com with SMTP id b5so25072490pgg.1 for ; Tue, 14 Mar 2017 08:05:58 -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=T7kSHsZS4DuHmNTypO50BWkMcEax4FO+TPP8oDmb2PJ/Hv/z4Tvw44xfmmXIKtTMXA biQ7Ls+S0qRrcaKgDXVrTE45Hm+R4DuHKkpumfu41u5OtijW5Hehi7RjNEB4RWY9bqoi DAWD0AyY+ZmbYKevVAq9y+lueJvgOHjilMOimoQ4LtYulzh2WA2RzKla3k7pJ8sQftMc 3QOg5TfWviVa55cBxaNEjY+6y4Ai3NriKe3SG/b3mmCPmuer5T7FHri/bGZIPtqJqYp1 jSMeAkHvOOzn7GJw92COaqSgDFF3SwY2B44byW4onDeIWegEtNLIprY1SAA0mk/58ma1 lLLw== 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=pOJLaqEjyOjD95YUL66tz8kWM6CBA0NNTULfXorYYt7F9LVLnrn+hB4bNI7uunkhPh IC1KtpCmc+T+3CbK2i7h/0gn7MbfzmkvBd2D70q/ST4ZFuaXdDxi6UDQP9+aJReAZSgU J26lJKSHKfqykC8s36VLkgm3MXsaQQCPa0G2UPjNjjwaLdwg4cdIi1s0mz22nN3YmlhU c419wfLG+LXdtboBU8JCOXohv8TIE7Ofo4FnYwmg0lajlCI97ooWx2aA/Q1B1ozJjfKA h5xkqYdg1fhwLQDIA3sGTqHeHGWYFVerwAMLZTjN2+b/m/DdKy73gkzvF4aY7HK2NjoK O0ig== X-Gm-Message-State: AMke39k5U9mDyXAn2BWfIJelmuo8nGNk14CwAM531BV1KGETd9eA0dTHQabsxiztGbCrqQ== X-Received: by 10.84.208.102 with SMTP id f35mr57113135plh.19.1489503958487; Tue, 14 Mar 2017 08:05:58 -0700 (PDT) Received: from squirtle.lan ([2601:602:9400:8377:f0f2:a63b:2597:b3d9]) by smtp.gmail.com with ESMTPSA id m6sm39179549pfg.126.2017.03.14.08.05.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Mar 2017 08:05:57 -0700 (PDT) From: Andrey Smirnov To: Shawn Guo Subject: [PATCH v5 1/3] ARM: imx: Add GPCv2 power gating driver bindings Date: Tue, 14 Mar 2017 08:05:38 -0700 Message-Id: <20170314150540.27831-2-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170314150540.27831-1-andrew.smirnov@gmail.com> References: <20170314150540.27831-1-andrew.smirnov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170314_080619_685183_CEBB795B X-CRM114-Status: GOOD ( 17.75 ) 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