dt-bindings: interrupt-controller: fsl,ls-extirq: convert to YAML
Convert the fsl,ls-extirq binding to the new YAML format.
In contrast to the original binding documentation, there are three
compatibles which are used in their corresponding device trees which
have a specific compatible and the (already documented) fallback
compatible:
- "fsl,ls1046a-extirq", "fsl,ls1043a-extirq"
- "fsl,ls2080a-extirq", "fsl,ls1088a-extirq"
- "fsl,lx2160a-extirq", "fsl,ls1088a-extirq"
Depending on the number of the number of the external IRQs which is
usually 12 except for the LS1021A where there are only 6, the
interrupt-map-mask was reduced from 0xffffffff to 0xf and 0x7
respectively and the number of interrupt-map entries have to
match.
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220427075338.1156449-4-michael@walle.cc
2022-04-27 09:53:37 +02:00
|
|
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
|
|
|
%YAML 1.2
|
|
|
|
---
|
|
|
|
$id: http://devicetree.org/schemas/interrupt-controller/fsl,ls-extirq.yaml#
|
|
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
|
|
|
|
title: Freescale Layerscape External Interrupt Controller
|
|
|
|
|
|
|
|
maintainers:
|
|
|
|
- Shawn Guo <shawnguo@kernel.org>
|
|
|
|
|
|
|
|
description: |
|
|
|
|
Some Layerscape SOCs (LS1021A, LS1043A, LS1046A LS1088A, LS208xA,
|
|
|
|
LX216xA) support inverting the polarity of certain external interrupt
|
|
|
|
lines.
|
|
|
|
|
|
|
|
properties:
|
|
|
|
compatible:
|
|
|
|
oneOf:
|
|
|
|
- enum:
|
|
|
|
- fsl,ls1021a-extirq
|
|
|
|
- fsl,ls1043a-extirq
|
|
|
|
- fsl,ls1088a-extirq
|
|
|
|
- items:
|
|
|
|
- enum:
|
|
|
|
- fsl,ls1046a-extirq
|
|
|
|
- const: fsl,ls1043a-extirq
|
|
|
|
- items:
|
|
|
|
- enum:
|
|
|
|
- fsl,ls2080a-extirq
|
|
|
|
- fsl,lx2160a-extirq
|
|
|
|
- const: fsl,ls1088a-extirq
|
|
|
|
|
|
|
|
'#interrupt-cells':
|
|
|
|
const: 2
|
|
|
|
|
|
|
|
'#address-cells':
|
|
|
|
const: 0
|
|
|
|
|
|
|
|
interrupt-controller: true
|
|
|
|
|
|
|
|
reg:
|
|
|
|
maxItems: 1
|
|
|
|
description:
|
|
|
|
Specifies the Interrupt Polarity Control Register (INTPCR) in the
|
|
|
|
SCFG or the External Interrupt Control Register (IRQCR) in the ISC.
|
|
|
|
|
|
|
|
interrupt-map:
|
|
|
|
description: Specifies the mapping from external interrupts to GIC interrupts.
|
|
|
|
|
|
|
|
interrupt-map-mask: true
|
|
|
|
|
|
|
|
required:
|
|
|
|
- compatible
|
|
|
|
- '#interrupt-cells'
|
|
|
|
- '#address-cells'
|
|
|
|
- interrupt-controller
|
|
|
|
- reg
|
|
|
|
- interrupt-map
|
|
|
|
- interrupt-map-mask
|
|
|
|
|
|
|
|
allOf:
|
|
|
|
- if:
|
|
|
|
properties:
|
|
|
|
compatible:
|
|
|
|
contains:
|
|
|
|
enum:
|
|
|
|
- fsl,ls1021a-extirq
|
|
|
|
then:
|
|
|
|
properties:
|
|
|
|
interrupt-map:
|
|
|
|
minItems: 6
|
|
|
|
maxItems: 6
|
|
|
|
interrupt-map-mask:
|
|
|
|
items:
|
|
|
|
- const: 0x7
|
|
|
|
- const: 0
|
|
|
|
- if:
|
|
|
|
properties:
|
|
|
|
compatible:
|
|
|
|
contains:
|
|
|
|
enum:
|
|
|
|
- fsl,ls1043a-extirq
|
|
|
|
- fsl,ls1046a-extirq
|
|
|
|
then:
|
|
|
|
properties:
|
|
|
|
interrupt-map:
|
|
|
|
minItems: 12
|
|
|
|
maxItems: 12
|
|
|
|
interrupt-map-mask:
|
|
|
|
items:
|
|
|
|
- const: 0xf
|
|
|
|
- const: 0
|
|
|
|
|
dt-bindings: interrupt-controller: fsl,ls-extirq: workaround wrong interrupt-map number
The driver(drivers/irqchip/irq-ls-extirq.c) have not use standard DT
function to parser interrupt-map. So it doesn't consider '#address-size'
in parent interrupt controller, such as GIC.
When dt-binding verify interrupt-map, item data matrix is spitted at
incorrect position. So cause below warning:
arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dtb: interrupt-controller@14:
interrupt-map: [[0, 0, 1, 0, 0, 4, 1, 0], [1, 0, 1, 4, 2, 0, 1, 0], ...
is too short
Remove interrupt-map restriction to workaround this warning for
'fsl,ls1088a-extirq', 'fsl,ls2080a-extirq' and fsl,lx2160a-extirq.
Other keep the same restriction.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20241007161823.811021-1-Frank.Li@nxp.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2024-10-07 12:18:23 -04:00
|
|
|
- if:
|
|
|
|
properties:
|
|
|
|
compatible:
|
|
|
|
contains:
|
|
|
|
enum:
|
|
|
|
- fsl,ls1088a-extirq
|
|
|
|
- fsl,ls2080a-extirq
|
|
|
|
- fsl,lx2160a-extirq
|
|
|
|
# The driver(drivers/irqchip/irq-ls-extirq.c) have not use standard DT
|
|
|
|
# function to parser interrupt-map. So it doesn't consider '#address-size'
|
|
|
|
# in parent interrupt controller, such as GIC.
|
|
|
|
#
|
|
|
|
# When dt-binding verify interrupt-map, item data matrix is spitted at
|
|
|
|
# incorrect position. Remove interrupt-map restriction because it always
|
|
|
|
# wrong.
|
|
|
|
|
|
|
|
then:
|
|
|
|
properties:
|
|
|
|
interrupt-map-mask:
|
|
|
|
items:
|
|
|
|
- const: 0xf
|
|
|
|
- const: 0
|
|
|
|
|
dt-bindings: interrupt-controller: fsl,ls-extirq: convert to YAML
Convert the fsl,ls-extirq binding to the new YAML format.
In contrast to the original binding documentation, there are three
compatibles which are used in their corresponding device trees which
have a specific compatible and the (already documented) fallback
compatible:
- "fsl,ls1046a-extirq", "fsl,ls1043a-extirq"
- "fsl,ls2080a-extirq", "fsl,ls1088a-extirq"
- "fsl,lx2160a-extirq", "fsl,ls1088a-extirq"
Depending on the number of the number of the external IRQs which is
usually 12 except for the LS1021A where there are only 6, the
interrupt-map-mask was reduced from 0xffffffff to 0xf and 0x7
respectively and the number of interrupt-map entries have to
match.
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220427075338.1156449-4-michael@walle.cc
2022-04-27 09:53:37 +02:00
|
|
|
additionalProperties: false
|
|
|
|
|
|
|
|
examples:
|
|
|
|
- |
|
|
|
|
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
|
|
|
interrupt-controller@1ac {
|
|
|
|
compatible = "fsl,ls1021a-extirq";
|
|
|
|
#interrupt-cells = <2>;
|
|
|
|
#address-cells = <0>;
|
|
|
|
interrupt-controller;
|
|
|
|
reg = <0x1ac 4>;
|
|
|
|
interrupt-map =
|
|
|
|
<0 0 &gic GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
|
|
|
|
<1 0 &gic GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>,
|
|
|
|
<2 0 &gic GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>,
|
|
|
|
<3 0 &gic GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>,
|
|
|
|
<4 0 &gic GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>,
|
|
|
|
<5 0 &gic GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
|
|
|
|
interrupt-map-mask = <0x7 0x0>;
|
|
|
|
};
|