From patchwork Tue Sep 12 02:49:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kwanghoon Son X-Patchwork-Id: 13380564 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 9B4F3CA0EC3 for ; Tue, 12 Sep 2023 02:49:42 +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:References:MIME-Version: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:In-Reply-To: List-Owner; bh=7k+vlC+/DU6jWlgiT1UloDmWzFaRvj3DCdFelICqG2U=; b=ACs+0P9FOy2Ip7 uf+Q3yHGh3vIDqTh0OhWi2L1AEYGcvZgbsJjHdzSpIiOpREEPnmBKvLcXIHJ4o1Ad8CA5YiM3UhmO C1wKFLAXino4LvldIM3Ms+gPHdyiBOOX7qEv9as9Uv/f9mK0jSrohqm6q/B4pzTHi51/XOa2HZ0uU zDUQu6C2tLMbj0qUScHuykOkpSytePwK3x89gKIm663luNKcudpA8MhphztLuQDPUJVHkH43DHbjj hTTPxPBNJl9myTpTKItTDEYLe7n5l6MH8UJfrHbQd7+LkuT8XrzVSmnO55kDn9GacYiUR1nQz5Xyb i5LE2ZrWL1GVEZ+HsjOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qftT7-001zLa-2q; Tue, 12 Sep 2023 02:49:38 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qftSx-001zIz-28 for linux-riscv@lists.infradead.org; Tue, 12 Sep 2023 02:49:35 +0000 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230912024919epoutp02ad976e646080a3299e0d10ad5640f446~EBulbnSbh2348423484epoutp02v for ; Tue, 12 Sep 2023 02:49:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230912024919epoutp02ad976e646080a3299e0d10ad5640f446~EBulbnSbh2348423484epoutp02v DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1694486959; bh=J3vjc1MlEpCgHPb593cMs7GqPe/HBS5l1vuBfQvuZz8=; h=From:To:Cc:Subject:Date:References:From; b=lF8cVIF9CoXgKA/xbrPOnXd+41Wi2+m2LDWBNwNcVKhaqpUW0Tl1stsGf/0/JkMZl TFWJKT2o+BWPtj4t5O+JQDNAe2FI93vrnUcXgTzjCSHmzjGw84f7B95QDGcIFpwOyc WwxmuLeVzZ7Szxcnf+593a27+ZEf0fFN1SjXaehM= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20230912024918epcas1p1589fbca8bdfc6c1b60d5043cfca4163a~EBuk9zgfF0386603866epcas1p1e; Tue, 12 Sep 2023 02:49:18 +0000 (GMT) Received: from epsmges1p3.samsung.com (unknown [182.195.36.136]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4Rl7Md4lHtz4x9Q0; Tue, 12 Sep 2023 02:49:17 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id C6.29.09646.DA1DFF46; Tue, 12 Sep 2023 11:49:17 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230912024917epcas1p29a513dcf6019fb7c63275aa0e39b1c71~EBujusJ6v1134811348epcas1p2o; Tue, 12 Sep 2023 02:49:17 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230912024917epsmtrp2b7ecb178a158574f3b41766a81a29bf7~EBujtx6b31886418864epsmtrp2f; Tue, 12 Sep 2023 02:49:17 +0000 (GMT) X-AuditID: b6c32a37-b23ff700000025ae-25-64ffd1ad372b Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 61.A7.08649.DA1DFF46; Tue, 12 Sep 2023 11:49:17 +0900 (KST) Received: from mediaserver.. (unknown [10.113.111.131]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230912024916epsmtip1708e1d09b1c490385c9cbac2943f215a~EBujalbgJ0070800708epsmtip1f; Tue, 12 Sep 2023 02:49:16 +0000 (GMT) From: k.son@samsung.com To: p.zabel@pengutronix.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, jszhang@kernel.org, guoren@kernel.org, wefu@redhat.com, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, inki.dae@samsung.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Kwanghoon Son Subject: [PATCH 0/3] Introduce reset driver for T-HEAD th1520 SoC Date: Tue, 12 Sep 2023 02:49:11 +0000 Message-Id: <20230912024914.3769440-1-k.son@samsung.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLJsWRmVeSWpSXmKPExsWy7bCmru7ai/9TDC63qFps/T2L3WLN3nNM FvOPnGO1eLG3kcVi0v0JLBbNx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lzbrl1vlh46WCA+qfMgTmb52V +CAgx9r/ROeF1TJs2SWB+dsfftzoFJ7IWO46ozr9V6oSS3FGoqEWc1FxIgBp427iAAMAAA== X-CMS-MailID: 20230912024917epcas1p29a513dcf6019fb7c63275aa0e39b1c71 X-Msg-Generator: CA X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230912024917epcas1p29a513dcf6019fb7c63275aa0e39b1c71 References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230911_194928_260926_549510DB X-CRM114-Status: GOOD ( 17.55 ) X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Kwanghoon Son This patchset adds initial support for reset driver. Register information is from vendor kernel [1]. I sent an e-mail to get permission the original author, but there was no answer. So I upload patch since it has GPL license. This patch also can be tested with watchdog simply with ``` watchdog0: watchdog@ffefc30000 { compatible = "snps,dw-wdt"; reg = <0xff 0xefc30000 0x0 0x1000>; interrupts = <24 IRQ_TYPE_LEVEL_HIGH>; clocks = <&osc>; resets = <&rst TH1520_RESET_WDT0>; status = "okay"; }; ``` [1] https://github.com/revyos/thead-kernel.git Changelog: rfc: https://lore.kernel.org/linux-riscv/20230904042559.2322997-1-k.son@samsung.com/ - dt_binding_check - enable reset controller default Kwanghoon Son (3): dt-bindings: reset: Document th1520 reset control reset: Add th1520 reset driver support riscv: dts: Add th1520 reset device tree .../bindings/reset/thead,th1520-reset.yaml | 47 ++++++++ arch/riscv/boot/dts/thead/th1520.dtsi | 8 ++ drivers/reset/Kconfig | 10 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-th1520.c | 109 ++++++++++++++++++ include/dt-bindings/reset/th1520-reset.h | 9 ++ 6 files changed, 184 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/thead,th1520-reset.yaml create mode 100644 drivers/reset/reset-th1520.c create mode 100644 include/dt-bindings/reset/th1520-reset.h