From patchwork Tue Aug 8 21:40:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 1819034 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=aD2uIeLV; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RL6803zdJz1yVt for ; Wed, 9 Aug 2023 07:41:20 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3B855866BD; Tue, 8 Aug 2023 23:41:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="aD2uIeLV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DAFA18679C; Tue, 8 Aug 2023 23:41:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D1CC586354 for ; Tue, 8 Aug 2023 23:40:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=festevam@gmail.com Received: by mail-ot1-x336.google.com with SMTP id 46e09a7af769-6bcca6485f6so520007a34.1 for ; Tue, 08 Aug 2023 14:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691530857; x=1692135657; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JK9a82lfTi47p8rvW+SejmXdiOesvu/Cjtp4MgLtZzs=; b=aD2uIeLV52PXa9X4bBTww0lkda3Y5samu4ds71HYZdACJ4UtYYRicyzLTUWJJ8JiOQ ai0EfTTGgML823aAIDY7CmzBmS8iW6J/FJxx8sdrOtN5ae7JsRYtBA9EhhfDtuNbYMS2 1xG+EJEh0dpcTRbTkrVBB+abYqM8HGZ/oAM4BErQq/hk4prw6qJHeWlhpLGP9oMaeK5v DMf7u0ga0FCKTB07rWaBefo2vyCav7dtXENfvesaBgFKN1xzFxhTVwj6fLv/uoiNQt5x ohIw1Q3o8lRipS2dtUKZHRc14fn8+jnBnjbb40VjvKiVV1akZZbPUGlE7wMqdcbQojYN EJZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691530857; x=1692135657; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JK9a82lfTi47p8rvW+SejmXdiOesvu/Cjtp4MgLtZzs=; b=YmeNePzMHaWZ+Fz/7lZecanbQVGFojaNOHTjKKqAshxGm+a6vhlxejsnfUb3iyynD1 RL+k1gN32NbO5RNSbnX4uzVd1ZpZnBJo2mrxOatVjMRFA9U2pXRZ7HbnEojC5WuADGmy d81haBs9ouSNBOVuw5TnzLvr2nDpKynwlt2srFF91ZwjamnhmkCMSOgHySGtSiEUWKPQ bF4Ec4SKWPc0S/nrFj4YVUqMeAB/1N6PMZjLM4eRIQk0xr/PF9PdeV1HOveoGC74sWPX 1Nm4jjInTiPHInniS19usc4cKQ+IDv2veHTXOMDq5BliEbNZGRolpRZwfVKziw7rvvrS bbyg== X-Gm-Message-State: AOJu0YxXvQcZ6mxpF+0FQ09SSSu+b2mlbooNhI6uhovnQO4jRLcXpMHN FhycWSntZCop3FYxKQTPEbOeN7wKU+M= X-Google-Smtp-Source: AGHT+IH+DOdrnZRHLZvP8ljmHqcgthyWHGB34hnJjFCV4RM4tIstqZQzk+99kPBpBdxChD8Z3iSpoQ== X-Received: by 2002:a05:6830:458b:b0:6b1:9646:2ea0 with SMTP id az11-20020a056830458b00b006b196462ea0mr825221otb.1.1691530857536; Tue, 08 Aug 2023 14:40:57 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b61:1504:23be:30de:31a3]) by smtp.gmail.com with ESMTPSA id e19-20020a9d6e13000000b006b9b2678639sm6305421otr.75.2023.08.08.14.40.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 14:40:56 -0700 (PDT) From: Fabio Estevam To: sbabic@denx.de Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, marex@denx.de, Fabio Estevam Subject: [PATCH 3/3] smegw01: Convert to watchdog driver model Date: Tue, 8 Aug 2023 18:40:40 -0300 Message-Id: <20230808214040.1382330-3-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230808214040.1382330-1-festevam@gmail.com> References: <20230808214040.1382330-1-festevam@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean From: Fabio Estevam Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused the 'reset' command in U-Boot to not cause a board reset. Fix it by switching to the watchdog driver model via sysreset, which is the preferred method for implementing the watchdog reset. Signed-off-by: Fabio Estevam Reviewed-by: Marek Vasut --- arch/arm/dts/imx7d-smegw01-u-boot.dtsi | 13 +++++++++++++ configs/smegw01_defconfig | 3 +++ 2 files changed, 16 insertions(+) create mode 100644 arch/arm/dts/imx7d-smegw01-u-boot.dtsi diff --git a/arch/arm/dts/imx7d-smegw01-u-boot.dtsi b/arch/arm/dts/imx7d-smegw01-u-boot.dtsi new file mode 100644 index 000000000000..cf7ba3a95817 --- /dev/null +++ b/arch/arm/dts/imx7d-smegw01-u-boot.dtsi @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +/ { + wdt-reboot { + compatible = "wdt-reboot"; + wdt = <&wdog1>; + bootph-pre-ram; + }; +}; + +&wdog1 { + bootph-pre-ram; +}; diff --git a/configs/smegw01_defconfig b/configs/smegw01_defconfig index 7f1b2bee8e16..a3d289eeca1a 100644 --- a/configs/smegw01_defconfig +++ b/configs/smegw01_defconfig @@ -80,5 +80,8 @@ CONFIG_DM_REGULATOR_GPIO=y CONFIG_SPECIFY_CONSOLE_INDEX=y CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_WATCHDOG=y CONFIG_IMX_THERMAL=y +CONFIG_IMX_WATCHDOG=y # CONFIG_CMD_BOOTEFI_BOOTMGR is not set