18c2ecf20Sopenharmony_ciHisilicon mbigen device tree bindings.
28c2ecf20Sopenharmony_ci=======================================
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ciMbigen means: message based interrupt generator.
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ciMBI is kind of msi interrupt only used on Non-PCI devices.
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ciTo reduce the wired interrupt number connected to GIC,
98c2ecf20Sopenharmony_ciHisilicon designed mbigen to collect and generate interrupt.
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ciNon-pci devices can connect to mbigen and generate the
138c2ecf20Sopenharmony_ciinterrupt by writing ITS register.
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciThe mbigen chip and devices connect to mbigen have the following properties:
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciMbigen main node required properties:
188c2ecf20Sopenharmony_ci-------------------------------------------
198c2ecf20Sopenharmony_ci- compatible: Should be "hisilicon,mbigen-v2"
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci- reg: Specifies the base physical address and size of the Mbigen
228c2ecf20Sopenharmony_ci  registers.
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciMbigen sub node required properties:
258c2ecf20Sopenharmony_ci------------------------------------------
268c2ecf20Sopenharmony_ci- interrupt controller: Identifies the node as an interrupt controller
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci- msi-parent: Specifies the MSI controller this mbigen use.
298c2ecf20Sopenharmony_ci  For more detail information,please refer to the generic msi-parent binding in
308c2ecf20Sopenharmony_ci  Documentation/devicetree/bindings/interrupt-controller/msi.txt.
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci- num-pins: the total number of pins implemented in this Mbigen
338c2ecf20Sopenharmony_ci  instance.
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci- #interrupt-cells : Specifies the number of cells needed to encode an
368c2ecf20Sopenharmony_ci  interrupt source. The value must be 2.
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci  The 1st cell is hardware pin number of the interrupt.This number is local to
398c2ecf20Sopenharmony_ci  each mbigen chip and in the range from 0 to the maximum interrupts number
408c2ecf20Sopenharmony_ci  of the mbigen.
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci  The 2nd cell is the interrupt trigger type.
438c2ecf20Sopenharmony_ci	The value of this cell should be:
448c2ecf20Sopenharmony_ci	1: rising edge triggered
458c2ecf20Sopenharmony_ci	or
468c2ecf20Sopenharmony_ci	4: high level triggered
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ciExamples:
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci	mbigen_chip_dsa {
518c2ecf20Sopenharmony_ci			compatible = "hisilicon,mbigen-v2";
528c2ecf20Sopenharmony_ci			reg = <0x0 0xc0080000 0x0 0x10000>;
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci			mbigen_gmac:intc_gmac {
558c2ecf20Sopenharmony_ci				interrupt-controller;
568c2ecf20Sopenharmony_ci				msi-parent = <&its_dsa 0x40b1c>;
578c2ecf20Sopenharmony_ci				num-pins = <9>;
588c2ecf20Sopenharmony_ci				#interrupt-cells = <2>;
598c2ecf20Sopenharmony_ci			};
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci			mbigen_i2c:intc_i2c {
628c2ecf20Sopenharmony_ci				interrupt-controller;
638c2ecf20Sopenharmony_ci				msi-parent = <&its_dsa 0x40b0e>;
648c2ecf20Sopenharmony_ci				num-pins = <2>;
658c2ecf20Sopenharmony_ci				#interrupt-cells = <2>;
668c2ecf20Sopenharmony_ci			};
678c2ecf20Sopenharmony_ci	};
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ciDevices connect to mbigen required properties:
708c2ecf20Sopenharmony_ci----------------------------------------------------
718c2ecf20Sopenharmony_ci-interrupts:Specifies the interrupt source.
728c2ecf20Sopenharmony_ci For the specific information of each cell in this property,please refer to
738c2ecf20Sopenharmony_ci the "interrupt-cells" description mentioned above.
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ciExamples:
768c2ecf20Sopenharmony_ci	gmac0: ethernet@c2080000 {
778c2ecf20Sopenharmony_ci		#address-cells = <1>;
788c2ecf20Sopenharmony_ci		#size-cells = <0>;
798c2ecf20Sopenharmony_ci		reg = <0 0xc2080000 0 0x20000>,
808c2ecf20Sopenharmony_ci		      <0 0xc0000000 0 0x1000>;
818c2ecf20Sopenharmony_ci		interrupt-parent  = <&mbigen_device_gmac>;
828c2ecf20Sopenharmony_ci		interrupts =	<656 1>,
838c2ecf20Sopenharmony_ci				<657 1>;
848c2ecf20Sopenharmony_ci	};
85