From: Piotr Oniszczuk <piotr.oniszczuk@gmail.com>
To: Heiko Stuebner <heiko@sntech.de>, Alexey Charkov <alchark@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Dragan Simic <dsimic@manjaro.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Chen-Yu Tsai <wens@kernel.org>,
Diederik de Haas <didi.debian@cknow.org>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 0/8] RK3588 and Rock 5B dts additions: thermal, OPP and fan
Date: Sun, 7 Jul 2024 20:32:18 +0200 [thread overview]
Message-ID: <503ECE3A-CA1C-43A7-AEB2-C0000A930B3A@gmail.com> (raw)
In-Reply-To: <1E6ED98C-BD49-485D-9FE9-9E7CAEDB4564@gmail.com>
Heiko, Alexey,
After some more tests: is varying fan-speeds working stable for you?
In my case - 1 per few reboots results with board enters state with: constant full speed and no any reaction for cpu temp.
In such state - I need multiple hw poweroffs (remove usb-c plug) to get fan-speeds working again.
When board is such state - all seems to work ok (frequency scaling, etc) except fan is constantly full speed…
Is it varying fan-speed working stable for you?
Maybe my issue is some kernel modules loading race?
> Wiadomość napisana przez Piotr Oniszczuk <piotr.oniszczuk@gmail.com> w dniu 07.07.2024, o godz. 14:37:
>
> Heiko,
> pls see inline
>
>> Wiadomość napisana przez Heiko Stübner <heiko@sntech.de> w dniu 07.07.2024, o godz. 13:11:
>>
>> Hey,
>>
>> Am Sonntag, 7. Juli 2024, 11:39:57 CEST schrieb Piotr Oniszczuk:
>>> Alexey,
>>> I’m playing with this series on rock5c on 6.10-rc6.
>>>
>>> Is code in this series enough to get working pwm-fan on rock5c?
>>> (of course after adding required changes from rokc5b dts to rock5c dts)
>>>
>>> In my case i’m getting constantly full speed of fan on my rock5c.
>>>
>>> hw seems ok as echo 96 > /sys/devices/platform/pwm-fan/hwmon/hwmon0/pwm1 changes fans speed as expected.
>>>
>>> May you pls hint me what i’m missing here?
>>
>> at least on my rock 5 itx patches, I get varying fan-speeds.
>> The fan starts high and then lowers its speed once the cpu-regulators
>> and every is set up.
>
> Ah - ok.
> I verified and it looks there was typo from my side in dts fan stanza :-/
> Now it works as expected :-)
>
> Many thx for your time!
>
>>
>> While I was working on the dts and the cpu-supplies were not yet working,
>> the fan speed stayed high, so maybe check that frequency scaling actually
>> works?
>> And of course you need the thermal map to handle the fan.
>
>>
>> Also of course I don't see a rock5c patch anywhere, so where did that
>> board dts come from?
>
> rock5c is my development: https://gist.github.com/warpme/6b2fa9004d8b28c0e43fa16b0b6595f3
>
>>
>>
>> Heiko
>>
>>>> Wiadomość napisana przez Alexey Charkov <alchark@gmail.com> w dniu 17.06.2024, o godz. 20:28:
>>>>
>>>> This enables thermal monitoring and CPU DVFS on RK3588(s), as well as
>>>> active cooling on Radxa Rock 5B via the provided PWM fan.
>>>>
>>>> Some RK3588 boards use separate regulators to supply CPUs and their
>>>> respective memory interfaces, so this is handled by coupling those
>>>> regulators in affected boards' device trees to ensure that their
>>>> voltage is adjusted in step.
>>>>
>>>> This also enables the built-in thermal sensor (TSADC) for all boards
>>>> that don't currently have it enabled, using the default CRU based
>>>> emergency thermal reset. This default configuration only uses on-SoC
>>>> devices and doesn't rely on any external wiring, thus it should work
>>>> for all devices (tested only on Rock 5B though).
>>>>
>>>> The boards that have TSADC_SHUT signal wired to the PMIC reset line
>>>> can choose to override the default reset logic in favour of GPIO
>>>> driven (PMIC assisted) reset, but in my testing it didn't work on
>>>> Radxa Rock 5B - maybe I'm reading the schematic wrong and it doesn't
>>>> support PMIC assisted reset after all.
>>>>
>>>> Fan control on Rock 5B has been split into two intervals: let it spin
>>>> at the minimum cooling state between 55C and 65C, and then accelerate
>>>> if the system crosses the 65C mark - thanks to Dragan for suggesting.
>>>> This lets some cooling setups with beefier heatsinks and/or larger
>>>> fan fins to stay in the quietest non-zero fan state while still
>>>> gaining potential benefits from the airflow it generates, and
>>>> possibly avoiding noisy speeds altogether for some workloads.
>>>>
>>>> OPPs help actually scale CPU frequencies up and down for both cooling
>>>> and performance - tested on Rock 5B under varied loads. I've dropped
>>>> those OPPs that cause frequency reductions without accompanying decrease
>>>> in CPU voltage, as they don't seem to be adding much benefit in day to
>>>> day use, while the kernel log gets a number of "OPP is inefficient" lines.
>>>>
>>>> Note that this submission doesn't touch the SRAM read margin updates or
>>>> the OPP calibration based on silicon quality which the downstream driver
>>>> does and which were mentioned in [1]. It works as it is (also confirmed by
>>>> Sebastian in his follow-up message [2]), and it is stable in my testing on
>>>> Rock 5B, so it sounds better to merge a simple version first and then
>>>> extend when/if required.
>>>>
>>>> This patch series has been rebased on top of Heiko's recent for-next branch
>>>> with Dragan's patch [3] which rearranges the .dtsi files for per-variant OPPs.
>>>> As a result, it now includes separate CPU OPP tables for RK3588(s) and RK3588j.
>>>>
>>>> GPU OPPs have also been split out to accommodate for the difference in RK3588j.
>>>>
>>>> [1] https://lore.kernel.org/linux-rockchip/CABjd4YzTL=5S7cS8ACNAYVa730WA3iGd5L_wP1Vn9=f83RCORA@mail.gmail.com/
>>>> [2] https://lore.kernel.org/linux-rockchip/pkyne4g2cln27dcdu3jm7bqdqpmd2kwkbguiolmozntjuiajrb@gvq4nupzna4o/
>>>> [3] https://lore.kernel.org/linux-rockchip/9ffedc0e2ca7f167d9d795b2a8f43cb9f56a653b.1717923308.git.dsimic@manjaro.org/
>>>>
>>>> Signed-off-by: Alexey Charkov <alchark@gmail.com>
>>>> ---
>>>> Changes in v5:
>>>> - Rebased against linux-rockchip/for-next with Dragan's .dtsi reshuffling on top
>>>> - Added separate OPP values for RK3588j (these also apply to RK3588m)
>>>> - Separated GPU OPP values for RK3588j (RK3588m ones differ slightly, not included here)
>>>> - Dragan's patch: https://lore.kernel.org/linux-rockchip/9ffedc0e2ca7f167d9d795b2a8f43cb9f56a653b.1717923308.git.dsimic@manjaro.org/
>>>> - Link to v4: https://lore.kernel.org/r/20240506-rk-dts-additions-v4-0-271023ddfd40@gmail.com
>>>>
>>>> Changes in v4:
>>>> - Rebased against linux-rockchip/for-next
>>>> - Reordered DT nodes alphabetically as pointed out by Diederik
>>>> - Moved the TSADC enablement to per-board .dts/.dtsi files
>>>> - Dropped extra "inefficient" OPPs (same voltage - lower frequencies)
>>>> - Dropped second passive cooling trips altogether to keep things simple
>>>> - Added a cooling map for passive GPU cooling (in a separate patch)
>>>> - Link to v3: https://lore.kernel.org/r/20240229-rk-dts-additions-v3-0-6afe8473a631@gmail.com
>>>>
>>>> Changes in v3:
>>>> - Added regulator coupling for EVB1 and QuartzPro64
>>>> - Enabled the TSADC for all boards in .dtsi, not just Rock 5B (thanks ChenYu)
>>>> - Added comments regarding two passive cooling trips in each zone (thanks Dragan)
>>>> - Fixed active cooling map numbering for Radxa Rock 5B (thanks Dragan)
>>>> - Dropped Daniel's Acked-by tag from the Rock 5B fan patch, as there's been quite some
>>>> churn there since the version he acknowledged
>>>> - Link to v2: https://lore.kernel.org/r/20240130-rk-dts-additions-v2-0-c6222c4c78df@gmail.com
>>>>
>>>> Changes in v2:
>>>> - Dropped the rfkill patch which Heiko has already applied
>>>> - Set higher 'polling-delay-passive' (100 instead of 20)
>>>> - Name all cooling maps starting from map0 in each respective zone
>>>> - Drop 'contribution' properties from passive cooling maps
>>>> - Link to v1: https://lore.kernel.org/r/20240125-rk-dts-additions-v1-0-5879275db36f@gmail.com
>>>>
>>>> ---
>>>> Alexey Charkov (8):
>>>> arm64: dts: rockchip: add thermal zones information on RK3588
>>>> arm64: dts: rockchip: enable thermal management on all RK3588 boards
>>>> arm64: dts: rockchip: add passive GPU cooling on RK3588
>>>> arm64: dts: rockchip: enable automatic fan control on Rock 5B
>>>> arm64: dts: rockchip: Add CPU/memory regulator coupling for RK3588
>>>> arm64: dts: rockchip: Add OPP data for CPU cores on RK3588
>>>> arm64: dts: rockchip: Add OPP data for CPU cores on RK3588j
>>>> arm64: dts: rockchip: Split GPU OPPs of RK3588 and RK3588j
>>>>
>>>> .../boot/dts/rockchip/rk3588-armsom-sige7.dts | 4 +
>>>> arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 197 +++++++++++++++++----
>>>> .../dts/rockchip/rk3588-edgeble-neu6a-common.dtsi | 4 +
>>>> arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts | 16 ++
>>>> arch/arm64/boot/dts/rockchip/rk3588-ok3588-c.dts | 4 +
>>>> arch/arm64/boot/dts/rockchip/rk3588-opp.dtsi | 190 ++++++++++++++++++++
>>>> .../arm64/boot/dts/rockchip/rk3588-quartzpro64.dts | 12 ++
>>>> arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 34 +++-
>>>> .../arm64/boot/dts/rockchip/rk3588-toybrick-x0.dts | 4 +
>>>> .../arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi | 4 +
>>>> arch/arm64/boot/dts/rockchip/rk3588.dtsi | 1 +
>>>> arch/arm64/boot/dts/rockchip/rk3588j.dtsi | 141 +++++++++++++++
>>>> arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 4 +
>>>> arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 1 +
>>>> 14 files changed, 577 insertions(+), 39 deletions(-)
>>>> ---
>>>> base-commit: 5cc74606bf40a2bbaccd3e3bb2781f637baebde5
>>>> change-id: 20240124-rk-dts-additions-a6d7b52787b9
>>>>
>>>> Best regards,
next prev parent reply other threads:[~2024-07-07 18:32 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 18:28 [PATCH v5 0/8] RK3588 and Rock 5B dts additions: thermal, OPP and fan Alexey Charkov
2024-06-17 18:28 ` [PATCH v5 1/8] arm64: dts: rockchip: add thermal zones information on RK3588 Alexey Charkov
2024-06-17 18:28 ` [PATCH v5 2/8] arm64: dts: rockchip: enable thermal management on all RK3588 boards Alexey Charkov
2024-06-17 18:28 ` [PATCH v5 3/8] arm64: dts: rockchip: add passive GPU cooling on RK3588 Alexey Charkov
2024-06-17 18:28 ` [PATCH v5 4/8] arm64: dts: rockchip: enable automatic fan control on Rock 5B Alexey Charkov
2024-06-17 18:28 ` [PATCH v5 5/8] arm64: dts: rockchip: Add CPU/memory regulator coupling for RK3588 Alexey Charkov
2024-06-17 18:28 ` [PATCH v5 6/8] arm64: dts: rockchip: Add OPP data for CPU cores on RK3588 Alexey Charkov
2024-06-17 18:28 ` [PATCH v5 7/8] arm64: dts: rockchip: Add OPP data for CPU cores on RK3588j Alexey Charkov
2025-02-11 16:32 ` Quentin Schulz
2025-02-15 18:59 ` Alexey Charkov
2025-02-15 20:30 ` Heiko Stübner
2025-02-15 21:26 ` Dragan Simic
2025-02-16 12:32 ` Alexey Charkov
2025-02-17 16:24 ` Quentin Schulz
2025-03-12 10:15 ` Quentin Schulz
2025-03-12 10:34 ` Dragan Simic
2025-03-13 10:42 ` Dragan Simic
2025-03-13 19:00 ` Heiko Stuebner
2025-03-13 19:43 ` Dragan Simic
2025-03-21 3:37 ` Dragan Simic
2024-06-17 18:28 ` [PATCH v5 8/8] arm64: dts: rockchip: Split GPU OPPs of RK3588 and RK3588j Alexey Charkov
2025-02-11 16:34 ` Quentin Schulz
2024-06-17 18:56 ` [PATCH v5 0/8] RK3588 and Rock 5B dts additions: thermal, OPP and fan Dragan Simic
2024-06-20 20:39 ` (subset) " Heiko Stuebner
2024-06-21 6:15 ` Alexey Charkov
2024-06-24 16:20 ` Heiko Stuebner
2024-07-07 9:39 ` Piotr Oniszczuk
2024-07-07 11:11 ` Heiko Stübner
2024-07-07 12:37 ` Piotr Oniszczuk
2024-07-07 18:32 ` Piotr Oniszczuk [this message]
2024-07-08 7:59 ` Alexey Charkov
2024-07-08 10:29 ` Piotr Oniszczuk
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=503ECE3A-CA1C-43A7-AEB2-C0000A930B3A@gmail.com \
--to=piotr.oniszczuk@gmail.com \
--cc=alchark@gmail.com \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=didi.debian@cknow.org \
--cc=dsimic@manjaro.org \
--cc=heiko@sntech.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh+dt@kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=wens@kernel.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).