From: Icenowy Zheng <uwu@icenowy.me>
To: Drew Fustini <fustini@kernel.org>
Cc: Guo Ren <guoren@kernel.org>, Fu Wei <wefu@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Han Gao <rabenda.cn@gmail.com>, Yao Zi <ziyao@disroot.org>,
linux-riscv@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] riscv: dts: thead: th1520: add coefficients to the PVT node
Date: Sat, 23 Aug 2025 22:37:13 +0800 [thread overview]
Message-ID: <6ac480db63aff3c59603db16e00b9c7b6580b663.camel@icenowy.me> (raw)
In-Reply-To: <aKjhOuqlQyuLCVEK@x1>
在 2025-08-22星期五的 14:29 -0700,Drew Fustini写道:
> On Sat, Aug 16, 2025 at 05:32:07PM +0800, Icenowy Zheng wrote:
> > The manual of TH1520 contains a set of coefficients a little
> > different
> > to the driver default ones.
> >
> > Add them to the device tree node of PVT.
> >
> > Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
> > ---
> > arch/riscv/boot/dts/thead/th1520.dtsi | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi
> > b/arch/riscv/boot/dts/thead/th1520.dtsi
> > index 03f1d73190499..e9c81bdabed8a 100644
> > --- a/arch/riscv/boot/dts/thead/th1520.dtsi
> > +++ b/arch/riscv/boot/dts/thead/th1520.dtsi
> > @@ -676,6 +676,10 @@ pvt: pvt@fffff4e000 {
> > reg-names = "common", "ts", "pd", "vm";
> > clocks = <&aonsys_clk>;
> > #thermal-sensor-cells = <1>;
> > + moortec,ts-coeff-g = <42740>;
> > + moortec,ts-coeff-h = <220500>;
> > + moortec,ts-coeff-j = <(-160)>;
> > + moortec,ts-coeff-cal5 = <4094>;
> > };
> >
> > gpio@fffff52000 {
> > --
> > 2.50.1
> >
>
> I think moortec,ts-coeff-XXX will need to be rounded to nearest
> multiple
> of 100 as dtbs_check warns that:
>
> pvt@fffff4e000: moortec,ts-coeff-g: 42740 is not a multiple of 100
> from schema $id:
> http://devicetree.org/schemas/hwmon/moortec,mr75203.yaml#
> pvt@fffff4e000: moortec,ts-coeff-j: -160 is not a multiple of 100
> from schema $id:
> http://devicetree.org/schemas/hwmon/moortec,mr75203.yaml#
> pvt@fffff4e000: moortec,ts-coeff-g: 42740 is not a multiple of 100
> from schema $id:
> http://devicetree.org/schemas/hwmon/moortec,mr75203.yaml#
> pvt@fffff4e000: moortec,ts-coeff-j: -160 is not a multiple of 100
> from schema $id:
> http://devicetree.org/schemas/hwmon/moortec,mr75203.yaml#
Then it looks like the binding is to be blamed for not allowing fine
tweak.
>
> Thanks,
> Drew
next prev parent reply other threads:[~2025-08-23 14:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-16 9:32 [PATCH 0/3] Initial thermal management for Lichee Pi 4A board Icenowy Zheng
2025-08-16 9:32 ` [PATCH 1/3] riscv: dts: thead: th1520: add coefficients to the PVT node Icenowy Zheng
2025-08-22 21:29 ` Drew Fustini
2025-08-23 14:37 ` Icenowy Zheng [this message]
2025-08-16 9:32 ` [PATCH 2/3] riscv: dts: thead: th1520: add initial thermal zones Icenowy Zheng
2025-08-16 9:32 ` [PATCH 3/3] riscv: dts: thead: th1520: add soft PWM fan for Lichee Pi 4A Icenowy Zheng
2025-08-16 23:27 ` Drew Fustini
2025-08-22 21:32 ` Drew Fustini
2025-08-23 5:45 ` Icenowy Zheng
2025-08-16 23:40 ` [PATCH 0/3] Initial thermal management for Lichee Pi 4A board Drew Fustini
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=6ac480db63aff3c59603db16e00b9c7b6580b663.camel@icenowy.me \
--to=uwu@icenowy.me \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fustini@kernel.org \
--cc=guoren@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=rabenda.cn@gmail.com \
--cc=robh@kernel.org \
--cc=wefu@redhat.com \
--cc=ziyao@disroot.org \
/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).