Skip to content

[PW_SID:1065108] PolarFire SoC GPIO interrupt support#1595

Closed
linux-riscv-bot wants to merge 4 commits into
workflow__riscv__fixesfrom
pw1065108
Closed

[PW_SID:1065108] PolarFire SoC GPIO interrupt support#1595
linux-riscv-bot wants to merge 4 commits into
workflow__riscv__fixesfrom
pw1065108

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1065108 applied to workflow__riscv__fixes

Name: PolarFire SoC GPIO interrupt support
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1065108
Version: 12

Add support for interrupts to the PolarFire SoC GPIO driver. Each GPIO
has an independent interrupt that is wired to an interrupt mux that sits
between the controllers and the PLIC. The SoC has more GPIO lines than
connections from the mux to the PLIC, so some GPIOs must share PLIC
interrupts. The configuration is not static and is set at runtime,
conventionally by the platform's firmware. CoreGPIO, the version
intended for use in the FPGA fabric has two interrupt output ports, one
is IO_NUM bits wide, as is used in the hardened cores, and the other is
a single bit with all lines ORed together.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
On PolarFire SoC there are more GPIO interrupts than there are interrupt
lines available on the PLIC, and a runtime configurable mux is used to
decide which interrupts are assigned direct connections to the PLIC &
which are relegated to sharing a line.

Reviewed-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
On PolarFire SoC there are more GPIO interrupts than there are interrupt
lines available on the PLIC, and a runtime configurable mux is used to
decide which interrupts are assigned direct connections to the PLIC &
which are relegated to sharing a line.

Add a driver so that Linux can set the mux based on the interrupt
mapping in the devicetree.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
…e SoC

There are 3 GPIO controllers on this SoC, of which:
- GPIO controller 0 has 14 GPIOs
- GPIO controller 1 has 24 GPIOs
- GPIO controller 2 has 32 GPIOs

All GPIOs are capable of generating interrupts, for a total of 70.
There are only 41 IRQs available however, so a configurable mux is used
to ensure all GPIOs can be used for interrupt generation.
38 of the 41 interrupts are in what the documentation calls "direct
mode", as they provide an exclusive connection from a GPIO to the PLIC.
The 3 remaining interrupts are used to mux the interrupts which do not
have a exclusive connection, one for each GPIO controller.

The mux was overlooked when the bindings and driver were originally
written for the GPIO controllers on Polarfire SoC, and the interrupts
property in the GPIO nodes used to try and convey what the mapping was.
Instead, the mux should be a device in its own right, and the GPIO
controllers should be connected to it, rather than to the PLIC.
Now that a binding exists for that mux, fix the inaccurate description
of the interrupt controller hierarchy.

GPIO controllers 0 and 1 do not have all 32 possible GPIO lines, so
ngpios needs to be set to match the number of lines/interrupts.

The m100pfsevp has conflicting interrupt mappings for controllers 0 and
2, as they cannot both be using an interrupt in "direct mode" at the
same time, so the default replaces this impossible configuration.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v12,1/4] gpio: mpfs: Add interrupt support"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 138.77 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v12,1/4] gpio: mpfs: Add interrupt support"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1137.51 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v12,1/4] gpio: mpfs: Add interrupt support"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1634.14 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v12,1/4] gpio: mpfs: Add interrupt support"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.48 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v12,1/4] gpio: mpfs: Add interrupt support"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.74 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v12,1/4] gpio: mpfs: Add interrupt support"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.04 seconds
Result: WARNING
Output:

CHECK: Alignment should match open parenthesis
#111: FILE: drivers/gpio/gpio-mpfs.c:159:
+	regmap_update_bits(mpfs_gpio->regs, MPFS_GPIO_CTRL(gpio_index),
+			     MPFS_GPIO_EN_INT, MPFS_GPIO_EN_INT);

