Module Name: src Committed By: jmcneill Date: Sat May 2 17:15:20 UTC 2015
Modified Files: src/sys/arch/arm/nvidia: files.tegra src/sys/arch/evbarm/conf: JETSONTK1 src/sys/arch/evbarm/tegra: tegra_machdep.c Log Message: jetsontk1 specific gpio setup for sdhc To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/nvidia/files.tegra cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/conf/JETSONTK1 cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/tegra/tegra_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/nvidia/files.tegra diff -u src/sys/arch/arm/nvidia/files.tegra:1.4 src/sys/arch/arm/nvidia/files.tegra:1.5 --- src/sys/arch/arm/nvidia/files.tegra:1.4 Sat May 2 12:09:04 2015 +++ src/sys/arch/arm/nvidia/files.tegra Sat May 2 17:15:20 2015 @@ -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 @@ defparam opt_tegra.h MEMSIZE # SOC parameters defflag opt_tegra.h SOC_TEGRAK1 defflag opt_tegra.h SOC_TEGRA124: SOC_TEGRAK1 + +# Board parameters +defflag opt_tegra.h BOARD_JETSONTK1 Index: src/sys/arch/evbarm/conf/JETSONTK1 diff -u src/sys/arch/evbarm/conf/JETSONTK1:1.7 src/sys/arch/evbarm/conf/JETSONTK1:1.8 --- src/sys/arch/evbarm/conf/JETSONTK1:1.7 Sat May 2 12:09:34 2015 +++ src/sys/arch/evbarm/conf/JETSONTK1 Sat May 2 17:15:20 2015 @@ -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 @@ include "arch/evbarm/conf/GENERIC.common options CPU_CORTEXA15 options SOC_TEGRA124 +options BOARD_JETSONTK1 options MULTIPROCESSOR #options MEMSIZE=2048 Index: src/sys/arch/evbarm/tegra/tegra_machdep.c diff -u src/sys/arch/evbarm/tegra/tegra_machdep.c:1.7 src/sys/arch/evbarm/tegra/tegra_machdep.c:1.8 --- src/sys/arch/evbarm/tegra/tegra_machdep.c:1.7 Mon Apr 27 00:33:46 2015 +++ src/sys/arch/evbarm/tegra/tegra_machdep.c Sat May 2 17:15:20 2015 @@ -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 <jmcne...@invisible.ca> @@ -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 @@ tegra_device_register(device_t self, voi 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 }