ARM: dts: Fix omap serial wake-up when booted with device tree
authorTony Lindgren <tony@atomide.com>
Tue, 6 May 2014 00:27:39 +0000 (17:27 -0700)
committerTony Lindgren <tony@atomide.com>
Tue, 6 May 2014 20:48:35 +0000 (13:48 -0700)
We've had deeper idle states working on omaps for few years now,
but only in the legacy mode. When booted with device tree, the
wake-up events did not have a chance to work until commit
3e6cee1786a1 (pinctrl: single: Add support for wake-up interrupts)
that recently got merged. In addition to that we also needed commit
79d9701559a9 (of/irq: create interrupts-extended property) and
9ec36cafe43b (of/irq: do irq resolution in platform_get_irq) that
are now also merged.

So let's fix the wake-up events for some selected omaps so devices
booted in device tree mode won't just hang if deeper power states
are enabled, and so systems can wake up from suspend to the serial
port event.

Note that there's no longer need to specify the wake-up bit in
the pinctrl settings, the request_irq on the wake-up pin takes
care of that.

Cc: devicetree@vger.kernel.org
Cc: "BenoƮt Cousson" <bcousson@baylibre.com>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Nishanth Menon <nm@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
[tony@atomide.com: updated comments, added board LDP]
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/omap3-evm-37xx.dts
arch/arm/boot/dts/omap3-ldp.dts
arch/arm/boot/dts/omap3-n900.dts
arch/arm/boot/dts/omap3.dtsi
arch/arm/boot/dts/omap4-panda-common.dtsi
arch/arm/boot/dts/omap4-sdp.dts
arch/arm/boot/dts/omap4.dtsi
include/dt-bindings/pinctrl/omap.h

index 4df68ad3736a52eba3d6953f7c8341599c6e7ebb..9cba94bed7ad1c0d683bec0efc9acd9245a6848e 100644 (file)
        status = "disabled";
 };
 
+&uart1 {
+       interrupts-extended = <&intc 72 &omap3_pmx_core OMAP3_UART1_RX>;
+};
+
+&uart2 {
+       interrupts-extended = <&intc 73 &omap3_pmx_core OMAP3_UART2_RX>;
+};
+
 &uart3 {
+       interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
        pinctrl-names = "default";
        pinctrl-0 = <&uart3_pins>;
 };
index 0abe986a4ecc19a7606690df50ec560e200b1f31..476ff158ddb32cbb9b1c6dc6cbc51e637742d740 100644 (file)
        };
 };
 
+&uart3 {
+       interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
+};
+
 &usb_otg_hs {
        pinctrl-names = "default";
        pinctrl-0 = <&musb_pins>;
index 1a57b61f5e24490ea198f327ce099c50fc0d141c..656ae403018fa01a169337e594d54538f7f49305 100644 (file)
 };
 
 &uart2 {
+       interrupts-extended = <&intc 73 &omap3_pmx_core OMAP3_UART2_RX>;
        pinctrl-names = "default";
        pinctrl-0 = <&uart2_pins>;
 };
 
 &uart3 {
+       interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
        pinctrl-names = "default";
        pinctrl-0 = <&uart3_pins>;
 };
