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
24752b1b94SMa Jun- interrupt controller: Identifies the node as an interrupt controller
25752b1b94SMa Jun
26752b1b94SMa Jun- msi-parent: Specifies the MSI controller this mbigen use.
27752b1b94SMa Jun  For more detail information,please refer to the generic msi-parent binding in
28752b1b94SMa Jun  Documentation/devicetree/bindings/interrupt-controller/msi.txt.
29752b1b94SMa Jun
30752b1b94SMa Jun- num-pins: the total number of pins implemented in this Mbigen
31752b1b94SMa Jun  instance.
32752b1b94SMa Jun
33752b1b94SMa Jun- #interrupt-cells : Specifies the number of cells needed to encode an
34752b1b94SMa Jun  interrupt source. The value must be 2.
35752b1b94SMa Jun
36752b1b94SMa Jun  The 1st cell is hardware pin number of the interrupt.This number is local to
37752b1b94SMa Jun  each mbigen chip and in the range from 0 to the maximum interrupts number
38752b1b94SMa Jun  of the mbigen.
39752b1b94SMa Jun
40752b1b94SMa Jun  The 2nd cell is the interrupt trigger type.
41752b1b94SMa Jun	The value of this cell should be:
42752b1b94SMa Jun	1: rising edge triggered
43752b1b94SMa Jun	or
44752b1b94SMa Jun	4: high level triggered
45752b1b94SMa Jun
46752b1b94SMa JunExamples:
47752b1b94SMa Jun
48752b1b94SMa Jun	mbigen_device_gmac:intc {
49752b1b94SMa Jun			compatible = "hisilicon,mbigen-v2";
50752b1b94SMa Jun			reg = <0x0 0xc0080000 0x0 0x10000>;
51752b1b94SMa Jun			interrupt-controller;
52752b1b94SMa Jun			msi-parent = <&its_dsa 0x40b1c>;
53752b1b94SMa Jun			num-pins = <9>;
54752b1b94SMa Jun			#interrupt-cells = <2>;
55752b1b94SMa Jun	};
56752b1b94SMa Jun
57752b1b94SMa JunDevices connect to mbigen required properties:
58752b1b94SMa Jun----------------------------------------------------
59752b1b94SMa Jun-interrupt-parent: Specifies the mbigen device node which device connected.
60752b1b94SMa Jun
61752b1b94SMa Jun-interrupts:Specifies the interrupt source.
62752b1b94SMa Jun For the specific information of each cell in this property,please refer to
63752b1b94SMa Jun the "interrupt-cells" description mentioned above.
64752b1b94SMa Jun
65752b1b94SMa JunExamples:
66752b1b94SMa Jun	gmac0: ethernet@c2080000 {
67752b1b94SMa Jun		#address-cells = <1>;
68752b1b94SMa Jun		#size-cells = <0>;
69752b1b94SMa Jun		reg = <0 0xc2080000 0 0x20000>,
70752b1b94SMa Jun		      <0 0xc0000000 0 0x1000>;
71752b1b94SMa Jun		interrupt-parent  = <&mbigen_device_gmac>;
72752b1b94SMa Jun		interrupts =	<656 1>,
73752b1b94SMa Jun				<657 1>;
74752b1b94SMa Jun	};
75