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 Standard mode for I2C needs a source div...
details: https://anonhg.NetBSD.org/src/rev/0bb6e01d7358
branches: trunk
changeset: 341570:0bb6e01d7358
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu Nov 12 10:31:29 2015 +0000
description:
Standard mode for I2C needs a source divider of 20, not 2.
diffstat:
sys/arch/arm/nvidia/soc_tegra124.c | 6 +++---
sys/arch/arm/nvidia/tegra_i2c.c | 11 +++++++----
2 files changed, 10 insertions(+), 7 deletions(-)
diffs (59 lines):
diff -r 09d9b3fd390a -r 0bb6e01d7358 sys/arch/arm/nvidia/soc_tegra124.c
--- a/sys/arch/arm/nvidia/soc_tegra124.c Thu Nov 12 05:05:24 2015 +0000
+++ b/sys/arch/arm/nvidia/soc_tegra124.c Thu Nov 12 10:31:29 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: soc_tegra124.c,v 1.7 2015/11/11 12:49:10 jmcneill Exp $ */
+/* $NetBSD: soc_tegra124.c,v 1.8 2015/11/12 10:31:29 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.7 2015/11/11 12:49:10 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: soc_tegra124.c,v 1.8 2015/11/12 10:31:29 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -77,7 +77,7 @@
void
tegra124_cpuinit(void)
{
- tegra_car_periph_i2c_enable(4, 204000000);
+ tegra_car_periph_i2c_enable(4, 20400000);
/* Set VDD_CPU voltage to 1.4V */
const u_int target_mv = 1400;
diff -r 09d9b3fd390a -r 0bb6e01d7358 sys/arch/arm/nvidia/tegra_i2c.c
--- a/sys/arch/arm/nvidia/tegra_i2c.c Thu Nov 12 05:05:24 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_i2c.c Thu Nov 12 10:31:29 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_i2c.c,v 1.7 2015/11/11 12:28:15 jmcneill Exp $ */
+/* $NetBSD: tegra_i2c.c,v 1.8 2015/11/12 10:31:29 jmcneill Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "locators.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_i2c.c,v 1.7 2015/11/11 12:28:15 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_i2c.c,v 1.8 2015/11/12 10:31:29 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -124,8 +124,11 @@
}
aprint_normal_dev(self, "interrupting on irq %d\n", loc->loc_intr);
- /* Recommended setting for standard mode */
- tegra_car_periph_i2c_enable(loc->loc_port, 204000000);
+ /*
+ * Recommended setting for standard mode is to use an I2C source div
+ * of 20 (Tegra K1 Technical Reference Manual, Table 137)
+ */
+ tegra_car_periph_i2c_enable(loc->loc_port, 20400000);
tegra_i2c_init(sc);
Home |
Main Index |
Thread Index |
Old Index