Module Name: src
Committed By: jmcneill
Date: Mon Jul 31 10:41:39 UTC 2017
Modified Files:
src/sys/arch/evbarm/rpi: rpi_machdep.c
Log Message:
Enable AUX UART for BT on btwifi boards
To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/evbarm/rpi/rpi_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/evbarm/rpi/rpi_machdep.c
diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.75 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.76
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.75 Sun Jul 30 23:48:32 2017
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c Mon Jul 31 10:41:39 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: rpi_machdep.c,v 1.75 2017/07/30 23:48:32 jmcneill Exp $ */
+/* $NetBSD: rpi_machdep.c,v 1.76 2017/07/31 10:41:39 jmcneill Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.75 2017/07/30 23:48:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.76 2017/07/31 10:41:39 jmcneill Exp $");
#include "opt_arm_debug.h"
#include "opt_bcm283x.h"
@@ -497,6 +497,14 @@ rpi_pinctrl(void)
BCM2835_GPIO_GPPUD_PULLUP);
}
#endif
+
+ if (rpi_rev_has_btwifi(vb.vbt_boardrev.rev)) {
+ /* Enable AUX UART on BT */
+ bcm2835gpio_function_select(32, BCM2835_GPIO_ALT5);
+ bcm2835gpio_function_select(33, BCM2835_GPIO_ALT5);
+ bcm2835gpio_function_setpull(32, BCM2835_GPIO_GPPUD_PULLOFF);
+ bcm2835gpio_function_setpull(33, BCM2835_GPIO_GPPUD_PULLUP);
+ }
}