diff mbox

[3/6] ARM: dts: omap4-droid4: Add GPIO poweroff

Message ID 20170305054359.8293-4-tony@atomide.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tony Lindgren March 5, 2017, 5:43 a.m. UTC
Droid 4 has a GPIO line that we can use with CONFIG_POWER_RESET_GPIO.
It is probably connected to the CPCAP PMIC, and seems to power down
the whole device taking power consumption to zero based on what
I measured.

Cc: devicetree@vger.kernel.org
Cc: Marcel Partap <mpartap@gmx.net>
Cc: Michael Scott <michael.scott@linaro.org>
Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/boot/dts/omap4-droid4-xt894.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Sebastian Reichel March 19, 2017, 1:19 a.m. UTC | #1
Hi,

On Sat, Mar 04, 2017 at 09:43:56PM -0800, Tony Lindgren wrote:
> Droid 4 has a GPIO line that we can use with CONFIG_POWER_RESET_GPIO.
> It is probably connected to the CPCAP PMIC, and seems to power down
> the whole device taking power consumption to zero based on what
> I measured.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Marcel Partap <mpartap@gmx.net>
> Cc: Michael Scott <michael.scott@linaro.org>
> Cc: Sebastian Reichel <sre@kernel.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Tested-By: Sebastian Reichel <sre@kernel.org>

-- Sebastian

>  arch/arm/boot/dts/omap4-droid4-xt894.dts | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts
> --- a/arch/arm/boot/dts/omap4-droid4-xt894.dts
> +++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts
> @@ -27,6 +27,14 @@
>  		reg = <0x80000000 0x3fd00000>;	/* 1021 MB */
>  	};
>  
> +	/* Poweroff GPIO probably connected to CPCAP */
> +	gpio-poweroff {
> +		compatible = "gpio-poweroff";
> +		pinctrl-0 = <&poweroff_gpio>;
> +		pinctrl-names = "default";
> +		gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;	/* gpio50 */
> +	};
> +
>  	/* This is probably coming straight from the battery.. */
>  	wl12xx_vmmc: regulator-wl12xx {
>  		compatible = "regulator-fixed";
> @@ -226,6 +234,14 @@
>  };
>  
>  &omap4_pmx_core {
> +
> +	/* gpmc_ncs0.gpio_50 */
> +	poweroff_gpio: pinmux_poweroff_pins {
> +		pinctrl-single,pins = <
> +		OMAP4_IOPAD(0x074, PIN_OUTPUT_PULLUP | MUX_MODE3)
> +		>;
> +	};
> +
>  	usb_gpio_mux_sel1: pinmux_usb_gpio_mux_sel1_pins {
>  		/* gpio_60 */
>  		pinctrl-single,pins = <
> -- 
> 2.11.1
diff mbox

Patch

diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts
--- a/arch/arm/boot/dts/omap4-droid4-xt894.dts
+++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts
@@ -27,6 +27,14 @@ 
 		reg = <0x80000000 0x3fd00000>;	/* 1021 MB */
 	};
 
+	/* Poweroff GPIO probably connected to CPCAP */
+	gpio-poweroff {
+		compatible = "gpio-poweroff";
+		pinctrl-0 = <&poweroff_gpio>;
+		pinctrl-names = "default";
+		gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;	/* gpio50 */
+	};
+
 	/* This is probably coming straight from the battery.. */
 	wl12xx_vmmc: regulator-wl12xx {
 		compatible = "regulator-fixed";
@@ -226,6 +234,14 @@ 
 };
 
 &omap4_pmx_core {
+
+	/* gpmc_ncs0.gpio_50 */
+	poweroff_gpio: pinmux_poweroff_pins {
+		pinctrl-single,pins = <
+		OMAP4_IOPAD(0x074, PIN_OUTPUT_PULLUP | MUX_MODE3)
+		>;
+	};
+
 	usb_gpio_mux_sel1: pinmux_usb_gpio_mux_sel1_pins {
 		/* gpio_60 */
 		pinctrl-single,pins = <