From patchwork Mon Oct 21 06:39:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taewan Kim X-Patchwork-Id: 13843619 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 A7892D3C53F for ; Mon, 21 Oct 2024 06:41:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:References:Content-Type: Content-Transfer-Encoding:MIME-Version:In-Reply-To:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=y1rVAAUbL4XZfrYkt5r90v9JFxYMUZqPCTcgm/yJbCM=; b=eXKMtrwIJyAM7Nof6w16vkol5q DbndkTEgxcjbbFbxPntTnvvVHTd+++kDG3rOHmXAYb9oYVfqiOPEJ4p+7DUY6y5etIbFEtEH9mogo 4ZMBK4//mJbUnDBXKT4MAhe4Yf+pn22vywF3S61Kj8IvSwXriBL+1VnFE0Jda6vpVyzBIp297gShc 7xEK1g6zibpc0R8la4xudY02u1gi9upv15mrhpCBfkB2S6HRa/hl4Y2fW6l+c6mIRbdBEvfkVWgD+ 1mE0wsUCBzluM8zOXxXBZ+vPPG6wBHG6BVzWrRIAw3mhBxKyyrRJqjkZEtyvtxY83dUU+nxj7dIfF ccbaAzsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2m6Q-00000006Ebz-3aht; Mon, 21 Oct 2024 06:41:18 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2m4v-00000006ELy-1iKg for linux-arm-kernel@lists.infradead.org; Mon, 21 Oct 2024 06:39:48 +0000 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20241021063939epoutp038cc4fe3b979329a910fc853d2535365d~AZIUWHG3_0779407794epoutp03L for ; Mon, 21 Oct 2024 06:39:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20241021063939epoutp038cc4fe3b979329a910fc853d2535365d~AZIUWHG3_0779407794epoutp03L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1729492779; bh=y1rVAAUbL4XZfrYkt5r90v9JFxYMUZqPCTcgm/yJbCM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fdMzb7Z/l70wqGdlAjIsM/uBh/g7TMZMhzVCsycqFwfgKZR2aNf/FpX2jJrvjZsz4 T8OHdZJhaPBEu6hRaMc1g/MSKyuQoZYym8T8TvebrZ6IQGYQt/X/zyJiuaZqk2BpDD GpcUCc4IDAVSl1gM+A9IewXV4CBR8nK3pBty5vFI= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20241021063939epcas2p253d4fd6e3af9b6310857b0d4cb72570a~AZIT3Hiyh2063720637epcas2p29; Mon, 21 Oct 2024 06:39:39 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.36.68]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4XX5JV3X2Tz4x9QD; Mon, 21 Oct 2024 06:39:38 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id DC.57.09770.A27F5176; Mon, 21 Oct 2024 15:39:38 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20241021063938epcas2p22e0a9f4f869237ceadf4f2035778bfc7~AZIS4FlqH2063720637epcas2p24; Mon, 21 Oct 2024 06:39:38 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20241021063938epsmtrp1eaa5da4c43b8b32e0b92f7a621cf634a~AZIS3NkOs1158811588epsmtrp1T; Mon, 21 Oct 2024 06:39:38 +0000 (GMT) X-AuditID: b6c32a46-00dfa7000000262a-11-6715f72a8699 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 28.99.08229.927F5176; Mon, 21 Oct 2024 15:39:37 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.55]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20241021063937epsmtip261c9eb531f2414339874f3626022d22d~AZISoWHWN1927319273epsmtip2V; Mon, 21 Oct 2024 06:39:37 +0000 (GMT) From: Taewan Kim To: Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar Cc: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Byoungtae Cho , Taewan Kim , Krzysztof Kozlowski Subject: [PATCH v3 2/3] watchdog: s3c2410_wdt: add support for exynosautov920 SoC Date: Mon, 21 Oct 2024 15:39:02 +0900 Message-ID: <20241021063903.793166-3-trunixs.kim@samsung.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241021063903.793166-1-trunixs.kim@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBJsWRmVeSWpSXmKPExsWy7bCmua7Wd9F0g/W7pS0ezN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1vVzb+dd3HCDP/SkZqa5hlTNhIfm+3faMR3UF6lvT5g9f3nQkj3Ox986mQUrvXlzRlH0 F1sqp+WONbf9b4a4aD5XX9w74dTs73nt+mYy7+wElFiKMxINtZiLihMBSIxYWgcDAAA= X-CMS-MailID: 20241021063938epcas2p22e0a9f4f869237ceadf4f2035778bfc7 X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20241021063938epcas2p22e0a9f4f869237ceadf4f2035778bfc7 References: <20241021063903.793166-1-trunixs.kim@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241020_233945_939564_14ABD3F0 X-CRM114-Status: GOOD ( 20.07 ) 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 From: Byoungtae Cho Adds the compatibles and drvdata for the ExynosAuto V920 SoC. This SoC is almost similar to ExynosAutoV9, but some CPU configurations are quite different, so it should be added. Plus it also support DBGACK like as GS101 SoC. Signed-off-by: Byoungtae Cho Signed-off-by: Taewan Kim Reviewed-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck --- drivers/watchdog/s3c2410_wdt.c | 37 +++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index 686cf544d0ae..aa128099c47d 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -63,6 +63,10 @@ #define EXYNOS850_CLUSTER1_NONCPU_INT_EN 0x1644 #define EXYNOSAUTOV9_CLUSTER1_NONCPU_OUT 0x1520 #define EXYNOSAUTOV9_CLUSTER1_NONCPU_INT_EN 0x1544 +#define EXYNOSAUTOV920_CLUSTER0_NONCPU_OUT 0x1420 +#define EXYNOSAUTOV920_CLUSTER0_NONCPU_INT_EN 0x1444 +#define EXYNOSAUTOV920_CLUSTER1_NONCPU_OUT 0x1720 +#define EXYNOSAUTOV920_CLUSTER1_NONCPU_INT_EN 0x1744 #define EXYNOS850_CLUSTER0_WDTRESET_BIT 24 #define EXYNOS850_CLUSTER1_WDTRESET_BIT 23 @@ -303,6 +307,32 @@ static const struct s3c2410_wdt_variant drv_data_gs101_cl1 = { QUIRK_HAS_DBGACK_BIT, }; +static const struct s3c2410_wdt_variant drv_data_exynosautov920_cl0 = { + .mask_reset_reg = EXYNOSAUTOV920_CLUSTER0_NONCPU_INT_EN, + .mask_bit = 2, + .mask_reset_inv = true, + .rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET, + .rst_stat_bit = EXYNOSAUTOV9_CLUSTER0_WDTRESET_BIT, + .cnt_en_reg = EXYNOSAUTOV920_CLUSTER0_NONCPU_OUT, + .cnt_en_bit = 7, + .quirks = QUIRK_HAS_WTCLRINT_REG | QUIRK_HAS_PMU_MASK_RESET | + QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_CNT_EN | + QUIRK_HAS_DBGACK_BIT, +}; + +static const struct s3c2410_wdt_variant drv_data_exynosautov920_cl1 = { + .mask_reset_reg = EXYNOSAUTOV920_CLUSTER1_NONCPU_INT_EN, + .mask_bit = 2, + .mask_reset_inv = true, + .rst_stat_reg = EXYNOS5_RST_STAT_REG_OFFSET, + .rst_stat_bit = EXYNOSAUTOV9_CLUSTER1_WDTRESET_BIT, + .cnt_en_reg = EXYNOSAUTOV920_CLUSTER1_NONCPU_OUT, + .cnt_en_bit = 7, + .quirks = QUIRK_HAS_WTCLRINT_REG | QUIRK_HAS_PMU_MASK_RESET | + QUIRK_HAS_PMU_RST_STAT | QUIRK_HAS_PMU_CNT_EN | + QUIRK_HAS_DBGACK_BIT, +}; + static const struct of_device_id s3c2410_wdt_match[] = { { .compatible = "google,gs101-wdt", .data = &drv_data_gs101_cl0 }, @@ -320,6 +350,8 @@ static const struct of_device_id s3c2410_wdt_match[] = { .data = &drv_data_exynos850_cl0 }, { .compatible = "samsung,exynosautov9-wdt", .data = &drv_data_exynosautov9_cl0 }, + { .compatible = "samsung,exynosautov920-wdt", + .data = &drv_data_exynosautov920_cl0 }, {}, }; MODULE_DEVICE_TABLE(of, s3c2410_wdt_match); @@ -643,7 +675,8 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev, struct s3c2410_wdt *wdt) /* Choose Exynos850/ExynosAutov9 driver data w.r.t. cluster index */ if (variant == &drv_data_exynos850_cl0 || variant == &drv_data_exynosautov9_cl0 || - variant == &drv_data_gs101_cl0) { + variant == &drv_data_gs101_cl0 || + variant == &drv_data_exynosautov920_cl0) { u32 index; int err; @@ -662,6 +695,8 @@ s3c2410_get_wdt_drv_data(struct platform_device *pdev, struct s3c2410_wdt *wdt) variant = &drv_data_exynosautov9_cl1; else if (variant == &drv_data_gs101_cl0) variant = &drv_data_gs101_cl1; + else if (variant == &drv_data_exynosautov920_cl0) + variant = &drv_data_exynosautov920_cl1; break; default: return dev_err_probe(dev, -EINVAL, "wrong cluster index: %u\n", index);