* Samsung GPIO Wakeup Interrupt Controller

This document is split into following sections.

[1] Samsung Exynos4 GPIO Wakeup Interrupt Source Controller
[2] Samsung Exynos5 GPIO Wakeup Interrupt Source Controller


[1] Samsung Exynos4 GPIO Wakeup Interrupt Source Controller

Samsung Exynos4 processor supports 32 external wakeup interrupt sources. First
16 of these interrupts are directly connected to GIC and the rest 16 of the
interrupts are grouped together to deliver a single interrupt to GIC.

Required properties:

    - compatible: should be "samsung,exynos4210-wakeup-eint".

    - reg: physical base address of the controller and length of memory
      mapped region.

    - interrupt-controller: Identifies the node as an interrupt controller.

    - interrupt-cells: Specifies the number of cells required to specify the
      interrupt source number. The value of should be <2>. The first cell
      represents the wakeup interrupt source number and the second cell
      should be zero (currently unused).

    - interrupts: List of interrupts generated by the gpio wakeup interrupt
      controller which are connected to a parent interrupt controller. The
      format of the interrupt specifier depends on the interrupt parent
      controller.

Optional properties:

    - interrupt-parent: phandle of the parent interrupt controller, required
      if not inheriting the interrupt parent from the parent node.

Example:

	The following example is from the Exynos4210 dtsi file.

	wakeup_eint: interrupt-controller-wakeup-eint {
		compatible = "samsung,exynos4210-wakeup-eint";
		reg = <0x11000000 0x1000>;
		#interrupt-cells = <2>;
		interrupt-controller;
		interrupts = <0 16 0>, <0 17 0>, <0 18 0>, <0 19 0>,
				<0 20 0>, <0 21 0>, <0 22 0>, <0 23 0>,
				<0 24 0>, <0 25 0>, <0 26 0>, <0 27 0>,
				<0 28 0>, <0 29 0>, <0 30 0>, <0 31 0>,
				<0 32 0>;
	};


[2] Samsung Exynos5 GPIO Wakeup Interrupt Source Controller

Samsung Exynos5 processor supports 32 external wakeup interrupt sources. First
16 of these interrupts are directly connected to GIC and the rest 16 of the
interrupts are grouped together to deliver a single interrupt to interrupt
combiner controller.

Since the wakeup interrupts has two interrupt parents, a interrupt nexus
child node is used that includes a interrupt-map used to translate wakeup
interrupt specifiers into gic and combiner domain interrupts.

Required properties:

    - compatible: should be "samsung,exynos5210-wakeup-eint".

    - reg: physical base address of the controller and length of memory
      mapped region.

    - interrupt-controller: Identifies the node as an interrupt controller.

    - interrupt-cells: Specifies the number of cells required to specify the
      interrupt source number. The value of should be <2>. The first cell
      represents the wakeup interrupt source number and the second cell
      should be zero (currently unused).

    - interrupts: List of interrupts generated by the gpio wakeup interrupt
      controller. Since both gic and combiner controllers are interrupt
      parents, a interrupt nexus child node is used to translate the interrupt
      specifiers into respective gic and combiner interrupt domains (see below).
      The interrupt specifier should be two cells - the first cell should be the
      interrupt number originating from the wakeup controller and the second
      cell should be zero (unused).

    - interrupt-parent: The phandle of the interrupt nexus child node.

    - interrupt-nexus child node: This node is used to translate the interrupt
      specifiers of the wakeup interrupt controller node to the respecitive
      gic or combiner interrupt domain. The interrupt nexus node should include
      the following properties.

      - interrupt-cells: Specifies the number of cells required to specify the
        interrupt source number. The value of should be <2>. The first cell
        represents the wakeup interrupt source number and the second cell
        should be zero (currently unused).

      - #address-cells: value of this property should be zero.

      - #size-cells: value of this property should be zero.

      - interrupt-map: The interrpt-map specifies how interrupt specifiers are
        translated. There should be a interrupt-map entry for each interrupt
        generated by the wakeup interrupt controller. The format of each entry
        in the interrupt map should be

              <#intr 0 parent-phandle parent-interrupt-specifier>

	 where #intr is one of the entries in the 'interrupts' property of the
        parent node.


Example:

	wakeup_eint: interrupt-controller@11400000 {
		compatible = "samsung,exynos5210-wakeup-eint";
		reg = <0x11400000 0x1000>;
		interrupt-controller;
		#interrupt-cells = <2>;
		interrupt-parent = <&eint_nexus>;
		interrupts = <0x0 0>, <0x1 0>, <0x2 0>, <0x3 0>,
			     <0x4 0>, <0x5 0>, <0x6 0>, <0x7 0>,
			     <0x8 0>, <0x9 0>, <0xa 0>, <0xb 0>,
			     <0xc 0>, <0xd 0>, <0xe 0>, <0xf 0>,
			     <0x10 0>;

                wakeup_map: interrupt-map {
                        #interrupt-cells = <2>;
                        #address-cells = <0>;
                        #size-cells = <0>;
                        interrupt-map = <0x0 0 &combiner 23 0>,
                                        <0x1 0 &combiner 24 0>,
                                        <0x2 0 &combiner 25 0>,
                                        <0x3 0 &combiner 25 1>,
                                        <0x4 0 &combiner 26 0>,
                                        <0x5 0 &combiner 26 1>,
                                        <0x6 0 &combiner 27 0>,
                                        <0x7 0 &combiner 27 1>,
                                        <0x8 0 &combiner 28 0>,
                                        <0x9 0 &combiner 28 1>,
                                        <0xa 0 &combiner 29 0>,
                                        <0xb 0 &combiner 29 1>,
                                        <0xc 0 &combiner 30 0>,
                                        <0xd 0 &combiner 30 1>,
                                        <0xe 0 &combiner 31 0>,
                                        <0xf 0 &combiner 31 1>,
                                        <0x10 0 &gic 0 32 0>;
                };
        };
