From nobody Sun Sep 22 01:34:41 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09CDECCA473 for ; Thu, 9 Jun 2022 11:23:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243584AbiFILXj (ORCPT ); Thu, 9 Jun 2022 07:23:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231712AbiFILXO (ORCPT ); Thu, 9 Jun 2022 07:23:14 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BF8FF0708; Thu, 9 Jun 2022 04:23:13 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 745DD66017D4; Thu, 9 Jun 2022 12:23:11 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1654773792; bh=a4rg/JyrfKEPVSNVifJkG8mIf7X7Pe0ajY4dp1vpzts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cjUzNuyMK/20GfbAc/y72h7+fAwkNXNVsq/OGwPUZo/9PWwiDnKghTypqicng8F9V zOJtHMkFUOUIOmJFMR8t/XDtAE5XJzpmpcvUWd5mskK5v1eDN3rTflqXt5DH7Uo8WE S5t9wMVNuZq8cpsQKF74uGhb8LALAjnJNMtBTjpWAUWhF0hMqdBddyVK9hpk4L+lYZ vg9TsWac7trd+76Ti0b/cae83y/nvR9OOX4G9pi2l9SBw1ICfLxb2aVo7U/y1xCY3e SpiCjCrQ3/i7sLiNx9OIEJV3y3nxlvN99lYyiQFLveZ4ba9Pm5kqFskiemmPB7/3RL psXJSX4t1NqHw== From: AngeloGioacchino Del Regno To: robh+dt@kernel.org Cc: krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, konrad.dybcio@somainline.org, marijn.suijten@somainline.org, martin.botka@somainline.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, paul.bouchara@somainline.org, kernel@collabora.com, AngeloGioacchino Del Regno Subject: [PATCH v2 04/10] arm64: dts: mediatek: mt6795: Add watchdog node to avoid timeouts Date: Thu, 9 Jun 2022 13:22:57 +0200 Message-Id: <20220609112303.117928-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220609112303.117928-1-angelogioacchino.delregno@collabora.com> References: <20220609112303.117928-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" At least on commercial devices like some smartphones, the bootloader will initialize the SoC watchdog and set it to reboot the board when it times out. The last pet that this watchdog is getting is right before booting the kernel and left it enabled as a protection against boot failure: this means that Linux is expected to initialize this device and pet as soon as possible, or it will bark and reset the AP. In order to prevent that, add the required watchdog node as default enabled: this will have no side effects on boards that are not performing the aforementioned watchdog setup before booting Linux. Signed-off-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt6795.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts= /mediatek/mt6795.dtsi index 639104b3f693..363fa25b4edc 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi @@ -188,6 +188,14 @@ soc { compatible =3D "simple-bus"; ranges; =20 + watchdog: watchdog@10007000 { + compatible =3D "mediatek,mt6795-wdt"; + reg =3D <0 0x10007000 0 0x100>; + interrupts =3D ; + #reset-cells =3D <1>; + timeout-sec =3D <20>; + }; + sysirq: intpol-controller@10200620 { compatible =3D "mediatek,mt6795-sysirq", "mediatek,mt6577-sysirq"; --=20 2.35.1