Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Tomasz Maciej Nowak <tmn505@gmail.com>
To: Aaron Kling <webgeek1234@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: tegra: Enable PWM fan on the Jetson TX1 Devkit
Date: Tue, 22 Apr 2025 18:19:41 +0200	[thread overview]
Message-ID: <03de9272-dbcc-4473-a267-c3a32e3fd844@gmail.com> (raw)
In-Reply-To: <CALHNRZ-1wY2D4FOauh7tD+2QKBfhtfdJcvpV_B9Y0tEpE1kTVA@mail.gmail.com>

W dniu 22.04.2025 o 17:58, Aaron Kling pisze:
> On Tue, Apr 22, 2025 at 9:52 AM Tomasz Maciej Nowak <tmn505@gmail.com> wrote:
>>
>> Hi.
>>
>> W dniu 21.04.2025 o 00:42, Aaron Kling via B4 Relay pisze:
>>> From: Aaron Kling <webgeek1234@gmail.com>
>>>
>>> This is based on 6f78a94, which enabled added the fan and thermal zones
>>> for the Jetson Nano Devkit. The fan and thermal characteristics of the
>>> two devkits are similar, so usng the same configuration.
>>
>> Does this work on Your DevKit? Doesn't on mine, the fan won't budge. Maybe the
>> revision difference? What I'm using ATM is [1] and [2]. Because inverted polarity
>> of PWM, not submitted since that'll need the driver changes [3],[4].
> 
> I would have sworn I verified this before sending it in. I've had the
> patches for some time. But you are correct, this does not work as-is.
> Maybe I lost something cleaning up for submission or just plain
> misremembered the verification. I will send a v2 once I've fixed and
> verified. Apologies to the list for the bad submission.
> 
> For inverted polarity, listing them backwards already has precedence
> in mainline, see the Banana Pi R3 dt. This makes me want to double
> check the existing Nano pwm-fan entry in mainline, though. Cause I
> thought all the t210 devices were the same in regards to pwm fan
> inversion. And it doesn't have reversed entries.

That Banana Pi R3 reverse levels look ugly, but if it's permitted I'm not against.

I would assume they fixed that in Nano, since PWM controller doesn't implement
inverted polarity in hardware. Looking at Switch [5] it seems the TX1 DevKit was
used for developing, since they replicated the issue.

5. https://github.com/fail0verflow/switch-linux/commit/b23e8b89081415f2a63bc625db041c8092e2a8a2
  > 
> Sincerely,
> Aaron Kling
> 
>>
>> 1. https://github.com/tmn505/linux/commit/a78c520ec94aeab2c9dc8e1f46597c4174ff957d
>> 2. https://github.com/tmn505/linux/commit/99beee4f0cd5d3a6f30e1829d823c11cb8b54bac
>> 3. https://libera.irclog.whitequark.org/tegra/2024-07-19#36707118;
>> 4. https://libera.irclog.whitequark.org/tegra/2024-10-14#37145211;
>>
>> Regards
>>
>>>
>>> Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
>>> ---
>>>  arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 60 ++++++++++++++++++++++++++
>>>  1 file changed, 60 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
>>> index 83ed6ac2a8d8f403fb588edce83dc401065c162f..bc02f2eb14bcbd99627c58b398bbf43061c8110b 100644
>>> --- a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
>>> +++ b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
>>> @@ -1623,6 +1623,14 @@ key-volume-up {
>>>               };
>>>       };
>>>
>>> +     fan: pwm-fan {
>>> +             compatible = "pwm-fan";
>>> +             pwms = <&pwm 3 45334>;
>>> +
>>> +             cooling-levels = <0 64 128 255>;
>>> +             #cooling-cells = <2>;
>>> +     };
>>> +
>>>       vdd_sys_mux: regulator-vdd-sys-mux {
>>>               compatible = "regulator-fixed";
>>>               regulator-name = "VDD_SYS_MUX";
>>> @@ -1778,4 +1786,56 @@ vdd_usb_vbus_otg: regulator-vdd-usb-vbus-otg {
>>>               enable-active-high;
>>>               vin-supply = <&vdd_5v0_sys>;
>>>       };
>>> +
>>> +     thermal-zones {
>>> +             cpu-thermal {
>>> +                     trips {
>>> +                             cpu_trip_critical: critical {
>>> +                                     temperature = <96500>;
>>> +                                     hysteresis = <0>;
>>> +                                     type = "critical";
>>> +                             };
>>> +
>>> +                             cpu_trip_hot: hot {
>>> +                                     temperature = <70000>;
>>> +                                     hysteresis = <2000>;
>>> +                                     type = "hot";
>>> +                             };
>>> +
>>> +                             cpu_trip_active: active {
>>> +                                     temperature = <50000>;
>>> +                                     hysteresis = <2000>;
>>> +                                     type = "active";
>>> +                             };
>>> +
>>> +                             cpu_trip_passive: passive {
>>> +                                     temperature = <30000>;
>>> +                                     hysteresis = <2000>;
>>> +                                     type = "passive";
>>> +                             };
>>> +                     };
>>> +
>>> +                     cooling-maps {
>>> +                             cpu-critical {
>>> +                                     cooling-device = <&fan 3 3>;
>>> +                                     trip = <&cpu_trip_critical>;
>>> +                             };
>>> +
>>> +                             cpu-hot {
>>> +                                     cooling-device = <&fan 2 2>;
>>> +                                     trip = <&cpu_trip_hot>;
>>> +                             };
>>> +
>>> +                             cpu-active {
>>> +                                     cooling-device = <&fan 1 1>;
>>> +                                     trip = <&cpu_trip_active>;
>>> +                             };
>>> +
>>> +                             cpu-passive {
>>> +                                     cooling-device = <&fan 0 0>;
>>> +                                     trip = <&cpu_trip_passive>;
>>> +                             };
>>> +                     };
>>> +             };
>>> +     };
>>>  };
>>>
>>> ---
>>> base-commit: 9c32cda43eb78f78c73aee4aa344b777714e259b
>>> change-id: 20250420-tx1-therm-9fb3c30fa43f
>>>
>>> Best regards,
>> --
>> TMN
>>

-- 
TMN


  reply	other threads:[~2025-04-22 16:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-20 22:42 [PATCH] arm64: tegra: Enable PWM fan on the Jetson TX1 Devkit Aaron Kling via B4 Relay
2025-04-21 15:07 ` Rob Herring (Arm)
2025-04-22 14:52 ` Tomasz Maciej Nowak
2025-04-22 15:58   ` Aaron Kling
2025-04-22 16:19     ` Tomasz Maciej Nowak [this message]
2025-04-23  4:31       ` Aaron Kling
2025-04-23 13:21         ` Tomasz Maciej Nowak
2025-05-01 22:31           ` Aaron Kling

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=03de9272-dbcc-4473-a267-c3a32e3fd844@gmail.com \
    --to=tmn505@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=webgeek1234@gmail.com \
    /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