Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dts: bindings: interrupt-controller: GIC: Allow specifying version in DT #58035

Merged
merged 19 commits into from Jun 17, 2023

Conversation

p-woj
Copy link
Contributor

@p-woj p-woj commented May 18, 2023

This PR separates the GIC binding into 3 version-specific ones and moves the GIC version from the SoCs' Kconfigs into their device trees. This brings the GIC driver more in line with other existing drivers and makes the device tree a more complete description of the hardware, which is useful for efforts relying on structured data such as Renodepedia.

When the GIC driver was originally introduced, it was only used on
Cortex-R SoCs. However, this is not the case anymore. Update the
description to reflect that this driver is not specific to Cortex-R.

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @p-woj, and thank you very much for your first pull request to the Zephyr project!

A project maintainer just triggered our CI pipeline to run it against your PR and ensure it's compliant and doesn't cause any issues. You might want to take this opportunity to review the project's Contributor Expectations and make any updates to your pull request if necessary. 😊

@povergoing
Copy link
Member

povergoing commented May 19, 2023

LGTM, but someone who has downstream board patches might have to update their DTS :)

@stephanosio stephanosio added the Release Notes To be mentioned in the release notes label May 19, 2023
Copy link
Member

@stephanosio stephanosio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable; but, these changes need to be described in the release notes so that any downstream users using out-of-tree boards can handle the migration.

Comment on lines 11 to +15
config GIC_V1
bool
def_bool DT_HAS_ARM_GIC_V1_ENABLED
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency this should be:

default y
depends on ...

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 <pwojnarowski@antmicro.com>
@p-woj
Copy link
Contributor Author

p-woj commented Jun 2, 2023

I've adjusted the Kconfig changes so that they don't break out-of-tree boards anymore. Now both ways of specifying the architecture version (select GIC_V2 in Kconfig and arm,gic-v2 in the DT) will work.

Also, having the version explicitly selected in Kconfig without the versioned compat in the DT prints a deprecation warning.

Please take a look @carlocaione

Copy link
Collaborator

@carlocaione carlocaione left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just a note about the changelog

Comment on lines 182 to 186
* Setting the GIC architecture version by selecting
:kconfig:option:`CONFIG_GIC_V1`, :kconfig:option:`CONFIG_GIC_V2` and
:kconfig:option:`CONFIG_GIC_V3` directly in Kconfig has been deprecated.
The GIC version should now be specified by adding the appropriate compatible, for
example :dtcompatible:`arm,gic-v2`, to the GIC node in the device tree.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go now in the 3.5 release notes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be good now

p-woj added 17 commits June 2, 2023 15:17
Add a base working release notes file for the Zephyr 3.5 release.

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Add a note that explains that the GIC version is now specified
in the DT and not Kconfig.

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for xilinx_zynq7000
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for nxp_s32
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for cyclonev
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for renesas_rcar
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for xilinx_zynqmp
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for fvp_aemv8{a,r}
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for viper
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for mimx9
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for the QEMU platforms
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for nxp_imx
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for intel_socfpga
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for rk3399
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for am6x
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for ls1046a
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
Move the GIC version to the device tree for xenvm
to improve readability

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
@nashif nashif merged commit 562716d into zephyrproject-rtos:main Jun 17, 2023
24 checks passed
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @p-woj!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a fantastic achievement, and we're thrilled to have you as part of our community!

To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge.

Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM64 ARM (64-bit) Architecture area: Devicetree Binding PR modifies or adds a Device Tree binding area: Interrupt Controller area: Xen Platform platform: NXP NXP platform: Renesas R-Car Renesas R-Car platform: TI K3 Texas Instruments Keystone 3 Processors platform: Xilinx Xilinx Release Notes To be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants