[U-Boot] [PATCH 09/14] ARM: AM43xx: mux: Update mux data

Lokesh Vutla lokeshvutla at ti.com
Tue Nov 5 05:20:55 CET 2013


Updating the mux data for UART, and adding data for i2c0 and mmc.

Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
---
 arch/arm/include/asm/arch-am33xx/mux_am43xx.h |    4 +++-
 board/ti/am43xx/mux.c                         |   24 ++++++++++++++++++++++--
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h
index 0206912..e95efdd 100644
--- a/arch/arm/include/asm/arch-am33xx/mux_am43xx.h
+++ b/arch/arm/include/asm/arch-am33xx/mux_am43xx.h
@@ -16,7 +16,9 @@
 	__raw_writel(value, (CTRL_BASE + offset));
 
 /* PAD Control Fields */
-#define SLEWCTRL	(0x1 << 19)
+#define DSPULLUDEN	(0x1 << 27) /* DS0 mode Pull-Up/Down enable */
+#define DSPULLUDDIS	(0x0 << 27) /* DS0 mode Pull-Up/Down Disable */
+#define SLEWCTRL	(0x1 << 19) /* Slow slew rate selection */
 #define RXACTIVE	(0x1 << 18)
 #define PULLDOWN_EN	(0x0 << 17) /* Pull Down Selection */
 #define PULLUP_EN	(0x1 << 17) /* Pull Up Selection */
diff --git a/board/ti/am43xx/mux.c b/board/ti/am43xx/mux.c
index 700e9a7..818a046 100644
--- a/board/ti/am43xx/mux.c
+++ b/board/ti/am43xx/mux.c
@@ -12,8 +12,26 @@
 #include "board.h"
 
 static struct module_pin_mux uart0_pin_mux[] = {
-	{OFFSET(uart0_rxd), (MODE(0) | RXACTIVE)},	/* UART0_RXD */
-	{OFFSET(uart0_txd), (MODE(0))},			/* UART0_TXD */
+	{OFFSET(uart0_rxd),
+	 (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL | DSPULLUDEN)},
+	{OFFSET(uart0_txd),
+	 (MODE(0) | PULLUDDIS | PULLUP_EN | SLEWCTRL | DSPULLUDEN)},
+	{-1},
+};
+
+static struct module_pin_mux mmc0_pin_mux[] = {
+	{OFFSET(mmc0_clk), (MODE(0) | PULLUDDIS | RXACTIVE | DSPULLUDEN)},
+	{OFFSET(mmc0_cmd), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)},
+	{OFFSET(mmc0_dat0), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)},
+	{OFFSET(mmc0_dat1), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)},
+	{OFFSET(mmc0_dat2), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)},
+	{OFFSET(mmc0_dat3), (MODE(0) | PULLUP_EN | RXACTIVE | DSPULLUDEN)},
+	{-1},
+};
+
+static struct module_pin_mux i2c0_pin_mux[] = {
+	{OFFSET(i2c0_sda), (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL)},
+	{OFFSET(i2c0_scl), (MODE(0) | PULLUP_EN | RXACTIVE | SLEWCTRL)},
 	{-1},
 };
 
@@ -24,4 +42,6 @@ void enable_uart0_pin_mux(void)
 
 void enable_board_pin_mux(void)
 {
+	configure_module_pin_mux(mmc0_pin_mux);
+	configure_module_pin_mux(i2c0_pin_mux);
 }
-- 
1.7.9.5



More information about the U-Boot mailing list