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: PeterYin X-Patchwork-Id: 13607944 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 2AA3FC54E67 for ; Thu, 28 Mar 2024 03: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=Tl0OwssgOWBl8hCIxl4KV08LzvlhP3dIj2BYvCFp/Sw=; b=xE18VGYjltDYOG rtA1WEHaT6JJ/1Ksn0i46y+91K3Mbe1TOvKMIJ5jRmkmd3aK0KO/uP+wUsWQ8OuQxIOd6IGoltQHB DZ4Mrh33kmQko+eMNaebDdwh9Zg8fphlwS1COKfkgQMm8K3edXyzemdSlIjn3+glxxkbsyml/c87c DWwoSHX/1+kxKFqtnaZt61JBAeTnv0a0iN0ju4OwsBZ4neR8UMPoNxgS6hqhGwb8YNcd1ADIsDRwE FMcAmffPUmXew0v3Yj11nywux1ewA5QiU2Fmfbo9fQ3jAxPNvSeka5mdOY1Vvwcc/NQq2bm+LM6j2 HrWY6sPTb1AAIupoVmkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpgWD-0000000CHaq-1UiP; Thu, 28 Mar 2024 03:33:33 +0000 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpfPh-0000000C56s-2KIX for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2024 02:22:46 +0000 Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3bbbc6e51d0so312571b6e.3 for ; 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=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=kY5RQa2saL6OgoSS+8ZTSAiegQh4rDIyjadtwywPhe6TXx1KkbamoKHdaSOstIWiBO kH5ryFgea0B/SRH6LObINI+0NeBcf/PT3csdMsPZypUHWErBseChIYrWys5xcja/3AW8 rM6SkphU1GjhG3PNntfRWMAGDSQKkOR5XZAYmMHdt/cytpmC9XmuJU/UmSkykJ/lRR0g XgttmLR50nftjGzU+0hjugcPBLw2ZYSB8qbEWGrV8HRu3JRMY5GJOfLw/ZCrNWERUeZW tBcZX8cN/b4R99I3WADsQtqoJQF1hcnhOubncpekAYuq+yHCapMphYjmNaukTtWcls+/ yXYA== 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=tEkiPg/elHsxKt0ptLd7BhjtJhUVcto4e7vh/doPmuk7/VtmDjvnFU6dtOC3m0CsZl L7g5uab2/aQ+O9pcxFZG8c9AoWM8xM9sMmbexjhsMnV1d7CL9Sn+BzePillQmQEy5o8t JFROHUzozJZgHRft4qWHL30BVDTxc5iHMpv6nNr3kbQXlaMsWJnv/jvhYv7kTWKNfoxs vNhK1QsWtZfuUSESdv/8zFuo8EJ97cRkWTG/gN3OFzJ89DK3UWBMcHURrif8sG5SO/dK 8iL/JcK2ipk7mcD+Emuq+TgOFQr0rGWUC+TQLonLpHTn/DCvSpGrdyOnIsfzrMuKuZL1 P2NQ== X-Forwarded-Encrypted: i=1; AJvYcCUk0m99dQb67fJSXalcOKzJNKLSKhO9h5pyGNv3/3YKE/T7SLPvtYsq/GM89yU0bG8vAvD9JC+XxRuc56ufhEntFyC8bTWrKox18rnMDQpQ99cbJrg= X-Gm-Message-State: AOJu0Yzyh99vzJ7GT3AAzNMNB+q6tkahDeTK5+ki/7j1RzvSok+noCSR 0J26kkboEnqavAVuBjR5+UqbIHFZGyjN69j7kkzTq1qrr/XY8qPu 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240327_192245_608358_7AA3DD21 X-CRM114-Status: GOOD ( 10.78 ) 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 02:22:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PeterYin X-Patchwork-Id: 13607921 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 6FC1AC47DD9 for ; Thu, 28 Mar 2024 02:23:11 +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=r7nr3bBYqRlXz0 j0qFqeFlA3SQRS0pJWwaO/Cr/AM86Nhr7bY2uUdUOMNS3b0A3bS4c9HNeYQH9h2NKRL1Ri2tITO9N B8mhN9pW4geDF0soTaAiv/yTk7EOJmVAelGwncIamgWp5intCp9pE3MEECSYnFHzgkn5k1TpyQ2N/ gmQOnYnvWqvV2wy8y8yR5MgnLEmovp7P/3ZRl2Ra5drI8GTFtP3PqHJRLiyWGezP5AHYq48ND4K8W S5n0JejLmpwazB471BZEC2PtmetQ531SJidFzOZWFpEJyAD7e8jMEMFWBAxRVR+rrAwyR0JpHgCaJ YisshfGLJsdaXPjPRErA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpfPx-0000000C5DX-15OZ; Thu, 28 Mar 2024 02:23:01 +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 1rpfPp-0000000C5Av-0b5Z for linux-arm-kernel@bombadil.infradead.org; Thu, 28 Mar 2024 02:22:53 +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=Xx3yr2hoNJ6Lpr5JXSLRWJKbG3 4AN3DArUyULGMS9143umijUR+gzYnkaZBtQn3fKydJW9fO77WOpRNl0BQWTgLTF/AgstGZjrEQgPF RW6Dm8pIt+kLgyiVaOc0E3K1I98jZBjYmIPeqQfChh93orJnO/2XPeQ602PtAYo33FVvZkeP4lTuw KP85cZ7H7s0M4cGsIQ3UzQWK47Dwbkp3nyWdgubXzb5b8U/rkWcefpvf2rJUGe8p0wGcXocxQS9cV tyfV+O1RZ8ZSFvYoHzBjP8TeKE/jpxDqzJci8Jwkni+dZtNA8+Exg1PlLthZmY9Ak99TzZgI+PbPv NyMmQrqw==; Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpfPk-00000000iTV-1yvt for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2024 02:22:51 +0000 Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-6e6e3eadec8so250006a34.0 for ; Wed, 27 Mar 2024 19:22:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711592565; x=1712197365; 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=brxJeXYo15Qhn3Ydyo1c9mvhyuybcThLadQGAP792YU5IHfFqV1YBQAkaEV+Qs14ox wBmbiaN/PCQBNveUbMBIMYFtaTfi4y3rzMZJ2E7Jk5SXQ+X/eZHeNW4lwMU++Gk+Iai0 GRO9JXtbOrH4mUA9y0t2H8/HbiGtpjGzisSNUu91UHGe6c8SYZalcr0iDyiMfAsh9W1q WCFNjxe3wMgu/juZqeh66vY/db4mAOElZxpLjCLWT+XshywsGdEsmh/EcohClp5zrhr2 SX0BZ/ihd9aRSLvl1lfsQlYtI6IdGBIsZTYdHUbDLchkOzlsP6epWCP8/vEJ3bydZqrV LkLg== 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=G9pbm0i78X3HVOGD3442YBxLvU7sz8ykGSuSHg0ItFv90S7X7Y4sPrp0md56EMo24d iKX78wdTTDuKt1QpAcHU6DN5hYoDrbnp7CIlIvapGs86NTcWbtPLioQPCfFvCKokVl3i to4gAkMR7AhI3LBKucG+/Gy4Xd7wcYZGkdOl3Y3fGhG1kddWAqGLP5s2Gbf0DHaVePGT dGZJR8DOTc1fVAQcW48JKUIOFgtANIYjcNaYc1526+B4LrfvyfC3Yrt53Uw1+MF8HWS3 DEYmA3EJnYd9dSatAZel8aqFu5kh5zQ7YO1KXetNM8Uxf6Y9EXLHEiHDbr55VzlmMDIW zC0g== X-Forwarded-Encrypted: i=1; AJvYcCWJCLU0/80hKbKvPSBagIn5N3KxS/tAEyBsAY4jLU3rwT22L34Y3aMNLeKbdlZIlf9yYDHAUfVP2jRC7fuAKkTWS9F+l4lTHFI0Td3MjOlv3JOAKc4= X-Gm-Message-State: AOJu0YxrbZ4unG15jyD37CcanEXSkHY2131//cFUy61loXGpwkjLZ1rs 6PsSFml2Z47b8e7MkSeRnZLvz+JzbDsu9O13Lv5dTKk6v1VUgyzl 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240328_022248_671776_0BB58EB5 X-CRM114-Status: GOOD ( 10.30 ) 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 02:22:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PeterYin X-Patchwork-Id: 13607923 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 AF466C54E67 for ; Thu, 28 Mar 2024 02:23:17 +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=DntXFUhyluSAIj NOLHqa9d0EVxm43nCvNDe0byNoC7ZLBH63VG2IRpMd3FpjxkDRKYMcEiZYqeVKyy+uwNB+xI+46JN +7mvaLRDTrGLHI7oV9R9MYOU+ekRf4ZSL9mcFxi+nE/HoW75/Vq9a5AtfaVDakXevYos+wRzvSuUX ZD1kiuuRoJZGsieEmYr0hpmhW4OJCif+BXW9BWco7eZKTT6PUFa2wuLXTQk6jFUiwGsuZzbwcznUj Gqg6DtemQ4bJtehKLIbXHdn+bx7ZdZJYnPbxlyLoMhSUNUvm7Sd8ZwIaZcYnQbdETr68uTUkWkOE+ 3lBRqi5vZOj7n6oiq94Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpfPw-0000000C5DP-2giE; Thu, 28 Mar 2024 02:23:00 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpfPn-0000000C59p-0ctG for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2024 02:22:52 +0000 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-6e6bee809b8so513196b3a.1 for ; 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=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=bNFgJRWHmfRL+y4KuKEz8lNKQ+1ogJooCETDTa/nQq2ziFW5QeEJjmdEk2SfJphF/2 BD5MJNzCg0Dogrc4SCdU4O3eFAqZdT1hq6FSsndZ+X0VzJCbqxdOE7HirYUtkXpQqZgN Y443Z7+rMQDYPykT42z1WAwClR+STxWARv2lqUes7K02lvftnl5ShYN6xmYVTrjOM20L ThJHHWf3qHKfexQyq1ZkOQO80FIn1hCzWRbaMFj4pU0ubO3vpOlFbzvlgtVCxb9FlSdr XGJAw2wX55nwGQYEYD/ONE01WleOMw6cPyqtgPE85D1Ms7DMv6BU3W+V/5BNNcRi8Np5 8SkA== 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=xQSe+xXslB9vJ81GG9C5HWqhRJQrEeDYk9xb4ZmCxNnLNYgLq+TpgCvn0Dcuw8Koto UO83INhulA4Q8+7c025HhfzKlq6DrCRtZfF7sB76j6S9Nci4NYdIUKN6ZezwFyFz8zvh CewQ+wgtk25zGesHJdMT3JQS0ia0v5lXTyTnQ7VUmY7w1sN3z6jmkV9mhy1+wYzmN1tV BBqYjdLdlWDIgJ12Y0mkIsZ+zMjiesb/PbpNOWUw63Pp56+GEC2Lr9jV5Mh8+bFW2KNR RXXkXUxUMJxJfm9lmLrk1pbcK10qmBK0khry1/2X7gvboooC7tJueoxL+dOWTT9uXTY+ lB8g== X-Forwarded-Encrypted: i=1; AJvYcCXOniP+iZThvJlsiP5nhi4gJ2X1+qIEDaDMMAZzA7OzLQsbtm6sDdhqGyt7mYYYVy8QRXxJeTKM6zii7RIMT+rCKJZKvrWOxGsNf4vH5CTLRPbOwT8= X-Gm-Message-State: AOJu0Yxqg7XUcFpLaTPY/LnUZf5Hs1wqEgDCvSWPCIZTKmAsrH43Jani QF7eha7IMJWHOQKpCADppiYbzob5rvzBiM1OX/+YBz7odman4e/H 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240327_192251_217918_0711C847 X-CRM114-Status: GOOD ( 11.48 ) 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 02:22:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PeterYin X-Patchwork-Id: 13607922 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 9E924C54E67 for ; Thu, 28 Mar 2024 02:23:14 +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=9KIJcniTzyYF/MmSwa7Yex8bz5kHEPArcD39unNQsEI=; b=kRUtWr3QxdHndT Xk/REejjWYNAALq591tsO72/eR8TBtfV+8TugZuTflwowLy+VU0iWdBwHlIY1WHZHbivGcqC7y9cd edgoFWZN05RGaEagAXicYBr0rS2hgKpBsWa/84X4YuGTEhwtmvqOzjP4aJU4C5Li8edqVapsD8T5r SN1Qvyq2S/P0Auzsyi2N+Dtdbxl6cOb867O52147WNX98sSY8SCW2W9a6MJoquM4RrzQEYy4ZL842 Dd3Pr+jzk02JbxdnKbmyFPyUr/4Pf/1Bp0fxTX/6/R7jbWSdxLoNy39LojqfqoNJlCDCYHvC2jIdq LT2mGKAMgLUvLjnjVqNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpfPx-0000000C5E4-3dsc; Thu, 28 Mar 2024 02:23:01 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpfPr-0000000C5BR-0rly for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2024 02:22:56 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6e6ca2ac094so511400b3a.0 for ; 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=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=pTnAwOa2uvPcM/ekFIY9I6q6Jkplpwwz1KPt6Wpm9+I=; b=FNMW8agABORxlqbyqF4VWOXgndvqkPTPPXRs6Zhxcrr1PjVu7ug4H/+s9ZYsf54Wj7 twGaR1QkVrB4AXibYSBXD5+u9bXQDtlveByEyrhJXGDpUjnw66O/hCyRPIJa7hlWw0+O 1hWI7ONzy1ccvhEn4OtXDGTidb4orMKEaPJlYN10hJbY84R5yk8NhKlGyN+G5dmlhsPp 9xmWW7KSm/5uQJay2ug0tQIRT+81O0s2smZS6RuaLZgQarDZWP69NCE1z1UiqHE8zq5f +F5HoLKPUH6wn/a5FdhYiXuFB8m/xppn1JIkQZS7VDO7GUHHXo1knjINzEnvpX9Ik4v5 KusA== 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=PYv3JhXaoF0QIJ6B3BtmKCqpelMFHOeGinXbZnDH8w6vyz15z2WP5/Cdb9WwHhf3qR Fnk1wUH5A0kr0CR96rxopp9q5dSGKuhUqMsR3RmkzTYUehgJn0YDL1BwNQHqCaMaEsPl 0R2XdWVq+GwK8K23+DXkXpyftazWCUdJtzHpEFsZT4h0FQcOsJFohO158+MsfUEah+io rBKK3CVO9patO/w2R6nJc6ZsXe78TPXm2AVoWxRxzddxFBUgtoRyhi3gaT70qncX5DP9 Eolr2U97k2nQwMsBSDK6eT391xRA0DfDqSYu44QIuVmWoFBPAghd/wC6+ZI5qu/QtOay gFEw== X-Forwarded-Encrypted: i=1; AJvYcCVfADTPU+a86DrGyCbOTgnfnDuYr+MHF56NcDK57DLvf3jsSjdeCpiITzsZ9UJs2GWoL4MeD+TUK/cnpY8VLiSs3vVuV9TP4thrhmHPkdRme9SFRl4= X-Gm-Message-State: AOJu0YwnA2JVcSqlCjZ37X6U9XY/Y2mBRiAAL81oN6f6oURxvavQnE3K rOMuVG9ZGOdSYxuFMr7dKUrF/zywZePmy2e6pm7f6ZZ3GRxV7c32 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240327_192255_294259_27F371C0 X-CRM114-Status: GOOD ( 19.61 ) 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 | 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);