Path: blob/main/sys/contrib/device-tree/Bindings/gpio/gpio-eic-sprd.txt
48378 views
Spreadtrum EIC controller bindings12The EIC is the abbreviation of external interrupt controller, which can3be used only in input mode. The Spreadtrum platform has 2 EIC controllers,4one is in digital chip, and another one is in PMIC. The digital chip EIC5controller contains 4 sub-modules: EIC-debounce, EIC-latch, EIC-async and6EIC-sync. But the PMIC EIC controller contains only one EIC-debounce sub-7module.89The EIC-debounce sub-module provides up to 8 source input signal10connections. A debounce mechanism is used to capture the input signals'11stable status (millisecond resolution) and a single-trigger mechanism12is introduced into this sub-module to enhance the input event detection13reliability. In addition, this sub-module's clock can be shut off14automatically to reduce power dissipation. Moreover the debounce range15is from 1ms to 4s with a step size of 1ms. The input signal will be16ignored if it is asserted for less than 1 ms.1718The EIC-latch sub-module is used to latch some special power down signals19and generate interrupts, since the EIC-latch does not depend on the APB20clock to capture signals.2122The EIC-async sub-module uses a 32kHz clock to capture the short signals23(microsecond resolution) to generate interrupts by level or edge trigger.2425The EIC-sync is similar with GPIO's input function, which is a synchronized26signal input register. It can generate interrupts by level or edge trigger27when detecting input signals.2829Required properties:30- compatible: Should be one of the following:31"sprd,sc9860-eic-debounce",32"sprd,sc9860-eic-latch",33"sprd,sc9860-eic-async",34"sprd,sc9860-eic-sync",35"sprd,sc2731-eic".36- reg: Define the base and range of the I/O address space containing37the GPIO controller registers.38- gpio-controller: Marks the device node as a GPIO controller.39- #gpio-cells: Should be <2>. The first cell is the gpio number and40the second cell is used to specify optional parameters.41- interrupt-controller: Marks the device node as an interrupt controller.42- #interrupt-cells: Should be <2>. Specifies the number of cells needed43to encode interrupt source.44- interrupts: Should be the port interrupt shared by all the gpios.4546Example:47eic_debounce: gpio@40210000 {48compatible = "sprd,sc9860-eic-debounce";49reg = <0 0x40210000 0 0x80>;50gpio-controller;51#gpio-cells = <2>;52interrupt-controller;53#interrupt-cells = <2>;54interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;55};5657eic_latch: gpio@40210080 {58compatible = "sprd,sc9860-eic-latch";59reg = <0 0x40210080 0 0x20>;60gpio-controller;61#gpio-cells = <2>;62interrupt-controller;63#interrupt-cells = <2>;64interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;65};6667eic_async: gpio@402100a0 {68compatible = "sprd,sc9860-eic-async";69reg = <0 0x402100a0 0 0x20>;70gpio-controller;71#gpio-cells = <2>;72interrupt-controller;73#interrupt-cells = <2>;74interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;75};7677eic_sync: gpio@402100c0 {78compatible = "sprd,sc9860-eic-sync";79reg = <0 0x402100c0 0 0x20>;80gpio-controller;81#gpio-cells = <2>;82interrupt-controller;83#interrupt-cells = <2>;84interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;85};8687pmic_eic: gpio@300 {88compatible = "sprd,sc2731-eic";89reg = <0x300>;90interrupt-parent = <&sc2731_pmic>;91interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;92gpio-controller;93#gpio-cells = <2>;94interrupt-controller;95#interrupt-cells = <2>;96};979899