From patchwork Thu Mar 28 01:32:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PeterYin X-Patchwork-Id: 13607885 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 848FAC47DD9 for ; Thu, 28 Mar 2024 01:33:25 +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=W1lRqAc5N+zsjmQ7oKEIiC+Vl9G+2IXOSl+Xkh+o55w=; b=EKaqKuQQv3u3eu gef8XIdPi/8c7PlXhr8f7uQDaq8Wt11mSmj/LEMsT2sfHA5c4aw2w52dAQ9ZlL5w33Wne4zbO0RYl sSZfZNX2JQGu9CXJcANE5oJJxNVJ4uIC8Cz9YLM0ShY/j9QdltAYeas1vABLCYYbfFvOmrS2Ss8pD nofTstvjE13eFW22M7IeQG8Xi3Iy6Oep2n7kZEvXTfrxMrh5ZJM9IhCZ3YAeeaA5CXusvpOVucles 9J4v8q2LLPgbe04UqQNFEqoRgbHXGuwtTZxMoKTr+D0HEokJwnf7Na9/9WHsXbLtT2hqoClkC+tGA h911g4WbNb3plXFd7kOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpedm-0000000BwqJ-44UA; Thu, 28 Mar 2024 01:33:14 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpedi-0000000Bwnd-1iRX for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2024 01:33:12 +0000 Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5d8b887bb0cso302037a12.2 for ; Wed, 27 Mar 2024 18:33:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711589588; x=1712194388; 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=RwzVZ+IWpczySSp2ln+6XuuWUjbpq64nflGUKemUacE=; b=KdXNkj38OTcF4m0xxMqiF28S7x7fRBP3KLduw3tqOqE9XNfkKXyGKLvRbMxMeM4foz hpXruaEFiCNUeRONe++iXzFeYJeT4e+LN1FeSM7FSSWvh3XyWtHFF1eH6ZrAmx8xlt4l sBXGnugdZTZ0IzIBItxNG6nMWhkqvxzrw5805/zI4I0D23JSn66kmYilmBXufr+25VTb QLtfCxa+/qY650tVX9lepSlJQ8cC7Mt7yxtn1goSqeqXNlp2WI96VdIfp72GOvKo/ROT Mi52I6MNCtI6eozhU1afR+3bUVhD6042rq/9ME1VwIO5naHKtASv0/NLvd+1Ct1jv3q1 dXrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711589588; x=1712194388; 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=RwzVZ+IWpczySSp2ln+6XuuWUjbpq64nflGUKemUacE=; b=MluE6IEuoDPVy4lD2AwhLmRBN5B55a04tjzfUvjnRDuzojM2Y/z4MXFMpw/OtU8bbS up+PZSthxRzAukmfGcuJNePDRFMysFxjHIQtZU1VM/nW9VvE/CCUiR6w4ZGo0LbNjt8i 2j2Hl8jWvHvYQ3JhcxpgouYt3ssrqIQEyPCK9VdLpDLKOHHrGqZhAjoWFC7vvz8OMMzF eCD13QEczVavfTV/rixcFV39Sm+7ldsnMxfcIDOMPuqWPOEJhh8n7AF7Ns6X3EBCRzYu BEEu39pAKtggHhmHrGaQHse8RsZcnOGtmzxowBbWmNeM0FVNuJqGFK7Lh56mjFjWoqns gzMg== X-Forwarded-Encrypted: i=1; AJvYcCV50jHKQJGmj3Bqz5x9nHQ2oS4rAxwl2FaQ2nUjAQPuluhl/r8aeQFFhe2XY/9weGPIsnpKJnz9JmrAp8JiYhiKLqwkY5v8t7aAau1xDFz+5OIKY8U= X-Gm-Message-State: AOJu0YzFy+9mZ4F+CSqVQATSOhT7rWVAQ5xqzl27PZV8jUG2PQsEWOq7 AVLYUXaOoXzPI6tFpfe/Joe3T+WecK7Fdg0eV6wBZfFpLEaoGKoH4OGCD5Od X-Google-Smtp-Source: AGHT+IFuuOxiVIqTtkjpl1E/e0b+0s1F3aV7PFkrdsx5dIaIXuKhPY9sIiffaQCR380fHvq1VgjLeQ== X-Received: by 2002:a05:6a21:398b:b0:1a3:4e31:ab8f with SMTP id ad11-20020a056a21398b00b001a34e31ab8fmr2153722pzc.17.1711589588358; Wed, 27 Mar 2024 18:33:08 -0700 (PDT) Received: from peter-bmc.dhcpserver.bu9bmc.local (2001-b400-e355-7eb0-b4d0-66d2-2269-ef6c.emome-ip6.hinet.net. [2001:b400:e355:7eb0:b4d0:66d2:2269:ef6c]) by smtp.gmail.com with ESMTPSA id g5-20020a170902c38500b001e0e85a21f5sm201338plg.32.2024.03.27.18.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 18:33:08 -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 v5 0/4] drivers: watchdog: ast2500 and ast2600 support bootstatus Date: Thu, 28 Mar 2024 09:32:58 +0800 Message-Id: <20240328013303.3609385-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_183310_521124_0A9681FE X-CRM114-Status: GOOD ( 12.48 ) 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. v4 -> v5 - Revert indentation. 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 | 34 ++++++++++++++++--- 4 files changed, 41 insertions(+), 4 deletions(-)