public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Yao Zi <me@ziyao.cc>
To: Hongliang Wang <wanghongliang@loongson.cn>,
	Krzysztof Kozlowski <krzk@kernel.org>
Cc: Binbin Zhou <zhoubinbin@loongson.cn>,
	Andi Shyti <andi.shyti@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
	loongarch@lists.linux.dev
Subject: Re: [PATCH v1 1/2] dt-bindings: i2c: ls2x-i2c: Add clock- related properties
Date: Thu, 9 Apr 2026 15:29:39 +0000	[thread overview]
Message-ID: <adfF4y8_GhtExZMf@pie> (raw)
In-Reply-To: <e10017ce-cda0-5b5e-8cd8-3488aef4cdb0@loongson.cn>

On Thu, Apr 09, 2026 at 08:03:47PM +0800, Hongliang Wang wrote:
> Hi, Krzysztof
> 
> On 2026/3/31 下午3:11, Hongliang Wang wrote:
> > 
> > On 2026/3/30 下午3:23, Krzysztof Kozlowski wrote:
> > > On 30/03/2026 09:18, Hongliang Wang wrote:
> > > > On 2026/3/27 下午2:39, Krzysztof Kozlowski wrote:
> > > > > On 27/03/2026 04:09, Hongliang Wang wrote:
> > > > > > The initial idea was that this patch could be used for
> > > > > > both ACPI and DTS.
> > > > > > > > > The i2c-ls2x driver is compatible with both Loongson 2K and 3A+7A
> > > > > > > > > platform, parse
> > > > > > > > > the same parameters regardless of dts or
> > > > > > > > > acpi parameter passing, So
> > > > > > > > > clock-input
> > > > > > > > > and clock-div attributes are defined to
> > > > > > > > > describe input clock of i2c
> > > > > > > > > controller and
> > > > > > > > > divisor of input clock. It can be used on
> > > > > > > > > both 2K and 3A+7A platform.
> > > > > > > > And you cannot use them in DTS.
> > > > > > OK
> > > > > > > I need to keep guessing what you want to achieve,
> > > > > > > because neither your
> > > > > > > message nor commit text was explicit
> > > > > > What I want to achieve is to describe the input clock
> > > > > > and divisor of I2C
> > > > > > controller
> > > > > Input clocks are defined as clock inputs obviously in DT, not as
> > > > > integers. Bindings need to describe the hardware, so start with that.
> > > > I can describe the hardware in loongson,ls2x-i2c.yaml, and I
> > > > would like to
> > > > confirm with you what final implementation plan you agree to? clock
> > > > framework
> > > > or custom clock-input an clock-div attributes? if clock framework, how
> > > > can it
> > > > also be used for ACPI?
> > > And you ask DT maintainer for that? It's not relevant. You sent DT
> > > bindings patch, so this patch must be correct and we discuss this patch
> > > here.
> > I don't. My idea is that if the clock input attribute can't be used for
> > both
> > dts and acpi, then clock framework will be used for dts and new define
> > attribute
> > will be used for acpi. I will first implement the hardware description
> > and clock
> > framework in Bindings.
> > > Best regards,
> > > Krzysztof
> > 
> > Best regards,
> > Hongliang Wang
> > 
> 
> I have a question, the input clock of i2c controller can be described by
> "clocks",
> but there is no existing attribute can describe the divisor of the input
> clock,

From the description of 7A1000's user manual (section 2.3
"时钟功能描述"), it seems the divider isn't part of the I2C controller,
but instead is an on-chip divider with fixed 1/2 factor, feeding both
"MISC" block (including I2C) and SPI.

> Can I define a new attribute named "clock-div" to describe it in DT
> bindings?
> or do you have any standard solutions for the divisor problem? Thank you.

If these devicetree-based Loongson platforms follow a similar pattern as
the bridge chip, then the divisor shouldn't be described in the I2C
controller node. You may want to include a "fixed-factor-clock" node to
match the hardware.

> Best regards,
> Hongliang Wang
> 
> 
> 

Regards,
Yao Zi

  parent reply	other threads:[~2026-04-09 15:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25  1:18 [PATCH v2 0/2] i2c: ls2x: Add clock- related properties and parsing Hongliang Wang
2026-03-25  1:18 ` [PATCH v1 1/2] dt-bindings: i2c: ls2x-i2c: Add clock- related properties Hongliang Wang
2026-03-25 11:42   ` Krzysztof Kozlowski
2026-03-25 11:43   ` Krzysztof Kozlowski
2026-03-26  2:12     ` Hongliang Wang
2026-03-26  7:02       ` Krzysztof Kozlowski
2026-03-26  7:49         ` Krzysztof Kozlowski
2026-03-26 11:48           ` Hongliang Wang
2026-03-26 12:23             ` Krzysztof Kozlowski
2026-03-27  2:06               ` Hongliang Wang
2026-03-27  3:09           ` Hongliang Wang
2026-03-27  6:39             ` Krzysztof Kozlowski
2026-03-30  7:18               ` Hongliang Wang
2026-03-30  7:23                 ` Krzysztof Kozlowski
2026-03-31  7:11                   ` Hongliang Wang
2026-04-09 12:03                     ` Hongliang Wang
2026-04-09 12:11                       ` Krzysztof Kozlowski
2026-04-09 15:29                       ` Yao Zi [this message]
2026-03-26  7:21       ` Andi Shyti
2026-03-27  2:08         ` Hongliang Wang
2026-03-25  1:18 ` [PATCH v1 2/2] i2c: ls2x: Add clock-input and clock-div properties parsing Hongliang Wang

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=adfF4y8_GhtExZMf@pie \
    --to=me@ziyao.cc \
    --cc=andi.shyti@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=wanghongliang@loongson.cn \
    --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