From 2f5ac45e53775bb57dcd9a5ee30992e44d95a9eb Mon Sep 17 00:00:00 2001 From: Piotr Wojnarowski Date: Wed, 17 May 2023 17:35:23 +0200 Subject: [PATCH] dts: bindings: interrupt-controller: GIC: Allow specifying version in DT Currently, only the presence of a GIC is reflected in the device tree, and its version must be set separately in each SoC's Kconfig. This patch adds separate bindings for each GIC version whose presence in the device tree automatically enables the corresponding Kconfig symbol. Signed-off-by: Piotr Wojnarowski --- drivers/interrupt_controller/Kconfig.gic | 18 +++++++++++++++--- .../interrupt-controller/arm,gic-v1.yaml | 7 +++++++ .../interrupt-controller/arm,gic-v2.yaml | 7 +++++++ .../interrupt-controller/arm,gic-v3.yaml | 7 +++++++ 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 dts/bindings/interrupt-controller/arm,gic-v1.yaml create mode 100644 dts/bindings/interrupt-controller/arm,gic-v2.yaml create mode 100644 dts/bindings/interrupt-controller/arm,gic-v3.yaml diff --git a/drivers/interrupt_controller/Kconfig.gic b/drivers/interrupt_controller/Kconfig.gic index 483e3a5e73b..bab59a6ee37 100644 --- a/drivers/interrupt_controller/Kconfig.gic +++ b/drivers/interrupt_controller/Kconfig.gic @@ -8,26 +8,38 @@ if CPU_CORTEX config GIC bool +# Selecting these symbols directly is deprecated: the GIC architecture version +# should be specified by adding the appropriate compat (for example arm,gic-v2) +# to the DT. config GIC_V1 - bool + def_bool DT_HAS_ARM_GIC_V1_ENABLED select GIC + select DEPRECATED if !DT_HAS_ARM_GIC_V1_ENABLED help The ARM Generic Interrupt Controller v1 (e.g. PL390) works with the ARM Cortex-family processors. + Selecting this symbol directly is deprecated. Please add the arm,gic-v1 + compatible to the GIC node in your DT and remove the direct selection. config GIC_V2 - bool + def_bool DT_HAS_ARM_GIC_V2_ENABLED select GIC + select DEPRECATED if !DT_HAS_ARM_GIC_V2_ENABLED help The ARM Generic Interrupt Controller v2 (e.g. GIC-400) works with the ARM Cortex-family processors. + Selecting this symbol directly is deprecated. Please add the arm,gic-v2 + compatible to the GIC node in your DT and remove the direct selection. config GIC_V3 - bool + def_bool DT_HAS_ARM_GIC_V3_ENABLED select GIC + select DEPRECATED if !DT_HAS_ARM_GIC_V3_ENABLED help The ARM Generic Interrupt Controller v3 (e.g. GIC-500 and GIC-600) works with the ARM Cortex-family processors. + Selecting this symbol directly is deprecated. Please add the arm,gic-v3 + compatible to the GIC node in your DT and remove the direct selection. config GIC_VER int diff --git a/dts/bindings/interrupt-controller/arm,gic-v1.yaml b/dts/bindings/interrupt-controller/arm,gic-v1.yaml new file mode 100644 index 00000000000..aae5bbbed0c --- /dev/null +++ b/dts/bindings/interrupt-controller/arm,gic-v1.yaml @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: Apache-2.0 + +description: ARM Generic Interrupt Controller v1 + +compatible: arm,gic-v1 + +include: arm,gic.yaml diff --git a/dts/bindings/interrupt-controller/arm,gic-v2.yaml b/dts/bindings/interrupt-controller/arm,gic-v2.yaml new file mode 100644 index 00000000000..a5e294efea3 --- /dev/null +++ b/dts/bindings/interrupt-controller/arm,gic-v2.yaml @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: Apache-2.0 + +description: ARM Generic Interrupt Controller v2 + +compatible: arm,gic-v2 + +include: arm,gic.yaml diff --git a/dts/bindings/interrupt-controller/arm,gic-v3.yaml b/dts/bindings/interrupt-controller/arm,gic-v3.yaml new file mode 100644 index 00000000000..8fc5851d62c --- /dev/null +++ b/dts/bindings/interrupt-controller/arm,gic-v3.yaml @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: Apache-2.0 + +description: ARM Generic Interrupt Controller v3 + +compatible: arm,gic-v3 + +include: arm,gic.yaml