[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <046e10babcdd391a012d160fed35d8f4d3a42ddc.camel@icenowy.me>
Date: Sat, 23 Aug 2025 13:45:42 +0800
From: Icenowy Zheng <uwu@...nowy.me>
To: Drew Fustini <fustini@...nel.org>
Cc: Guo Ren <guoren@...nel.org>, Fu Wei <wefu@...hat.com>, Rob Herring
<robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Han Gao <rabenda.cn@...il.com>, Yao Zi
<ziyao@...root.org>, linux-riscv@...ts.infradead.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] riscv: dts: thead: th1520: add soft PWM fan for
Lichee Pi 4A
在 2025-08-22星期五的 14:32 -0700,Drew Fustini写道:
> On Sat, Aug 16, 2025 at 05:32:09PM +0800, Icenowy Zheng wrote:
> > Because of the SoM+Dock design of Lichee Pi 4A, heat dissipation
> > does
> > not work well; fortunately it comes with a fan port with PWM
> > driving
> > capability.
> >
> > As the hardware PWM controller of Lichee Pi 4A isn't ready yet,
> > drive it
> > with pwm-gpio driver (software PWM) now.
> >
> > A long PWM period is used, because not only software PWM is used,
> > but
> > also the fan port is a 2-pin one and fast PWM might confuse the
> > BLDC
> > driver on fans.
> >
> > Signed-off-by: Icenowy Zheng <uwu@...nowy.me>
> > ---
> > .../boot/dts/thead/th1520-lichee-pi-4a.dts | 53
> > +++++++++++++++++++
> > arch/riscv/boot/dts/thead/th1520.dtsi | 2 +-
> > 2 files changed, 54 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts
> > b/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts
> > index 4020c727f09e8..f696db01353c5 100644
> > --- a/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts
> > +++ b/arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts
> > @@ -4,6 +4,7 @@
> > */
> >
> > #include "th1520-lichee-module-4a.dtsi"
> > +#include <dt-bindings/gpio/gpio.h>
> >
> > / {
> > model = "Sipeed Lichee Pi 4A";
> > @@ -28,6 +29,58 @@ aliases {
> > chosen {
> > stdout-path = "serial0:115200n8";
> > };
> > +
> > + gpio_pwm: gpio-pwm {
> > + #pwm-cells = <3>;
> > + compatible = "pwm-gpio";
> > + gpios = <&gpio3 3 GPIO_ACTIVE_HIGH>;
> > + };
>
> I think the node name needs to be 'pwm' instead of 'gpio-pwm' as
> dtbs_check
> warns that:
Sounds reasonable, although 'pwm' seems to be too generic.
But the recommended names below looks quite generic too... Is it just
some copy-pasta?
Well, maybe just take 'pwm' or 'pwm-0' now?
>
> gpio-pwm: $nodename:0: 'gpio-pwm' does not match '^pwm(@.*|-([0-
> 9]|[1-9][0-9]+))?$'
> from schema $id: http://devicetree.org/schemas/pwm/pwm-gpio.yaml#
>
> Thanks,
> Drew
Powered by blists - more mailing lists