Linux-PM Archive on lore.kernel.org
 help / color / Atom feed
* BUG: no cpufreq on gta04 (omap dm3730) in 5.2-rc4
@ 2019-06-13 16:09 Andreas Kemnade
  0 siblings, 0 replies; only message in thread
From: Andreas Kemnade @ 2019-06-13 16:09 UTC (permalink / raw)
  To: Discussions about the Letux Kernel, linux-pm, linux-omap

[-- Attachment #1: Type: text/plain, Size: 1997 bytes --]

Hi,

On the gta04 (dm3730 cpu), cpufreq does not work properly with above-mentioned
kernel.
cpufreq-info just shows
analyzing CPU 0:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 0.00 ms.

dmesg log shows these interesting lines.

[    3.140655] core: _opp_supported_by_regulators: OPP minuV: 1012500 maxuV: 1012500, not supported by regulator
[    3.152709] cpu cpu0: _opp_add: OPP not supported by regulators (300000000)
[    3.160278] core: _opp_supported_by_regulators: OPP minuV: 1200000 maxuV: 1200000, not supported by regulator
[    3.171142] cpu cpu0: _opp_add: OPP not supported by regulators (600000000)
[    3.178710] core: _opp_supported_by_regulators: OPP minuV: 1325000 maxuV: 1325000, not supported by regulator
[    3.189483] cpu cpu0: _opp_add: OPP not supported by regulators
(800000000)

looking through logs shows that these lines first appeared in
next-20190506. They were not present in next-20190503. If I understand that
correcly it is about vdd1.
Analysis reveals:

in
int regulator_is_supported_voltage(struct regulator *regulator,
                                   int min_uV, int max_uV)

the following if fails:
     /* Any voltage within constrains range is fine? */
        if (rdev->desc->continuous_voltage_range) {

The following hack did the trick

diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 6fa15b2d6fb3..f7bfdf53701d 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -478,6 +478,7 @@ static const struct twlreg_info TWL4030_INFO_##label = { \
 		.type = REGULATOR_VOLTAGE, \
 		.owner = THIS_MODULE, \
 		.enable_time = turnon_delay, \
+		.continuous_voltage_range = true, \
 		.of_map_mode = twl4030reg_map_mode, \
 		}, \
 	}


not sure whether it is correct, whether these things are continuous enough.
If that all is ok, I will of course submit a formal patch.

Regards
Andreas

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-13 16:09 BUG: no cpufreq on gta04 (omap dm3730) in 5.2-rc4 Andreas Kemnade

Linux-PM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pm/0 linux-pm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pm linux-pm/ https://lore.kernel.org/linux-pm \
		linux-pm@vger.kernel.org linux-pm@archiver.kernel.org
	public-inbox-index linux-pm


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pm


AGPL code for this site: git clone https://public-inbox.org/ public-inbox