make VDD_CPU programming a bit easier to understand, and while here, actually program it to 1.4V as intended instead of 1.39V
This commit is contained in:
parent
578cf4f763
commit
317868fba7
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: soc_tegra124.c,v 1.6 2015/06/03 11:43:18 skrll Exp $ */
|
||||
/* $NetBSD: soc_tegra124.c,v 1.7 2015/11/11 12:49:10 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2015 Jared D. McNeill <jmcneill@invisible.ca>
|
||||
@ -30,7 +30,7 @@
|
||||
#include "opt_multiprocessor.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: soc_tegra124.c,v 1.6 2015/06/03 11:43:18 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: soc_tegra124.c,v 1.7 2015/11/11 12:49:10 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/bus.h>
|
||||
@ -77,9 +77,12 @@ static struct tegra124_cpufreq_rate {
|
||||
void
|
||||
tegra124_cpuinit(void)
|
||||
{
|
||||
/* Set VDD_CPU voltage to 1.4V */
|
||||
tegra_car_periph_i2c_enable(4, 204000000);
|
||||
tegra_i2c_dvc_write(0x40, 0x4f00, 2);
|
||||
|
||||
/* Set VDD_CPU voltage to 1.4V */
|
||||
const u_int target_mv = 1400;
|
||||
const u_int sd0_vsel = (target_mv - 600) / 10;
|
||||
tegra_i2c_dvc_write(0x40, (sd0_vsel << 8) | 00, 2);
|
||||
delay(10000);
|
||||
|
||||
tegra_cpufreq_register(&tegra124_cpufreq_func);
|
||||
|
Loading…
Reference in New Issue
Block a user