• Manivannan Sadhasivam's avatar
    arm64: dts: qcom: sc8280xp-pmics: Specify interrupt parent explicitly · 2d5cab92
    Manivannan Sadhasivam authored
    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: default avatarPatrick Wildt <patrick@blueri.se>
    Signed-off-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Reviewed-by: default avatarBjorn Andersson <andersson@kernel.org>
    Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
    Link: https://lore.kernel.org/r/20230213090118.11527-1-manivannan.sadhasivam@linaro.org
    2d5cab92
sc8280xp-pmics.dtsi 4.13 KB