Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/nvidia make VDD_CPU programming a bit easier to...
details: https://anonhg.NetBSD.org/src/rev/331b1a91f2b6
branches: trunk
changeset: 811699:331b1a91f2b6
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Nov 11 12:49:10 2015 +0000
description:
make VDD_CPU programming a bit easier to understand, and while here, actually program it to 1.4V as intended instead of 1.39V
diffstat:
sys/arch/arm/nvidia/soc_tegra124.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r 0280d433b95d -r 331b1a91f2b6 sys/arch/arm/nvidia/soc_tegra124.c
--- a/sys/arch/arm/nvidia/soc_tegra124.c Wed Nov 11 12:37:52 2015 +0000
+++ b/sys/arch/arm/nvidia/soc_tegra124.c Wed Nov 11 12:49:10 2015 +0000
@@ -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@localhost>
@@ -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 @@
void
tegra124_cpuinit(void)
{
+ tegra_car_periph_i2c_enable(4, 204000000);
+
/* Set VDD_CPU voltage to 1.4V */
- tegra_car_periph_i2c_enable(4, 204000000);
- tegra_i2c_dvc_write(0x40, 0x4f00, 2);
+ 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);
Home |
Main Index |
Thread Index |
Old Index