0001 Spreadtrum EIC controller bindings
0002
0003 The EIC is the abbreviation of external interrupt controller, which can
0004 be used only in input mode. The Spreadtrum platform has 2 EIC controllers,
0005 one is in digital chip, and another one is in PMIC. The digital chip EIC
0006 controller contains 4 sub-modules: EIC-debounce, EIC-latch, EIC-async and
0007 EIC-sync. But the PMIC EIC controller contains only one EIC-debounce sub-
0008 module.
0009
0010 The EIC-debounce sub-module provides up to 8 source input signal
0011 connections. A debounce mechanism is used to capture the input signals'
0012 stable status (millisecond resolution) and a single-trigger mechanism
0013 is introduced into this sub-module to enhance the input event detection
0014 reliability. In addition, this sub-module's clock can be shut off
0015 automatically to reduce power dissipation. Moreover the debounce range
0016 is from 1ms to 4s with a step size of 1ms. The input signal will be
0017 ignored if it is asserted for less than 1 ms.
0018
0019 The EIC-latch sub-module is used to latch some special power down signals
0020 and generate interrupts, since the EIC-latch does not depend on the APB
0021 clock to capture signals.
0022
0023 The EIC-async sub-module uses a 32kHz clock to capture the short signals
0024 (microsecond resolution) to generate interrupts by level or edge trigger.
0025
0026 The EIC-sync is similar with GPIO's input function, which is a synchronized
0027 signal input register. It can generate interrupts by level or edge trigger
0028 when detecting input signals.
0029
0030 Required properties:
0031 - compatible: Should be one of the following:
0032 "sprd,sc9860-eic-debounce",
0033 "sprd,sc9860-eic-latch",
0034 "sprd,sc9860-eic-async",
0035 "sprd,sc9860-eic-sync",
0036 "sprd,sc2731-eic".
0037 - reg: Define the base and range of the I/O address space containing
0038 the GPIO controller registers.
0039 - gpio-controller: Marks the device node as a GPIO controller.
0040 - #gpio-cells: Should be <2>. The first cell is the gpio number and
0041 the second cell is used to specify optional parameters.
0042 - interrupt-controller: Marks the device node as an interrupt controller.
0043 - #interrupt-cells: Should be <2>. Specifies the number of cells needed
0044 to encode interrupt source.
0045 - interrupts: Should be the port interrupt shared by all the gpios.
0046
0047 Example:
0048 eic_debounce: gpio@40210000 {
0049 compatible = "sprd,sc9860-eic-debounce";
0050 reg = <0 0x40210000 0 0x80>;
0051 gpio-controller;
0052 #gpio-cells = <2>;
0053 interrupt-controller;
0054 #interrupt-cells = <2>;
0055 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
0056 };
0057
0058 eic_latch: gpio@40210080 {
0059 compatible = "sprd,sc9860-eic-latch";
0060 reg = <0 0x40210080 0 0x20>;
0061 gpio-controller;
0062 #gpio-cells = <2>;
0063 interrupt-controller;
0064 #interrupt-cells = <2>;
0065 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
0066 };
0067
0068 eic_async: gpio@402100a0 {
0069 compatible = "sprd,sc9860-eic-async";
0070 reg = <0 0x402100a0 0 0x20>;
0071 gpio-controller;
0072 #gpio-cells = <2>;
0073 interrupt-controller;
0074 #interrupt-cells = <2>;
0075 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
0076 };
0077
0078 eic_sync: gpio@402100c0 {
0079 compatible = "sprd,sc9860-eic-sync";
0080 reg = <0 0x402100c0 0 0x20>;
0081 gpio-controller;
0082 #gpio-cells = <2>;
0083 interrupt-controller;
0084 #interrupt-cells = <2>;
0085 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
0086 };
0087
0088 pmic_eic: gpio@300 {
0089 compatible = "sprd,sc2731-eic";
0090 reg = <0x300>;
0091 interrupt-parent = <&sc2731_pmic>;
0092 interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
0093 gpio-controller;
0094 #gpio-cells = <2>;
0095 interrupt-controller;
0096 #interrupt-cells = <2>;
0097 };