index acb9019dc437b66321ec7995dc16456678a2e42c..8a0ce605fdd86d4f24336c67a876abe6e7d89ff5 100644 (file)
                uart1: serial@4806a000 {
                        compatible = "ti,omap3-uart";
                        reg = <0x4806a000 0x2000>;
-                       interrupts = <72>;
+                       interrupts-extended = <&intc 72>;
                        dmas = <&sdma 49 &sdma 50>;
                        dma-names = "tx", "rx";
                        ti,hwmods = "uart1";
                uart2: serial@4806c000 {
                        compatible = "ti,omap3-uart";
                        reg = <0x4806c000 0x400>;
-                       interrupts = <73>;
+                       interrupts-extended = <&intc 73>;
                        dmas = <&sdma 51 &sdma 52>;
                        dma-names = "tx", "rx";
                        ti,hwmods = "uart2";
                uart3: serial@49020000 {
                        compatible = "ti,omap3-uart";
                        reg = <0x49020000 0x400>;
-                       interrupts = <74>;
+                       interrupts-extended = <&intc 74>;
                        dmas = <&sdma 53 &sdma 54>;
                        dma-names = "tx", "rx";
                        ti,hwmods = "uart3";
index d2c45bfaaa2c5269b996ebd9e29fcf2d8031be60..8cfa3c8a72b08ea7985b1ee3ed1f92bee132a4d8 100644 (file)
        usb-supply = <&vusb>;
 };
 
+&uart2 {
+       interrupts-extended = <&gic GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH
+                              &omap4_pmx_core OMAP4_UART2_RX>;
+};
+
+&uart3 {
+       interrupts-extended = <&gic GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH
+                              &omap4_pmx_core OMAP4_UART3_RX>;
+};
+
+&uart4 {
+       interrupts-extended = <&gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH
+                              &omap4_pmx_core OMAP4_UART4_RX>;
+};
+
 &usb_otg_hs {
        interface-type = <1>;
        mode = <3>;
index 48983c8d56c22fe27271e1b6ff07b8c9f9e3cbc0..3e1da43068f68e67f7578d5eda64c12ea33501ca 100644 (file)
 };
 
 &uart2 {
+       interrupts-extended = <&gic GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH
+                              &omap4_pmx_core OMAP4_UART2_RX>;
        pinctrl-names = "default";
        pinctrl-0 = <&uart2_pins>;
 };
 
 &uart3 {
+       interrupts-extended = <&gic GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH
+                              &omap4_pmx_core OMAP4_UART3_RX>;
        pinctrl-names = "default";
        pinctrl-0 = <&uart3_pins>;
 };
 
 &uart4 {
+       interrupts-extended = <&gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH
+                              &omap4_pmx_core OMAP4_UART4_RX>;
        pinctrl-names = "default";
        pinctrl-0 = <&uart4_pins>;
 };
index 649b5cd38b403102e9a6d5ddebf918a3e39ab73e..b22664544a097f4c2b0b5abfa98f703db79537ee 100644 (file)
                uart2: serial@4806c000 {
                        compatible = "ti,omap4-uart";
                        reg = <0x4806c000 0x100>;
-                       interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts-extended = <&gic GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "uart2";
                        clock-frequency = <48000000>;
                };
                uart3: serial@48020000 {
                        compatible = "ti,omap4-uart";
                        reg = <0x48020000 0x100>;
-                       interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts-extended = <&gic GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "uart3";
                        clock-frequency = <48000000>;
                };
                uart4: serial@4806e000 {
                        compatible = "ti,omap4-uart";
                        reg = <0x4806e000 0x100>;
-                       interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts-extended = <&gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "uart4";
                        clock-frequency = <48000000>;
                };
index b04528cd033cb3d96d6776561cda327a0ff33966..404ba7ef78131fc6665f60a3d96a13c970ad3a93 100644 (file)
 #define OMAP5_WKUP_IOPAD(pa, val)      OMAP_IOPAD_OFFSET((pa), 0xc840) (val)
 #define DRA7XX_CORE_IOPAD(pa, val)     OMAP_IOPAD_OFFSET((pa), 0x3400) (val)
 
+/*
+ * Define some commonly used pins configured by the boards.
+ * Note that some boards use alternative pins, so check
+ * the schematics before using these.
+ */
+#define OMAP3_UART1_RX         0x152
+#define OMAP3_UART2_RX         0x14a
+#define OMAP3_UART3_RX         0x16e
+#define OMAP4_UART2_RX         0xdc
+#define OMAP4_UART3_RX         0x104
+#define OMAP4_UART4_RX         0x11c
+
 #endif