From patchwork Wed Mar 27 08:53:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PeterYin X-Patchwork-Id: 13605976 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 259C1C47DD9 for ; Wed, 27 Mar 2024 08:53:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=35IlNu6u+4geOX2s6eiP3B5vIX41JP702KUNwxzVrBc=; b=DpgYY/ICX9J30+ C6so6Zbe97p0vR1OgXPbaIsxAxJHHInb+r3e6WCyTcJRXLdL7niC9DRE5UVaI7cFX0NORORp6s/e8 B0Q2/2KYFVJhAU3ZW9hTJeU2LhbuMVHxvkZqe8FXxbYPQ6Dh2X5tTTpgAIQFngLUmUVoBRNKy8Rz8 5T1wB1tA5ScCoT38C9jQyK6Zn423ZtHCQr7Lf3k9ZateLwhO+hIfuq98JRaAH3NGvMJ4Zl63bVknp do4r4JH5lkTGYhqY6R2VZuj2iGuheSm2c5AJF6Z/wUn831Jx8zSV43UKSfscrsvuUW+W7d5rIv309 8ymY3ZmnVqfXdewX1waA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpP2T-000000087Ap-0g8G; Wed, 27 Mar 2024 08:53:41 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpP2P-0000000879Q-2Ruh for linux-arm-kernel@lists.infradead.org; Wed, 27 Mar 2024 08:53:39 +0000 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6e6a9fafacdso4959257b3a.2 for ; Wed, 27 Mar 2024 01:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711529616; x=1712134416; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=L27nwRy0B54L75c8FppdsQdbbGjzrBj54QC46XAQ3Bg=; b=JIwT2xjS0JBucLN01hoznSm8AgyJ22kcNelT1ipK/HoYm/YwUFViMhqEkLPsst77pa Mj8DrgII9jQB/twtHAIAku4a4KCI7ABS8hmtkK64alD23O09zbfQ0gxXUVneQTPatiIu Hew9KoXd5Wqqy+vElmI3Rglz3Zik1HnNx93QvqPqlDvHeIH+SuKJ1YtAsJdbyGOvBhKM Jq+0u56a0UFeOxoBCbTGvvh043/b6xas9BtibGoRg9KK3zLDkXI6CSSEr+z9XhBCGuaW 8OAIRqKYhhm8tEJtXMKvj+xFPSHFkaK+wDlDJVwFcN1m3LCqU3ekpasd0H5d+mR6u1/4 Z3gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711529616; x=1712134416; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=L27nwRy0B54L75c8FppdsQdbbGjzrBj54QC46XAQ3Bg=; b=sjKmESOR8+PHTXgvCshPImT5RlEg2F2QC5LAxSkCKTZo8jqNXNOpjKLOwJMCLwg4Dz DVP/lZTIFjifXWd/0cBtJb8h0I/Ca7AjPodNIEcpjUTMkBEm56GhfY6TtsTbh7z2TUD7 7XfPrcqRsZWb9+1rKIQEqP+JVLIlL79m1NHTQ6IYyudFbskiEBlk5C1JK1n9a/ARjcz5 zytS38l3KMGQ/RyCXgg+AJ/IKw2XHetdSJMLG8nOjA+HjXscFVM+CvSghbdjjSdr27ZW wxByrUOvfc5GXwlxL7WKsoPd3nlN1Liq3cj7B+dpsb4a0RqwY+LActERmaAKb6TNYaim fjag== X-Forwarded-Encrypted: i=1; AJvYcCXKg5ypxWXiwhZGx6W1U6i1nqjYyYVuOKgKMzNTaDUL++/LEFP1JNg/1xOiTjr+Vh4gw4T8zNpqJN7N+IbuanhGpY4s4NjkdvRdslmJIGMlC+flW0o= X-Gm-Message-State: AOJu0YzdPVB8r5u29z4JcI7oQHYDjZJz9Qtp5mo7QdKfREDI4qochn8c o5cfmRHgUQAew3cPioMJtZfCshEcRcrkhsUcmCCduXctSzxtR1/X X-Google-Smtp-Source: AGHT+IHqmkt9OtAKUxJa0j6kyiCFEtGlMxKMALqNdU/nVhjmwEQ9JXHQc5PYrKjshaxLA5zvrZJpTQ== X-Received: by 2002:a05:6a21:2d8f:b0:1a3:e28b:e574 with SMTP id ty15-20020a056a212d8f00b001a3e28be574mr1652139pzb.26.1711529616478; Wed, 27 Mar 2024 01:53:36 -0700 (PDT) Received: from peter-bmc.dhcpserver.bu9bmc.local (2001-b400-e383-3566-013c-5a87-9abc-381e.emome-ip6.hinet.net. [2001:b400:e383:3566:13c:5a87:9abc:381e]) by smtp.gmail.com with ESMTPSA id h12-20020a170902eecc00b001e0501d3058sm8356848plb.63.2024.03.27.01.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 01:53:36 -0700 (PDT) From: Peter Yin To: patrick@stwcx.xyz, Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joel Stanley , Andrew Jeffery , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 0/4] drivers: watchdog: ast2500 and ast2600 support bootstatus Date: Wed, 27 Mar 2024 16:53:26 +0800 Message-Id: <20240327085330.3281697-1-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240327_015337_669585_BECC2B0C X-CRM114-Status: GOOD ( 12.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add WDIOF_EXTERN1 and WDIOF_CARDRESET bootstatus in ast2500/ast2600 Regarding the AST2600 specification, the WDTn Timeout Status Register (WDT10) has bit 1 reserved. Bit 1 of the status register indicates on ast2500 if the boot was from the second boot source. It does not indicate that the most recent reset was triggered by the watchdog. The code should just be changed to set WDIOF_CARDRESET if bit 0 of the status register is set. Include SCU register to veriy WDIOF_EXTERN1 in ast2600 SCU74 or ast2500 SCU3C when bit1 is set. v3 -> v4 - Add error handling for syscon_regmap_lookup_by_phandle and regmap_read. v2 -> v3 - Fixed WDIOF_CARDRESET status bit check and added support for WDIOF_EXTERN1 on ast2500 and ast2600. v1 -> v2 - Add comment and support WDIOF_CARDRESET in ast2600 v1 - Patch 0001 - Add WDIOF_EXTERN1 bootstatus --- Peter Yin (4): ARM: dts: aspeed: Add the AST2500 WDT with SCU register ARM: dts: aspeed: Add the AST2600 WDT with SCU register dt-bindings: watchdog: aspeed-wdt: Add aspeed,scu drivers: watchdog: ast2500 and ast2600 support bootstatus .../bindings/watchdog/aspeed-wdt.txt | 4 ++ arch/arm/boot/dts/aspeed/aspeed-g5.dtsi | 3 + arch/arm/boot/dts/aspeed/aspeed-g6.dtsi | 4 ++ drivers/watchdog/aspeed_wdt.c | 60 ++++++++++++++----- 4 files changed, 55 insertions(+), 16 deletions(-)