total: 0 errors, 0 warnings, 1 checks, 166 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 81cef1d6752f ("gpio: mpfs: Add interrupt support") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 1 checks, 166 lines checked
CHECK: Alignment should match open parenthesis


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v12,1/4] gpio: mpfs: Add interrupt support"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 83.14 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v12,1/4] gpio: mpfs: Add interrupt support"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v12,1/4] gpio: mpfs: Add interrupt support"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v12,1/4] gpio: mpfs: Add interrupt support"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v12,1/4] gpio: mpfs: Add interrupt support"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v12,1/4] gpio: mpfs: Add interrupt support"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v12,2/4] dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 137.38 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v12,2/4] dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1001.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v12,2/4] dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1347.54 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v12,2/4] dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.69 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v12,2/4] dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.97 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v12,2/4] dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.06 seconds
Result: WARNING
Output:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#22: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 87 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit baf20444079d ("dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 87 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v12,2/4] dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 82.55 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v12,2/4] dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v12,2/4] dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v12,2/4] dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v12,2/4] dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v12,2/4] dt-bindings: soc: microchip: document PolarFire SoC's gpio interrupt mux"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v12,3/4] soc: microchip: add mpfs gpio interrupt mux driver"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 138.13 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v12,3/4] soc: microchip: add mpfs gpio interrupt mux driver"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1130.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v12,3/4] soc: microchip: add mpfs gpio interrupt mux driver"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1645.66 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v12,3/4] soc: microchip: add mpfs gpio interrupt mux driver"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 27.01 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v12,3/4] soc: microchip: add mpfs gpio interrupt mux driver"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.40 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v12,3/4] soc: microchip: add mpfs gpio interrupt mux driver"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.79 seconds
Result: WARNING
Output:

WARNING: please write a help paragraph that fully describes the config symbol with at least 4 lines
#42: FILE: drivers/soc/microchip/Kconfig:1:
+config POLARFIRE_SOC_IRQ_MUX
+	bool "Microchip PolarFire SoC's GPIO IRQ Mux"
+	depends on ARCH_MICROCHIP
+	select REGMAP
+	select REGMAP_MMIO
+	default y
+	help
+	  Support for the interrupt mux on Polarfire SoC. It sits between
+	  the GPIO controllers and the PLIC, as only 41 interrupts are shared
+	  between 3 GPIO controllers with a total of 70 interrupts.
+

CHECK: Alignment should match open parenthesis
#100: FILE: drivers/soc/microchip/mpfs-irqmux.c:31:
+	if (parent_args->args[0] < MPFS_IRQMUX_DIRECT_START ||
+			parent_args->args[0] > MPFS_IRQMUX_NONDIRECT_END) {

CHECK: Blank lines aren't necessary after an open brace '{'
#145: FILE: drivers/soc/microchip/mpfs-irqmux.c:76:
+	for_each_of_imap_item(&imap_parser, &imap_item) {
+

total: 0 errors, 1 warnings, 2 checks, 206 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit afd346785a29 ("soc: microchip: add mpfs gpio interrupt mux driver") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 2 checks, 206 lines checked
CHECK: Alignment should match open parenthesis
CHECK: Blank lines aren't necessary after an open brace '{'
WARNING: please write a help paragraph that fully describes the config symbol with at least 4 lines


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v12,3/4] soc: microchip: add mpfs gpio interrupt mux driver"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 82.43 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v12,3/4] soc: microchip: add mpfs gpio interrupt mux driver"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v12,3/4] soc: microchip: add mpfs gpio interrupt mux driver"
kdoc
Desc: Detects for kdoc errors
Duration: 0.99 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v12,3/4] soc: microchip: add mpfs gpio interrupt mux driver"
module-param
Desc: Detect module_param changes
Duration: 0.33 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v12,3/4] soc: microchip: add mpfs gpio interrupt mux driver"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 3: "[v12,3/4] soc: microchip: add mpfs gpio interrupt mux driver"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v12,4/4] riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 137.76 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v12,4/4] riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1069.63 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v12,4/4] riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1428.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v12,4/4] riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.71 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v12,4/4] riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.70 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v12,4/4] riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.20 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v12,4/4] riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 82.70 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v12,4/4] riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v12,4/4] riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC"
kdoc
Desc: Detects for kdoc errors
Duration: 0.84 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v12,4/4] riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC"
module-param
Desc: Detect module_param changes
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v12,4/4] riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 4: "[v12,4/4] riscv: dts: microchip: update mpfs gpio interrupts to better match the SoC"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 1.04 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw1065108 branch March 18, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants