Received: by 2002:a05:7412:b112:b0:f9:3106:f1c0 with SMTP id az18csp67999rdb; Sun, 17 Dec 2023 21:53:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IGC1wveFa2jPUwBD1QL5Gc3Z2rZLqdq3OZ90qylh4RhDf4YGCVMgHOD0h1D8ihDX9metfzn X-Received: by 2002:a17:907:7ba3:b0:a23:58ba:8d95 with SMTP id ne35-20020a1709077ba300b00a2358ba8d95mr464259ejc.155.1702878797594; Sun, 17 Dec 2023 21:53:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702878797; cv=none; d=google.com; s=arc-20160816; b=d1tcs7j6H9+Tb25Z4e69+PFG0zpq1dEWVAD4q0RwsG/zREfpJStJinN79Nmih7+E7t G5FCeEMh4UhcTDcLnoY6clVDYX4zhrOnYs4aAk6F4WbfgFlrxg9TlK0zVtOFyGU1y9nr VZRjJ/jk+4GDBl9TUOlVbTX7IwozCdWTaTmvo31Oql1fUODVSbd+uFnXlQppILnLMh2j t3To+IOZ97m7EqmR/gvNFdaAntmt3gRfLOnztRu3SNqvLIUyHnVNJ9bwr5eBWPA6V8JW svd1DhnioD7ncDXHer4Zkd+f0LmKrJGD6lbqa/U/6G/lcNaJcS3YMcreDRGZX4BCwiXu dxPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=JrzhM+SOzNMpJTYeWD3zrq9UbfY7YKswmK004bAhnjE=; fh=Gzi24qqLFgrq8vRIBLYURGEAGWATSJQ2sCJzMY1V5uw=; b=mEaqz2vFgS5To6Ywv6fAdiLNC3VHCeeGVykXjJiwvLDrg0EcuokDJIdpcpc9OO39Ki wFhwfkdsASfZPQE40Ab6avBuxu/kdMJZu3wqMEK26ZXx+G/BobiSm8TYz8eD/f7kTL9h os9CfVPO1JeEjSJCyvWd+FN2/UvXhsSyebvGzLM/WMk6WaOIIPMpD+rd6AFJr6D/2Uma Y63/MO88b7aBaFxvsxgxZtsb9CnQZ5HWXMoOKx1eg4Ndwca4UqKT1RBFjlQGqA18SIX6 6NLG6RiCes46qFczMTaHuigiFdml708/VwjHN7GPQ7Ghx8iKDK5qVbZOGM95yApWRmcT 7dSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jffKOK2V; spf=pass (google.com: domain of linux-kernel+bounces-3015-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3015-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id l11-20020a170906078b00b00a2321fdfed1si2212560ejc.952.2023.12.17.21.53.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 21:53:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3015-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jffKOK2V; spf=pass (google.com: domain of linux-kernel+bounces-3015-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3015-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 584741F22750 for ; Mon, 18 Dec 2023 05:53:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D94606AAD; Mon, 18 Dec 2023 05:53:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jffKOK2V" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0EC056FA3; Mon, 18 Dec 2023 05:53:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3CD2C433C7; Mon, 18 Dec 2023 05:53:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702878788; bh=poEh5cZ/XSxXESVgiGQc0+z0JA7uTX6Yt33bDiXj6eA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jffKOK2VFuew5xQxKzNVYzj/N/t8nMhU8eEVGJ1OKgDQpLfxArLG5GrFTnz5fWNsT bqJ17UR4eefIaW//mYcaKsvq0q/gR0iWOxl8RtpqqAN4LTnd6Yp/7Ehza1grVJkJ7o qxUE/q/af94viPTJjJH/ZMKN5UICx141Y6KVTPFtuG71aDw5Kzd/PT4y74VxobPG4a 1MWLSWA/rW7lzUfdlC1RiC1WKwQAucjnyZ9mE09evVFAWa2CL/QwDtNt02wmdHt87o /cCUN0qB/mCGrsKeA0K8UdeghPW0kcOmhcu0wMnNmftRenMeT+dMmjHW/IfS6uOmVu TKHxFMYvtsJkQ== Date: Mon, 18 Dec 2023 13:40:33 +0800 From: Jisheng Zhang To: Jingbao Qiu Cc: a.zummo@towertech.it, alexandre.belloni@bootlin.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor@kernel.org, conor+dt@kernel.org, chao.wei@sophgo.com, unicorn_wang@outlook.com, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dlan@gentoo.org Subject: Re: [PATCH v2 0/3] riscv: rtc: sophgo: add rtc support for CV1800 Message-ID: References: <20231217110952.78784-1-qiujingbao.dlmu@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231217110952.78784-1-qiujingbao.dlmu@gmail.com> On Sun, Dec 17, 2023 at 07:09:49PM +0800, Jingbao Qiu wrote: > This series adds rtc support for Sophgo CV1800. > > Changes since v1 > - fix duplicate names in subject > - using RTC replace RTC controller > - improve the properties of dt-bindings > - using `unevaluatedProperties` replace `additionalProperties` > - dt-bindings passed the test > - using `devm_platform_ioremap_resource()` replace > `platform_get_resource()` and `devm_ioremap_resource()` > - fix random order of the code > - fix wrong wrapping of the `devm_request_irq()` and map the flag with dts > - using devm_clk_get_enabled replace `devm_clk_get()` and > `clk_prepare_enable()` > - fix return style > - add rtc clock calibration function > - use spinlock when write register on read/set time > > Jingbao Qiu (3): > dt-bindings: rtc: sophgo: add RTC support for Sophgo CV1800 series SoC > rtc: sophgo: add rtc support for Sophgo CV1800 SoC > riscv: dts: sophgo: add rtc dt node for CV1800 AFAICT, the rtc subsystem supports not only RTC function but also power/reboot controller, so modeling the rtc subsystem as RTC only doesn't match the HW. I expect a mfd here. > > .../bindings/rtc/sophgo,cv1800-rtc.yaml | 47 ++ > arch/riscv/boot/dts/sophgo/cv1800b.dtsi | 7 + > drivers/rtc/Kconfig | 6 + > drivers/rtc/Makefile | 1 + > drivers/rtc/rtc-cv1800.c | 400 ++++++++++++++++++ > 5 files changed, 461 insertions(+) > create mode 100644 Documentation/devicetree/bindings/rtc/sophgo,cv1800-rtc.yaml > create mode 100644 drivers/rtc/rtc-cv1800.c > > -- > 2.25.1 >