From: Tony Lindgren <tony@atomide.com> To: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Cc: "Aaro Koskinen" <aaro.koskinen@iki.fi>, "Kevin Hilman" <khilman@linaro.org>, "Nishanth Menon" <nm@ti.com>, "Pali Rohár" <pali.rohar@gmail.com>, "Paul Walmsley" <paul@pwsan.com>, "Pavel Machek" <pavel@ucw.cz>, "Sebastian Reichel" <sre@kernel.org>, "Tero Kristo" <t-kristo@ti.com> Subject: [PATCH 07/11] ARM: dts: Enable N900 keybaord sleep leds by default Date: Thu, 10 Apr 2014 16:47:15 -0700 [thread overview] Message-ID: <1397173639-29587-8-git-send-email-tony@atomide.com> (raw) In-Reply-To: <1397173639-29587-1-git-send-email-tony@atomide.com> 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: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: Kevin Hilman <khilman@linaro.org> Cc: Nishanth Menon <nm@ti.com> Cc: Pali Rohár <pali.rohar@gmail.com> Cc: Paul Walmsley <paul@pwsan.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Sebastian Reichel <sre@kernel.org> Cc: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> --- arch/arm/boot/dts/omap3-n900.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index 0bf40c9..0d34201 100644 --- 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 */ -- 1.8.1.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 07/11] ARM: dts: Enable N900 keybaord sleep leds by default Date: Thu, 10 Apr 2014 16:47:15 -0700 [thread overview] Message-ID: <1397173639-29587-8-git-send-email-tony@atomide.com> (raw) In-Reply-To: <1397173639-29587-1-git-send-email-tony@atomide.com> 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: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: Kevin Hilman <khilman@linaro.org> Cc: Nishanth Menon <nm@ti.com> Cc: Pali Roh?r <pali.rohar@gmail.com> Cc: Paul Walmsley <paul@pwsan.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Sebastian Reichel <sre@kernel.org> Cc: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> --- arch/arm/boot/dts/omap3-n900.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index 0bf40c9..0d34201 100644 --- 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 */ -- 1.8.1.1
next prev parent reply other threads:[~2014-04-10 23:47 UTC|newest] Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-04-10 23:47 [PATCH 00/11] Fixes for omap PM for making omap3 DT only Tony Lindgren 2014-04-10 23:47 ` Tony Lindgren 2014-04-10 23:47 ` [PATCH 01/11] ARM: OMAP3: PM: remove access to PRM_VOLTCTRL register Tony Lindgren 2014-04-10 23:47 ` Tony Lindgren 2014-04-10 23:47 ` [PATCH 02/11] ARM: OMAP3: Fix idle mode signaling for sys_clkreq and sys_off_mode Tony Lindgren 2014-04-10 23:47 ` Tony Lindgren 2014-04-12 8:57 ` Tero Kristo 2014-04-12 8:57 ` Tero Kristo 2014-04-12 15:02 ` Tony Lindgren 2014-04-12 15:02 ` Tony Lindgren 2014-04-23 7:51 ` Tero Kristo 2014-04-23 7:51 ` Tero Kristo 2014-04-23 20:49 ` Tony Lindgren 2014-04-23 20:49 ` Tony Lindgren 2014-05-07 16:34 ` Tony Lindgren 2014-05-07 16:34 ` Tony Lindgren 2014-04-14 22:51 ` Grazvydas Ignotas 2014-04-14 22:51 ` Grazvydas Ignotas 2014-04-15 22:56 ` Tony Lindgren 2014-04-15 22:56 ` Tony Lindgren 2014-04-16 13:58 ` Grazvydas Ignotas 2014-04-16 13:58 ` Grazvydas Ignotas 2014-04-18 17:48 ` Tony Lindgren 2014-04-18 17:48 ` Tony Lindgren 2014-04-10 23:47 ` [PATCH 03/11] ARM: OMAP3: Disable broken omap3_set_off_timings function Tony Lindgren 2014-04-10 23:47 ` Tony Lindgren 2014-04-10 23:47 ` [PATCH 04/11] ARM: OMAP3: Fix voltage control for deeper idle states Tony Lindgren 2014-04-10 23:47 ` Tony Lindgren 2014-04-11 15:14 ` Tony Lindgren 2014-04-11 15:14 ` Tony Lindgren 2014-05-07 16:38 ` Tony Lindgren 2014-05-07 16:38 ` Tony Lindgren 2014-04-10 23:47 ` [PATCH 05/11] ARM: dts: Configure omap3 twl4030 I2C4 pins by default Tony Lindgren 2014-04-10 23:47 ` Tony Lindgren 2014-04-10 23:47 ` [PATCH 06/11] ARM: OMAP2+: Fix voltage scaling init for device tree Tony Lindgren 2014-04-10 23:47 ` Tony Lindgren 2014-05-19 17:50 ` Joachim Eastwood 2014-05-19 17:50 ` Joachim Eastwood 2014-05-19 18:01 ` Tony Lindgren 2014-05-19 18:01 ` Tony Lindgren 2014-05-19 18:32 ` Nishanth Menon 2014-05-19 18:32 ` Nishanth Menon 2014-05-19 18:48 ` Joachim Eastwood 2014-05-19 18:48 ` Joachim Eastwood 2014-05-19 18:52 ` Nishanth Menon 2014-05-19 18:52 ` Nishanth Menon 2014-05-19 20:23 ` Tony Lindgren 2014-05-19 20:23 ` Tony Lindgren 2014-04-10 23:47 ` Tony Lindgren [this message] 2014-04-10 23:47 ` [PATCH 07/11] ARM: dts: Enable N900 keybaord sleep leds by default Tony Lindgren 2014-04-11 0:23 ` Tony Lindgren 2014-04-11 0:23 ` Tony Lindgren 2014-04-11 23:31 ` Aaro Koskinen 2014-04-11 23:31 ` Aaro Koskinen 2014-04-23 21:07 ` Tony Lindgren 2014-04-23 21:07 ` Tony Lindgren 2014-04-10 23:47 ` [PATCH 08/11] ARM: dts: Fix omap serial wake-up when booted with device tree Tony Lindgren 2014-04-10 23:47 ` Tony Lindgren 2014-04-10 23:47 ` [PATCH 09/11] ARM: OMAP2+: Enable CPUidle in omap2plus_defconfig Tony Lindgren 2014-04-10 23:47 ` Tony Lindgren 2014-04-10 23:47 ` [PATCH 10/11] mfd: twl-core: Fix idle mode signaling for omaps when booted with device tree Tony Lindgren 2014-04-10 23:47 ` Tony Lindgren 2014-04-17 8:00 ` Lee Jones 2014-04-17 8:00 ` Lee Jones 2014-04-17 15:37 ` Tony Lindgren 2014-04-17 15:37 ` Tony Lindgren 2014-04-23 14:46 ` [GIT PULL] arm: omap: Immutable branch between MFD and ARM OMAP due for the v3.16 merge-window Lee Jones 2014-04-23 14:46 ` Lee Jones 2014-04-23 20:41 ` Tony Lindgren 2014-04-23 20:41 ` Tony Lindgren 2014-04-10 23:47 ` [PATCH 11/11] pinctrl: single: Clear pin interrupts enabled by bootloader Tony Lindgren 2014-04-10 23:47 ` Tony Lindgren 2014-04-22 11:54 ` Linus Walleij 2014-04-22 11:54 ` Linus Walleij 2014-04-22 16:10 ` Tony Lindgren 2014-04-22 16:10 ` Tony Lindgren 2014-04-23 13:57 ` Linus Walleij 2014-04-23 13:57 ` Linus Walleij 2014-04-11 20:47 ` [PATCH 00/11] Fixes for omap PM for making omap3 DT only Sebastian Reichel 2014-04-11 20:47 ` Sebastian Reichel 2014-04-11 21:04 ` Tony Lindgren 2014-04-11 21:04 ` Tony Lindgren
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1397173639-29587-8-git-send-email-tony@atomide.com \ --to=tony@atomide.com \ --cc=aaro.koskinen@iki.fi \ --cc=khilman@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=nm@ti.com \ --cc=pali.rohar@gmail.com \ --cc=paul@pwsan.com \ --cc=pavel@ucw.cz \ --cc=sre@kernel.org \ --cc=t-kristo@ti.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.