[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b02789ca-b6a0-d972-7e9e-fdddd3d15538@linaro.org>
Date: Wed, 28 Jun 2023 13:15:06 +0200
From: Konrad Dybcio <konrad.dybcio@...aro.org>
To: Patrick Wildt <patrick@...eri.se>, Johan Hovold <johan@...nel.org>
Cc: Manivannan Sadhasivam <mani@...nel.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Johan Hovold <johan+linaro@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Andy Gross <agross@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Mark Kettenis <kettenis@...nbsd.org>
Subject: Re: [PATCH] arm64: dts: qcom: sc8280xp-pmics: add explicit rtc
interrupt parent
On 28.06.2023 10:31, Patrick Wildt wrote:
> On Wed, Jun 28, 2023 at 08:47:00AM +0200, Johan Hovold wrote:
>> On Wed, Jun 28, 2023 at 10:55:57AM +0530, Manivannan Sadhasivam wrote:
>>> On Tue, Jun 27, 2023 at 05:27:32PM +0200, Johan Hovold wrote:
>>>> On Tue, Jun 27, 2023 at 06:54:06PM +0530, Manivannan Sadhasivam wrote:
>>>>> On Tue, Jun 27, 2023 at 10:53:06AM +0200, Johan Hovold wrote:
>>>>>> 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 <patrick@...eri.se>
>>>>>> Signed-off-by: Johan Hovold <johan+linaro@...nel.org>
>>>>>
>>>>> 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.
>>
>> 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.
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
>
> Cheers,
> Patrick
Powered by blists - more mailing lists