Skip to content

Commit

Permalink
Merge tag 'imx-drivers-4.12' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/shawnguo/linux into next/drivers

i.MX drivers updates for 4.12:
 - A series from Lucas Stach which partly rewrites the imx gpc driver
   to support multiple power domains, and moves the related code from
   imx platform into drivers folder.
 - A series from Dong Aisheng which fixes the issues with Lucas' code
   changes and improves things.
 - Add workaround for i.MX6QP hardware erratum ERR009619 that is PRE
   clocks may be stalled during the power up sequencing of the PU power
   domain.
 - Add imx-gpcv2 driver to support power domains managed by GPCv2 IP
   block found on i.MX7 series of SoCs.

* tag 'imx-drivers-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  soc: imx: gpc: add workaround for i.MX6QP to the GPC PD driver
  dt-bindings: imx-gpc: add i.MX6 QuadPlus compatible
  soc: imx: gpc: add defines for domain index
  soc: imx: Add GPCv2 power gating driver
  dt-bindings: Add GPCv2 power gating driver
  soc: imx: gpc: remove unnecessary readable_reg callback
  dt-bindings: imx-gpc: correct the DOMAIN_INDEX using
  soc: imx: gpc: keep PGC_X_CTRL name align with reference manual
  soc: imx: gpc: fix comment when power up domain
  soc: imx: gpc: fix imx6sl gpc power domain regression
  soc: imx: gpc: fix domain_index sanity check issue
  soc: imx: gpc: fix the wrong using of regmap cache
  soc: imx: gpc: fix gpc clk get error handling
  soc: imx: move PGC handling to a new GPC driver
  dt-bindings: add multidomain support to i.MX GPC DT binding

Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Olof Johansson committed Apr 19, 2017
2 parents 7b02065 + 44c43c9 commit 912c9fb
Show file tree
Hide file tree
Showing 11 changed files with 1,010 additions and 245 deletions.
85 changes: 57 additions & 28 deletions Documentation/devicetree/bindings/power/fsl,imx-gpc.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,42 @@
Freescale i.MX General Power Controller
=======================================

The i.MX6Q General Power Control (GPC) block contains DVFS load tracking
counters and Power Gating Control (PGC) for the CPU and PU (GPU/VPU) power
domains.
The i.MX6 General Power Control (GPC) block contains DVFS load tracking
counters and Power Gating Control (PGC).

Required properties:
- compatible: Should be "fsl,imx6q-gpc" or "fsl,imx6sl-gpc"
- compatible: Should be one of the following:
- fsl,imx6q-gpc
- fsl,imx6qp-gpc
- fsl,imx6sl-gpc
- reg: should be register base and length as documented in the
datasheet
- interrupts: Should contain GPC interrupt request 1
- pu-supply: Link to the LDO regulator powering the PU power domain
- clocks: Clock phandles to devices in the PU power domain that need
to be enabled during domain power-up for reset propagation.
- #power-domain-cells: Should be 1, see below:
- interrupts: Should contain one interrupt specifier for the GPC interrupt
- clocks: Must contain an entry for each entry in clock-names.
See Documentation/devicetree/bindings/clocks/clock-bindings.txt for details.
- clock-names: Must include the following entries:
- ipg

The gpc node is a power-controller as documented by the generic power domain
bindings in Documentation/devicetree/bindings/power/power_domain.txt.
The power domains are generic power domain providers as documented in
Documentation/devicetree/bindings/power/power_domain.txt. They are described as
subnodes of the power gating controller 'pgc' node of the GPC and should
contain the following:

Required properties:
- reg: Must contain the DOMAIN_INDEX of this power domain
The following DOMAIN_INDEX values are valid for i.MX6Q:
ARM_DOMAIN 0
PU_DOMAIN 1
The following additional DOMAIN_INDEX value is valid for i.MX6SL:
DISPLAY_DOMAIN 2

- #power-domain-cells: Should be 0

Optional properties:
- clocks: a number of phandles to clocks that need to be enabled during domain
power-up sequencing to ensure reset propagation into devices located inside
this power domain
- power-supply: a phandle to the regulator powering this domain

Example:

Expand All @@ -25,35 +45,44 @@ Example:
reg = <0x020dc000 0x4000>;
interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>,
<0 90 IRQ_TYPE_LEVEL_HIGH>;
pu-supply = <&reg_pu>;
clocks = <&clks IMX6QDL_CLK_GPU3D_CORE>,
<&clks IMX6QDL_CLK_GPU3D_SHADER>,
<&clks IMX6QDL_CLK_GPU2D_CORE>,
<&clks IMX6QDL_CLK_GPU2D_AXI>,
<&clks IMX6QDL_CLK_OPENVG_AXI>,
<&clks IMX6QDL_CLK_VPU_AXI>;
#power-domain-cells = <1>;
clocks = <&clks IMX6QDL_CLK_IPG>;
clock-names = "ipg";

pgc {
#address-cells = <1>;
#size-cells = <0>;

power-domain@0 {
reg = <0>;
#power-domain-cells = <0>;
};

pd_pu: power-domain@1 {
reg = <1>;
#power-domain-cells = <0>;
power-supply = <&reg_pu>;
clocks = <&clks IMX6QDL_CLK_GPU3D_CORE>,
<&clks IMX6QDL_CLK_GPU3D_SHADER>,
<&clks IMX6QDL_CLK_GPU2D_CORE>,
<&clks IMX6QDL_CLK_GPU2D_AXI>,
<&clks IMX6QDL_CLK_OPENVG_AXI>,
<&clks IMX6QDL_CLK_VPU_AXI>;
};
};
};


Specifying power domain for IP modules
======================================

IP cores belonging to a power domain should contain a 'power-domains' property
that is a phandle pointing to the gpc device node and a DOMAIN_INDEX specifying
the power domain the device belongs to.
that is a phandle pointing to the power domain the device belongs to.

Example of a device that is part of the PU power domain:

vpu: vpu@02040000 {
reg = <0x02040000 0x3c000>;
/* ... */
power-domains = <&gpc 1>;
power-domains = <&pd_pu>;
/* ... */
};

The following DOMAIN_INDEX values are valid for i.MX6Q:
ARM_DOMAIN 0
PU_DOMAIN 1
The following additional DOMAIN_INDEX value is valid for i.MX6SL:
DISPLAY_DOMAIN 2
71 changes: 71 additions & 0 deletions Documentation/devicetree/bindings/power/fsl,imx-gpcv2.txt
Original file line number Diff line number Diff line change
@@ -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 = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
#interrupt-cells = <3>;
interrupt-parent = <&intc>;

pgc {
#address-cells = <1>;
#size-cells = <0>;

pgc_pcie_phy: power-domain@3 {
#power-domain-cells = <0>;

reg = <IMX7_POWER_DOMAIN_PCIE_PHY>;
power-supply = <&reg_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>;
/* ... */
};
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,7 @@ F: arch/arm/mach-mxs/
F: arch/arm/boot/dts/imx*
F: arch/arm/configs/imx*_defconfig
F: drivers/clk/imx/
F: drivers/soc/imx/
F: include/soc/imx/

ARM/FREESCALE VYBRID ARM ARCHITECTURE
Expand Down
Loading

0 comments on commit 912c9fb

Please sign in to comment.