linux-stable/arch/arm64
Manivannan Sadhasivam 2d5cab9232 arm64: dts: qcom: sc8280xp-pmics: Specify interrupt parent explicitly
Nodes like pwrkey, resin, iadc, adc-tm, temp-alarm which are the grand
children of spmi_bus node represent the interrupt generating devices but
don't have "interrupt-parent" property.

As per the devicetree spec v0.3, section 2.4:

"The physical wiring of an interrupt source to an interrupt controller is
represented in the devicetree with the interrupt-parent property. Nodes
that represent interrupt-generating devices contain an interrupt-parent
property which has a phandle value that points to the device to which the
device’s interrupts are routed, typically an interrupt controller. If an
interrupt-generating device does not have an interrupt-parent property,
its interrupt parent is assumed to be its devicetree parent."

This clearly says that if the "interrupt-parent" property is absent, then
the immediate devicetree parent will be assumed as the interrupt parent.
But the immediate parents of these nodes are not interrupt controllers
themselves.

This may lead to failure while wiring the interrupt for these nodes by an
operating system. But a few operating systems like Linux, workaround this
issue by walking up the parent nodes until it finds the "interrupt-cells"
property. Then the node that has the "interrupt-cells" property will be
used as the interrupt parent.

But this workaround is not as per the DT spec and is not being implemented
by other operating systems such as OpenBSD.

Hence, fix this issue by adding the "interrupts-extended" property that
explicitly specifies the spmi_bus node as the interrupt parent. Note that
the "interrupts-extended" property is chosen over "interrupt-parent" as it
allows specifying both interrupt parent phandle and interrupt specifiers in
a single property.

Reported-by: Patrick Wildt <patrick@blueri.se>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230213090118.11527-1-manivannan.sadhasivam@linaro.org
2023-02-13 14:18:21 -08:00
..
boot arm64: dts: qcom: sc8280xp-pmics: Specify interrupt parent explicitly 2023-02-13 14:18:21 -08:00
configs arm64: defconfig: Enable Qualcomm SM6115 / SM4250 GCC and Pinctrl 2022-11-30 17:49:05 +01:00
crypto crypto: arm64/ghash-ce - use frame_push/pop macros consistently 2022-12-09 18:45:00 +08:00
hyperv hyperv: simplify and rename generate_guest_id 2022-09-28 13:36:56 +00:00
include arm64 fixes for -rc1 2022-12-16 13:46:41 -06:00
kernel arm64 fixes for -rc1 2022-12-16 13:46:41 -06:00
kvm ARM64: 2022-12-15 11:12:21 -08:00
lib Merge branch 'for-next/sysregs' into for-next/core 2022-12-06 11:32:25 +00:00
mm arm64 fixes for -rc1 2022-12-16 13:46:41 -06:00
net bpf: Remove prog->active check for bpf_lsm and bpf_iter 2022-10-25 23:11:46 -07:00
tools Revert "arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption" 2022-12-15 17:59:12 +00:00
xen
Kbuild
Kconfig arm64 fixes for -rc1 2022-12-16 13:46:41 -06:00
Kconfig.debug
Kconfig.platforms arm64: renesas: Drop selecting GPIOLIB and PINCTRL 2022-10-28 14:31:24 +02:00
Makefile Merge branch 'for-next/ftrace' into for-next/core 2022-12-06 11:07:39 +00:00