Jump to content

[Pull Request] - rockchip64: disable pwm patch because broken (edge kernel)


RSS Bot

Recommended Posts

Description

Sorry for uplifting the discussion again around the PWM patch for rockchip64 again, but I did some further tests and I'm not convinced. The patch rk3568-pwm-rockchip.patch looks like a copy-paste patch from rockchip v5.10 kernel and I can't find it on patchwork.kernel.org patches, so I guess it is not suitable for mainline.

There is some weird behaviour I'm experiencing. My test board is the rk3318 tvbox, but this is not a cons; instead this is a pro and I'm going to explain why: these tvboxes lacks proper voltage regulator chips (like rk805 or rk808) and instead heavily relies on PWM to do power regulation for CPU and Logic planes. When PWM goes nuts, the board is either unstable or temperatures skyrocket and feedback is immediate.

  • Now what happens: with the "vanilla" edition of the patch, the missing "active" pinctrl configuration in the device tree makes the PWM not work at all because the driver refuses to go further. In this case my board is stable, but just because opp and devfreq framework don't work anymore (CPU and GPU stay at default frequency)
  • With the "patched" version by me (see), where "active" is optional, the driver goes further, but the board becomes unstable: CPU and GPU now scale their frequency, but PWM does not regulate voltages correctly.
  • When I use the "active" pinctrl configuration with the PWM pin pulled down as found in some rk3399 dts, PWM regulation stops at all, temperatures skyrocket and I read some whooping 1.45v for CPU and 1.35v for Logic.
  • When the patch is completely removed, my board is perfectly stable for hours doing business and I read the right voltages out of the MOSFETs (0.95v-1.20v for CPU and 1.00v-1.15v for Logic).

Now I don't really know what's going on, what the "active" pinctrl configuration is supposed to do and why it is mandatory in the vanilla edition of the patch.

It looks to me that this is breaking the PWM subsystem somehow. It just goes unnoticed because there are not so many PWM users out there but I see that some rk3399 boards also use PWM as voltage regulators for Logic (OrangePI 4, OrangePI 4 LTS, Tinkerboard2, RockPi4, roc-pc, ...). I didn't have the chance to test the voltages on OrangePI 4 LTS I have here because components are far mode dense than the tvbox above and I don't want to risk a short circuit, plus kernel v5.18 is giving me headaches with sdcard controller not being able to detect the card; OrangePI 4 LTS device has the "active" pinctrl configuration, so I guess the Logic just goes at highest voltage increasing consumption and heat for nothing, but this needs to be verified.

I propose here to disable the patch if there are no rk356x critical uses, until there is some clarification on what is the expected behaviour of the thingy and why it does not work as expected. Still I am not totally convinced that a blind copy-paste from rockchip branch is a proper solution

How Has This Been Tested?

  • [x] Tested on tvbox which has PWM voltage regulators

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] Any dependent changes have been merged and published in downstream modules

View the full article

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines