arm64: dts: qcom: sc8280xp-pmics: add explicit rtc interrupt parent
PATCH 1/1 arm64: dts: qcom: sc8280xp-pmics: add explicit rtc interrupt parent
Unless explicitly specified the interrupt-parent property is inherited from the parent node on Linux even though this may not be in full compliance with the devicetree specification.
Following commit 2d5cab9232ba ("arm64: dts: qcom: sc8280xp-pmics:
Specify interrupt parent explicitly"), add an explicit interrupt parent also for the PMIC RTC node for the benefit of other operating systems which may be confused by this omission.
Note that any such OS must still implement a fallback to the root interrupt domain as most devicetrees are written under the assumption that the interrupt parent is inherited.
--- arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi +1 -1
@@ -101,7 +101,7 @@ pmk8280_rtc: rtc@6100 { compatible = "qcom,pmk8350-rtc"; reg = <0x6100>, <0x6200>; reg-names = "rtc", "alarm"; - interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>; + interrupts-extended = <&spmi_bus 0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>; wakeup-source; status = "disabled"; };
Signature · 1 line
2.39.3
Quoted 9 lines · Johan Hovold
Unless explicitly specified the interrupt-parent property is inherited from the parent node on Linux even though this may not be in full compliance with the devicetree specification.
Following commit
2d5cab9232ba("arm64: dts: qcom: sc8280xp-pmics:
Specify interrupt parent explicitly"), add an explicit interrupt parent also for the PMIC RTC node for the benefit of other operating systems which may be confused by this omission.
Quoted 7 lines
Note that any such OS must still implement a fallback to the root interrupt domain as most devicetrees are written under the assumption that the interrupt parent is inherited.
Reported-by Patrick Wildt <[email protected]>Signed-off-by Johan Hovold <[email protected]>---
Maybe a warning in of core should be introduced..
Or maybe dtc could learn not to compile such DTS :P
Konrad
Quoted 16 lines
arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi +1
-1@@ -101,7 +101,7 @@ pmk8280_rtc: rtc@6100 { compatible = "qcom,pmk8350-rtc"; reg = <0x6100>, <0x6200>; reg-names = "rtc", "alarm"; - interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>; + interrupts-extended = <&spmi_bus 0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>; wakeup-source; status = "disabled"; };
Quoted 9 lines · Johan Hovold
Unless explicitly specified the interrupt-parent property is inherited from the parent node on Linux even though this may not be in full compliance with the devicetree specification.
Following commit
2d5cab9232ba("arm64: dts: qcom: sc8280xp-pmics:
Specify interrupt parent explicitly"), add an explicit interrupt parent also for the PMIC RTC node for the benefit of other operating systems which may be confused by this omission.
Quoted 6 lines
Note that any such OS must still implement a fallback to the root interrupt domain as most devicetrees are written under the assumption that the interrupt parent is inherited.
Reported-by Patrick Wildt <[email protected]>Signed-off-by Johan Hovold <[email protected]>
It is good to encode this in the binding and fix other such instances.
- Mani
Quoted 20 lines
--- arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi +1
-1@@ -101,7 +101,7 @@ pmk8280_rtc: rtc@6100 { compatible = "qcom,pmk8350-rtc"; reg = <0x6100>, <0x6200>; reg-names = "rtc", "alarm"; - interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>; + interrupts-extended = <&spmi_bus 0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>; wakeup-source; status = "disabled"; };Signature · 1 line
2.39.3
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Quoted 10 lines · Manivannan Sadhasivam
Quoted 9 lines · Johan Hovold
Unless explicitly specified the interrupt-parent property is inherited from the parent node on Linux even though this may not be in full compliance with the devicetree specification.
Following commit
2d5cab9232ba("arm64: dts: qcom: sc8280xp-pmics:
Specify interrupt parent explicitly"), add an explicit interrupt parent also for the PMIC RTC node for the benefit of other operating systems which may be confused by this omission.
Quoted 8 lines
Quoted 6 lines
Note that any such OS must still implement a fallback to the root interrupt domain as most devicetrees are written under the assumption that the interrupt parent is inherited.
Reported-by Patrick Wildt <[email protected]>Signed-off-by Johan Hovold <[email protected]>It is good to encode this in the binding and fix other such instances.
Not sure about that. Perhaps the spec should be updated to match reality instead... We have many more instances like this, even for this very SoC, but apparently OpenBSD or whatever OS needs this falls back to the root domain then.
Changing this for the rtc node for consistency after you changed the others is a no-brainer, but not sure about trying to do this tree-wide. We already have too many of these one-line DT cleanups...
Johan
Quoted 18 lines · Johan Hovold
Quoted 17 lines · Manivannan Sadhasivam
Quoted 15 lines · Johan Hovold
Unless explicitly specified the interrupt-parent property is inherited from the parent node on Linux even though this may not be in full compliance with the devicetree specification.
Following commit
2d5cab9232ba("arm64: dts: qcom: sc8280xp-pmics:
Specify interrupt parent explicitly"), add an explicit interrupt parent also for the PMIC RTC node for the benefit of other operating systems which may be confused by this omission.Note that any such OS must still implement a fallback to the root interrupt domain as most devicetrees are written under the assumption that the interrupt parent is inherited.
Reported-by Patrick Wildt <[email protected]>Signed-off-by Johan Hovold <[email protected]>
Quoted 7 lines
Quoted 1 line
It is good to encode this in the binding and fix other such instances.
Not sure about that. Perhaps the spec should be updated to match reality instead... We have many more instances like this, even for this very SoC, but apparently OpenBSD or whatever OS needs this falls back to the root domain then.
Just because linux is doing it in a different way doesn't warrant an amendment to the spec IMO.
Quoted 4 lines
Changing this for the rtc node for consistency after you changed the others is a no-brainer, but not sure about trying to do this tree-wide. We already have too many of these one-line DT cleanups...
I agree that this is going to be a one-line cleanup but someone has to do it. (not asking you to do since I also skipped it during 2d5cab9232ba). We can put it in the back burner.
- Mani
Quoted 1 line
Johan
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Quoted 21 lines · Manivannan Sadhasivam
Quoted 20 lines · Johan Hovold
Quoted 18 lines · Manivannan Sadhasivam
Quoted 9 lines · Johan Hovold
Unless explicitly specified the interrupt-parent property is inherited from the parent node on Linux even though this may not be in full compliance with the devicetree specification.
Following commit
2d5cab9232ba("arm64: dts: qcom: sc8280xp-pmics:
Specify interrupt parent explicitly"), add an explicit interrupt parent also for the PMIC RTC node for the benefit of other operating systems which may be confused by this omission.Quoted 6 lines
Note that any such OS must still implement a fallback to the root interrupt domain as most devicetrees are written under the assumption that the interrupt parent is inherited.
Reported-by Patrick Wildt <[email protected]>Signed-off-by Johan Hovold <[email protected]>It is good to encode this in the binding and fix other such instances.
Quoted 8 lines
Quoted 5 lines
Not sure about that. Perhaps the spec should be updated to match reality instead... We have many more instances like this, even for this very SoC, but apparently OpenBSD or whatever OS needs this falls back to the root domain then.
Just because linux is doing it in a different way doesn't warrant an amendment to the spec IMO.
My point is that it's apparently not just Linux as most devicetrees work this way at least for the root domain. And then it may be time to update the spec in some way.
Quoted 8 lines
Quoted 4 lines
Changing this for the rtc node for consistency after you changed the others is a no-brainer, but not sure about trying to do this tree-wide. We already have too many of these one-line DT cleanups...
I agree that this is going to be a one-line cleanup but someone has to do it. (not asking you to do since I also skipped it during
2d5cab9232ba). We can put it in the back burner.
So that may actually amount to a ten-thousand line diff or so... And then it's probably better to just update the spec.
Johan
Quoted 28 lines · Johan Hovold
Quoted 27 lines · Manivannan Sadhasivam
Quoted 25 lines · Johan Hovold
Quoted 10 lines · Manivannan Sadhasivam
Quoted 9 lines · Johan Hovold
Unless explicitly specified the interrupt-parent property is inherited from the parent node on Linux even though this may not be in full compliance with the devicetree specification.
Following commit
2d5cab9232ba("arm64: dts: qcom: sc8280xp-pmics:
Specify interrupt parent explicitly"), add an explicit interrupt parent also for the PMIC RTC node for the benefit of other operating systems which may be confused by this omission.Quoted 8 lines
Quoted 6 lines
Note that any such OS must still implement a fallback to the root interrupt domain as most devicetrees are written under the assumption that the interrupt parent is inherited.
Reported-by Patrick Wildt <[email protected]>Signed-off-by Johan Hovold <[email protected]>It is good to encode this in the binding and fix other such instances.
Not sure about that. Perhaps the spec should be updated to match reality instead... We have many more instances like this, even for this very SoC, but apparently OpenBSD or whatever OS needs this falls back to the root domain then.
Quoted 6 lines
Quoted 2 lines
Just because linux is doing it in a different way doesn't warrant an amendment to the spec IMO.
My point is that it's apparently not just Linux as most devicetrees work this way at least for the root domain. And then it may be time to update the spec in some way.
I'm not sure about the point you're trying to make. In OpenBSD's implementation, which I think complies with the spec, for non-extended interrupts we check the node's (or all its parents') interrupt-parent property.
Technically the SPMI arbiter could define an interrupt-parent that points to itself, because it's using interrupts-extended anyway to point to the PDC. But that would feel a bit stupid and not really correct. Alternatively each child node could have interrupt-parent.
That said, I understand the point that it might make sense to amend the spec so that if a parent node is an interrupt-controller, that's most probably interrupt parent, unless an interrupt-parent property shows up before.
I would like to add that OpenBSD supports a number of SoCs for quite some years and this is the first time I've hit an issue with interrupts that were not designed in a way for the current spec to work. That said we obviously support quite fewer SoCs/boards in total compared to Linux.
Cheers,
Patrick
Quoted 51 lines · Patrick Wildt
Quoted 28 lines · Johan Hovold
Quoted 27 lines · Manivannan Sadhasivam
Quoted 25 lines · Johan Hovold
Quoted 10 lines · Manivannan Sadhasivam
Quoted 9 lines · Johan Hovold
Unless explicitly specified the interrupt-parent property is inherited from the parent node on Linux even though this may not be in full compliance with the devicetree specification.
Following commit
2d5cab9232ba("arm64: dts: qcom: sc8280xp-pmics:
Specify interrupt parent explicitly"), add an explicit interrupt parent also for the PMIC RTC node for the benefit of other operating systems which may be confused by this omission.Quoted 8 lines
Quoted 6 lines
Note that any such OS must still implement a fallback to the root interrupt domain as most devicetrees are written under the assumption that the interrupt parent is inherited.
Reported-by Patrick Wildt <[email protected]>Signed-off-by Johan Hovold <[email protected]>It is good to encode this in the binding and fix other such instances.
Not sure about that. Perhaps the spec should be updated to match reality instead... We have many more instances like this, even for this very SoC, but apparently OpenBSD or whatever OS needs this falls back to the root domain then.
Quoted 6 lines
Quoted 2 lines
Just because linux is doing it in a different way doesn't warrant an amendment to the spec IMO.
My point is that it's apparently not just Linux as most devicetrees work this way at least for the root domain. And then it may be time to update the spec in some way.
I'm not sure about the point you're trying to make. In OpenBSD's implementation, which I think complies with the spec, for non-extended interrupts we check the node's (or all its parents') interrupt-parent property.
Technically the SPMI arbiter could define an interrupt-parent that points to itself, because it's using interrupts-extended anyway to point to the PDC. But that would feel a bit stupid and not really correct. Alternatively each child node could have interrupt-parent.
That said, I understand the point that it might make sense to amend the spec so that if a parent node is an interrupt-controller, that's most probably interrupt parent, unless an interrupt-parent property shows up before.
Quoted 4 lines
I would like to add that OpenBSD supports a number of SoCs for quite some years and this is the first time I've hit an issue with interrupts that were not designed in a way for the current spec to work. That said we obviously support quite fewer SoCs/boards in total compared to Linux.
Linux does something out of spec here. We should either comply or amend the dt spec. Perhaps that's a question for Rob Herring.
Konrad
Quoted 3 lines
Cheers,
Patrick
Quoted 10 lines · Patrick Wildt
Quoted 3 lines · Johan Hovold
My point is that it's apparently not just Linux as most devicetrees work this way at least for the root domain. And then it may be time to update the spec in some way.
I'm not sure about the point you're trying to make. In OpenBSD's implementation, which I think complies with the spec, for non-extended interrupts we check the node's (or all its parents') interrupt-parent property.
My point is that that is not compliant with the spec either which only says that in case 'interrupt-parent' is missing in a node for an interrupt-generating device, then the interrupt parent is assumed to be the devicetree parent (which must then also be an interrupt controller or nexus).
There is no provision for any recursive lookup in the spec currently.
Quoted 4 lines
Technically the SPMI arbiter could define an interrupt-parent that points to itself, because it's using interrupts-extended anyway to point to the PDC. But that would feel a bit stupid and not really correct. Alternatively each child node could have interrupt-parent.
I agree that that would not really be correct (e.g. as 'interrupt' and 'interrupt-extended' are supposed to be mutually exclusive).
Quoted 3 lines
That said, I understand the point that it might make sense to amend the spec so that if a parent node is an interrupt-controller, that's most probably interrupt parent,
This bit is already in the spec.
Quoted 2 lines
unless an interrupt-parent property
shows up before.
But this seems to suggest that you really meant to say "ancestor" in the first clause?
Quoted 4 lines
I would like to add that OpenBSD supports a number of SoCs for quite some years and this is the first time I've hit an issue with interrupts that were not designed in a way for the current spec to work. That said we obviously support quite fewer SoCs/boards in total compared to Linux.
So OpenBSD apparently implements something similar to Linux (recursive lookup of 'interrupt-parent' properties), but not the part about stopping the recursion when hitting an interrupt controller.
Neither part appears to be spec compliant, but you only care about updating DTs that do not comply to the latter bit. That seems reasonable and should importantly not require adding tens of thousands of 'interrupt-parent' properties to the DTs in mainline.
Johan
Quoted 10 lines · Johan Hovold
Unless explicitly specified the interrupt-parent property is inherited from the parent node on Linux even though this may not be in full compliance with the devicetree specification.
Following commit
2d5cab9232ba("arm64: dts: qcom: sc8280xp-pmics:
Specify interrupt parent explicitly"), add an explicit interrupt parent also for the PMIC RTC node for the benefit of other operating systems which may be confused by this omission.[...]
Applied, thanks!
[1/1] arm64: dts: qcom: sc8280xp-pmics: add explicit rtc interrupt parent
commit: 55c9b1bf29dad107b3871bbb250c00df80a68791
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>