• Chen-Yu Tsai's avatar
    dt-bindings/interrupt-controller: sunxi-nmi: Add compatible for A31 R_INTC · cd647575
    Chen-Yu Tsai authored
    The A31 and later have an R_INTC block which handles the NMI interrupt
    pin on the SoC. This interrupt pin is used by the external PMIC to
    signal interrupts to the SoC.
    
    While this hardware block is undocumented, the interrupt offsets
    combined with the register regions for the existing "sun6i-a31-sc-nmi"
    compatible line up with the old interrupt controller found on the A10.
    Experiments show that only the first 32 interrupt lines can be enabled,
    and only the first (NMI) interrupt is actually connected.
    
    This patch adds a new, properly named compatible for the A31 R_INTC
    block, which requires the register region to be properly aligned to
    the block boundary. For comparison, the old "sun6i-a31-sc-nmi"
    compatible had its register region aligned with the first used
    register. This didn't match up with the memory map in the SoC's
    datasheet/user manual.
    
    Since the new compatible supercedes the old one, deprecate the old one.
    Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
    Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    cd647575
allwinner,sunxi-nmi.txt 1.05 KB
Allwinner Sunxi NMI Controller
==============================

Required properties:

- compatible : should be one of the following:
  - "allwinner,sun7i-a20-sc-nmi"
  - "allwinner,sun6i-a31-sc-nmi" (deprecated)
  - "allwinner,sun6i-a31-r-intc"
  - "allwinner,sun9i-a80-nmi"
- reg : Specifies base physical address and size of the registers.
- interrupt-controller : Identifies the node as an interrupt controller
- #interrupt-cells : Specifies the number of cells needed to encode an
  interrupt source. The value shall be 2. The first cell is the IRQ number, the
  second cell the trigger type as defined in interrupt.txt in this directory.
- interrupt-parent: Specifies the parent interrupt controller.
- interrupts: Specifies the interrupt line (NMI) which is handled by
  the interrupt controller in the parent controller's notation. This value
  shall be the NMI.

Example:

sc-nmi-intc@01c00030 {
	compatible = "allwinner,sun7i-a20-sc-nmi";
	interrupt-controller;
	#interrupt-cells = <2>;
	reg = <0x01c00030 0x0c>;
	interrupt-parent = <&gic>;
	interrupts = <0 0 4>;
};