From patchwork Wed Apr 23 21:07:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 341996 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 08048140120 for ; Thu, 24 Apr 2014 07:11:07 +1000 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wd4Oz-0003K0-Td; Wed, 23 Apr 2014 21:08:21 +0000 Received: from mho-03-ewr.mailhop.org ([204.13.248.66] helo=mho-01-ewr.mailhop.org) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wd4Ow-0001uE-6L for linux-arm-kernel@lists.infradead.org; Wed, 23 Apr 2014 21:08:19 +0000 Received: from 99-127-230-128.lightspeed.sntcca.sbcglobal.net ([99.127.230.128] helo=atomide.com) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1Wd4OZ-0002kp-Pa; Wed, 23 Apr 2014 21:07:56 +0000 X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 99.127.230.128 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18JZNBVFQ0MsaKoxLaqB7ep Date: Wed, 23 Apr 2014 14:07:50 -0700 From: Tony Lindgren To: Aaro Koskinen Subject: Re: [PATCH 07/11] ARM: dts: Enable N900 keybaord sleep leds by default Message-ID: <20140423210750.GC6053@atomide.com> References: <1397173639-29587-1-git-send-email-tony@atomide.com> <1397173639-29587-8-git-send-email-tony@atomide.com> <20140411233109.GG15736@drone.musicnaut.iki.fi> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140411233109.GG15736@drone.musicnaut.iki.fi> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140423_140818_417019_58FE5D92 X-CRM114-Status: GOOD ( 18.10 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [204.13.248.66 listed in list.dnswl.org] Cc: Nishanth Menon , Paul Walmsley , Kevin Hilman , Sebastian Reichel , Tero Kristo , Pavel Machek , Pali =?utf-8?B?Um9ow6Fy?= , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org * Aaro Koskinen [140411 16:39]: > Hi, > > On Thu, Apr 10, 2014 at 04:47:15PM -0700, Tony Lindgren wrote: > > + leds { > > + compatible = "gpio-leds"; > > + heartbeat { > > + label = "debug::sleep"; > > + gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>; /* gpio162 */ > > + linux,default-trigger = "default-on"; > > Just some very minor nits, spaces should be converted to TABs here > for indent, and patch title should say "keyboard" instead of "keybaord". > > Acked-by: Aaro Koskinen Thanks and sorry for the delay, got sidetracked with some GPMC bugs. Here's the updated version of this patch. Tony 8< ------------------------ From: Tony Lindgren Date: Wed, 23 Apr 2014 13:59:24 -0700 Subject: [PATCH] ARM: dts: Enable N900 keyboard sleep leds by default On N900 there are nice LEDs that show the state of the sys_clkreq and sys_off_mode pins. These LEDs go low when the system enters deeper idle states. The left LED shows the state of the sys_clkreq pin, and goes off during retention idle. The right LED shows the state of sys_off_mode pin and both go off during off idle. As N900 is a battery operated device, these LEDs should be off most of the time. So let's enable them by default so we can make sure the system is mostly idle. This allows the maintainers to also immediately test patches for PM regressions by looking at the LEDs, which certainly makes my life easier. The LED can naturally be disabled during runtime with: # echo none > /sys/class/leds/debug::sleep/trigger Note that we don't currently have support for omap3 errata 1.158 that remuxes GPIO pins to INPUT_PULLUP | MUX_MODE7 for the duration of idle. This means that the GPIO pins set high will go down during off idle. In this case it does not matter as the sys_off_mode goes down too, but there's still a slim chance of false off idle LED signals. If in doubt, false LED signals can be verified by the sys_off_mode or vdd_core values. Also note that to allow the UARTs to autoidle, the following needs to be run on N900 to enable off idle: #!/bin/sh uarts=$(find /sys/class/tty/ttyO*/device/power/ -type d) for uart in $uarts; do echo 3000 > $uart/autosuspend_delay_ms done uarts=$(find /sys/class/tty/ttyO*/power/ -type d) for uart in $uarts; do echo enabled > $uart/wakeup echo auto > $uart/control done echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode For retention idle, change the above to set 0 to enable_off_mode. Also note that without the twl4030 PM scripts the actual voltage scaling won't happen for off idle so we only get voltage scaling over I2C4 for retention idle. I'll do some device tree patches for those also a bit later on. Cc: Kevin Hilman Cc: Nishanth Menon Cc: Pali Rohár Cc: Paul Walmsley Cc: Pavel Machek Cc: Sebastian Reichel Cc: Tero Kristo Acked-by: Aaro Koskinen Signed-off-by: Tony Lindgren --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts @@ -21,6 +21,17 @@ }; }; + leds { + compatible = "gpio-leds"; + heartbeat { + label = "debug::sleep"; + gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>; /* gpio162 */ + linux,default-trigger = "default-on"; + pinctrl-names = "default"; + pinctrl-0 = <&debug_leds>; + }; + }; + memory { device_type = "memory"; reg = <0x80000000 0x10000000>; /* 256 MB */ @@ -114,6 +125,12 @@ >; }; + debug_leds: pinmux_debug_led_pins { + pinctrl-single,pins = < + OMAP3_CORE1_IOPAD(0x2198, PIN_OUTPUT | MUX_MODE4) /* mcbsp1_clkx.gpio_162 */ + >; + }; + mmc1_pins: pinmux_mmc1_pins { pinctrl-single,pins = < 0x114 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk */