1752b1b94SMa JunHisilicon mbigen device tree bindings.
2752b1b94SMa Jun=======================================
3752b1b94SMa Jun
4752b1b94SMa JunMbigen means: message based interrupt generator.
5752b1b94SMa Jun
6752b1b94SMa JunMBI is kind of msi interrupt only used on Non-PCI devices.
7752b1b94SMa Jun
8752b1b94SMa JunTo reduce the wired interrupt number connected to GIC,
9752b1b94SMa JunHisilicon designed mbigen to collect and generate interrupt.
10752b1b94SMa Jun
11752b1b94SMa Jun
12752b1b94SMa JunNon-pci devices can connect to mbigen and generate the
13752b1b94SMa Juninterrupt by writing ITS register.
14752b1b94SMa Jun
15752b1b94SMa JunThe mbigen chip and devices connect to mbigen have the following properties:
16752b1b94SMa Jun
17752b1b94SMa JunMbigen main node required properties:
18752b1b94SMa Jun-------------------------------------------
19752b1b94SMa Jun- compatible: Should be "hisilicon,mbigen-v2"
20752b1b94SMa Jun
21752b1b94SMa Jun- reg: Specifies the base physical address and size of the Mbigen
22752b1b94SMa Jun  registers.
23752b1b94SMa Jun
24d0e28641SMaJunMbigen sub node required properties:
25d0e28641SMaJun------------------------------------------
26752b1b94SMa Jun- interrupt controller: Identifies the node as an interrupt controller
27752b1b94SMa Jun
28752b1b94SMa Jun- msi-parent: Specifies the MSI controller this mbigen use.
29752b1b94SMa Jun  For more detail information,please refer to the generic msi-parent binding in
30752b1b94SMa Jun  Documentation/devicetree/bindings/interrupt-controller/msi.txt.
31752b1b94SMa Jun
32752b1b94SMa Jun- num-pins: the total number of pins implemented in this Mbigen
33752b1b94SMa Jun  instance.
34752b1b94SMa Jun
35752b1b94SMa Jun- #interrupt-cells : Specifies the number of cells needed to encode an
36752b1b94SMa Jun  interrupt source. The value must be 2.
37752b1b94SMa Jun
38752b1b94SMa Jun  The 1st cell is hardware pin number of the interrupt.This number is local to
39752b1b94SMa Jun  each mbigen chip and in the range from 0 to the maximum interrupts number
40752b1b94SMa Jun  of the mbigen.
41752b1b94SMa Jun
42752b1b94SMa Jun  The 2nd cell is the interrupt trigger type.
43752b1b94SMa Jun	The value of this cell should be:
44752b1b94SMa Jun	1: rising edge triggered
45752b1b94SMa Jun	or
46752b1b94SMa Jun	4: high level triggered
47752b1b94SMa Jun
48752b1b94SMa JunExamples:
49752b1b94SMa Jun
50d0e28641SMaJun	mbigen_chip_dsa {
51752b1b94SMa Jun			compatible = "hisilicon,mbigen-v2";
52752b1b94SMa Jun			reg = <0x0 0xc0080000 0x0 0x10000>;
53d0e28641SMaJun
54d0e28641SMaJun			mbigen_gmac:intc_gmac {
55752b1b94SMa Jun				interrupt-controller;
56752b1b94SMa Jun				msi-parent = <&its_dsa 0x40b1c>;
57752b1b94SMa Jun				num-pins = <9>;
58752b1b94SMa Jun				#interrupt-cells = <2>;
59752b1b94SMa Jun			};
60752b1b94SMa Jun
61d0e28641SMaJun			mbigen_i2c:intc_i2c {
62d0e28641SMaJun				interrupt-controller;
63d0e28641SMaJun				msi-parent = <&its_dsa 0x40b0e>;
64d0e28641SMaJun				num-pins = <2>;
65d0e28641SMaJun				#interrupt-cells = <2>;
66d0e28641SMaJun			};
67d0e28641SMaJun	};
68d0e28641SMaJun
69752b1b94SMa JunDevices connect to mbigen required properties:
70752b1b94SMa Jun----------------------------------------------------
71752b1b94SMa Jun-interrupts:Specifies the interrupt source.
72752b1b94SMa Jun For the specific information of each cell in this property,please refer to
73752b1b94SMa Jun the "interrupt-cells" description mentioned above.
74752b1b94SMa Jun
75752b1b94SMa JunExamples:
76752b1b94SMa Jun	gmac0: ethernet@c2080000 {
77752b1b94SMa Jun		#address-cells = <1>;
78752b1b94SMa Jun		#size-cells = <0>;
79752b1b94SMa Jun		reg = <0 0xc2080000 0 0x20000>,
80752b1b94SMa Jun		      <0 0xc0000000 0 0x1000>;
81752b1b94SMa Jun		interrupt-parent  = <&mbigen_device_gmac>;
82752b1b94SMa Jun		interrupts =	<656 1>,
83752b1b94SMa Jun				<657 1>;
84752b1b94SMa Jun	};
85