From 4a389a44d5afbf98a181c6b60fefdbdc786e19d8 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Mon, 30 Sep 2019 20:47:39 +0000 Subject: Enable CPU voltage regulators. The firmware I built for my odroid-n2 (based on mainline U-Boot and a proprietary primary loader and ATF) doesn't actually enable the regulator for one of the CPU clusters. ok patrick@ --- sys/arch/arm/arm/cpu.c | 5 ++++- sys/arch/arm64/arm64/cpu.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/arm/arm/cpu.c b/sys/arch/arm/arm/cpu.c index 73f4b03ba42..b2ab59a75ca 100644 --- a/sys/arch/arm/arm/cpu.c +++ b/sys/arch/arm/arm/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.49 2019/09/29 10:36:52 kettenis Exp $ */ +/* $OpenBSD: cpu.c,v 1.50 2019/09/30 20:47:38 kettenis Exp $ */ /* $NetBSD: cpu.c,v 1.56 2004/04/14 04:01:49 bsh Exp $ */ @@ -613,6 +613,9 @@ cpu_opp_mountroot(struct device *self) if (ot->ot_master && ot->ot_master != ci) continue; + /* PWM regulators may need to be explicitly enabled. */ + regulator_enable(ci->ci_cpu_supply); + curr_hz = clock_get_frequency(ci->ci_node, NULL); curr_microvolt = regulator_get_voltage(ci->ci_cpu_supply); diff --git a/sys/arch/arm64/arm64/cpu.c b/sys/arch/arm64/arm64/cpu.c index 665f3f2009a..9fb76c756d6 100644 --- a/sys/arch/arm64/arm64/cpu.c +++ b/sys/arch/arm64/arm64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.35 2019/09/01 15:34:15 kettenis Exp $ */ +/* $OpenBSD: cpu.c,v 1.36 2019/09/30 20:47:38 kettenis Exp $ */ /* * Copyright (c) 2016 Dale Rahn @@ -724,6 +724,9 @@ cpu_opp_mountroot(struct device *self) if (ot->ot_master && ot->ot_master != ci) continue; + /* PWM regulators may need to be explicitly enabled. */ + regulator_enable(ci->ci_cpu_supply); + curr_hz = clock_get_frequency(ci->ci_node, NULL); curr_microvolt = regulator_get_voltage(ci->ci_cpu_supply); -- cgit v1.2.3