devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Binbin Zhou <zhoubinbin@loongson.cn>
To: Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Huacai Chen <chenhuacai@loongson.cn>,
	WANG Xuerui <kernel@xen0n.name>
Cc: linux-rtc@vger.kernel.org, linux-mips@vger.kernel.org,
	loongarch@lists.linux.dev, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	devicetree@vger.kernel.org, Qing Zhang <zhangqing@loongson.cn>,
	zhaoxiao <zhaoxiao@uniontech.com>,
	keguang.zhang@gmail.com, Binbin Zhou <zhoubinbin@loongson.cn>
Subject: [PATCH V3 0/7] rtc: ls2x: Add support for the Loongson-2K/LS7A RTC
Date: Thu, 13 Apr 2023 15:57:32 +0800	[thread overview]
Message-ID: <cover.1681370153.git.zhoubinbin@loongson.cn> (raw)

Hi all:

The initial DT-base ls2x rtc driver was written by Wang Xuerui, He has
released five versions of patchset before, and all related mail records
are shown below if you are interested:

https://lore.kernel.org/all/?q=ls2x-rtc

In this series of patches, based on the code above, I have added the
following support:

1. Add ACPI-related support, as Loongson-3A5000 + LS7A is now ACPI-base
   by default under LoongArch architecture;
2. Add rtc alarm/walarm related functions.

I have tested on Loongson-3A5000LA+LS7A1000/LS7A2000, Loongson-2K1000LA
and Loongson-2K0500.

BTW:
As LS1X does not support DT, we will merge LS2X and LS1X after keguang
has completed DT support for LS1X.

-------
Changes since v2:
- Rebase on the top of rtc-next.
patch(1/7):
 - The new patch.
patch(2/7):
 - Check patchset with "checkpatch.pl --strict";
 - Drop static inline functions which are used only once, such as
   ls2x_rtc_regs_to_time;
 - Remove the suruct ls2x_rtc_regs and regmap_bulk_xxx() is used to read
   and write rtc registers;
 - Clear the RTC wakeup interrupt manually;
 - Enable the RTC in set_time() and check in read_time();
 - device_get_match_data() is used to get ls2x_pm_offset, for LS2k1000
   has the different value;
 - Remove some inexact CONFIG_ACPI;
 - remove()->remove_new().

Changes since v1:
1. Rebased on top of latest loongarch-next;
2. Add interrupt descriptions to the ls2k and ls7a DTS files to avoid
errors when the driver gets the IRQ number, Thanks to Qing Zhang for
testing;
3. Remove some inexact CONFIG_ACPI.

Thanks.

Binbin Zhou (7):
  dt-bindings: rtc: Subdivision of LS2X RTC compatible
  rtc: Add support for the Loongson-2K/LS7A RTC
  LoongArch: Enable LS2X RTC in loongson3_defconfig
  MIPS: Loongson64: DTS: Add RTC support to LS7A
  MIPS: Loongson: Enable LS2X RTC in loongson3_defconfig
  MIPS: Loongson64: DTS: Add RTC support to Loongson-2K
  MIPS: Loongson: Enable LS2X RTC in loongson2k_defconfig

 .../devicetree/bindings/rtc/trivial-rtc.yaml  |   7 +-
 arch/loongarch/configs/loongson3_defconfig    |   1 +
 .../boot/dts/loongson/loongson64-2k1000.dtsi  |   7 +
 arch/mips/boot/dts/loongson/ls7a-pch.dtsi     |   7 +
 arch/mips/configs/loongson2k_defconfig        |   1 +
 arch/mips/configs/loongson3_defconfig         |   1 +
 drivers/rtc/Kconfig                           |  11 +
 drivers/rtc/Makefile                          |   1 +
 drivers/rtc/rtc-ls2x.c                        | 345 ++++++++++++++++++
 9 files changed, 379 insertions(+), 2 deletions(-)
 create mode 100644 drivers/rtc/rtc-ls2x.c

-- 
2.39.1


             reply	other threads:[~2023-04-13  7:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13  7:57 Binbin Zhou [this message]
2023-04-13  7:57 ` [PATCH V3 1/7] dt-bindings: rtc: Subdivision of LS2X RTC compatible Binbin Zhou
2023-04-16 17:31   ` Krzysztof Kozlowski
2023-04-19  7:12     ` Binbin Zhou
2023-04-19  8:52       ` Krzysztof Kozlowski
2023-04-19  9:38         ` Binbin Zhou
2023-04-13  7:57 ` [PATCH V3 2/7] rtc: Add support for the Loongson-2K/LS7A RTC Binbin Zhou
2023-04-13 18:35   ` kernel test robot
2023-04-16 19:49   ` Alexandre Belloni
2023-05-05  2:28     ` Binbin Zhou
2023-04-13  7:57 ` [PATCH V3 3/7] LoongArch: Enable LS2X RTC in loongson3_defconfig Binbin Zhou
2023-04-13  7:57 ` [PATCH V3 4/7] MIPS: Loongson64: DTS: Add RTC support to LS7A Binbin Zhou
2023-04-13  7:57 ` [PATCH V3 5/7] MIPS: Loongson: Enable LS2X RTC in loongson3_defconfig Binbin Zhou
2023-04-13  7:58 ` [PATCH V3 6/7] MIPS: Loongson64: DTS: Add RTC support to Loongson-2K Binbin Zhou
2023-04-13  7:58 ` [PATCH V3 7/7] MIPS: Loongson: Enable LS2X RTC in loongson2k_defconfig Binbin Zhou
2023-04-16 17:33   ` Krzysztof Kozlowski
2023-04-16 19:51 ` [PATCH V3 0/7] rtc: ls2x: Add support for the Loongson-2K/LS7A RTC Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1681370153.git.zhoubinbin@loongson.cn \
    --to=zhoubinbin@loongson.cn \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=chenhuacai@loongson.cn \
    --cc=devicetree@vger.kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=keguang.zhang@gmail.com \
    --cc=kernel@xen0n.name \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=robh+dt@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=zhangqing@loongson.cn \
    --cc=zhaoxiao@uniontech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).