From patchwork Wed Mar 27 08:53:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Yin X-Patchwork-Id: 1916583 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Ul5/AHCX; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4L7L3Hkhz1yYM for ; Wed, 27 Mar 2024 19:53:50 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Ul5/AHCX; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4V4L7L2H82z3dX5 for ; Wed, 27 Mar 2024 19:53:50 +1100 (AEDT) X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Ul5/AHCX; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::529; helo=mail-pg1-x529.google.com; envelope-from=peteryin.openbmc@gmail.com; receiver=lists.ozlabs.org) Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4V4L7C0dGbz3cGK for ; Wed, 27 Mar 2024 19:53:42 +1100 (AEDT) Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-5e152c757a5so3335609a12.2 for ; Wed, 27 Mar 2024 01:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711529620; x=1712134420; darn=lists.ozlabs.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=Ul5/AHCXLNr4UEEW4WtJ46aOIcKI4w3qBP5ZiVAJhxdDZHf1ih26y82z1sQBkXyyEn B9HVETAFxsi5X7GhlLqCmZ9DM21+zU7kAG4sPZNwR3+fvvymUiIP4hDp4PJvwVeCR/LC 36x8FTTT0eY861lB9mHVvLifVgBv9E2Wv1x0F4jOyr6HvGrEXio0kXLgpr2Dn/L3r/JC c4LeyKmK7JQydjeUumfzOn4T3eTZmbZaIXOoQ4fdwfT2yOus3D6D3tGw6UwbkdmWdtxC DtVC9DKVp94OhsA78nOuKGHL+bw181rj+HrJRY3rgZwWKVs51mx4NGLe4FNIUqu2VZlu 1t0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711529620; x=1712134420; 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=bMmRsxHUR703GPmKH0c8T9AF9Dbt6LOk48QxRAD9tqx4M/rMArXkHnGIsrEoV8xMwv mpSo2HCH8mOSnA1JRQOOMkmvjizUxJ9sr+spZ/1HC+Y0JF3PvZ4CXl461UZEL6V4l9jL 4d/KD00cSNnINV3AuZgNQimyx4JHGE2beB55NFYsNg8L5tS3fDdCyqAIWujMsn+AZZ7Z 26xR6ZMZPVrfaSpCgceVQ4iXO3eol79s9v0O9DQTZcNB+Egx13D+3cQEeXWyCDNGzFv/ u0yt7N+BTZYIi0MI/E1hWqsk+7KvSgnAnbzHWUrWe9C7BFJOzQ9Ep7+++ZnDZhGGge6P 5p4Q== X-Forwarded-Encrypted: i=1; AJvYcCWGYN1S8cJ59xgflOvs487VL1exgtoAyUMuIfkxNaVJsBC+JueaGeK4kUpbc8barbcwwVZ70VukYrWO73GWtN2eS+CQhc7b1qoKFb523A== X-Gm-Message-State: AOJu0Yz42/9h/nWAaEd6UZMdLvS8KDr4ZPfTLsUy6k+2EuCUnzpmdvMT ogvFjXjzLiSGOF9r2q5BEGAeZZptOJi4PQs24euycx9Ob9v09PPE X-Google-Smtp-Source: AGHT+IGb/Tw3XGNhOyfvK3yRw4V3NFMG20lg3pc2PVS38GELaklkOPObegfstg6VozJB2qusMOgTAw== X-Received: by 2002:a05:6a20:c888:b0:1a1:87c7:2d03 with SMTP id hb8-20020a056a20c88800b001a187c72d03mr2484994pzb.33.1711529620366; Wed, 27 Mar 2024 01:53:40 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 01:53: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 v4 1/4] ARM: dts: aspeed: Add the AST2500 WDT with SCU register Date: Wed, 27 Mar 2024 16:53:27 +0800 Message-Id: <20240327085330.3281697-2-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240327085330.3281697-1-peteryin.openbmc@gmail.com> References: <20240327085330.3281697-1-peteryin.openbmc@gmail.com> MIME-Version: 1.0 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" 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 Wed Mar 27 08:53: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: 1916584 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=NdImYuNd; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4L7Q5rvWz1yYM for ; Wed, 27 Mar 2024 19:53:54 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=NdImYuNd; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4V4L7Q4pXLz3dW2 for ; Wed, 27 Mar 2024 19:53:54 +1100 (AEDT) X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=NdImYuNd; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::636; helo=mail-pl1-x636.google.com; envelope-from=peteryin.openbmc@gmail.com; receiver=lists.ozlabs.org) Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4V4L7H2J0Xz3dwr for ; Wed, 27 Mar 2024 19:53:47 +1100 (AEDT) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1dffa5e3f2dso42335905ad.2 for ; Wed, 27 Mar 2024 01:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711529625; x=1712134425; darn=lists.ozlabs.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=NdImYuNdGNrD3X87KPzhDJjWvM/HRSKHieFPrnWALfLEyyYrXGEL4Au4UfOSGOQAtb +EO4uC4I8m2W0XxwYjN1Q9eR7kcZgww2Wl59mQwRv6sVJuYxscT/FGun/imv9g8zGTnl xxOYSlCV7DnuJdh/04wzclWYZrDcO0AgdKL0LZQmPGkeoiT9fH78mLteHjd+uP2gtEfn Jr1tvLKJlHxxExuhzulKD/SR/KcxeuuOavlO0WAGJmOnopCx5Us4RtX8WM8eX6t4SR53 vaTmO67YwPvLlJN4Rdi6SUtgE5H9rptffY1XJt5sBTSLa3wmtm9QsUYcyZbTyoSG5o8l ++Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711529625; x=1712134425; 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=ihlXfC/tADodDyIGQStKP4l5HwCe2ME4vvLYhkdN0CJZ0UQcUjAThLAEKj1i3Bx7i3 Oq5t9HyC1NzzmwIY45Kss7pqEJMuFIfHK1kjihPtqYBXVSSO9U9De5Vtvh0pPhMncNo/ s1U0pQQB7Ed5q7WzoTo98oLIZnj3aP4z/KcP6+ma/FdQDVrX0Ve2LX4cJt+L0VpXCEx2 k2huNdfKw1kAMs3pb3rRsKGySnur/6BMyGQhe2D4vT3P52lIKyM+rcF7kKRsha5GpqSL 6+a/qlaWO46WO7/KttEDJb+7Pxa/mxs+CCfFg0tyVuQlfpgwgTGWUcu26VZJlFYbtsBM 8RnA== X-Forwarded-Encrypted: i=1; AJvYcCXF2pJ1F2hTWc9kpuLlhS/u39jqFjoSGv7ZHevw1p0LS3sSxToEfZdPi7YvkH5KRblZUz7LQYmPNPWW0vJmes5dToeBZ7/VvGRcPNF1Ew== X-Gm-Message-State: AOJu0YwLkDFvUq+wBo2aJrU7HI+weO9qyM7qM8lfwkB3Dm64WDkPGZjn eJQmVpCVKZGFcaNgw9QmWjs2BMWvlYTDiRN0llhTJWfzdqYvk3g5 X-Google-Smtp-Source: AGHT+IHn+z3k+py4UVKTT73n+eHw2Es3sDNz128MEDJ3zzb3n/dn1oWz8gRzbMhU0oCuzm6/uIBFXg== X-Received: by 2002:a17:903:2a8e:b0:1e0:294f:17d3 with SMTP id lv14-20020a1709032a8e00b001e0294f17d3mr660549plb.5.1711529624925; Wed, 27 Mar 2024 01:53:44 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 01:53: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 v4 2/4] ARM: dts: aspeed: Add the AST2600 WDT with SCU register Date: Wed, 27 Mar 2024 16:53:28 +0800 Message-Id: <20240327085330.3281697-3-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240327085330.3281697-1-peteryin.openbmc@gmail.com> References: <20240327085330.3281697-1-peteryin.openbmc@gmail.com> MIME-Version: 1.0 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" 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 Wed Mar 27 08:53: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: 1916585 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=lUZYei26; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4L7W1b2Yz1yYM for ; Wed, 27 Mar 2024 19:53:59 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=lUZYei26; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4V4L7W0XZ8z3dXZ for ; Wed, 27 Mar 2024 19:53:59 +1100 (AEDT) X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=lUZYei26; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::632; helo=mail-pl1-x632.google.com; envelope-from=peteryin.openbmc@gmail.com; receiver=lists.ozlabs.org) Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4V4L7M716Nz3fQH for ; Wed, 27 Mar 2024 19:53:51 +1100 (AEDT) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1dee27acf7aso45724725ad.2 for ; Wed, 27 Mar 2024 01:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711529629; x=1712134429; darn=lists.ozlabs.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=lUZYei26nEbDhwqbKYEx3por+C9aDo1/JNuHA7jUOL7zt0nWD00aVSb3DoC/geZqXz j0SUFKUEzPbLbFUna9eydseNM7ScRqcF8m8Yqi+qhTqphSSGuS/TkgUP6OT3odAtHQVr FZi1N3Dahf66i61Mso6u02Ql+EkpVSRptmR/XvtZRPvsWMINcaktz/nMFwoI4mFam+Bx pHcETN2HJHU5hPtfIjVWiY+rteLl8zqzvlPFVWHJ5xGe5KVGxOzbCLCACGaJOT0zcYG9 jAbW8VWRR8uRoarq0hmZSOXnT+PD1tB45dhH3J3bK0OkiqjxOOKwhCciLUzLwVxuh5C6 LNqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711529629; x=1712134429; 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=MtJTLwaRzeEKYOVD28k+K3jvVR0ZiE2WpEOmV473wtzzv4qdQVW9aleROmAfVKhkQR xnZ01LRwfoDfzc1Da4iFsj98orjOi41iS6qo+62bycIvzzMOXAiHohRxcD5rMlIOtgGU v7mK0XMLbWPCnv2+D44jFMJO7M/BcM2ntQjzM8NvkY6iBmnzZJ+Httw5rInO08/4yKNj hTY4etJs+G9vxG8GW7So2KQ9+SsI5fc8iiZ5m9V4vm/n9CNq8hfhidRo4XxohMu9hksG UYLNxWavpjuZekbHkcrF1I83BisbpKeQ32OVq07/HPQGciHw3l1JcPGVkWDl/cm2RpcY 58KA== X-Forwarded-Encrypted: i=1; AJvYcCWV7x8BvQItbUNh9DPi3DnCCymp/6zHD5Hh23SOpEG7h44lYWkBsXmq/TFI30GUNF/BOOWKNDRRM8gA2v4vfopnPPslow8y+KduSOx9PQ== X-Gm-Message-State: AOJu0YyYnjADTL/AwBYL1cUklGOm2PBUxEF3MOu6tmh+Nkbp5Av5QTNK /Uy8TuBm4JViEyBHjsASyCPhxuUiad3bIyb+46IudRjci6eggABI X-Google-Smtp-Source: AGHT+IHMtf+g4HCFGxUFbq7vGIja15S+RN2FfG532r/JlKdvx3ne3MqOCeZu8bYoa6cKVVkgxKSGoQ== X-Received: by 2002:a17:902:a3c6:b0:1de:e5aa:5ce with SMTP id q6-20020a170902a3c600b001dee5aa05cemr1931176plb.41.1711529629258; Wed, 27 Mar 2024 01:53:49 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 01:53: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 v4 3/4] dt-bindings: watchdog: aspeed-wdt: Add aspeed,scu Date: Wed, 27 Mar 2024 16:53:29 +0800 Message-Id: <20240327085330.3281697-4-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240327085330.3281697-1-peteryin.openbmc@gmail.com> References: <20240327085330.3281697-1-peteryin.openbmc@gmail.com> MIME-Version: 1.0 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" 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 Wed Mar 27 08:53: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: 1916586 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=FesTdBRf; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4L7b4fffz1yYM for ; Wed, 27 Mar 2024 19:54:03 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=FesTdBRf; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4V4L7b3dpdz3dh2 for ; Wed, 27 Mar 2024 19:54:03 +1100 (AEDT) X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=FesTdBRf; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::632; helo=mail-pl1-x632.google.com; envelope-from=peteryin.openbmc@gmail.com; receiver=lists.ozlabs.org) Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4V4L7Q6YJ1z3dwG for ; Wed, 27 Mar 2024 19:53:54 +1100 (AEDT) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1def3340682so53590795ad.1 for ; Wed, 27 Mar 2024 01:53:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711529633; x=1712134433; darn=lists.ozlabs.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=QZEbTSOw9EjuXuuOhzMwhOK0HhVADXjRmiePaMQf/CY=; b=FesTdBRf9j7jIlqdAt0dLO4oCFo/7icA1QxuL9Cc3kRcl4qOmANFqEMJq4/ZCmNW78 FaBFGr+SyC9F4faZ/r1aGYuoY2/+b7JpQ2CmmQUVfyM0ltSON1DTK00xRlnZTrmJjxHS OPjpSJZLuV9GJYAOGAnMyJPmHsLOSDUtgM9ri/GqMa81jF5tHU8m1CFS/P78wnaNQHiV eAjIn+agYPdjYAhojeCpfcXfuEuCKmiFQCawzcbVQ1TBa+kDtOTAirDilO9524cc2Mtb 1ZuA513k3m5caTypq3jbvLUvteyKpGHhAlF/Nu1QpqQk61nZ1jptbWNbixprBdlvkFO4 Cdmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711529633; x=1712134433; 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=QZEbTSOw9EjuXuuOhzMwhOK0HhVADXjRmiePaMQf/CY=; b=Y28TCXZUFLmHHCDERkKkHrRJd3pj2PHtMyxeOHVyYq3e0HuCVbVmgFzw9KYfQ7GW7R o7exjmXM3neUG9lCuxXc7wZZDYo3nqYgjm0eddmLTa9DJWicqEzwTvuJueDvzk/HRo7v W0QTCDEh95SN650P2G8cE6aNTrZ76u0+TnNlUqrnfsutYmxwPdjx16DmFFnMqaOBnvur S0ZcoOrfNz81Pt5H4kPa+7uCNnJFECz8Hd17ApugYBx0jnZR4vdNZoZ9AhtajsAlKB+2 +CPKo60DEmQ0okXJsxRoVAbYwgdZ6V0owZ45EyCrqridiwsWzm0NV91F4C0pkN78l5lx LZ8w== X-Forwarded-Encrypted: i=1; AJvYcCW0K7pDyhKVR7wx5B/VsAIcPKg9kBghU/5cNQ4+GRyeaUDVyZSoiASDPT6/mHSbYxTvXX+pS/lGMkAE5JaGxirPi7772h/Uj8qi06L4Bg== X-Gm-Message-State: AOJu0YwIcbSmEg9Fwa1KODJMp6D2O6990j48m0vyZCTfFXMmv1hb0nc1 2xFkUT1yUofv0p6+6PbRoq/CCuvJ4DFlRe8uASsfh5SzPx+gUmhK X-Google-Smtp-Source: AGHT+IFlw6rOiGuhTJ4vNythc7vqhRqSyiMQo9PeosfY33Phf1K75pTfq+88EaBWSjn9tJXb1tX3pQ== X-Received: by 2002:a17:902:c94a:b0:1e0:acb1:7977 with SMTP id i10-20020a170902c94a00b001e0acb17977mr785333pla.49.1711529633261; Wed, 27 Mar 2024 01:53:53 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 01:53: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 v4 4/4] drivers: watchdog: ast2500 and ast2600 support bootstatus Date: Wed, 27 Mar 2024 16:53:30 +0800 Message-Id: <20240327085330.3281697-5-peteryin.openbmc@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240327085330.3281697-1-peteryin.openbmc@gmail.com> References: <20240327085330.3281697-1-peteryin.openbmc@gmail.com> MIME-Version: 1.0 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" 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 | 60 +++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 16 deletions(-) diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index b4773a6aaf8c..29e9afdee619 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: @@ -330,6 +341,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 +475,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);