Documentation: Add device tree binding file for MOXA ART SoCs interrupt controller
Subsystems (2)
PATCH 1/1 Documentation: Add device tree binding file for MOXA ART SoCs interrupt controller
Add binding document for MOXA ART SoCs interrupt controller.
---
Notes:
The MOXA ART irqchip driver was added without accompanying devicetree document.
( in next-20130716 drivers/irqchip/irq-moxart.c )
Applies to next-20130716.../interrupt-controller/moxa,moxart-ic.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/moxa,moxart-ic.txt
Documentation/devicetree/bindings/interrupt-controller/moxa,moxart-ic.txt new file +28 -0
@@ -0,0 +1,28 @@ +* MOXA ART Interrupt Controller + +MOXA ART Interrupt Controller (moxart-ic) is used on MOXA ART SoCs +and supports 32 non-configurable number of interrupts + +Main node required properties: + +- compatible : "moxa,moxart-ic" +- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Specifies the number of cells needed to encode an + interrupt source. The type shall be a <u32> and the value shall be 2. + + The first cell contains the interrupt number in the range [0-31]. + The second cell contains the interrupt type + +- reg: physical base address and size of the intc registers map. +- interrupt-mask: Specifies if the interrupt is edge or level-triggered + each bit represent an interrupt 0-31 where 1 signify edge + +Example: + + intc: interrupt-controller at 98800000 { + compatible = "moxa,moxart-ic"; + reg = <0x98800000 0x38>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-mask = <0x00080000>; + };
Signature · 1 line
1.8.2.1
Quoted 8 lines · Jonas Jensen
Add binding document for MOXA ART SoCs interrupt controller.
Signed-off-by Jonas Jensen <[email protected]>---
Notes:
The MOXA ART irqchip driver was added without accompanying devicetree document.
( in next-20130716drivers/irqchip/irq-moxart.c)
Aaargh. That should not have happened >:(
Quoted 21 lines
Applies to next-20130716.../interrupt-controller/moxa,moxart-ic.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/moxa,moxart-ic.txtDocumentation/devicetree/bindings/interrupt-controller/moxa,moxart-ic.txt new file +8
-0@@ -0,0 +1,28 @@ +* MOXA ART Interrupt Controller + +MOXA ART Interrupt Controller (moxart-ic) is used on MOXA ART SoCs +and supports 32 non-configurable number of interrupts + +Main node required properties: + +- compatible : "moxa,moxart-ic"
Documentation/devicetree/bindings/interrupt-controller/moxa,moxart-ic.txt line 18
Quoted 10 lines
Documentation/devicetree/bindings/interrupt-controller/moxa,moxart-ic.txt new file +10
-0+- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Specifies the number of cells needed to encode an + interrupt source. The type shall be a <u32> and the value shall be 2. + + The first cell contains the interrupt number in the range [0-31]. + The second cell contains the interrupt type + +- reg: physical base address and size of the intc registers map. +- interrupt-mask: Specifies if the interrupt is edge or level-triggered + each bit represent an interrupt 0-31 where 1 signify edge
For the GIC, this gets descrbied in the interrupt sepcifier rather than on the interrupt controller's root node. Is there a reason to do this differently here?
Thanks,
Mark.
Quoted 18 lines
Documentation/devicetree/bindings/interrupt-controller/moxa,moxart-ic.txt new file +10
-0+ +Example: + + intc: interrupt-controller at 98800000 { + compatible = "moxa,moxart-ic"; + reg = <0x98800000 0x38>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-mask = <0x00080000>; + };Signature · 6 lines
1.8.2.1 _______________________________________________ devicetree-discuss mailing list devicetree-discuss at lists.ozlabs.org https://lists.ozlabs.org/listinfo/devicetree-discuss
Hi Mark,
Quoted 4 lines · Mark Rutland
Quoted 2 lines
The MOXA ART irqchip driver was added without accompanying devicetree document.
( in next-20130716drivers/irqchip/irq-moxart.c)Aaargh. That should not have happened >:(
Sorry about this, my plan was to submit all documents along with moxart platform support. At the time I did not know it is more normal to push the binding along with the driver.
Quoted 6 lines
Quoted 2 lines
+- interrupt-mask: Specifies if the interrupt is edge or level-triggered + each bit represent an interrupt 0-31 where 1 signify edgeFor the GIC, this gets descrbied in the interrupt sepcifier rather than on the interrupt controller's root node. Is there a reason to do this differently here?
The reason is, IRQ types must be written to the controller as two u32 registers (IRQ_MODE_REG and IRQ_LEVEL_REG). I could not find an easier way (that uses generic things) to do it.
It's true that "interrupt-mask" is redundant, DT "interrupts" hold the same information. I just never found nice way to collect it from DT.
See registers written on line 111:
http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/irqchip/irq-moxart.c#n111
Best regards,
Jonas
Quoted 6 lines · Jonas Jensen
It's true that "interrupt-mask" is redundant, DT "interrupts" hold the same information. I just never found nice way to collect it from DT.
See registers written on line 111:
http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/irqchip/irq-moxart.c#n111
Can't you just update the register whenever an interrupt gets mapped?
All unused interrupts can start out as edge triggered.
Arnd