Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch jetsontk1 specific gpio setup for sdhc



details:   https://anonhg.NetBSD.org/src/rev/e1361f4c9224
branches:  trunk
changeset: 808032:e1361f4c9224
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat May 02 17:15:20 2015 +0000

description:
jetsontk1 specific gpio setup for sdhc

diffstat:

 sys/arch/arm/nvidia/files.tegra       |   5 ++++-
 sys/arch/evbarm/conf/JETSONTK1        |   3 ++-
 sys/arch/evbarm/tegra/tegra_machdep.c |  18 ++++++++++++++++--
 3 files changed, 22 insertions(+), 4 deletions(-)

diffs (71 lines):

diff -r e3dcf454ea1a -r e1361f4c9224 sys/arch/arm/nvidia/files.tegra
--- a/sys/arch/arm/nvidia/files.tegra   Sat May 02 17:07:55 2015 +0000
+++ b/sys/arch/arm/nvidia/files.tegra   Sat May 02 17:15:20 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.tegra,v 1.4 2015/05/02 12:09:04 jmcneill Exp $
+#      $NetBSD: files.tegra,v 1.5 2015/05/02 17:15:20 jmcneill Exp $
 #
 # Configuration info for NVIDIA Tegra ARM Peripherals
 #
@@ -72,3 +72,6 @@
 # SOC parameters
 defflag        opt_tegra.h                     SOC_TEGRAK1
 defflag        opt_tegra.h                     SOC_TEGRA124: SOC_TEGRAK1
+
+# Board parameters
+defflag        opt_tegra.h                     BOARD_JETSONTK1
diff -r e3dcf454ea1a -r e1361f4c9224 sys/arch/evbarm/conf/JETSONTK1
--- a/sys/arch/evbarm/conf/JETSONTK1    Sat May 02 17:07:55 2015 +0000
+++ b/sys/arch/evbarm/conf/JETSONTK1    Sat May 02 17:15:20 2015 +0000
@@ -1,5 +1,5 @@
 #
-#      $NetBSD: JETSONTK1,v 1.7 2015/05/02 12:09:34 jmcneill Exp $
+#      $NetBSD: JETSONTK1,v 1.8 2015/05/02 17:15:20 jmcneill Exp $
 #
 #      NVIDIA Jetson TK1 - Tegra K1 development kit
 #      https://developer.nvidia.com/jetson-tk1
@@ -10,6 +10,7 @@
 
 options        CPU_CORTEXA15
 options        SOC_TEGRA124
+options        BOARD_JETSONTK1
 options        MULTIPROCESSOR
 #options       MEMSIZE=2048
 
diff -r e3dcf454ea1a -r e1361f4c9224 sys/arch/evbarm/tegra/tegra_machdep.c
--- a/sys/arch/evbarm/tegra/tegra_machdep.c     Sat May 02 17:07:55 2015 +0000
+++ b/sys/arch/evbarm/tegra/tegra_machdep.c     Sat May 02 17:15:20 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_machdep.c,v 1.7 2015/04/27 00:33:46 jmcneill Exp $ */
+/* $NetBSD: tegra_machdep.c,v 1.8 2015/05/02 17:15:20 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_machdep.c,v 1.7 2015/04/27 00:33:46 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_machdep.c,v 1.8 2015/05/02 17:15:20 jmcneill Exp $");
 
 #include "opt_tegra.h"
 #include "opt_machdep.h"
@@ -376,4 +376,18 @@
                 prop_dictionary_set_uint32(dict, "frequency", TEGRA_REF_FREQ);
                return;
        }
+
+#ifdef BOARD_JETSONTK1
+       if (device_is_a(self, "sdhc")
+           && device_is_a(device_parent(self), "tegraio")) {
+               struct tegraio_attach_args * const tio = aux;
+               const struct tegra_locators * const loc = &tio->tio_loc;
+
+               if (loc->loc_port == 2) {
+                       prop_dictionary_set_cstring(dict, "cd-gpio", "V2");
+                       prop_dictionary_set_cstring(dict, "power-gpio", "R0");
+                       prop_dictionary_set_cstring(dict, "wp-gpio", "Q4");
+               }
+       }
+#endif
 }



Home | Main Index | Thread Index | Old Index