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: Peter Yin X-Patchwork-Id: 13607880 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (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 39EF5225CF; Thu, 28 Mar 2024 01:33:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711589594; cv=none; b=JoFipMu0dv0N0z7UBnzXa7eM7H1bHnHTpi4E9hTvaJPDRblg3SsSgGSz+FP1HmgPDBkSk8zZKKK66KpQGed7zYj+gA3q/F1iyCUUb8/BOSwyYKdjL3NfqPxutpOlBFdTj3SE+awDOzumSq/eXJCZTSl5xBt46i4F7lUDi6ZlZYY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711589594; c=relaxed/simple; bh=i2IRRjTZyiYex34MyWLMNAUhtzs5XV3CN9xcafzB4wU=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MYQl6T/QcJPW/envCHOg8nVv7klyTX+PYV2RE7AOLS58rhWsPiVrmu+qnj1SgiuDZmGE1TGwu3ZhYWi7z7pA8++CXlDHTBuve43EErHg2Z6BvvjyDVheOmUxDZxSWT6n4qNNb+4cfFta0ohIdhaCZpJAr85bQEB4995OnloIo20= 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=gRHZ6TVB; arc=none smtp.client-ip=209.85.214.171 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="gRHZ6TVB" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1e00d1e13a2so3748945ad.0; Wed, 27 Mar 2024 18:33:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711589592; x=1712194392; 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=gRHZ6TVBC32AqngKpSBAmeBN4YXw0AXhjJ3JFMhjr62cDDsy6AZ69B+6SknklAyc+x TId8TmTVh0r9uuh2aEzuXtZnqU91ENtaW/yzgeCepardkjC6vj1BKGiI8j5UEjiULtFO bwk1QE+zJTi0qNnL8yggu3TDeS5k+e7GEEjEBdeJcmZ/lCZ6i87/5MqAWOrM+DyDJuey n79YjMnN3xnSUrmWMOoOYra17jgySaapYYXcb7+GqhTYysleE0Gc9+1Tt5giiGfftAk+ ojyorc2FX+lLQ8ZZ1x3QuH7zfNkoQKvep0jazNbIVCepycIxlNx0xWZdE0NulfMOAMWJ EK5A== 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=CTWZcd/tfgf53QRSFnQ0rYC3JWr9jvqe1qlKzqpmP/e0QENNC+5+jy5cT+OklqYslJ YqDZx2U+iQln9kpG4ipWRH/lGmrqilOl6hsO6V9q0b4pz+dSSeKAe5bUYGoUGaElh3ZJ 5sHCGO6ZyuRJvvreIQx2u68amGVFIgPyLruijdLUCCPSbl6UEo5xBiWz2tQRhPbfBeNy VZn5HA9/gOphsAMB3xFHRxyXQ6vAxKJwv4uDOYC2CtwpiQy0j8UQA0u/foM11Duy3SFp DglJqoLiAHlkrmkzP2FN0gxjcB8ENnXZq45iztA44DG8kRQXxS5tRkDeREM2kcX/qRUh 0RxA== X-Forwarded-Encrypted: i=1; AJvYcCWa5DSFbIv29/rLIbNtmo/EsTk8qOpSCc1OZGmlgcfZIBgCX16bnJwsM+ho+NVN5BsOccfxHd+WX9FnA2m9qu+6mXpGQbxe5dg+IIasohZ2PQu/W/XbULgu+qJe28GF/zew6sZKhl/mXBtrGZb4uiZ17DbqN8fmRTqcpsuc57IUujf74A68KAd/ X-Gm-Message-State: AOJu0YyYd1wE/Ktu78Dx44fi0F6Sm4tOeJ7Ohj1Vzi+cU/B8ib6rRTKp pNM0X7wsmYzBP+48Wb72+gnF6nSDTkMyFtCKSdSIeOJX3Iyrvx7m 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> 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 01:33:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Yin X-Patchwork-Id: 13607881 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (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 029272554B; Thu, 28 Mar 2024 01:33:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711589598; cv=none; b=k/m+rbCQt2ljlXXZTmEK7DN8MXRF7+ECvpg6w7G3sGzwWlVWbDQzrQ0ok6dR3K9+eYEEfFaEB04pZfIdXda5cUoQQmajGbtDg9jM9f6CiZlkIpltaJibNBD3lGlfl7/E4GRaM0Z1RNH2M2haQbY4kdMJ5pj6Kr+xB7G3kpn4/uA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711589598; c=relaxed/simple; bh=YDcNcquXcHWCPOuOTYjyhuADwug6LeexFaOD5IjWu+I=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gCt9LxusrUv1DOD/HVvQWKp6pWkrfDD7Yov+ej+kqE+ff1OJhwDjdx4N9LaqxFYDI3J6AlVa4HCjo9sOfMZnch4GKYgYmUz54zg6GT4r181Z5Any5UlaQxbpzLw1ZUv7r0ZlYUon8khyXiAUXZA1ly+gdMap1qPru/L85lxG6/c= 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=e9Y/M/tU; arc=none smtp.client-ip=209.85.214.170 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="e9Y/M/tU" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1e00d1e13acso3554905ad.0; Wed, 27 Mar 2024 18:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711589596; x=1712194396; 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=e9Y/M/tUfjbn5quw3FZIDGzYB6Fa5GGq8dri7zRHcfjiDlr0QcOHU8i30f0Wvq3qVR SUrlhj2Qgvc42/lJLzGBNiW3ytpKry1cGk2IxIPUjyfb/L9TQK8ME70ssg6yxJsYbuf4 OZlWZOHFNJAScZmObvthcdCUNXJ0MDQfEOmT47NQ5e1bhV44uvCXehFltQDGRAqDNr+h xMb0h+Ra2pnVxsfRYRhS43MK2IHxQIbHnYQOwkS42XO2AB6UKTfkrO/boVHtqkOcLHeh SIXi0Zr9lfFKeZ9enGP2eZIi0E2V/0MRTG5Ow+VaCyjNnjAcrkXs3+qeollnGt94h8iF yaFg== 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=TDTE7wRMWd5xJQeBRnx668C0SUN7GvrK17ywwh8GMBfeZM3gA3y9XaS1/wTakpaZVj 9SHyx6yBj2PypYWmA0xovtPROPdyrPoQ4hJ6HK0E90JLqucwkPA73WIqUiRwP0KbOrHu 7I5uKnqu70KB7C3yFdl9qRmu0WZaHrTOcBYCyj9nx+Y/Dp9mmVGQ/BG06CICpBXc8qWz g4gEGetmDnUKIIl/onYGweSxjqD4qw80YypvJkGdoS/xjAoOQW/QKnTfdYnfu4Os8OZZ TAgHmaKTiTJAMzDiVwW6d5JubA4PpZEalSD6CIVUi+QxU5fl8n2vfI/r/yNxqMcXn7Un olaQ== X-Forwarded-Encrypted: i=1; AJvYcCUZUGnryW6Doh/1k5MbAiWMhdBLe197MpiZvSmxdYSAl4gW9hUHI8n04+1TmboAfjfadieXiY1XGaopcoxd0FOGwXxjtRNoJcjL8FT7viyAtHJ8F7deLTvoc+R9U4GgMriM+aDGntfZQSH9aUyya+WiANCfDeRU10B+KMTS4QnWOyG3oH2dcmOC X-Gm-Message-State: AOJu0YwVfvLT6Ly9k+dV8j3y0qoGBb0O2qm3DrWeM7PlJImxQUIRtTBl n/u4VyJw9xYqxuGfyTDNcK69Ev3vU4+IlEcjuPBn8aLhCR6nhrV1 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> 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 01:33:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Yin X-Patchwork-Id: 13607882 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 DB4F52557F; Thu, 28 Mar 2024 01:33:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711589602; cv=none; b=oWHx1ZRxhhkzsHR/9aHwRRtFrqR5S6x5rejIBpPQ9/ww2uKXED9vcx9UQLMJgRxO/UMSsQhMua2NoIo+UBI7BUNAToEywTmjLjM0UrY7mLOEr868IXOJ4s6zOPP8F+/7ceyheEawiGq833uh2DjCZDRKFj/WHIGjSizRB85bTv8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711589602; c=relaxed/simple; bh=uZfnDGW6R8YxxzhmPXNOoQ4C6Vi6QB/c1rE2mdl1BHU=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PG4OADJWirGCwOjkFH0Ki0WjRNrVAav2up/PNs3SwTy2Zpp6dDEmsXSjjfZJnZONrZcx516Z1EjJyBEkdkpGG3mZXJUC7KclE7JX77zyfoIaW67hkb4F6zQfhrPckBoUr/9aqtndtrJK4srSTYNVDXmz13I0dYidSQX9eFM4OW4= 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=IdoJWqQb; arc=none smtp.client-ip=209.85.214.175 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="IdoJWqQb" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1e00d1e13acso3555335ad.0; 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=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=IdoJWqQb2n1RKzmSjnqk7C2nfyKh1bwpDFCFdtVKRNoaerPhs+pfu7nufPgTQa4P0C omrI85WiDq/GwBnllDxXrHdmzfZ1SOC+X6vTga9n/Q1N79pufZYn2DOkiO1EtrcqETyh M17p/Vq+7fjnWkvlTZYXw0nnp4WrvrHg85JgBo+ZX1lFTfqQAtcHoXEvPLmmO2kDobad fQZbDu3A64DWc7Y/SdceMD4mQcadKmWauYghENm3sOD7dJYt0MMdZvvSVjrW9ea3cJJq nUshl1thUFaZmyLeS8aAaaAKHphQDu0QXuer8woZHD3UYhlAP8rfZH5NAjjaGP9bm8MM X7Yw== 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=CJOjPD3gX6aws0JXcj5goAFLG7ynKGC6TdyGQ469fuzjnv41mausdPKUYholYKn1oZ 4iOir3ZnAiNwhHVabZuqPZTDJs+a3naoAFK9Xnsm1w0yMw9p1A90sauFI3b2Xb3OW+or Vh+yko6/lZMs1ED+xGBSsLgdQEnKAGZDEIbu6ZqW4ROzG7q5hyR/ttgGO0pbuAc40LKq VJje5BE290pA5Gf8BgKlNBOMT2M9KJlTHqNoU/4Akp8dyFX5EAmKf/kkd3ZIaINJJ9Li eNhqRvzqAJqmXP/BZZjKoArK2pVGyTFppKhCKqLSPrsT93d6bUoLXxu0BEaXbLniE3ox 3U2Q== X-Forwarded-Encrypted: i=1; AJvYcCXI6O/Yo5TfrzYiwCUjNH4MAY3nTVUDdYYC3wBNHs0uhEYjwUn3yZw9ZBbRi29OcDilQ5iodhgttX/vHLh0AM90dbhsGvjrPoa+e9vPo9MwymAvK48rlPEgBUaKEsAXwOYXYRa4KitRKlKZjZpfZnreE7M/J92GLCZl1TJPBKeJRwGV8AcfrY9T X-Gm-Message-State: AOJu0YwV658ip2UOjMFWB7XuCRKg4vHkL3EjCud0rvoSJBwlBPadD75H lVUP86zyqJlcnIKqaCq9HB5P2lad8TPVHNxRWKtd8er9RX/tvze4 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> 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 01:33:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Yin X-Patchwork-Id: 13607883 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 95524208DA; Thu, 28 Mar 2024 01:33:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711589607; cv=none; b=JLeMsstzNc+8GQbtGpGreH/sm6FrZh6kOnGQHTavmncsFxl2rhVPmS9O8ONK9XeZOhZULXeyy9uyP+fcZsU3Sg50hTIEDvp/nZyfU085/A3KqkEFfdtbU12j0yc+jid64B77FK2PHd9XayCQubyYk1ENJpFLrzCWCmrM6gUNJyg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711589607; c=relaxed/simple; bh=e6LmR+kcXCwdJyinw0c4KFjrt9Hcyg2W04CBm0MAL98=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lQCmhW6nv6my63e6sTO4Nzovk7eM57nljYvUq4qZVIK77J7HlCGp9+DN92YSd1L1dwh+7cRLYzjIEjNKzmR9PqdfOUXR2FprWBF8DaSkZF+T6KryPiI3nTTpiGAttswZzrgtupqf/LyBHYc7R9UHkAddlHfYdGXV2I50Yppamvo= 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=g5LBGQ2h; arc=none smtp.client-ip=209.85.214.177 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="g5LBGQ2h" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1e0bfc42783so4312125ad.0; 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=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=G0IynxA3JbozA3TAjnZstACddkpz8hoX6OU7xoU+2fw=; b=g5LBGQ2hbTsfaVuTZbsjdgM2Ol2VGbVU+9qzcchBq9TLOCZr0PvIrcFR5YSZNp30BH ECT7P9RWvi5d/ow3xY5VDAgp4SvLAM1yNG0w/+YCZ5Lj/sZdHnayogwhTGNEcG/wO3EO IDQiBaic+uIs9Y/KcJuR01VyHQb0IORw6lbQJ/oxEKBORY15l8ixKrBSRcX2VitdGBUu XlgD33VI49FQSApY9NUwDqf2mmsUuy2NT1NrPkdzwi2Bc1lQOPGZH3iJF2MyuhVpXvT5 X7dBYrv7mfV9MON03uj0MErAU/CZTcmufHJRL1jbmEpE3No3aS9y5MNOfbrHBDtPp2pj COpQ== 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=QvzNAskWlHqNnSo2MtAWULJvw7Pq01w0C8nr6OrSPlju5mWUvIYm5UZ/oGsJDcg7F2 9jrhJAoXLWmNA3pGvO5B/+JYoqIFhiVRm6VkXWEmmVMXEDClhdIDgYO0VLxuytB4P5dd 1ATVyswNCP6hqrKlch+zxOf9poExO1jPyqF//iFnz3nevphwezcUsmK+O2znTCY+7jNA sAug6SAlgkH2k7Sg3jZpQ7FFOoPY+QuhAU+fbBetWNALlnVMwGaH9SQA9g/hOwEBzSsm PQote36hR1yjGQI29Ze14IdSnOL7Y3BgrA26/LW5rmPcnz7Wm2gDwh9MH7NzJ/glYipJ Zk2g== X-Forwarded-Encrypted: i=1; AJvYcCXGaWvYL5Zh+5h1/OFhGfBj3CI/jMDE+se+sFFIQd/ncTa3vzFWTsP+gIvuoM1FFpFVa564bdEDKBgPsMAn/28KtOngXMqC1x07YPCVSr+kcPnHnw3iRcFIUss1ZkvT7aytzksvKVqRF9RKuR0Zg81m2ieYLiSxJdN/i7alCpHpYlNNUhLIQZMR X-Gm-Message-State: AOJu0Yx5obrgJ7juDaox8yVCH3HJAMCIHh+zVkJfvTp4PFZ2EUhVAxZj sVKC/qIVdIYeFkV4HRInT5zAMr1T58OC+37UQgOkE9/tsYtLHlLg 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> 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 | 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);