From: Conor Dooley <conor@kernel.org>
To: Binbin Zhou <zhoubb.aaron@gmail.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Binbin Zhou <zhoubinbin@loongson.cn>,
Huacai Chen <chenhuacai@loongson.cn>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-rtc@vger.kernel.org,
Xiaochuang Mao <maoxiaochuan@loongson.cn>,
Huacai Chen <chenhuacai@kernel.org>,
Xuerui Wang <kernel@xen0n.name>,
loongarch@lists.linux.dev, devicetree@vger.kernel.org,
linux-mips@vger.kernel.org,
Keguang Zhang <keguang.zhang@gmail.com>
Subject: Re: [PATCH v3 1/3] dt-bindings: rtc: loongson: Correct Loongson-1C interrupts property
Date: Wed, 21 Jan 2026 18:28:54 +0000 [thread overview]
Message-ID: <20260121-sadness-operating-8bffd4250085@spud> (raw)
In-Reply-To: <CAMpQs4Lm1Oq8L+dY8OnseV-NNUoD3+0QjnZATRkmR-sejCKAdA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4255 bytes --]
On Wed, Jan 21, 2026 at 02:52:06PM +0800, Binbin Zhou wrote:
> Hi Conor & Alexandre:
>
> Thanks for your reply.
>
> On Wed, Jan 21, 2026 at 7:39 AM Conor Dooley <conor@kernel.org> wrote:
> >
> > On Tue, Jan 20, 2026 at 11:49:20PM +0100, Alexandre Belloni wrote:
> > > On 20/01/2026 19:24:09+0000, Conor Dooley wrote:
> > > > On Tue, Jan 20, 2026 at 08:50:45AM +0100, Alexandre Belloni wrote:
> > > > > On 19/01/2026 18:24:36+0000, Conor Dooley wrote:
> > > > > > On Sat, Jan 17, 2026 at 10:26:48AM +0800, Binbin Zhou wrote:
> > > > > > > The `interrupts` property indicates an RTC alarm interrupt, which is
> > > > > > > required for RTCs that support the alarm feature, which is not supported
> > > > > > > by the Loongson-1C RTC. We exclude it for a more accurate description.
> > > > > > >
> > > > > > > Changing the `allowed` property is ABI-breaking behavior, but
> > > > > > > throughout the existing Loongson DTS{i}, the description of the RTC
> > > > > > > nodes conforms to the modified bingding rules.
> > > > > >
> > > > > > Right, changing properties is an ABI break, but when following the ABI
> > > > > > would've produced something non-functional, breaking it is not really
> > > > > > relevant.
> > > > >
> > > > >
> > > > > But the HW has the interrupt, the fact that is not functional doesn't
> > > > > mean it isn't there. I thought we should describe the hardware?
> > > >
> > > > Does the hardware have it? My interpretation of the commit message was
> > > > that it didn't have the alarm feature and thus no interrupt? Unless the
> > > > interrupt has some other purpose, in which case yeah we shouldn't accept
> > > > this change and only the new device should permit there being no
> > > > interrupt.
> > >
> > > The datasheet shows the interrupt coming out of the RTC and it has the
> > > proper registers. Why it is not functional is not clear to me.
> >
> > Right.. Perhaps Binbin can explain that then? If the interrupt is
> > actually there then the dts should get fixed instead IMO.
>
> I carefully reviewed the manual again and believe this patch is still necessary.
>
> First, the Loongson-1C RTC does not define the timing interrupt
> register (`TOY_MATCH0_REG`)[1], meaning it lacks hardware support for
I don't understand Chinese, so I'll take your word for it that this
particular model doesn't have this interrupt and that there's no other
interrupt used by the rtc via a different register :) My ack for the
patch remains valid.
Also, I looked at the existing binding again, and there's no ABI break
anyway cos the interrupts property wasn't required in the first place,
so any driver has to be written to permit the absence of an interrupts
property. I think you should remove mention of ABI break from the commit
message, since it's not actually one.
> alarms. Consequently, `interrupts` are also unnecessary.
> The Loongson-2K0300 is different. It defines `TOY_MATCH0_REG`, but due
> to a hardware design flaw, accessing this register causes system
> crashes. Therefore, I must also classify it as lacking alarm support.
This logic also seems fair to me, assuming that this is the only
interrupt that the device has.
> Additionally, in patch-3 [2], I rewrote the alarm logic to decouple
> the `interrupts` property from the alarm feature: I defined
> corresponding workaround bits in `loongson_rtc_config->flags`. This
> should be considered a SoC-specific attribute.
>
> Finally, two thoughts:
> 1. Retain this patch; it is correct for Loongson-1C.
> 2. For Patch-2, still add the `interrupts` property to the
> Loongson-2K0300 RTC node (as it exists in hardware), combined with the
> workaround bit setting in patch-3 to avoid the hardware flaw.
Personally, I think what you've done in patch 2 is okay, since that
interrupt is non-functional.
>
> Would this approach be acceptable?
>
> [1]: https://www.loongson.cn/uploads/images/2022051616223977135.%E9%BE%99%E8%8A%AF1C300%E5%A4%84%E7%90%86%E5%99%A8%E7%94%A8%E6%88%B7%E6%89%8B%E5%86%8C.pdf
> (section 21.2.1)
> [2]: https://lore.kernel.org/linux-rtc/abff68dda2fe6a6601a9e58b31e278d941297fce.1768616276.git.zhoubinbin@loongson.cn/
>
> --
> Thanks.
> Binbin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-01-21 18:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-17 2:26 [PATCH v3 0/3] RTC: Add Loongson-2K0300 support Binbin Zhou
2026-01-17 2:26 ` [PATCH v3 1/3] dt-bindings: rtc: loongson: Correct Loongson-1C interrupts property Binbin Zhou
2026-01-19 18:24 ` Conor Dooley
2026-01-20 7:50 ` Alexandre Belloni
2026-01-20 19:24 ` Conor Dooley
2026-01-20 22:49 ` Alexandre Belloni
2026-01-20 23:39 ` Conor Dooley
2026-01-21 6:52 ` Binbin Zhou
2026-01-21 18:28 ` Conor Dooley [this message]
2026-01-17 2:26 ` [PATCH v3 2/3] dt-bindings: rtc: loongson: Document Loongson-2K0300 compatible Binbin Zhou
2026-01-19 18:21 ` Conor Dooley
2026-01-17 2:26 ` [PATCH v3 3/3] rtc: loongson: Add Loongson-2K0300 support Binbin Zhou
2026-01-30 23:16 ` [PATCH v3 0/3] 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=20260121-sadness-operating-8bffd4250085@spud \
--to=conor@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=keguang.zhang@gmail.com \
--cc=kernel@xen0n.name \
--cc=krzk+dt@kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=maoxiaochuan@loongson.cn \
--cc=robh@kernel.org \
--cc=zhoubb.aaron@gmail.com \
--cc=zhoubinbin@loongson.cn \
/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