From patchwork Thu Mar 28 01:32:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PeterYin X-Patchwork-Id: 13607924 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 EDA2DC54E67 for ; Thu, 28 Mar 2024 02:33:52 +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=FmaldjsapO40E6 B0BM1BM18s6dcljpf02VG8s2MV4urHRQMDuvkJhCRRMYlZf5lAM0mpD8nGi8dtydgnkJM95DdiyF2 tSpvY4Li9tmwrRfi+us0Oq8yoDs+edjcuesLKAsHEEQ8ANESsPeYCfPPYXdKemYMEkbOc9T9FGeRd /DniJce3lEJTFwBCYFy6hmngT2i2oOtJzD1O5+kajiRlVJoUbTWHXa+BrR6USL5t3KB1JbHMmawd2 q2H9ZuhuHanz3ct/jEQMO77tWsn/6iwz5ktZYySljMWA19WjEVgLwvXEHh+KwjxfUOf3cvuMcWWxl vcJ3m8EpXGhj98Y4qGKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpfaB-0000000C7Cw-0cCW; Thu, 28 Mar 2024 02:33:35 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpedm-0000000Bwpb-2UTp for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2024 01:33:16 +0000 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1e0b889901bso4508415ad.1 for ; Wed, 27 Mar 2024 18:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711589592; x=1712194392; 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=GbyQhdTy9jxChGewbsfh96zw25AosCnokIvlBZpVthAaJloG+JErkpc1XY32MTPxpR QZuC7Ohg5gh52AFkITwottk3pQyQRoE3PG2T4QpQhX+obQX/05C2y1x8NA6r4frvFxLR BcsU9b13ZfExsw2kXLl2l5woyET2HotFE12ZJ/IosboJoS/kzoSnjCCd1NLwhEnJ5oY1 y4UgWhR7vzHRyAYbkVXRsxrspsgUWPxJX2qP6gwkhak2kVadSSs0pisFLfZsiOAVO1H+ fwf3Lo9d/7BKnkHc5VsPt/nH9jznaZkR3u+hq3p/Dvga6UmYst8rw4x+Ho9FjJC2OrIO 7fCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711589592; x=1712194392; 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=q1NHjjfE88FStA0t1315w/+GToUnzL5FNpB7biBS/j2qfT/JSoakmNKJH10NBLJXtO y52Ld/vV/LwGTZR5MQJ9ek4NX+EFX5TDUNP9Ckvqhp90jcpGVsewjgEy0BYIiNWo9Tjf 71Q8Z8zNEzGPuTq9PsC0LBwspe8ojRUEmjVY9UWvDOeMVR9ftjfhmDD/i4uRf7JKuHI4 pcZjnsXCUzKTmTMRiaOcjoPojKAU0m52ZGx9lONgxv2bgONDG+FRyEQY5ILDurp1VfQN /RjlAYK9MEw3v8SOl64iDWKXYiXcZv7cHQQpW4G/aT85JdLWK/WHonstPvhp8gCAdd1A MnZg== X-Forwarded-Encrypted: i=1; AJvYcCVB4GoYlpaV19rIa/sg/3AyjBPGIAQ+U6GY5+1r//zTvZALcQ1kr9HhqkKBZMGOOSb5LKxoLAIqPbDSI59fgB9PS/PSRQguU4JG7TIL69FoNcc+Oz8= X-Gm-Message-State: AOJu0YxwNNyI1sD2sKvkreEjQngPmDaEO3eFnqccxO3U5aObJIIMbBEK kc039baV34KtXv/j0vRkj5TE9qmkUZKVUOszR8jZ6GX6M6CEoAwSw0/OMluV X-Google-Smtp-Source: AGHT+IEZEoeW2NdDTGEuRTb0RH18Hq2hYgJ7S9WDoccBaiJjGZNW9oQwol0ryh3GxnsQsqJ4xh8gVQ== X-Received: by 2002:a17:902:cf4b:b0:1dc:418f:890b with SMTP id e11-20020a170902cf4b00b001dc418f890bmr1550409plg.40.1711589592392; Wed, 27 Mar 2024 18:33:12 -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.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 18:33:12 -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 1/4] ARM: dts: aspeed: Add the AST2500 WDT with SCU register Date: Thu, 28 Mar 2024 09:32:59 +0800 Message-Id: <20240328013303.3609385-2-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240328013303.3609385-1-peteryin.openbmc@gmail.com> References: <20240328013303.3609385-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-20240327_183314_658834_3B2706BD X-CRM114-Status: GOOD ( 10.88 ) 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 Thu Mar 28 01:33:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PeterYin X-Patchwork-Id: 13607888 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 7607DC54E67 for ; Thu, 28 Mar 2024 01:33:50 +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=S5RHxYhfE0Qcl1KcB1uWVEcrdMaWHvxoHGX13Ay8DDs=; b=2zqmg8j7G8oVbV f+wt/wZ7PMfhPOcGrso2Tvi5FcDZDFgnc0PDzNsIYluF5pQ/v+uencHhH/FZHPsHYpqBbWn3wSs46 ZPYK/V8UdkGTF7W1n5Kbik+h38DHymOBfk2o/oir9J7HjH1B7w6hpp2vvxc7P2mZ39vTgNey8RXgs N0WDF2dun2Wsb2T9hiR3wrhLEPUaknRR3Mg53BEUDxb9E6ysIkEcp+C4fCxuRUNcVmR4zJXagfrK5 Uj1aSiedCGCwGPdEPH5LnQnosxK1mYbMxOfSSzf8RN9u5B0RMTugeqgNEWJhvb9q7QOclA6IbgK3t A3cJ1Gj3g9qyLhp15UQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpee6-0000000Bwzf-3UmX; Thu, 28 Mar 2024 01:33:34 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpedx-0000000Bwuj-0OoQ for linux-arm-kernel@bombadil.infradead.org; Thu, 28 Mar 2024 01:33:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: Content-Type:Content-ID:Content-Description; bh=bI/8H0pAGYbJspCOpWpVMnvSIVC0SWhWj4SAbo7SW7A=; b=oFWnHuyvUuRrSHPiz5fixSMKEv CV3JtfqYr5hCOUQvwTE0kXEj3CX0RHh3pmOEY4MxLLa1nJEbFHpk0GkRv4yNQheEM926QDYxyqgmd 5M23R6g4m0r84/4rVchhL1CvRz8+85WDvTAhcI+8XVQvBd58MnCoI8fy4VelDQ91owwmHvQP1bKXy WYrNl0EM+UnYi5cWdqczP4JfWWVyQVw+tc0qy7Z4fhuZ+9wiuItJVv7L6ljqEdQK2Oq8/2Dmh9H6S GaeoYiAnCrdWYMW0rGAiaTa0+v5n/RvAleC/WHYCHnMZm3LzX8m26GAGXVcR6iFgrALo+WiLVWJQc 8HQUZCyg==; Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpedq-00000000hBD-2cGF for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2024 01:33:22 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1e0d654590bso3632015ad.2 for ; Wed, 27 Mar 2024 18:33:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711589596; x=1712194396; 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=bI/8H0pAGYbJspCOpWpVMnvSIVC0SWhWj4SAbo7SW7A=; b=ne1M5xdpkK80jVHlup7R3XU714bgTdLy1AX5hyTVM5XzQsITRvTzkhZ9BStQnXhS65 5u5bHbJWYruQEHOQqh/v0Dz8461nqAzBj8vENz58YIngtn6M8Nzi/Ay1GF/v5yG1bpWi VxMk6BZcunpHpYdFDmDIPRChen/n6K5C4dzSsyeSg5JrOMO10eg+8NV6JZJTW9r2CFui n7E+wDz0rSeiR0tJWT3e/ahibXpcoNbXHjYTjE5jdkpQhsB1B5xP3j4Rt56EsSMbjDv3 TLqBy9WVytqoZHRGS3fr6XX4HtsYS05qm44Cgaj0LyIT39V0jz9hMimlVLy9rLDzzlNs GIbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711589596; x=1712194396; 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=bI/8H0pAGYbJspCOpWpVMnvSIVC0SWhWj4SAbo7SW7A=; b=IWPVS6Aqx+XYKeeahcErslZgz+lqYE9bEwT8PEwMQjmu9Jp7cn6k9DX1+F3+ICockf Tw+X59SUNuWMloGrx43pvBTIHRzS+Y1xyLef6KqgoXXrTif+5QR7p8cgRwISvRvAeezQ DnhIlF/PvOkJWzsaCgs06gdV63enH+fIfisvlGN7rkX8PHAW/Kc5Tgz65cvHCbGP2hK0 3K7u1632h1BbtWGE+lB1faFz5PoibrdQ2FuaxJv9zYg+nftxepG5gSvcXtMeA1rwHUFy pyZV7TA3l3JEcG24D+ifH3gpSjjeq4tPJ78mzTwgQPV27raunRL8RYYd290e4VWW4axp DobA== X-Forwarded-Encrypted: i=1; AJvYcCXNhCGENi7jT5VeqwYV0YLyNauBKHoPSZ+2ze/9SfrCd34LzGn2mrbWHEHemnzNMU81jp3hSItoOXaxjVfZY1wvklfhHmzslLSdrmuClVbUtzA1qcY= X-Gm-Message-State: AOJu0Yxvrv2SqNOqb/wlQBJ2wvqxYSa+NR7CAm68xgUpGESq/iYGPxwZ HuZgiv28xNoojbpbTI2PO+3HBX2W0I/bUOke3aMxCXCI0w2C46nH X-Google-Smtp-Source: AGHT+IFsBLzrq9PPCeN5NGFGoiK1EWQwfPzGwMyzieFUAaPbnalux9RNDxGXm3wYog97cDv+yXPGLw== X-Received: by 2002:a17:903:986:b0:1e0:d9da:b126 with SMTP id mb6-20020a170903098600b001e0d9dab126mr1644145plb.15.1711589596275; Wed, 27 Mar 2024 18:33:16 -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.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 18:33:15 -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 2/4] ARM: dts: aspeed: Add the AST2600 WDT with SCU register Date: Thu, 28 Mar 2024 09:33:00 +0800 Message-Id: <20240328013303.3609385-3-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240328013303.3609385-1-peteryin.openbmc@gmail.com> References: <20240328013303.3609385-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-20240328_013319_561507_E7CB5993 X-CRM114-Status: GOOD ( 10.19 ) 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 ead835fca657..b47850f0dca0 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi +++ b/arch/arm/boot/dts/aspeed/aspeed-g6.dtsi @@ -557,23 +557,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 Thu Mar 28 01:33:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PeterYin X-Patchwork-Id: 13607887 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 48DD0C47DD9 for ; Thu, 28 Mar 2024 01:33:50 +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=sCA1t4RcFveWb6 vM6AcCYSVB725x8aRMSnLz2lwdjj71eGp2xM+UYlPcZjdWWweEX2btLIevftiX0fCxSbUJxaQTBFC XMzLORKlJ7LLN+U8IAHZ35W5+2igDwLhJCNZcVLIGc4bIIihx0WgIqoJ/L1I+Tz16NTq6uUPD0sas ATWqhjUveGWQk1ZPVMPAjEcgMqO7w5MR329yuTkCmLpC7U32hqyDco0fnR7tSa8YCZII1qXaN+XqK QOnXd8+WCLNZmhiVRhxeqOOew1dMD74RVDkVRm1ZRh33Cz5HGXo2JAYHGz8TPUKR6hB6K2NgQjHSc Oa7M2Z4A4YIY3gGDHD3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpee6-0000000BwzF-06vM; Thu, 28 Mar 2024 01:33:34 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpedu-0000000Bwst-0KkQ for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2024 01:33:23 +0000 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1e0d654590bso3632395ad.2 for ; Wed, 27 Mar 2024 18:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711589600; x=1712194400; 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=TzVeKjGCiAVXCjPzi9I+mAL7pWkqNA70VeiVS35WqiLmlepKtRDHhb1iMEDTslQka7 anoGRv7Hw0QEUbEz/V0T1jWYq+SGX1y6La6p46Mah/tSeZS3ZJkeeMUys2o7/wX6aguc 3EmbKwPKoeSrgRDtPLY7Bpr2rC/HXXUsH9vLfI7xC2mHcN4bAT0Oo453yBpxErCU2IyI pf7e00eT0PBB1Uid3AHjcAZZyW/+HKqtBGuBqa+FxmJlTtklvq7qjBNODubcqijZxxCo P2/87DThNL7o+aCAry3EatbWxfs9HslUwUDEPPe77320ndN0UmK8tqFWvJ20hcyWPpEa EjDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711589600; x=1712194400; 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=LUWd8inR41FXo8FOTf7PjYhbUkssz5KXdyUxjQE19iiFe5fvofkeIMzBdcHBUEtItT PYSz7QpHL7ClT9x1VnbETOox/y6K0bbFSY4YdigwqlCx06xN8vSZLRdctiET3AF73fDv gmhOhgKoMKh3GWwNrcRZLnBOeDVuv7b0hXwZyikl2iZBVTB3lqA/TX8rXt9PNP/jLkOh Uy7Ej5ZDiOArLG6ieElq8HvKT4kG6fEqNQT5Rcd8EsKVMLpXxRirzyjWZ7gKOPtjVt+M 4gkzIGxy1yLLlIdm66o1cJEhY2p0Pa1M/Cf6hqccVQl3uE9U3tpzu1YtwsKzwzyuxhoI HVaQ== X-Forwarded-Encrypted: i=1; AJvYcCVaDiBicqCXS2gE27+ry2wRYTAQ72SmZT0FJyV0Lar5VI39iqB/4iv3iVDy9LLNQDdoFLLON6Mx7zhOvu5hYNCTciogl+foZVDjR74esKVZsqlUdM0= X-Gm-Message-State: AOJu0YwjQGrFBqBH4WY53VX+kCtIrMyDhtXpeEAPq32jk1VxNNAQpyIb KFEjfRdBBNAMS4zo6Y1I52LdHkey4fvIqpsh+y9YkORcRsFNIVKX X-Google-Smtp-Source: AGHT+IHiJqaLeX1ZdgNRMa9pBlR+bhPRua5gteIelUWkWhnVizBcWhV4cIRYRWVS82I9hJrHDaThDg== X-Received: by 2002:a17:902:d503:b0:1e0:11a4:30e0 with SMTP id b3-20020a170902d50300b001e011a430e0mr1966819plg.19.1711589600090; Wed, 27 Mar 2024 18:33:20 -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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 18:33:19 -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 3/4] dt-bindings: watchdog: aspeed-wdt: Add aspeed,scu Date: Thu, 28 Mar 2024 09:33:01 +0800 Message-Id: <20240328013303.3609385-4-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240328013303.3609385-1-peteryin.openbmc@gmail.com> References: <20240328013303.3609385-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-20240327_183322_154267_EE070F64 X-CRM114-Status: GOOD ( 11.37 ) 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 Thu Mar 28 01:33:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PeterYin X-Patchwork-Id: 13607886 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 0F08FC47DD9 for ; Thu, 28 Mar 2024 01:33:47 +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=KB/MQQw0kxfBT9nfESJ+wM7s1pQzJrIjxf2lghZIbSg=; b=E60vRynjBmFNAs T7xGCjqg3vLz0ACwFcjTUAkoHs6etpjp4Dh9QRGM5PI5Eetpqxml1vLpgJ6v3Av4b6lPlppv8NQq/ QYWdIUzPwzf9GsAT+Vrd+zQdtvwuI9c9WVQmmQieRratVysiV42rbYJcC/YCyc0j70TZPp+87mj90 d/J/KMYVyulYvEGG6k2qekd7ck2ejcDwOhWE9mcwlA0znxPwWvDgJjNjX/WPLGtrZ6z0QaFBQr55W /W3K9hHQA2qI4eHP+0X2DaeSTkxVeRZTWGbFHVqHE53fuzo5F7CuoeB3SwL5+QMuaB2r0QvmCh2he Ar9PBB8P/rREsXDsGC5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpee7-0000000Bx0Z-36ms; Thu, 28 Mar 2024 01:33:35 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpedw-0000000Bwul-2aBU for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2024 01:33:26 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1def2a1aafaso3843665ad.3 for ; Wed, 27 Mar 2024 18:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711589604; x=1712194404; 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=G0IynxA3JbozA3TAjnZstACddkpz8hoX6OU7xoU+2fw=; b=RHkzDm6zqGd6kYs44UgaarSLMORHpprPklQd1y4P1VZD2SsAM/Uu68huWp3D8EtQsq gpVJ7+TtMOGBL4nzEKXyHXYXPwxBbeQClAX2uZl3gNPxcnrx1VxInULTozNkD6H74QnC mJTOBa6FOSPRCvkF838ZH17B8F+IutPY8iC0KJq7kOt2YQoSAnuBaJTHZMlR2TB7iuLt ZyoL9O6/evN59ilHYlTwlTg3dZZZIhCEna5dkIqbMU1oTuSem7Shcf3uYHcxp7dTuSjR /ZBDOyd6/EPKHYFpA575Ku5qUJIEc6y5C0seoLgOEsdw2aL2bI5K01lCRqQGA/Dfwrwb BKog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711589604; x=1712194404; 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=G0IynxA3JbozA3TAjnZstACddkpz8hoX6OU7xoU+2fw=; b=H3E0wyJZ3lPLzOyQDORMse8Vv6jUqFil/ads2F4LGaId0gM54VKO1qluNR7iuTcd6m m/UlaeX5wiL7VXFZTq9sAL0wsNpCNoxl5a79Uo+UFdh1G708/mQ/gJJFRc/w+Uwvrk29 sLsZjLFFMnDiHeODfFFGWgH9v02DprBemEpRxpOs/6qOLmT3Z5jOMJCMosGouVt4DT4H o4XlGtMb1//+gnHLvfYcnEzrJU5pdXA2caw1gyG90QJ4zQdoVeDBnyY5jPTgm0UvrSpU 2ynM3IjTlmmxytTCTfD8GoUmwV0td+cDT2yPaOb6U5Ut8ZQoPO2iw3Y9yXB32lP8tbQy lNRg== X-Forwarded-Encrypted: i=1; AJvYcCXm1wbtto4obhjhD9GU9QvKbZ8A/D2AyqwEqV8/ld3370MLTvWSYM52ZM0lTcgEj/k1VrFk0ihj2weI0I3NSoI+0FiaPSPJdh/T57jlEHuRgFN/JZ4= X-Gm-Message-State: AOJu0YxlZcq1GDcHC2UruWAWex6RjXlpqtsQ6/5YZB+Ka98HitlUigJy drIpuZZIRTiCmYB0vKgi7YD61G+y1BA6L6okFRq+VVeOaTzMUYpI X-Google-Smtp-Source: AGHT+IErqe1JgPY/tC+iEEwyWTtpp/xy7QUKcZTy0vIiStxw4d/K5SUR+QGLZAGX83Ujl4LUNDIuFw== X-Received: by 2002:a17:903:8cc:b0:1e0:a2cf:62f2 with SMTP id lk12-20020a17090308cc00b001e0a2cf62f2mr1579482plb.23.1711589604023; Wed, 27 Mar 2024 18:33:24 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 18:33:23 -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 4/4] drivers: watchdog: ast2500 and ast2600 support bootstatus Date: Thu, 28 Mar 2024 09:33:02 +0800 Message-Id: <20240328013303.3609385-5-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240328013303.3609385-1-peteryin.openbmc@gmail.com> References: <20240328013303.3609385-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-20240327_183324_693682_A3CD3D50 X-CRM114-Status: GOOD ( 19.60 ) 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 | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index b4773a6aaf8c..c3c8098c035d 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; @@ -82,6 +84,13 @@ MODULE_DEVICE_TABLE(of, aspeed_wdt_of_table); #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 AST2500_SYSTEM_RESET_EVENT 0x3C +#define AST2600_SYSTEM_RESET_EVENT 0x74 +#define EXTERN_RESET_FLAG BIT(1) /* * WDT_RESET_WIDTH controls the characteristics of the external pulse (if * enabled), specifically: @@ -330,6 +339,11 @@ static int aspeed_wdt_probe(struct platform_device *pdev) if (IS_ERR(wdt->base)) return PTR_ERR(wdt->base); + struct regmap *scu_base = syscon_regmap_lookup_by_phandle(dev->of_node, + "aspeed,scu"); + if (IS_ERR(scu_base)) + return PTR_ERR(scu_base); + wdt->wdd.info = &aspeed_wdt_info; if (wdt->cfg->irq_mask) { @@ -459,14 +473,26 @@ static int aspeed_wdt_probe(struct platform_device *pdev) } 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")) { + ret = regmap_read(scu_base, + AST2600_SYSTEM_RESET_EVENT, + &status); + } else { + ret = regmap_read(scu_base, + AST2500_SYSTEM_RESET_EVENT, + &status); + wdt->wdd.groups = bswitch_groups; } + /* + * Reset cause by Extern Reset + */ + if (status & EXTERN_RESET_FLAG && !ret) + wdt->wdd.bootstatus |= WDIOF_EXTERN1; + dev_set_drvdata(dev, wdt); return devm_watchdog_register_device(dev, &wdt->wdd);