0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: "http://devicetree.org/schemas/interrupt-controller/loongson,liointc.yaml#"
0005 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
0006
0007 title: Loongson Local I/O Interrupt Controller
0008
0009 maintainers:
0010 - Jiaxun Yang <jiaxun.yang@flygoat.com>
0011
0012 description: |
0013 This interrupt controller is found in the Loongson-3 family of chips and
0014 Loongson-2K1000 chip, as the primary package interrupt controller which
0015 can route local I/O interrupt to interrupt lines of cores.
0016
0017 allOf:
0018 - $ref: /schemas/interrupt-controller.yaml#
0019
0020 properties:
0021 compatible:
0022 enum:
0023 - loongson,liointc-1.0
0024 - loongson,liointc-1.0a
0025 - loongson,liointc-2.0
0026
0027 reg:
0028 minItems: 1
0029 maxItems: 3
0030
0031 reg-names:
0032 items:
0033 - const: main
0034 - const: isr0
0035 - const: isr1
0036
0037 interrupt-controller: true
0038
0039 interrupts:
0040 description:
0041 Interrupt source of the CPU interrupts.
0042 minItems: 1
0043 maxItems: 4
0044
0045 interrupt-names:
0046 description: List of names for the parent interrupts.
0047 items:
0048 - const: int0
0049 - const: int1
0050 - const: int2
0051 - const: int3
0052 minItems: 1
0053
0054 '#interrupt-cells':
0055 const: 2
0056
0057 'loongson,parent_int_map':
0058 description: |
0059 This property points how the children interrupts will be mapped into CPU
0060 interrupt lines. Each cell refers to a parent interrupt line from 0 to 3
0061 and each bit in the cell refers to a child interrupt from 0 to 31.
0062 If a CPU interrupt line didn't connect with liointc, then keep its
0063 cell with zero.
0064 $ref: /schemas/types.yaml#/definitions/uint32-array
0065 minItems: 4
0066 maxItems: 4
0067
0068 required:
0069 - compatible
0070 - reg
0071 - interrupts
0072 - interrupt-controller
0073 - '#interrupt-cells'
0074 - 'loongson,parent_int_map'
0075
0076
0077 unevaluatedProperties: false
0078
0079 if:
0080 properties:
0081 compatible:
0082 contains:
0083 enum:
0084 - loongson,liointc-2.0
0085
0086 then:
0087 properties:
0088 reg:
0089 minItems: 3
0090
0091 required:
0092 - reg-names
0093
0094 else:
0095 properties:
0096 reg:
0097 maxItems: 1
0098
0099 examples:
0100 - |
0101 iointc: interrupt-controller@3ff01400 {
0102 compatible = "loongson,liointc-1.0";
0103 reg = <0x3ff01400 0x64>;
0104
0105 interrupt-controller;
0106 #interrupt-cells = <2>;
0107
0108 interrupt-parent = <&cpuintc>;
0109 interrupts = <2>, <3>;
0110 interrupt-names = "int0", "int1";
0111
0112 loongson,parent_int_map = <0xf0ffffff>, /* int0 */
0113 <0x0f000000>, /* int1 */
0114 <0x00000000>, /* int2 */
0115 <0x00000000>; /* int3 */
0116
0117 };
0118
0119 ...