From patchwork Fri Sep 13 08:03:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taewan Kim X-Patchwork-Id: 13803088 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEB6E1BC9EE for ; Fri, 13 Sep 2024 08:03:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726214634; cv=none; b=WMqgVGOxyTpDPCdlhgJaZu7uh/XR5aHEWs9cC4SJ6A3iwQp0Q7LF3lbMaZQZjW1hBXWpnkJSiqLDJZyYq6YwDvqPaSi0uq8Q8IlR0XK/Y4iruaIQPKpWKIZWzt84lsdCuFzmESV5bHn4sT6mCtQIkXwKEjeEDvSVyAAP4ccTwKQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726214634; c=relaxed/simple; bh=6PINVVeNOi1FFdL0EeeG8KqEqwP2RPH+YzT742JlVTI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:MIME-Version: Content-Type:References; b=UGWCr+Fa+ETSfpOz5uchXN0Deo4M7pvoDiEyJ0vd0f2Iif366dOxJXO/1gasjo7pXvCq0+Vtl+zkc0wrhPyLypUk/GwHdB83+Lr3AYdMxCCdDNAB14lcKkhOWLIRSiL8eMvkZsAAl37Fk7FSWhrMVqSHzGMsJGenEVAr62mzKNY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=Tb7QJdTR; arc=none smtp.client-ip=203.254.224.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="Tb7QJdTR" Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20240913080348epoutp0232e2dd8c6f0d92e6d001ca68872bfd3d~0vw8kmIw01203112031epoutp02t for ; Fri, 13 Sep 2024 08:03:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20240913080348epoutp0232e2dd8c6f0d92e6d001ca68872bfd3d~0vw8kmIw01203112031epoutp02t DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1726214628; bh=3LRTVWYsQXjzzI1/oxcfdZncMermUZ1Aj0HJAMy7vq0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Tb7QJdTRBtpihxbjdAGzs/c2qPbg/EqTk7lpCgFPLkU6VSNEr4I3GzXlK65/ccoiS mV3H4tMl1AwWSTmDHb3FwS6Kp1vGdEKjcUJLN4+RUrbG8t9w/ar2NX8K8DELSlcYD7 3sGZH/GJQKmtKPzxHAQa4MNoRJEw7yogkHefOge0= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20240913080348epcas2p3531d2d05e3f29898b0dbdd41018258b0~0vw8IUOzk1762517625epcas2p3A; Fri, 13 Sep 2024 08:03:48 +0000 (GMT) Received: from epsmgec2p1.samsung.com (unknown [182.195.36.97]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4X4mz75yZqz4x9Py; Fri, 13 Sep 2024 08:03:47 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmgec2p1.samsung.com (Symantec Messaging Gateway) with SMTP id CD.92.08901.3E1F3E66; Fri, 13 Sep 2024 17:03:47 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20240913080347epcas2p4b5694797cff88a22fd815a9de989d20b~0vw7FrBOR1981419814epcas2p40; Fri, 13 Sep 2024 08:03:47 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240913080347epsmtrp25d63db8a4bf1c0d84342eff71eb628db~0vw7E5AqR1974219742epsmtrp2F; Fri, 13 Sep 2024 08:03:47 +0000 (GMT) X-AuditID: b6c32a43-a0fff700000022c5-a9-66e3f1e3d999 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id A2.C7.07567.3E1F3E66; Fri, 13 Sep 2024 17:03:47 +0900 (KST) Received: from localhost.localdomain (unknown [10.229.9.55]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240913080347epsmtip20b87633b581872ad1b638af18d025074~0vw61UmWg0679006790epsmtip2F; Fri, 13 Sep 2024 08:03:47 +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 Subject: [PATCH 2/3] watchdog: s3c2410_wdt: add support for exynosautov920 SoC Date: Fri, 13 Sep 2024 17:03:24 +0900 Message-ID: <20240913080325.3676181-3-trunixs.kim@samsung.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240913080325.3676181-1-trunixs.kim@samsung.com> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLJsWR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5Wn9HRBf+Vjx6NsVmzbbC YM5j/P9/K+c+yjXrn6Gvzj/thOHm340q+44GfQy2TRWrrRO0U7slXnO3u2HeDO9PyWXT4zd9 fjbhdaufjiv/2bZt0RP+fNdoWa/EUpyRaKjFXFScCAC9sDsa+QIAAA== X-CMS-MailID: 20240913080347epcas2p4b5694797cff88a22fd815a9de989d20b X-Msg-Generator: CA X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240913080347epcas2p4b5694797cff88a22fd815a9de989d20b References: <20240913080325.3676181-1-trunixs.kim@samsung.com> 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..c25133348f0e 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_cl1) + variant = &drv_data_exynosautov920_cl1; break; default: return dev_err_probe(dev, -EINVAL, "wrong cluster index: %u\n", index);