[PATCH v2 2/3] arm64: dts: qcom: hamoa: Add the APSS watchdog

Abel Vesa posted 3 patches 1 month, 3 weeks ago
There is a newer version of this series
[PATCH v2 2/3] arm64: dts: qcom: hamoa: Add the APSS watchdog
Posted by Abel Vesa 1 month, 3 weeks ago
The watchdog support in EL1 is SBSA compliant, handled by Gunyah
hypervisor, but in EL2. the watchdog is an instance of the APSS WDT HW
block, same as older platforms. So describe the APSS WDT node and mark
it as reserved, as it will only be enabled in EL2 overlay.

Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/hamoa.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/hamoa.dtsi b/arch/arm64/boot/dts/qcom/hamoa.dtsi
index a17900eacb20..b65dfad71c2f 100644
--- a/arch/arm64/boot/dts/qcom/hamoa.dtsi
+++ b/arch/arm64/boot/dts/qcom/hamoa.dtsi
@@ -8302,6 +8302,14 @@ gic_its: msi-controller@17040000 {
 			};
 		};
 
+		apss_watchdog: watchdog@17410000 {
+			compatible = "qcom,apss-wdt-x1e80100", "qcom,kpss-wdt";
+			reg = <0x0 0x17410000 0x0 0x1000>;
+			clocks = <&sleep_clk>;
+			interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
+			status = "reserved"; /* Accessible in EL2 only */
+		};
+
 		cpucp_mbox: mailbox@17430000 {
 			compatible = "qcom,x1e80100-cpucp-mbox";
 			reg = <0 0x17430000 0 0x10000>, <0 0x18830000 0 0x10000>;

-- 
2.48.1
Re: [PATCH v2 2/3] arm64: dts: qcom: hamoa: Add the APSS watchdog
Posted by Konrad Dybcio 1 month, 3 weeks ago
On 12/19/25 11:00 AM, Abel Vesa wrote:
> The watchdog support in EL1 is SBSA compliant, handled by Gunyah
> hypervisor, but in EL2. the watchdog is an instance of the APSS WDT HW
> block, same as older platforms. So describe the APSS WDT node and mark
> it as reserved, as it will only be enabled in EL2 overlay.
> 
> Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
> ---
>  arch/arm64/boot/dts/qcom/hamoa.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/hamoa.dtsi b/arch/arm64/boot/dts/qcom/hamoa.dtsi
> index a17900eacb20..b65dfad71c2f 100644
> --- a/arch/arm64/boot/dts/qcom/hamoa.dtsi
> +++ b/arch/arm64/boot/dts/qcom/hamoa.dtsi
> @@ -8302,6 +8302,14 @@ gic_its: msi-controller@17040000 {
>  			};
>  		};
>  
> +		apss_watchdog: watchdog@17410000 {
> +			compatible = "qcom,apss-wdt-x1e80100", "qcom,kpss-wdt";
> +			reg = <0x0 0x17410000 0x0 0x1000>;
> +			clocks = <&sleep_clk>;
> +			interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
> +			status = "reserved"; /* Accessible in EL2 only */

This is technically incorrect - it's not accessible if Gunyah is
present, which is only somewhat related - if you run a different
hypervisor which doesn't explicitly block access to this region, you
can still access it even though Linux may be running at EL1

Konrad
Re: [PATCH v2 2/3] arm64: dts: qcom: hamoa: Add the APSS watchdog
Posted by Abel Vesa 1 month, 2 weeks ago
On 25-12-19 13:15:00, Konrad Dybcio wrote:
> On 12/19/25 11:00 AM, Abel Vesa wrote:
> > The watchdog support in EL1 is SBSA compliant, handled by Gunyah
> > hypervisor, but in EL2. the watchdog is an instance of the APSS WDT HW
> > block, same as older platforms. So describe the APSS WDT node and mark
> > it as reserved, as it will only be enabled in EL2 overlay.
> > 
> > Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
> > ---
> >  arch/arm64/boot/dts/qcom/hamoa.dtsi | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/hamoa.dtsi b/arch/arm64/boot/dts/qcom/hamoa.dtsi
> > index a17900eacb20..b65dfad71c2f 100644
> > --- a/arch/arm64/boot/dts/qcom/hamoa.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/hamoa.dtsi
> > @@ -8302,6 +8302,14 @@ gic_its: msi-controller@17040000 {
> >  			};
> >  		};
> >  
> > +		apss_watchdog: watchdog@17410000 {
> > +			compatible = "qcom,apss-wdt-x1e80100", "qcom,kpss-wdt";
> > +			reg = <0x0 0x17410000 0x0 0x1000>;
> > +			clocks = <&sleep_clk>;
> > +			interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
> > +			status = "reserved"; /* Accessible in EL2 only */
> 
> This is technically incorrect - it's not accessible if Gunyah is
> present, which is only somewhat related - if you run a different
> hypervisor which doesn't explicitly block access to this region, you
> can still access it even though Linux may be running at EL1

Fair enough. But in the case where you have a different hypervisor,
I guess the EL2 dtso should be used.

So, since AFAIK all devices come with Gunyah by default, it makes sense
to mark it as reserved (or disable it otherwise) and then enable it in EL2
dtso.
Re: [PATCH v2 2/3] arm64: dts: qcom: hamoa: Add the APSS watchdog
Posted by Konrad Dybcio 1 month, 2 weeks ago
On 12/23/25 5:00 PM, Abel Vesa wrote:
> On 25-12-19 13:15:00, Konrad Dybcio wrote:
>> On 12/19/25 11:00 AM, Abel Vesa wrote:
>>> The watchdog support in EL1 is SBSA compliant, handled by Gunyah
>>> hypervisor, but in EL2. the watchdog is an instance of the APSS WDT HW
>>> block, same as older platforms. So describe the APSS WDT node and mark
>>> it as reserved, as it will only be enabled in EL2 overlay.
>>>
>>> Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
>>> ---
>>>  arch/arm64/boot/dts/qcom/hamoa.dtsi | 8 ++++++++
>>>  1 file changed, 8 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/hamoa.dtsi b/arch/arm64/boot/dts/qcom/hamoa.dtsi
>>> index a17900eacb20..b65dfad71c2f 100644
>>> --- a/arch/arm64/boot/dts/qcom/hamoa.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/hamoa.dtsi
>>> @@ -8302,6 +8302,14 @@ gic_its: msi-controller@17040000 {
>>>  			};
>>>  		};
>>>  
>>> +		apss_watchdog: watchdog@17410000 {
>>> +			compatible = "qcom,apss-wdt-x1e80100", "qcom,kpss-wdt";
>>> +			reg = <0x0 0x17410000 0x0 0x1000>;
>>> +			clocks = <&sleep_clk>;
>>> +			interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
>>> +			status = "reserved"; /* Accessible in EL2 only */
>>
>> This is technically incorrect - it's not accessible if Gunyah is
>> present, which is only somewhat related - if you run a different
>> hypervisor which doesn't explicitly block access to this region, you
>> can still access it even though Linux may be running at EL1
> 
> Fair enough. But in the case where you have a different hypervisor,
> I guess the EL2 dtso should be used.
> 
> So, since AFAIK all devices come with Gunyah by default, it makes sense
> to mark it as reserved (or disable it otherwise) and then enable it in EL2
> dtso.

I'm just stingy about the wording. Perhaps:

status = "reserved"; /* Reserved by Gunyah */

?

The patch looks good otherwise

Konrad
Re: [PATCH v2 2/3] arm64: dts: qcom: hamoa: Add the APSS watchdog
Posted by Abel Vesa 1 month, 2 weeks ago
On 25-12-23 18:19:50, Konrad Dybcio wrote:
> On 12/23/25 5:00 PM, Abel Vesa wrote:
> > On 25-12-19 13:15:00, Konrad Dybcio wrote:
> >> On 12/19/25 11:00 AM, Abel Vesa wrote:
> >>> The watchdog support in EL1 is SBSA compliant, handled by Gunyah
> >>> hypervisor, but in EL2. the watchdog is an instance of the APSS WDT HW
> >>> block, same as older platforms. So describe the APSS WDT node and mark
> >>> it as reserved, as it will only be enabled in EL2 overlay.
> >>>
> >>> Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
> >>> ---
> >>>  arch/arm64/boot/dts/qcom/hamoa.dtsi | 8 ++++++++
> >>>  1 file changed, 8 insertions(+)
> >>>
> >>> diff --git a/arch/arm64/boot/dts/qcom/hamoa.dtsi b/arch/arm64/boot/dts/qcom/hamoa.dtsi
> >>> index a17900eacb20..b65dfad71c2f 100644
> >>> --- a/arch/arm64/boot/dts/qcom/hamoa.dtsi
> >>> +++ b/arch/arm64/boot/dts/qcom/hamoa.dtsi
> >>> @@ -8302,6 +8302,14 @@ gic_its: msi-controller@17040000 {
> >>>  			};
> >>>  		};
> >>>  
> >>> +		apss_watchdog: watchdog@17410000 {
> >>> +			compatible = "qcom,apss-wdt-x1e80100", "qcom,kpss-wdt";
> >>> +			reg = <0x0 0x17410000 0x0 0x1000>;
> >>> +			clocks = <&sleep_clk>;
> >>> +			interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
> >>> +			status = "reserved"; /* Accessible in EL2 only */
> >>
> >> This is technically incorrect - it's not accessible if Gunyah is
> >> present, which is only somewhat related - if you run a different
> >> hypervisor which doesn't explicitly block access to this region, you
> >> can still access it even though Linux may be running at EL1
> > 
> > Fair enough. But in the case where you have a different hypervisor,
> > I guess the EL2 dtso should be used.
> > 
> > So, since AFAIK all devices come with Gunyah by default, it makes sense
> > to mark it as reserved (or disable it otherwise) and then enable it in EL2
> > dtso.
> 
> I'm just stingy about the wording. Perhaps:
> 
> status = "reserved"; /* Reserved by Gunyah */
> 
> ?

Sure, will do.

> 
> The patch looks good otherwise
> 
> Konrad

Thanks for reviewing,
Abel