* [PATCH v2] arm64: dts: renesas: r8a779g3: Add Argon40 fan HAT DTO to Retronix R-Car V4H Sparrow Hawk
@ 2025-09-05 2:00 Marek Vasut
2025-09-05 12:30 ` Wolfram Sang
0 siblings, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2025-09-05 2:00 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Marek Vasut, Conor Dooley, Geert Uytterhoeven,
Krzysztof Kozlowski, Magnus Damm, Rob Herring, devicetree,
linux-renesas-soc
Add DT overlay to bind Argon40 fan HAT, on Retronix R-Car V4H
Sparrow Hawk board. Fan RPM control and full RPM on reboot has
been tested.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
---
NOTE: Depends on series:
https://lore.kernel.org/linux-hwmon/20250904202157.170600-1-marek.vasut+renesas@mailbox.org/
---
V2: - Rename the pwm-fan node to pwm-fan-ext to avoid colission
with existing pwm-fan node in r8a779g3-sparrow-hawk.dts .
There can be two independent blower fans.
---
arch/arm64/boot/dts/renesas/Makefile | 3 +
.../r8a779g3-sparrow-hawk-fan-argon40.dtso | 56 +++++++++++++++++++
2 files changed, 59 insertions(+)
create mode 100644 arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk-fan-argon40.dtso
diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
index bef624636d58b..b2325d1ddf9d3 100644
--- a/arch/arm64/boot/dts/renesas/Makefile
+++ b/arch/arm64/boot/dts/renesas/Makefile
@@ -96,6 +96,9 @@ dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g2-white-hawk-single-ard-audio-da7212.dtb
DTC_FLAGS_r8a779g3-sparrow-hawk += -Wno-spi_bus_bridge
dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g3-sparrow-hawk.dtb
+dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g3-sparrow-hawk-fan-argon40.dtbo
+r8a779g3-sparrow-hawk-fan-argon40-dtbs := r8a779g3-sparrow-hawk.dtb r8a779g3-sparrow-hawk-fan-argon40.dtbo
+dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g3-sparrow-hawk-fan-argon40.dtb
dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g3-sparrow-hawk-fan-pwm.dtbo
r8a779g3-sparrow-hawk-fan-pwm-dtbs := r8a779g3-sparrow-hawk.dtb r8a779g3-sparrow-hawk-fan-pwm.dtbo
dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g3-sparrow-hawk-fan-pwm.dtb
diff --git a/arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk-fan-argon40.dtso b/arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk-fan-argon40.dtso
new file mode 100644
index 0000000000000..f7c144eb63920
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk-fan-argon40.dtso
@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/*
+ * Device Tree Overlay for the Argon40 HAT blower fan in connector CN7
+ * on R-Car V4H ES3.0 Sparrow Hawk board
+ *
+ * Copyright (C) 2025 Marek Vasut <marek.vasut+renesas@mailbox.org>
+ *
+ * Example usage:
+ *
+ * # Localize hwmon sysfs directory that matches the PWM fan,
+ * # enable the PWM fan, and configure the fan speed manually.
+ * r8a779g3-sparrow-hawk$ grep -H . /sys/class/hwmon/hwmon?/name
+ * /sys/class/hwmon/hwmon0/name:sensor1_thermal
+ * /sys/class/hwmon/hwmon1/name:sensor2_thermal
+ * /sys/class/hwmon/hwmon2/name:sensor3_thermal
+ * /sys/class/hwmon/hwmon3/name:sensor4_thermal
+ * /sys/class/hwmon/hwmon4/name:pwmfan
+ * ^ ^^^^^^
+ *
+ * # Select mode 2 , enable fan PWM and regulator and keep them enabled.
+ * # For details, see Linux Documentation/hwmon/pwm-fan.rst
+ * r8a779g3-sparrow-hawk$ echo 2 > /sys/class/hwmon/hwmon4/pwm1_enable
+ *
+ * # Configure PWM fan speed in range 0..255 , 0 is stopped , 255 is full speed .
+ * # Fan speed 101 is about 2/5 of the PWM fan speed:
+ * r8a779g3-sparrow-hawk$ echo 101 > /sys/class/hwmon/hwmon4/pwm1
+ */
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ pwm-fan-ext {
+ compatible = "pwm-fan";
+ #cooling-cells = <2>;
+ /* PWM period: 33us ~= 30 kHz */
+ pwms = <&pwmhat 0 33334 0>;
+ /* Available cooling levels */
+ cooling-levels = <0 50 100 150 200 255>;
+ fan-shutdown-percent = <100>;
+ };
+};
+
+/* Page 31 / IO_CN */
+&i2c3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ clock-frequency = <400000>;
+ status = "okay";
+
+ pwmhat: pwm@1a {
+ compatible = "argon40,fan-hat";
+ reg = <0x1a>;
+ #pwm-cells = <3>;
+ };
+};
--
2.50.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] arm64: dts: renesas: r8a779g3: Add Argon40 fan HAT DTO to Retronix R-Car V4H Sparrow Hawk
2025-09-05 2:00 [PATCH v2] arm64: dts: renesas: r8a779g3: Add Argon40 fan HAT DTO to Retronix R-Car V4H Sparrow Hawk Marek Vasut
@ 2025-09-05 12:30 ` Wolfram Sang
2025-09-05 18:35 ` Marek Vasut
0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2025-09-05 12:30 UTC (permalink / raw)
To: Marek Vasut
Cc: linux-arm-kernel, Conor Dooley, Geert Uytterhoeven,
Krzysztof Kozlowski, Magnus Damm, Rob Herring, devicetree,
linux-renesas-soc
Hi Marek,
On Fri, Sep 05, 2025 at 04:00:57AM +0200, Marek Vasut wrote:
> Add DT overlay to bind Argon40 fan HAT, on Retronix R-Car V4H
> Sparrow Hawk board. Fan RPM control and full RPM on reboot has
> been tested.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Basically works for me as well, so:
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> + * r8a779g3-sparrow-hawk$ grep -H . /sys/class/hwmon/hwmon?/name
> + * /sys/class/hwmon/hwmon0/name:sensor1_thermal
> + * /sys/class/hwmon/hwmon1/name:sensor2_thermal
> + * /sys/class/hwmon/hwmon2/name:sensor3_thermal
> + * /sys/class/hwmon/hwmon3/name:sensor4_thermal
> + * /sys/class/hwmon/hwmon4/name:pwmfan
> + * ^ ^^^^^^
For me, the output looks different, though:
/sys/class/hwmon/hwmon0/name:pwmfan
/sys/class/hwmon/hwmon1/name:sensor1_thermal
/sys/class/hwmon/hwmon2/name:sensor2_thermal
/sys/class/hwmon/hwmon3/name:sensor3_thermal
/sys/class/hwmon/hwmon4/name:sensor4_thermal
/sys/class/hwmon/hwmon5/name:pwmfan
hwmon0 is the Argon, hwmon5 the (unpopulated) on board connector.
I hope the naming is stable, but in any case, the docs need to be
reworked a little, I guess?
Thanks for your work!
Wolfram
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] arm64: dts: renesas: r8a779g3: Add Argon40 fan HAT DTO to Retronix R-Car V4H Sparrow Hawk
2025-09-05 12:30 ` Wolfram Sang
@ 2025-09-05 18:35 ` Marek Vasut
2025-09-05 20:04 ` Wolfram Sang
0 siblings, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2025-09-05 18:35 UTC (permalink / raw)
To: Wolfram Sang, Marek Vasut
Cc: linux-arm-kernel, Conor Dooley, Geert Uytterhoeven,
Krzysztof Kozlowski, Magnus Damm, Rob Herring, devicetree,
linux-renesas-soc
On 9/5/25 2:30 PM, Wolfram Sang wrote:
> Hi Marek,
Hello Wolfram,
>> + * r8a779g3-sparrow-hawk$ grep -H . /sys/class/hwmon/hwmon?/name
>> + * /sys/class/hwmon/hwmon0/name:sensor1_thermal
>> + * /sys/class/hwmon/hwmon1/name:sensor2_thermal
>> + * /sys/class/hwmon/hwmon2/name:sensor3_thermal
>> + * /sys/class/hwmon/hwmon3/name:sensor4_thermal
>> + * /sys/class/hwmon/hwmon4/name:pwmfan
>> + * ^ ^^^^^^
>
> For me, the output looks different, though:
>
> /sys/class/hwmon/hwmon0/name:pwmfan
> /sys/class/hwmon/hwmon1/name:sensor1_thermal
> /sys/class/hwmon/hwmon2/name:sensor2_thermal
> /sys/class/hwmon/hwmon3/name:sensor3_thermal
> /sys/class/hwmon/hwmon4/name:sensor4_thermal
> /sys/class/hwmon/hwmon5/name:pwmfan
>
> hwmon0 is the Argon, hwmon5 the (unpopulated) on board connector.
>
> I hope the naming is stable, but in any case, the docs need to be
> reworked a little, I guess?
The hwmon devices are allocated first come first served, so the list can
look different for you. You need to look up the fan you want to control,
of course. Look up by name is simplest, if there are more fans, it might
be a bit more involved to find the right one.
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] arm64: dts: renesas: r8a779g3: Add Argon40 fan HAT DTO to Retronix R-Car V4H Sparrow Hawk
2025-09-05 18:35 ` Marek Vasut
@ 2025-09-05 20:04 ` Wolfram Sang
2025-09-07 16:14 ` Marek Vasut
0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2025-09-05 20:04 UTC (permalink / raw)
To: Marek Vasut
Cc: Marek Vasut, linux-arm-kernel, Conor Dooley, Geert Uytterhoeven,
Krzysztof Kozlowski, Magnus Damm, Rob Herring, devicetree,
linux-renesas-soc
Hi Marek,
> > > + * r8a779g3-sparrow-hawk$ grep -H . /sys/class/hwmon/hwmon?/name
> > > + * /sys/class/hwmon/hwmon0/name:sensor1_thermal
> > > + * /sys/class/hwmon/hwmon1/name:sensor2_thermal
> > > + * /sys/class/hwmon/hwmon2/name:sensor3_thermal
> > > + * /sys/class/hwmon/hwmon3/name:sensor4_thermal
> > > + * /sys/class/hwmon/hwmon4/name:pwmfan
> > > + * ^ ^^^^^^
> >
> > For me, the output looks different, though:
> >
> > /sys/class/hwmon/hwmon0/name:pwmfan
> > /sys/class/hwmon/hwmon1/name:sensor1_thermal
> > /sys/class/hwmon/hwmon2/name:sensor2_thermal
> > /sys/class/hwmon/hwmon3/name:sensor3_thermal
> > /sys/class/hwmon/hwmon4/name:sensor4_thermal
> > /sys/class/hwmon/hwmon5/name:pwmfan
> >
> > hwmon0 is the Argon, hwmon5 the (unpopulated) on board connector.
> >
> > I hope the naming is stable, but in any case, the docs need to be
> > reworked a little, I guess?
>
> The hwmon devices are allocated first come first served, so the list can
> look different for you. You need to look up the fan you want to control, of
> course. Look up by name is simplest, if there are more fans, it might be a
> bit more involved to find the right one.
Exactly. This is why I would suggest to drop the '^^^^^' line from
above. We definitely have two pwmfans with the above dtso. So finding
the right one needs a second look anyhow. And while I think it is quite
likely that the list of hwmon devices will look the same (I don't see a
race condition which would make hwmon0 and hwmon5 swap), I agree we
shouldn't rely on it. I would also think that we then maybe should
change
echo 2 > /sys/class/hwmon/hwmon4/pwm1_enable
to
echo 2 > /sys/class/hwmon/hwmon<X>/pwm1_enable
or something? What do you think? Just suggestions, I am not really
insisting. Well, maybe, about dropping the "^^^^" line ;)
Happy hacking,
Wolfram
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] arm64: dts: renesas: r8a779g3: Add Argon40 fan HAT DTO to Retronix R-Car V4H Sparrow Hawk
@ 2025-09-06 6:55 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2025-09-06 6:55 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "dtcheck: binding changes may go via different trees"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250905020149.257459-1-marek.vasut+renesas@mailbox.org>
References: <20250905020149.257459-1-marek.vasut+renesas@mailbox.org>
TO: Marek Vasut <marek.vasut+renesas@mailbox.org>
TO: linux-arm-kernel@lists.infradead.org
CC: Marek Vasut <marek.vasut+renesas@mailbox.org>
CC: Conor Dooley <conor+dt@kernel.org>
CC: Geert Uytterhoeven <geert+renesas@glider.be>
CC: Krzysztof Kozlowski <krzk@kernel.org>
CC: Magnus Damm <magnus.damm@gmail.com>
CC: Rob Herring <robh@kernel.org>
CC: devicetree@vger.kernel.org
CC: linux-renesas-soc@vger.kernel.org
Hi Marek,
kernel test robot noticed the following build warnings:
[auto build test WARNING on geert-renesas-devel/next]
[also build test WARNING on kvmarm/next rockchip/for-next shawnguo/for-next soc/for-next linus/master v6.17-rc4 next-20250905]
[cannot apply to arm/for-next arm/fixes arm64/for-next/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Marek-Vasut/arm64-dts-renesas-r8a779g3-Add-Argon40-fan-HAT-DTO-to-Retronix-R-Car-V4H-Sparrow-Hawk/20250905-100249
base: https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git next
patch link: https://lore.kernel.org/r/20250905020149.257459-1-marek.vasut%2Brenesas%40mailbox.org
patch subject: [PATCH v2] arm64: dts: renesas: r8a779g3: Add Argon40 fan HAT DTO to Retronix R-Car V4H Sparrow Hawk
:::::: branch date: 29 hours ago
:::::: commit date: 29 hours ago
config: arm64-randconfig-052-20250906 (https://download.01.org/0day-ci/archive/20250906/202509061432.akteO086-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 8.5.0
dtschema version: 2025.8
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250906/202509061432.akteO086-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202509061432.akteO086-lkp@intel.com/
dtcheck warnings: (new ones prefixed by >>)
>> arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk-fan-argon40.dtb: pwm-fan-ext (pwm-fan): 'fan-shutdown-percent' does not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/hwmon/pwm-fan.yaml#
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] arm64: dts: renesas: r8a779g3: Add Argon40 fan HAT DTO to Retronix R-Car V4H Sparrow Hawk
2025-09-05 20:04 ` Wolfram Sang
@ 2025-09-07 16:14 ` Marek Vasut
0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2025-09-07 16:14 UTC (permalink / raw)
To: Wolfram Sang
Cc: Marek Vasut, linux-arm-kernel, Conor Dooley, Geert Uytterhoeven,
Krzysztof Kozlowski, Magnus Damm, Rob Herring, devicetree,
linux-renesas-soc
On 9/5/25 10:04 PM, Wolfram Sang wrote:
Hello Wolfram,
>>>> + * r8a779g3-sparrow-hawk$ grep -H . /sys/class/hwmon/hwmon?/name
>>>> + * /sys/class/hwmon/hwmon0/name:sensor1_thermal
>>>> + * /sys/class/hwmon/hwmon1/name:sensor2_thermal
>>>> + * /sys/class/hwmon/hwmon2/name:sensor3_thermal
>>>> + * /sys/class/hwmon/hwmon3/name:sensor4_thermal
>>>> + * /sys/class/hwmon/hwmon4/name:pwmfan
>>>> + * ^ ^^^^^^
>>>
>>> For me, the output looks different, though:
>>>
>>> /sys/class/hwmon/hwmon0/name:pwmfan
>>> /sys/class/hwmon/hwmon1/name:sensor1_thermal
>>> /sys/class/hwmon/hwmon2/name:sensor2_thermal
>>> /sys/class/hwmon/hwmon3/name:sensor3_thermal
>>> /sys/class/hwmon/hwmon4/name:sensor4_thermal
>>> /sys/class/hwmon/hwmon5/name:pwmfan
>>>
>>> hwmon0 is the Argon, hwmon5 the (unpopulated) on board connector.
>>>
>>> I hope the naming is stable, but in any case, the docs need to be
>>> reworked a little, I guess?
>>
>> The hwmon devices are allocated first come first served, so the list can
>> look different for you. You need to look up the fan you want to control, of
>> course. Look up by name is simplest, if there are more fans, it might be a
>> bit more involved to find the right one.
>
> Exactly. This is why I would suggest to drop the '^^^^^' line from
> above. We definitely have two pwmfans with the above dtso. So finding
> the right one needs a second look anyhow. And while I think it is quite
> likely that the list of hwmon devices will look the same (I don't see a
> race condition which would make hwmon0 and hwmon5 swap), I agree we
> shouldn't rely on it. I would also think that we then maybe should
> change
>
> echo 2 > /sys/class/hwmon/hwmon4/pwm1_enable
>
> to
>
> echo 2 > /sys/class/hwmon/hwmon<X>/pwm1_enable
>
> or something? What do you think? Just suggestions, I am not really
> insisting. Well, maybe, about dropping the "^^^^" line ;)
I hope the V3 comment will be to your liking , as it addresses this
part. I'll then send separate update for the native fan DTO once we
agree on this wording.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-09-07 16:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-05 2:00 [PATCH v2] arm64: dts: renesas: r8a779g3: Add Argon40 fan HAT DTO to Retronix R-Car V4H Sparrow Hawk Marek Vasut
2025-09-05 12:30 ` Wolfram Sang
2025-09-05 18:35 ` Marek Vasut
2025-09-05 20:04 ` Wolfram Sang
2025-09-07 16:14 ` Marek Vasut
-- strict thread matches above, loose matches on Subject: below --
2025-09-06 6:55 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.