[PATCH] arm64: dts: mt8173-oak: Switch to SMC watchdog

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Mon Jul 25 01:39:30 PDT 2022


Il 25/07/22 10:24, Pin-yen Lin ha scritto:
> Switch to SMC watchdog because we need direct control of HW watchdog
> registers from kernel. The corresponding firmware was uploaded in
> https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/3405.
> 

There's a fundamental issue with this change, I think.

What happens if we run this devicetree on a device that does *not* have
the new(er) firmware?

The kernel *shall not* get broken when running on devices that are running
on older firmware, especially because that's what was initially supported
and what is working right now.

For this reason, I think that we should get some code around that checks
if the SMC watchdog is supported and, if not, resort to MMIO wdog.

Regards,
Angelo


> Signed-off-by: Pin-yen Lin <treapking at chromium.org>
> ---
> 
>   arch/arm64/boot/dts/mediatek/mt8173.dtsi | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
> index a2aef5aa67c1..2d1c776740a5 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
> @@ -528,10 +528,8 @@ power-domain at MT8173_POWER_DOMAIN_MFG {
>   			};
>   		};
>   
> -		watchdog: watchdog at 10007000 {
> -			compatible = "mediatek,mt8173-wdt",
> -				     "mediatek,mt6589-wdt";
> -			reg = <0 0x10007000 0 0x100>;
> +		watchdog {
> +			compatible = "arm,smc-wdt";
>   		};
>   
>   		timer: timer at 10008000 {
> 





More information about the linux-arm-kernel mailing list