From patchwork Tue Mar 26 15:00:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PeterYin X-Patchwork-Id: 13604349 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 015C0CD1283 for ; Tue, 26 Mar 2024 15:01:12 +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:References:In-Reply-To: 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: List-Owner; bh=Tl0OwssgOWBl8hCIxl4KV08LzvlhP3dIj2BYvCFp/Sw=; b=E51no40a83wfox NKhuibud9kIbMEsEGk8idwvTe0Y6T6iSbfErefHp8hM83RIZ8pUvNd2l/Txr0e+MsXuAsEootjoHW rnScLkDuduUjnpRcjHpLP2kMtDAz82YhN5FnFimcXuvsy5++i2YUOQp/YW27f6UDTO5xbp5D69kE+ +RlqGdGru/lUe6yd1BCI/LTAFkojCRFdgx6LRsgma2HUiYXrwCmFyaTTz3PrhqpRqwKs7EJmfcrfU ujFupJYM722nVEOdOQxhPw3Tvk4O1qfhToTskoYw5fpJsc8X/yb94bC12VaLk4QKCZyHRIxyRBEfe ARDss2Tt5OFAIF+OX0Rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rp8IJ-000000052XA-2aLZ; Tue, 26 Mar 2024 15:00:55 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rp8I5-000000052Oe-0nfz for linux-arm-kernel@lists.infradead.org; Tue, 26 Mar 2024 15:00:42 +0000 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-6ea9a605ca7so1759014b3a.0 for ; Tue, 26 Mar 2024 08:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711465239; x=1712070039; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=axYCeiGWmH5zGIGoROlm87X0Iv4FCoHgVdnjtyDTc9Q=; b=S1zNK0/21H95oqjaXqUW6Y+4ulw1dcirzAnuX5T38sIn/4dTjkAjn9FoVNKoa72QZh EB+kXEwPHbMP72asbEOSD5JtV8QVgC5bpYuy3gWl50prs7gTTgfiiqVkzu0XUvF+dhNr MaSGv9wMVZc9s1mx+jEnoHrMI7jFOFTvJLMIyywjkQY8AC/3NvrizRFU9Jq/oc5fPFHv MFlmrXizMo7q69p6gUEqiauetbUZ4FgWjSU7K3tgg8Ytz2dRLn2Uyq1/9kTpQ2mJqO16 WNYahFC3QKEZlQpDnjITg19EIM1kSbk4HxNwC5owrYPOj0bZ/QeRQf3DtefwuRA4AOGI B0+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711465239; x=1712070039; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=axYCeiGWmH5zGIGoROlm87X0Iv4FCoHgVdnjtyDTc9Q=; b=VD5DdGTc6B3R6S80CrNu9eTPTRbDh3HBD73hMZAdwj48r9DjMefyHoTMHZqqPDfp0T oFqxTfkSN0GEq9nnOZo8srdOfJxQt7aAxYVpOSLVVoYJfffwbh3DE3Y6z5QEP7O9qcbl MJycLqqTl4U2P2vnGTqQS0AJiRuwvH1XrmXCei3Kkv91/iHT2ToAvdc9QGRg0n5GphP1 RzON6JtO5fi24CRDeSzLkg3UkncZm2FIpkvCcuf/mcjgS9citIAjS/cpgd3f6j1coeN+ F5AzS4E3w5aI9Q7PMdn6UUSIEQdmiZst5Ktf3X55VJaO0mg4UhdlPSP4RPLlOL4QRYiX Q4Xw== X-Forwarded-Encrypted: i=1; AJvYcCXUdnGS824kfoHXl2rdKq2M9BHBz+/HpCz8H1a8kNZxYMGz4ueOhxZqtD380YCnvoSkg5W3FkOC9HO994FZgJESCj1DaErgE8yAqgynlsBEkwLW6Ws= X-Gm-Message-State: AOJu0YzQwBsiyOmqbpwBktfmxY0yydnk+WRCqnPG/2StfUv8nRGmak6k BcTutS2OH86BFawoFn4sLuca+bGQuor4L1Z4eMLnZs1D7aGyivuo X-Google-Smtp-Source: AGHT+IF0agEOL3Fig3++nGEEQ7VbXvH89pPROnJTx7czX7BhvNTMXX3BGpNPSZ/xbiPnOM52Kd7b+g== X-Received: by 2002:a05:6a20:958b:b0:1a3:dd51:1922 with SMTP id iu11-20020a056a20958b00b001a3dd511922mr1436278pzb.7.1711465239120; Tue, 26 Mar 2024 08:00:39 -0700 (PDT) Received: from peter-bmc.dhcpserver.bu9bmc.local (1-34-21-66.hinet-ip.hinet.net. [1.34.21.66]) by smtp.gmail.com with ESMTPSA id l27-20020a635b5b000000b005dcbb855530sm7658404pgm.76.2024.03.26.08.00.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 08:00:38 -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 v3 1/4] ARM: dts: aspeed: Add the AST2500 WDT with SCU register Date: Tue, 26 Mar 2024 23:00:24 +0800 Message-Id: <20240326150027.3015958-2-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326150027.3015958-1-peteryin.openbmc@gmail.com> References: <20240326150027.3015958-1-peteryin.openbmc@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240326_080041_313941_4005DEB8 X-CRM114-Status: GOOD ( 10.59 ) 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 The AST2500 WDT references the System Control Unit register for its operation. Signed-off-by: Peter Yin --- arch/arm/boot/dts/aspeed/aspeed-g5.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/boot/dts/aspeed/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed/aspeed-g5.dtsi index 04f98d1dbb97..5fd12c057c31 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-g5.dtsi +++ b/arch/arm/boot/dts/aspeed/aspeed-g5.dtsi @@ -410,12 +410,14 @@ wdt1: watchdog@1e785000 { compatible = "aspeed,ast2500-wdt"; reg = <0x1e785000 0x20>; clocks = <&syscon ASPEED_CLK_APB>; + aspeed,scu = <&syscon>; }; wdt2: watchdog@1e785020 { compatible = "aspeed,ast2500-wdt"; reg = <0x1e785020 0x20>; clocks = <&syscon ASPEED_CLK_APB>; + aspeed,scu = <&syscon>; }; wdt3: watchdog@1e785040 { @@ -423,6 +425,7 @@ wdt3: watchdog@1e785040 { reg = <0x1e785040 0x20>; clocks = <&syscon ASPEED_CLK_APB>; status = "disabled"; + aspeed,scu = <&syscon>; }; pwm_tacho: pwm-tacho-controller@1e786000 { From patchwork Tue Mar 26 15:00:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PeterYin X-Patchwork-Id: 13604350 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 76078C6FD1F for ; Tue, 26 Mar 2024 15:01:15 +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:References:In-Reply-To: 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: List-Owner; bh=aq12h1e5241OTverTc/CsqiDkKtfqtLSqG3+1wSfoRM=; b=XeuVWwCVm9Gc+v dqj+5aCEyPcxyctkmRAnvimztTYlE6gFod4Om4W44l78p1yjQ19hxEu94dz/fiCU3cGeONj2dG7+g 91WmTX74mQwTKba/2wuGxSGdhT11NlJVymnIIp0IiMUPJtcqhXgvtZr5pb7UTfoHFlViE+Lkp2Qt2 pdm/rfepfUSQKeLJE9ONJ7KMtA4TozINysmOuWKWnxyTNalenlyNO/4Fnla8EYYuR2iA5UFdSLh0/ v1zF02oC8Pu3Fm6aGpUVrMRf2KjGOxsSA7+rbXAZJGRHl2lN3FK26Czl44UhTMJQm49E5BD9O8xAI K2D8LclIrbqwp/LQtIfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rp8IL-000000052Y8-0fGx; Tue, 26 Mar 2024 15:00:57 +0000 Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rp8I8-000000052Q9-16Ep for linux-arm-kernel@lists.infradead.org; Tue, 26 Mar 2024 15:00:45 +0000 Received: by mail-oi1-x230.google.com with SMTP id 5614622812f47-3c3aeef1385so3440662b6e.3 for ; Tue, 26 Mar 2024 08:00:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711465242; x=1712070042; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=dNSpu6YM8BptgR2qjrv8QihJHcI+7VsMuE3/EFlGmdw=; b=KSJ5YAxwNNGey83sdbXfoIVDzpDBwEP5izG2ahCwS9+p48FqJ2gfQrYzSJiUoaiSRD hg+Q5omXfMmjTEE2QcnOtKmEOIBDTinpsLTjey/B7FSAp4D65Udj70lmydx/p+HP0MSx 8PQpRZebNBxA9g+a2WzDEg2PO9Esbxlg0v1zyj3IDtKP0AX+HA63WqLn2linjc9P8Qej SpfSN20GNauRoAY18Qvln+PDtFWUo7yb5aeuVn1AVXkbJ6e45e81YrYMsBGn/L5396lI k1FCPqUoMgwE9AH/n7+3IkmfH/idKOXwnvrSBDEKnWuK1wCm9uCUIzUeNCYkfnH/g7g3 m1gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711465242; x=1712070042; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dNSpu6YM8BptgR2qjrv8QihJHcI+7VsMuE3/EFlGmdw=; b=FL3+kVUBQcFlTYx7YXiwo8EV++juXHVCAENC3+CNVL2stcDY1ZUNmTbS92uFq//p+g PhWYjilmotZ7NWXGsVTXgTryCgR8H9YAh+buF7woCB5zt1E2SMxGa2h41RclkFTRT4W7 wmt6eQf/3tgNYWppemSmpp1CL2Lzc6JYNX4GNiB0J1OcLP+2hqETrc0if7Qu9pUeGau4 XoJCGFE+2/Jh+rOKe9IlQ2SOriRfTN1B/DkJAcsRECAf6KdG7Kn5327OwRPyIOOGEIAS tQvPffFXzjuqHeDQo8DXDIJnrKEhdKOVSfWp1RGtLzrkO9Xu+CenlsZEpxi6T0HTiwJC rDhg== X-Forwarded-Encrypted: i=1; AJvYcCUhfg7YkJMWhKi5pzOzk+y6/+cVy0+HHSOlI0mkNAiSL4tKDrt3xJxAeHR59SVworNk4NkLN/nf0ers9wddRA+kcB1MBvaiADWSxcXalOpFMOUbi5s= X-Gm-Message-State: AOJu0YxnQJ4WxigM5EYq7JuLz+cs9m6/6jD1NrGuETDM6rzk+NGKb+cy 8HiFoXsA37PNxjL9FqiAb99ZPTjHoD5HmX3FyjXR4Zgfqrwnctgq X-Google-Smtp-Source: AGHT+IG+eQB9Du+89O9YPqZUBHKoPkGBuBszCclR0pKdvZy2gkL+dMe3RVVwPqyf1FUChuKP+urjPg== X-Received: by 2002:a05:6870:5693:b0:222:12dc:8af7 with SMTP id p19-20020a056870569300b0022212dc8af7mr11124988oao.59.1711465242163; Tue, 26 Mar 2024 08:00:42 -0700 (PDT) Received: from peter-bmc.dhcpserver.bu9bmc.local (1-34-21-66.hinet-ip.hinet.net. [1.34.21.66]) by smtp.gmail.com with ESMTPSA id l27-20020a635b5b000000b005dcbb855530sm7658404pgm.76.2024.03.26.08.00.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 08:00:41 -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 v3 2/4] ARM: dts: aspeed: Add the AST2600 WDT with SCU register Date: Tue, 26 Mar 2024 23:00:25 +0800 Message-Id: <20240326150027.3015958-3-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326150027.3015958-1-peteryin.openbmc@gmail.com> References: <20240326150027.3015958-1-peteryin.openbmc@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240326_080044_327021_822A5021 X-CRM114-Status: GOOD ( 10.15 ) 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 The AST2600 Watchdog Timer (WDT) references the System Control Unit (SCU) register for its operation. Signed-off-by: Peter Yin --- arch/arm/boot/dts/aspeed/aspeed-g6.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi index 5f640b7d6b6d..2f7788f2f153 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi +++ b/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi @@ -558,23 +558,27 @@ uart5: serial@1e784000 { wdt1: watchdog@1e785000 { compatible = "aspeed,ast2600-wdt"; reg = <0x1e785000 0x40>; + aspeed,scu = <&syscon>; }; wdt2: watchdog@1e785040 { compatible = "aspeed,ast2600-wdt"; reg = <0x1e785040 0x40>; + aspeed,scu = <&syscon>; status = "disabled"; }; wdt3: watchdog@1e785080 { compatible = "aspeed,ast2600-wdt"; reg = <0x1e785080 0x40>; + aspeed,scu = <&syscon>; status = "disabled"; }; wdt4: watchdog@1e7850c0 { compatible = "aspeed,ast2600-wdt"; reg = <0x1e7850C0 0x40>; + aspeed,scu = <&syscon>; status = "disabled"; }; From patchwork Tue Mar 26 15:00:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PeterYin X-Patchwork-Id: 13604351 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 E9611CD1284 for ; Tue, 26 Mar 2024 15:01:16 +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:References:In-Reply-To: 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: List-Owner; bh=sPMS2cYkmc+f8BXxlDD+03Wqdxz2GUgPFRJHl0WuwNo=; b=FRK2QskNJ1Jr3Q bD5ssxZItYeI/UWRhZHRnKIbxK2bnJe/onVfFF6tmFdnUhasDM5OUfiGSnyvvVhE4GmWmsadWX0FN pKxcunUXx3YjajDMj9rT++oLt8u9UuV7bcrNXzkHE31NE9Ah3nufy8WvcT10d+YHwVy6mHonb0sTU hufPAbnI8QWLsGlmNbLvVyI9vfQXme6stas1PCDgePiNS+7iJK24iymOM6fAg4g8HRLdbDlS6ffnN DC95fxPbOXhCfGQB9JHQPLdJQI4tp4wFrAp8arx7OjbU8oT/mUSrt/LxTG9WcVMsZnIaKVP/A7rkh FZRMcmKFBYnzyGJOm2ww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rp8IM-000000052Z5-2bBf; Tue, 26 Mar 2024 15:00:58 +0000 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rp8IB-000000052Rs-2hGF for linux-arm-kernel@lists.infradead.org; Tue, 26 Mar 2024 15:00:49 +0000 Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-3c3d3941a26so988624b6e.2 for ; Tue, 26 Mar 2024 08:00:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711465245; x=1712070045; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=b9G+01fnYmsgdrsm4iyF3y0ufJf0ihC4vR7iu7tY8Oc=; b=mIcjKxpPkm7qx/LI1lUP6e27vpi8vy7+O7SZqG36+XtO3Ep3FeQVdQlRaWFCzzKSF9 f0QDpWf9L7iux1own+dP0GYWmUU5q4luE5RIqqUecJkW7ZZhUoyyhMVGJUVuuJFADr/v xs8Kbw7Ddy+diPqeJrFp3QkaQVzaVlC/F/CaRL3nphYl9xJtUDr/Vh8gmg67Evaq79gS fQSs0aCB1s9D5PRgRdq43mGNu7jZp9iMi6QM+sJHyyTNAAuOuAalJCibdxIbs4XvzG1S LA6+79ajKrD4JvF3pBga9XPFZKSOWQiYiP9yMJ4nwvuOggPNCr+SYTNdUfVEIyfp0jYL fEdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711465245; x=1712070045; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b9G+01fnYmsgdrsm4iyF3y0ufJf0ihC4vR7iu7tY8Oc=; b=in9/vfuGygMrHLrtosPEy8xkb4YcbQzoqoSANSYUrZxOqiDG37WOeYGXpvFb4+4/3w l0T8UFdn1n1ySnBcQtyFPlTGpLsZ4QQ6KN9CuOhtKRLq07oXeyf7jbNxcoSL0aHNNkd5 SFoHvWfFMR5TG5HPB1KRo6nANCF+CH61cX9HdCpwaxoXEVFWEITB3tPi+5h7j0SOWJBX RjZtuQQ/9KTI314rdG7+Jj3oqTTkzWBk4yo5GmgGOjx40HMhrDGuaml762gX/eNwkyVR qxuZAAsEObupw0goHHtr52nQMqghxhuxpROb/4D5XuH0QMDjJJ4wDtI8rVBxOmA3nqki bq6w== X-Forwarded-Encrypted: i=1; AJvYcCUv4SCOPzQLLr0Vj8ijvNglRdlqBxciJEXRysMc1dWKXRSBZfml5ZkHZUTCHsE5snlDTIoMuQA+aia5mrPsDsnEQ/J2oaQhJbP/HG5/XPA+hJ4CdJc= X-Gm-Message-State: AOJu0YxSBv/RGa4C5DcqI3HSWNHlvBjh8MatA5LIhY4pDrZ8U025GrUd iwUEVvD2OscmTcFrEqgqScxpkaKdV66lwCzOSUFGhjY9R8gvQZjL X-Google-Smtp-Source: AGHT+IHN+fopr69FJ89Yh2+C9kaCZwgQMMF/ZNQmyQw3jN0rS6V6fpUrceswbHdxV8p2In3aXxih/w== X-Received: by 2002:a05:6359:4c1b:b0:17f:5a02:e938 with SMTP id kj27-20020a0563594c1b00b0017f5a02e938mr12309821rwc.1.1711465245390; Tue, 26 Mar 2024 08:00:45 -0700 (PDT) Received: from peter-bmc.dhcpserver.bu9bmc.local (1-34-21-66.hinet-ip.hinet.net. [1.34.21.66]) by smtp.gmail.com with ESMTPSA id l27-20020a635b5b000000b005dcbb855530sm7658404pgm.76.2024.03.26.08.00.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 08:00:44 -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 v3 3/4] dt-bindings: watchdog: aspeed-wdt: Add aspeed,scu Date: Tue, 26 Mar 2024 23:00:26 +0800 Message-Id: <20240326150027.3015958-4-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326150027.3015958-1-peteryin.openbmc@gmail.com> References: <20240326150027.3015958-1-peteryin.openbmc@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240326_080047_750852_04D7FB48 X-CRM114-Status: GOOD ( 11.31 ) 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 To use the SCU register to obtain reset flags for supporting bootstatus. Signed-off-by: Peter Yin --- Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt b/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt index 3208adb3e52e..80a1f58b5a2e 100644 --- a/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt +++ b/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt @@ -8,6 +8,8 @@ Required properties: - reg: physical base address of the controller and length of memory mapped region + - aspeed,scu: a reference to the System Control Unit node of the Aspeed + SOC. Optional properties: @@ -62,6 +64,7 @@ Examples: reg = <0x1e785000 0x1c>; aspeed,reset-type = "system"; aspeed,external-signal; + aspeed,scu = <&syscon>; }; #include @@ -70,4 +73,5 @@ Examples: reg = <0x1e785040 0x40>; aspeed,reset-mask = ; + aspeed,scu = <&syscon>; }; From patchwork Tue Mar 26 15:00:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PeterYin X-Patchwork-Id: 13604352 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 DF6F1C6FD1F for ; Tue, 26 Mar 2024 15:01:42 +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:References:In-Reply-To: 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: List-Owner; bh=j33+X12s0d/B0J2MGbiOXpQMWc7PtzV5QtAPtP7gkZg=; b=ZvhpgWeo2mtUwj 2waKmtN9yI2CZdYjmx06yHMANJOQNIGldlfMFWF8bvHo4SJFpKiOEH7GelWpgM86pJ14dO5MNiH2H f5FfLv/phXprwcmqWodsph+8vJEi0DTdlJxwK0moYk2F+RdaJ8WpAj9LrK5PM52rpMSBPYqzbysoC YQRRlwXgKq97OFfeFNpwawVUHa4h1p7RvD4GTJsya3Ji9foTJXVYQafqBssmjmeahXv4yDZe3YjNK 0wRAzga9KeiZ92GZAY39CvcUtTqzE71lfz9kktb4U3ATbz0QeIt5wJNuTgtfJTzYGBjvO90qrZkjB XyMGYftWzuV7qJbLPq0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rp8Ik-000000052lr-2PQI; Tue, 26 Mar 2024 15:01:23 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rp8IH-000000052UJ-2qxQ for linux-arm-kernel@lists.infradead.org; Tue, 26 Mar 2024 15:00:55 +0000 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-6e6a9fafacdso4276487b3a.2 for ; Tue, 26 Mar 2024 08:00:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711465248; x=1712070048; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=fxIIBTP4rXppfPhTT/4q0S1EVkuGtE5Ah2bvfj9/Kl4=; b=GefdA+DTl2KcpmzzmqTdFi0IFq5TjoIjECs8EY6KNGE57znlSr8F1scevG0nrioXVG vec0dA3D+oWT6UOYC76AgJkYcOFOHspvKNA1bp1LnS2TPM8wgoc8chJ3uEnwdgkEuPT5 F3ifwOkWU44HiyURYDuXUfy6L6MbMXQyHw8wspsMVvMRM4FNVHhm9GzWlHYrzCGI8Vh7 QN3izvV+qT+1flyAX2QrUha7EldyTxP6Rueeu+IZeOfMo5nTFkHzWgVFLJtmgPAOAEvT GJ83ko++/sTqs1swrbEva/eSFlBJgPee1hmrhGovTlEKlg9zJwEOArsuY/pVNy6pJFnQ +vhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711465248; x=1712070048; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fxIIBTP4rXppfPhTT/4q0S1EVkuGtE5Ah2bvfj9/Kl4=; b=nFUOeafKwmwmzLcdqxPFPt7uoWAe2p9RlZJuc663JoiUNmfjdYGH126JzsF/yHhFw8 r3BovXiG5D7VqsNtJ/CC/BytqwsDhKsU0gcJoW01CIkYASVUUTCmgXQJE2dc0XJWoY3b APov/zK7I1JnryHh0O7bfsgcgAsSxnmQKWbxiN1d1up2tM9Wos1Zm7U+XF7YK1mGuQa4 UEp5/63WnYQBHgUPiSQIOyfmCc+ftvP19vH8OBVwU60DzXzNGhRCKrVt8D6H7SkuHP9Y oCxVDL2vayge31Z8iJDTtwaLA4DCvUX4tMvLkuXm+efzJjbqZqICBaBd07Bw3Zc4PSrF FX0A== X-Forwarded-Encrypted: i=1; AJvYcCX/x33uNnq122cFtqtn+bmHhfwushnwOTvi849h5GTVLEkre5YUEKTp2vkH+0D7lWPk2iOLwrXmlfSgp632KoaCK0npnrSNXX0pfg0TRL8yo+891Vk= X-Gm-Message-State: AOJu0YxO9yEdE1UPuU5o8xKKrTVLJx1+0fqm8o3HDKUXUthCtd2YlCEA THdryRnsRkzJl7tJbpG0c5XTpqGRZuu2eVDOk1LbV/LAbs/iEnOj X-Google-Smtp-Source: AGHT+IH1cX47UcVDJeEEPc3BtsiLHnch3pmt/eT/zXRUGHXwiIA0NbF5hbSlAoW8eYDLcPteprOuGw== X-Received: by 2002:a05:6a20:6a22:b0:1a3:c3e6:aef7 with SMTP id p34-20020a056a206a2200b001a3c3e6aef7mr7554771pzk.54.1711465248497; Tue, 26 Mar 2024 08:00:48 -0700 (PDT) Received: from peter-bmc.dhcpserver.bu9bmc.local (1-34-21-66.hinet-ip.hinet.net. [1.34.21.66]) by smtp.gmail.com with ESMTPSA id l27-20020a635b5b000000b005dcbb855530sm7658404pgm.76.2024.03.26.08.00.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 08:00:48 -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 v3 4/4] drivers: watchdog: ast2500 and ast2600 support bootstatus Date: Tue, 26 Mar 2024 23:00:27 +0800 Message-Id: <20240326150027.3015958-5-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240326150027.3015958-1-peteryin.openbmc@gmail.com> References: <20240326150027.3015958-1-peteryin.openbmc@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240326_080053_751682_A44D286F X-CRM114-Status: GOOD ( 17.98 ) 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 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. Signed-off-by: Peter Yin --- drivers/watchdog/aspeed_wdt.c | 53 ++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index b4773a6aaf8c..52afc5240b1c 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c @@ -11,10 +11,12 @@ #include #include #include +#include #include #include #include #include +#include #include static bool nowayout = WATCHDOG_NOWAYOUT; @@ -65,23 +67,32 @@ MODULE_DEVICE_TABLE(of, aspeed_wdt_of_table); #define WDT_RELOAD_VALUE 0x04 #define WDT_RESTART 0x08 #define WDT_CTRL 0x0C -#define WDT_CTRL_BOOT_SECONDARY BIT(7) -#define WDT_CTRL_RESET_MODE_SOC (0x00 << 5) -#define WDT_CTRL_RESET_MODE_FULL_CHIP (0x01 << 5) -#define WDT_CTRL_RESET_MODE_ARM_CPU (0x10 << 5) -#define WDT_CTRL_1MHZ_CLK BIT(4) -#define WDT_CTRL_WDT_EXT BIT(3) -#define WDT_CTRL_WDT_INTR BIT(2) -#define WDT_CTRL_RESET_SYSTEM BIT(1) -#define WDT_CTRL_ENABLE BIT(0) +#define WDT_CTRL_BOOT_SECONDARY BIT(7) +#define WDT_CTRL_RESET_MODE_SOC (0x00 << 5) +#define WDT_CTRL_RESET_MODE_FULL_CHIP (0x01 << 5) +#define WDT_CTRL_RESET_MODE_ARM_CPU (0x10 << 5) +#define WDT_CTRL_1MHZ_CLK BIT(4) +#define WDT_CTRL_WDT_EXT BIT(3) +#define WDT_CTRL_WDT_INTR BIT(2) +#define WDT_CTRL_RESET_SYSTEM BIT(1) +#define WDT_CTRL_ENABLE BIT(0) #define WDT_TIMEOUT_STATUS 0x10 -#define WDT_TIMEOUT_STATUS_IRQ BIT(2) -#define WDT_TIMEOUT_STATUS_BOOT_SECONDARY BIT(1) +#define WDT_TIMEOUT_STATUS_IRQ BIT(2) +#define WDT_TIMEOUT_STATUS_BOOT_SECONDARY BIT(1) +#define WDT_TIMEOUT_STATUS_EVENT BIT(0) #define WDT_CLEAR_TIMEOUT_STATUS 0x14 -#define WDT_CLEAR_TIMEOUT_AND_BOOT_CODE_SELECTION BIT(0) +#define WDT_CLEAR_TIMEOUT_AND_BOOT_CODE_SELECTION BIT(0) #define WDT_RESET_MASK1 0x1c #define WDT_RESET_MASK2 0x20 +/* + * Ast2600 SCU74 bit1 is External reset flag + * Ast2500 SCU3C bit1 is External reset flag + */ +#define EXTERN_RESET_FLAG BIT(1) +#define AST2500_SYSTEM_RESET_EVENT (0x3C) +#define AST2600_SYSTEM_RESET_EVENT (0x74) + /* * WDT_RESET_WIDTH controls the characteristics of the external pulse (if * enabled), specifically: @@ -458,15 +469,25 @@ static int aspeed_wdt_probe(struct platform_device *pdev) writel(duration - 1, wdt->base + WDT_RESET_WIDTH); } + struct regmap *scu_base = syscon_regmap_lookup_by_phandle(dev->of_node, + "aspeed,scu"); status = readl(wdt->base + WDT_TIMEOUT_STATUS); - if (status & WDT_TIMEOUT_STATUS_BOOT_SECONDARY) { + if (status & WDT_TIMEOUT_STATUS_EVENT) wdt->wdd.bootstatus = WDIOF_CARDRESET; - if (of_device_is_compatible(np, "aspeed,ast2400-wdt") || - of_device_is_compatible(np, "aspeed,ast2500-wdt")) - wdt->wdd.groups = bswitch_groups; + if (of_device_is_compatible(np, "aspeed,ast2600-wdt")) { + regmap_read(scu_base, AST2600_SYSTEM_RESET_EVENT, &status); + } else { + regmap_read(scu_base, AST2500_SYSTEM_RESET_EVENT, &status); + wdt->wdd.groups = bswitch_groups; } + /* + * Reset cause by Extern Reset + */ + if (status & EXTERN_RESET_FLAG) + wdt->wdd.bootstatus |= WDIOF_EXTERN1; + dev_set_drvdata(dev, wdt); return devm_watchdog_register_device(dev, &wdt->wdd);