jetsontk1 specific gpio setup for sdhc
This commit is contained in:
parent
a1d68d25dd
commit
581102ab39
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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>
|
||||
@ -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, void *aux)
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user