From patchwork Thu Mar 28 02:22:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Yin X-Patchwork-Id: 784052 Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3BD93771E; Thu, 28 Mar 2024 02:22:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711592563; cv=none; b=QUQQBmGJwh6XhuJ4okRPlkOsj8EAAz7kDEsHrduhtM3I+DpOQYwEqaa1ScQ/d4/OzWYORX+BEaaKtG2u1JvpjnG/XJbo8ry26HaMDRSEYP6ve+MAnE++0MVpohznNRPTwELiUNg2KisTtmXxKtvn90llm+N6I5WkwhEirnN1MEs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711592563; c=relaxed/simple; bh=i2IRRjTZyiYex34MyWLMNAUhtzs5XV3CN9xcafzB4wU=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=O+p/XWRpVXYRPVdZaeNN3VqZcsQQMcoKIrPRPojCYz4L7WwjNMGirlIEegxq15mO9Kut3wjlTC8eZgZzwxb0D/l248lOGxbMw+C6DzN/wpptNpwL8ZbTfKhfvDjInseHNNIqwpCa4u1g6BFzZQDPiep9ExXrMDwYygHZR/8pYEQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WnIBh5Xb; arc=none smtp.client-ip=209.85.167.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WnIBh5Xb" Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-3c3bc867eaaso373141b6e.1; Wed, 27 Mar 2024 19:22:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711592561; x=1712197361; darn=vger.kernel.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=WnIBh5XbtbSA8xM2Fq8junhGrw7rZYYc/0VELW8mvT7ll236t+6kfxct6KZNJtMdP1 PJPuG22p7fWoURlnAiUXORMzQVj9IOxqKQ45s4ReFJoR3qS9ZRvExvrLPd2ouapxickq YfXFY5RmFjYsOb5ezLkLFrm7OdMNLDhG/bpjB1YdKrCRhIL+d9iCjm1deNJb30YQqlRw Jfa8s/j/bLxln2ci0NbQoSKoPuQuD0FpRv0H5yRtld2Ia5Al374UVxfxTcsi27Db8sb7 ie1hi45i1cBiWuai4G5Ak9a9lRX5suS5yNjFSvYWbV9scsOVxBy0k5A8o0I6nYfdjfwn B1EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711592561; x=1712197361; 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=Hk1UD6Qonjjyvd6soPc+Al/z56WfdCB9JOl2I2bZgzN2tSXYvcFSp/zzrB/gBJxGss SkXqmXv5kmYOpQe4NNE+ErEehd5TJOXYkSN8Ltoj5hmyWZPQ5n3CtvZuhW9bv2W2EpPZ o1jLq8HzUa87UT29zk9cb2Zm9VkxXrVs3+qksvcrTyNHCDqiGdvAA4MXSsAJduJUU1IT h5Q6gPyb4mUFekP4asd2xw/f6aooPzsi/dGeGzITyfuGN/e5rokbduSjxUuzADG7M32P ERbQZOhIN8N5TJu5YG1A8dwpl2wSKQnj56RAo1c9z3pWE6MbUEc3qz4e0tIbZX4JA3V4 uwIg== X-Forwarded-Encrypted: i=1; AJvYcCU80ZTbVlHoAmHb623EPle9UNUHrkCbWCeMZFKRDBBMfSMy6DnK87pwePjr9VXmN0SeDhAgAEVYIsPLGwTJGMU8mZDGMJMyv+xXhy8RojOMWiRDxZggAUfle5MZl9zjNbaB+lTVIVoPfh5Vrk2F6aZaIHnsL6lEUtZ5lilK+Zp5rATUTfd9WNSp X-Gm-Message-State: AOJu0Yy2XCY8yu3T+3MENgFRMWCSGiFBNwjHXKPnTPPvmquWJZK4VQp5 vEDL2QaemWKMVLkQSwHlU+ekAWmpFq8ayjVaSFqTTil/k6hR4/zP X-Google-Smtp-Source: AGHT+IF/M2aT2iNp3ruFJkZVXPJ0JqQ59asv05qBqw21fy7twZ5ntMVtEyAWYGtrxsTVZAd3CYIWkA== X-Received: by 2002:a05:6808:ec7:b0:3c3:cd21:8a07 with SMTP id q7-20020a0568080ec700b003c3cd218a07mr1833577oiv.32.1711592560966; Wed, 27 Mar 2024 19:22:40 -0700 (PDT) Received: from peter-bmc.dhcpserver.bu9bmc.local (2001-b400-e355-7eb0-17c6-c47d-d4ee-f9e8.emome-ip6.hinet.net. [2001:b400:e355:7eb0:17c6:c47d:d4ee:f9e8]) by smtp.gmail.com with ESMTPSA id d25-20020aa78699000000b006ea858ea901sm229256pfo.210.2024.03.27.19.22.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 19:22:40 -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 v6 1/4] ARM: dts: aspeed: Add the AST2500 WDT with SCU register Date: Thu, 28 Mar 2024 10:22:28 +0800 Message-Id: <20240328022231.3649741-2-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240328022231.3649741-1-peteryin.openbmc@gmail.com> References: <20240328022231.3649741-1-peteryin.openbmc@gmail.com> Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 02:22:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Yin X-Patchwork-Id: 785081 Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1B3539AD5; Thu, 28 Mar 2024 02:22:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711592567; cv=none; b=H40v4NszBRQjTl7OQ/dnqU0Dtv9E7mq8qR6R4w9iUf3cQyey77kNkJ6RZU8VHpjY2mO/fhQeNQDNwQgHtECd45Gp3osPhaGhLR60mJeVhEUxxwaAOUF8RL/ls/R4l96zANwVE9DGNZRdSlDCfYToOAwPjqvOqbMeWA/RjEzaWlg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711592567; c=relaxed/simple; bh=YDcNcquXcHWCPOuOTYjyhuADwug6LeexFaOD5IjWu+I=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nUxd+kTmMPsNw/ypSILJQ7udTcc+Fmyw/nvkmvvbkcofujilaFfMVHgbvNlc3AAPB3ErH+pCOXsh3XXZLiWV7PqzuH207/kRnVWShGDWd5X2DjxHj4kK7yO3amWMvaKdFPQk7gMPvXo0WuGd6tjU4xgXu4dvzOgyuZRz90PCBH0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=O9hXQ1lW; arc=none smtp.client-ip=209.85.167.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="O9hXQ1lW" Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-3c396fec63aso222312b6e.0; Wed, 27 Mar 2024 19:22:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711592565; x=1712197365; darn=vger.kernel.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=O9hXQ1lWxW+cX+sM9ZVozwwATl1sebsp0Pl5re9GVN40LupYqGzmNlKqGg5d1Py82b osNsA8W/qKh6qNWCfisjF3EqjjWZEAaDYtS0Qr2sVkqc4SaIVcGWo/GAw6JMqI87cF8V fcUOHDUuY6nkVMOVwXWfM8Kc+nSuchuaIE7gsf7HCqMkUICQB0feDAVLDafbNhcf6/03 r36h4gWR849LOvrG2Jt5H6qNb8m2RaUvkTEz5Pt3r8756SNN3b57zPJutyXq/a0LcS6k M7r1phOg2asqe3z/1JrlcDB+p+4eq+pFijZ15rk4MzmaPgxrlRvcQ/LWMaNAL8diA1Lo kcZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711592565; x=1712197365; 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=a/zK+FnA1BCW3MvsqZqDlGwxoJAXQloCzUhSwL+DRHapWOsZamBvNykBvqWm9UL7WV oNb9E+BHeuaEO6yfhbkPi+gWwILdmu3GhUaWguIFDNFQ+OfFKGPUmK1QvuwK55LHhqeN f2SvEjVtoGvq32MAf3Oc4LYAodx5/rpTSgbi8H0ltBeIik2RXQERe/bgdK9ZKlqxrKaL UVn1bglPrjHjVoBXqiBmnfakCQ6LLeGVVO5tNBU3A3op0QAbI3+UzH6i9G8Kj2CBGV2A 11+rboAcz5tDxV/GB4sNp0sl9JLobdbNxQtVMfFZBngNE6nRGAp5q/+Rg9ocEbN8wjcb dnNA== X-Forwarded-Encrypted: i=1; AJvYcCX1AFbPjmfdfd3/M8/iXrQwszTTQtw0UXdIX7hXIzNs0U7V/hAj2djccxy2q+PYgVpV1hjav5U8tCA4dV42v3ktv5bQiCTXYshUf1VBT3TYP188TRizIRmxXYiWN4+rA9fnY3zRX9Sb39TltnUhhNA26af+dzfvvhmAZR6HHCM2naosM9fFBJ/n X-Gm-Message-State: AOJu0Yzz7IeRuUgitOBG09UKD13QKVO3ezFIAX2ToIgNShDJGedtL7bY hpsuYopoEg682FffWG7qQZDSuv3nb3rUAhIjZQuLRm02G1hTgFgL X-Google-Smtp-Source: AGHT+IGbwznYQbqi5HTXiUOA7d00ceCj8N2cmmUWUhbT755TePpGDg9zSqMamOerLluvJFoltPTgXw== X-Received: by 2002:a05:6871:4191:b0:221:bbb6:3aea with SMTP id lc17-20020a056871419100b00221bbb63aeamr1570113oab.16.1711592565077; Wed, 27 Mar 2024 19:22:45 -0700 (PDT) Received: from peter-bmc.dhcpserver.bu9bmc.local (2001-b400-e355-7eb0-17c6-c47d-d4ee-f9e8.emome-ip6.hinet.net. [2001:b400:e355:7eb0:17c6:c47d:d4ee:f9e8]) by smtp.gmail.com with ESMTPSA id d25-20020aa78699000000b006ea858ea901sm229256pfo.210.2024.03.27.19.22.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 19:22: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 v6 2/4] ARM: dts: aspeed: Add the AST2600 WDT with SCU register Date: Thu, 28 Mar 2024 10:22:29 +0800 Message-Id: <20240328022231.3649741-3-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240328022231.3649741-1-peteryin.openbmc@gmail.com> References: <20240328022231.3649741-1-peteryin.openbmc@gmail.com> Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 02:22:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Yin X-Patchwork-Id: 784051 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA92439FF4; Thu, 28 Mar 2024 02:22:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711592571; cv=none; b=XJ9lCURbr0vfKdPc0PHQYHpeQwu/nZcYBpmIoIbT+Y+Df2RMG7/caHoYRpardUJFvBvc+ssE3psIBboOAliH5lk01XkNyytspL9wc7eLTbC0WqsOrmbuaVGVRE8ZirWOurpNG8I118LJ9iU3faR75Jq7coObrW1SAJv/8o4IgLU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711592571; c=relaxed/simple; bh=uZfnDGW6R8YxxzhmPXNOoQ4C6Vi6QB/c1rE2mdl1BHU=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=J/ujw7dc5h+ICOnmk6jAVmvw7VVYRBTjE9DnlFY6eGyOPK094M4+ddVsQPRlC4Yyk3UVV40mS5RPWDG7+8WUFGPkEU89UZQyTNRedi7XOMORV0xcixLli0Tl6yWDpHGgAyHSVdVxq1skAp07W7FGTDcIHi4BFMOu6fzzS0+hdRs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BRrXNCx5; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BRrXNCx5" Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6da202aa138so384840b3a.2; Wed, 27 Mar 2024 19:22:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711592569; x=1712197369; darn=vger.kernel.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=BRrXNCx5C8AEJtYN2jBw/m6tT9YMysqiRA0bxw+CSCAptduhS+A9KHmvHuUm6JTvpF SbsbSUETr82SNigVzxCIWTAzDKTvoHFsbxs1GOkNSlFIe6ipV5GARG/TikSVhg66+hOx FbFhnLDi7oJJkYmLXMkFr3G4xDAVjM8qgWu0H0AjKsw9Il3o3dsGvo794YJgixxIhrHU DeLsxOX+9zIie90dEAxXjuTGvO6/xUnHyedRJYsq+u3J0HNIbywFsxrnTdu2KIs26zTO d5OVptV0trogO7AvsXl29CPXE2WycwQ2a4FklWs/beOwk/sbXIWdX22/wmhpVq7mqA7N Hy+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711592569; x=1712197369; 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=faMQV4kOj3WY1Y61HRerLVFgO4srrMmSiKnHi/aQuFaT0+MOYSDr3EISoyKA+to9nR FRBizDJuLiouZvDQ58xRAoF0UBneZUEVF00oPA0f9VbpGw/J+BPGXlBzsgNvBnxN3UsN 2sH9VUjK2lOuoi9+kGaHlosVTepRsAZ3u/YgtOv+pzW/G6ou3E6zd520ig+WhCzbX4mA Ee2Mvzt28Do/KX5XopSTX4Gcwgh4mNC0RxnT6t7uo6khKJ10+AEcabQ6HWhO9H+Tz2MD Rgdh3Sd66F3knhFTXKBOO8Vi+YHFIpUqu4NEsc6iHmYlVET/S5XZOcJPwEAu+tMK8PCp nxYg== X-Forwarded-Encrypted: i=1; AJvYcCVcWXAeRdSAhPtLVQB5mdXlGnFa2WyVgxB6+4f59iW5z7XyUCuXgkFRO0semdG8EWgf1Mbb1EA0J/CpJ5/2ccuD1Tri8VqFDz7xAtNrghdz2HoJfG1sYmr8yvg72qe7KQ1DMFd6IP1HseIW2l6k5jmO7pOiixG4X5TD5Gng1Jtpi/bl4UV2ATBL X-Gm-Message-State: AOJu0YxCCPeR0qvrjhndex7I6kg/LSMyLYEBRloe1XwNPhvoUk3HP949 5m+XzDTQcYMsL/Xzfz2ah0PCPVhUtKvUv5JgkomiDW6ijLvQ6UA9YD98zTu9 X-Google-Smtp-Source: AGHT+IHEYik3ANtnRa6lUOZjg98pWEyljQMpLalhqqnQpsJMdrecpYww0XTbhYN2Vm8Jo6MXl+PZ+A== X-Received: by 2002:a05:6a00:1a89:b0:6ea:bb00:dba6 with SMTP id e9-20020a056a001a8900b006eabb00dba6mr1983301pfv.26.1711592568937; Wed, 27 Mar 2024 19:22:48 -0700 (PDT) Received: from peter-bmc.dhcpserver.bu9bmc.local (2001-b400-e355-7eb0-17c6-c47d-d4ee-f9e8.emome-ip6.hinet.net. [2001:b400:e355:7eb0:17c6:c47d:d4ee:f9e8]) by smtp.gmail.com with ESMTPSA id d25-20020aa78699000000b006ea858ea901sm229256pfo.210.2024.03.27.19.22.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 19:22: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 v6 3/4] dt-bindings: watchdog: aspeed-wdt: Add aspeed,scu Date: Thu, 28 Mar 2024 10:22:30 +0800 Message-Id: <20240328022231.3649741-4-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240328022231.3649741-1-peteryin.openbmc@gmail.com> References: <20240328022231.3649741-1-peteryin.openbmc@gmail.com> Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 02:22:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Yin X-Patchwork-Id: 785080 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6C363BBE6; Thu, 28 Mar 2024 02:22:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711592575; cv=none; b=i+oMvwKJudVGtXSWAkvYSmYdMHit6NB0UVxkTvyEiT2I2KvXD5WIHpf9qHYk+S1fC2XbkwCyEzv+CoTOu+Us6J9G5Hw7i4MLKN7IDTAxCrCP0mxTwmQyDM0Gnu9Nz6/8iByIjUxTvIQ2gBIb3rbuki9CBQDt2LMjCqy+OhbOous= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711592575; c=relaxed/simple; bh=Txw5w1mXvAlE3ttKOsRB1KC6yqApC7+pEpAOdfCaZNg=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=p6bLjZizRJXDTCaskTJEsp+YxqzbwsjZj7yY0gI5FL1efep1Co9Lz72cKZ1UwhNsVbuQfjhDv5Q6ilj8OTvFaDtRbNG63l+OmVUhK91exKT4sCgQiiC2NnCLP3glgNuYmy/7vSyopPqlCUrST+PmDaH503DZKxJBVUL4FnVbqJM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PdCn67Y6; arc=none smtp.client-ip=209.85.210.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PdCn67Y6" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-6e709e0c123so483712b3a.1; Wed, 27 Mar 2024 19:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711592573; x=1712197373; darn=vger.kernel.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=pTnAwOa2uvPcM/ekFIY9I6q6Jkplpwwz1KPt6Wpm9+I=; b=PdCn67Y6d+JJCwJvJQ3zXSJBp+5qwsesAJLn7a6SsnNtdYuX0/W5cvogCpkTmzGQko SkIxQpwjYCl076BUxUVlnkt2jervBtl0IuAYTuZ8/9mHVgnKO7rK9QZbOOHbpixkxQkx qPBBXVsHfGjydG2CDGyggrAAjOwFKcDuZWNwzOWGUeWVu1Vx4cjRfj9nOMT8JWgbjT+q fT0ghGy2iuqmkwEWy6dQt8haUGaIeWNpPa1gjmRWiM85wToqIKyA1qe12snMwf8F63S9 fg7uZy8tT6RmR7Y1BkrSskBFZ9EZwrI7NzsrYbN1tX5JHXVonq6HNRPXel+4LShVfTVy LcRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711592573; x=1712197373; 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=pTnAwOa2uvPcM/ekFIY9I6q6Jkplpwwz1KPt6Wpm9+I=; b=rz05bjzRmNI5C3rrQoutXVyw8YQmTHzMkQSbGshWMp8urucmL0pnpk52c6nSvjXt/1 wKZj5UPs8i4wFJdnw6UTvv+OjSms+p1wd6vcioC/LG/ZnySHEuQZvIOTziOzoR9S8+CF y3eVCYT76SYOFdg2TTYSBwMVJFgxO8tcKdTjfp/fzYCbNhCxmdNuoNhHMYZJrgO4gjv3 xcEPYHcp2kfoT9u57+US67zG9HWaPyvgiQG4X7gU4/h0I24xyUf7mVhuIOhRVOF1FxJL lLE5yJCUXvpsEK20L2zfXWroVuNP5i5GCgHb/5kvMS713HPt5BWer0f8SkOJL8KawE/l 0TKQ== X-Forwarded-Encrypted: i=1; AJvYcCUwsWKnHg01GpHlFl286D9IXEtSSeCi/LGG3KgqYhkiAJ2lsE2+cCRH/b2sYogxek6BJm37zN5KziEkkiSKyq8d8zheFg+odddwyAoKftsPORZnDULQXL6VBpXEGr72vLIpoxlvWlq+drX+wL73OhdwzwkZOpR0hJ35ZT0u3vsXBWOno575UoQb X-Gm-Message-State: AOJu0Yz/PGUekI5YRR2/6YSYkaOaQHIXa4QMQkpn4JM4SoaUSQOg2+cu g3kfAIlD9LpexhqYJRXctyuE9UD3D8hUzWNkHDnKzPT8eEx4rl84 X-Google-Smtp-Source: AGHT+IHyluQj3/cCpsmHi5qOqzz/QMCSs1jG33c9hrW1m6MP1TsWwfE6CQM9fOkeDUivtVwLq6k/8A== X-Received: by 2002:a05:6a00:4b4a:b0:6ea:c634:ca0f with SMTP id kr10-20020a056a004b4a00b006eac634ca0fmr1790243pfb.21.1711592573087; Wed, 27 Mar 2024 19:22:53 -0700 (PDT) Received: from peter-bmc.dhcpserver.bu9bmc.local (2001-b400-e355-7eb0-17c6-c47d-d4ee-f9e8.emome-ip6.hinet.net. [2001:b400:e355:7eb0:17c6:c47d:d4ee:f9e8]) by smtp.gmail.com with ESMTPSA id d25-20020aa78699000000b006ea858ea901sm229256pfo.210.2024.03.27.19.22.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 19:22:52 -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 v6 4/4] drivers: watchdog: ast2500 and ast2600 support bootstatus Date: Thu, 28 Mar 2024 10:22:31 +0800 Message-Id: <20240328022231.3649741-5-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240328022231.3649741-1-peteryin.openbmc@gmail.com> References: <20240328022231.3649741-1-peteryin.openbmc@gmail.com> Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index b4773a6aaf8c..0e7ef860cbdc 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; @@ -77,11 +79,19 @@ MODULE_DEVICE_TABLE(of, aspeed_wdt_of_table); #define WDT_TIMEOUT_STATUS 0x10 #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_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 +340,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 +474,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);