| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 | 
							- /*
 
-  * arch/arm/plat-omap/include/mach/mux.h
 
-  *
 
-  * Table of the Omap register configurations for the FUNC_MUX and
 
-  * PULL_DWN combinations.
 
-  *
 
-  * Copyright (C) 2004 - 2008 Texas Instruments Inc.
 
-  * Copyright (C) 2003 - 2008 Nokia Corporation
 
-  *
 
-  * Written by Tony Lindgren
 
-  *
 
-  * This program is free software; you can redistribute it and/or modify
 
-  * it under the terms of the GNU General Public License as published by
 
-  * the Free Software Foundation; either version 2 of the License, or
 
-  * (at your option) any later version.
 
-  *
 
-  * This program is distributed in the hope that it will be useful,
 
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
-  * GNU General Public License for more details.
 
-  *
 
-  * You should have received a copy of the GNU General Public License
 
-  * along with this program; if not, write to the Free Software
 
-  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
-  *
 
-  * NOTE: Please use the following naming style for new pin entries.
 
-  *	 For example, W8_1610_MMC2_DAT0, where:
 
-  *	 - W8	     = ball
 
-  *	 - 1610	     = 1510 or 1610, none if common for both 1510 and 1610
 
-  *	 - MMC2_DAT0 = function
 
-  */
 
- #ifndef __ASM_ARCH_MUX_H
 
- #define __ASM_ARCH_MUX_H
 
- #define PU_PD_SEL_NA		0	/* No pu_pd reg available */
 
- #define PULL_DWN_CTRL_NA	0	/* No pull-down control needed */
 
- #ifdef	CONFIG_OMAP_MUX_DEBUG
 
- #define MUX_REG(reg, mode_offset, mode) .mux_reg_name = "FUNC_MUX_CTRL_"#reg, \
 
- 					.mux_reg = FUNC_MUX_CTRL_##reg, \
 
- 					.mask_offset = mode_offset, \
 
- 					.mask = mode,
 
- #define PULL_REG(reg, bit, status)	.pull_name = "PULL_DWN_CTRL_"#reg, \
 
- 					.pull_reg = PULL_DWN_CTRL_##reg, \
 
- 					.pull_bit = bit, \
 
- 					.pull_val = status,
 
- #define PU_PD_REG(reg, status)		.pu_pd_name = "PU_PD_SEL_"#reg, \
 
- 					.pu_pd_reg = PU_PD_SEL_##reg, \
 
- 					.pu_pd_val = status,
 
- #define MUX_REG_7XX(reg, mode_offset, mode) .mux_reg_name = "OMAP7XX_IO_CONF_"#reg, \
 
- 					.mux_reg = OMAP7XX_IO_CONF_##reg, \
 
- 					.mask_offset = mode_offset, \
 
- 					.mask = mode,
 
- #define PULL_REG_7XX(reg, bit, status)	.pull_name = "OMAP7XX_IO_CONF_"#reg, \
 
- 					.pull_reg = OMAP7XX_IO_CONF_##reg, \
 
- 					.pull_bit = bit, \
 
- 					.pull_val = status,
 
- #else
 
- #define MUX_REG(reg, mode_offset, mode) .mux_reg = FUNC_MUX_CTRL_##reg, \
 
- 					.mask_offset = mode_offset, \
 
- 					.mask = mode,
 
- #define PULL_REG(reg, bit, status)	.pull_reg = PULL_DWN_CTRL_##reg, \
 
- 					.pull_bit = bit, \
 
- 					.pull_val = status,
 
- #define PU_PD_REG(reg, status)		.pu_pd_reg = PU_PD_SEL_##reg, \
 
- 					.pu_pd_val = status,
 
- #define MUX_REG_7XX(reg, mode_offset, mode) \
 
- 					.mux_reg = OMAP7XX_IO_CONF_##reg, \
 
- 					.mask_offset = mode_offset, \
 
- 					.mask = mode,
 
- #define PULL_REG_7XX(reg, bit, status)	.pull_reg = OMAP7XX_IO_CONF_##reg, \
 
- 					.pull_bit = bit, \
 
- 					.pull_val = status,
 
- #endif /* CONFIG_OMAP_MUX_DEBUG */
 
- #define MUX_CFG(desc, mux_reg, mode_offset, mode,	\
 
- 		pull_reg, pull_bit, pull_status,	\
 
- 		pu_pd_reg, pu_pd_status, debug_status)	\
 
- {							\
 
- 	.name =	 desc,					\
 
- 	.debug = debug_status,				\
 
- 	MUX_REG(mux_reg, mode_offset, mode)		\
 
- 	PULL_REG(pull_reg, pull_bit, pull_status)	\
 
- 	PU_PD_REG(pu_pd_reg, pu_pd_status)		\
 
- },
 
- /*
 
-  * OMAP730/850 has a slightly different config for the pin mux.
 
-  * - config regs are the OMAP7XX_IO_CONF_x regs (see omap7xx.h) regs and
 
-  *   not the FUNC_MUX_CTRL_x regs from hardware.h
 
-  * - for pull-up/down, only has one enable bit which is is in the same register
 
-  *   as mux config
 
-  */
 
- #define MUX_CFG_7XX(desc, mux_reg, mode_offset, mode,	\
 
- 		   pull_bit, pull_status, debug_status)\
 
- {							\
 
- 	.name =	 desc,					\
 
- 	.debug = debug_status,				\
 
- 	MUX_REG_7XX(mux_reg, mode_offset, mode)		\
 
- 	PULL_REG_7XX(mux_reg, pull_bit, pull_status)	\
 
- 	PU_PD_REG(NA, 0)		\
 
- },
 
- struct pin_config {
 
- 	char 			*name;
 
- 	const unsigned int 	mux_reg;
 
- 	unsigned char		debug;
 
- 	const unsigned char mask_offset;
 
- 	const unsigned char mask;
 
- 	const char *pull_name;
 
- 	const unsigned int pull_reg;
 
- 	const unsigned char pull_val;
 
- 	const unsigned char pull_bit;
 
- 	const char *pu_pd_name;
 
- 	const unsigned int pu_pd_reg;
 
- 	const unsigned char pu_pd_val;
 
- #if	defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS)
 
- 	const char *mux_reg_name;
 
- #endif
 
- };
 
- enum omap7xx_index {
 
- 	/* OMAP 730 keyboard */
 
- 	E2_7XX_KBR0,
 
- 	J7_7XX_KBR1,
 
- 	E1_7XX_KBR2,
 
- 	F3_7XX_KBR3,
 
- 	D2_7XX_KBR4,
 
- 	C2_7XX_KBC0,
 
- 	D3_7XX_KBC1,
 
- 	E4_7XX_KBC2,
 
- 	F4_7XX_KBC3,
 
- 	E3_7XX_KBC4,
 
- 	/* USB */
 
- 	AA17_7XX_USB_DM,
 
- 	W16_7XX_USB_PU_EN,
 
- 	W17_7XX_USB_VBUSI,
 
- 	W18_7XX_USB_DMCK_OUT,
 
- 	W19_7XX_USB_DCRST,
 
- 	/* MMC */
 
- 	MMC_7XX_CMD,
 
- 	MMC_7XX_CLK,
 
- 	MMC_7XX_DAT0,
 
- 	/* I2C */
 
- 	I2C_7XX_SCL,
 
- 	I2C_7XX_SDA,
 
- 	/* SPI */
 
- 	SPI_7XX_1,
 
- 	SPI_7XX_2,
 
- 	SPI_7XX_3,
 
- 	SPI_7XX_4,
 
- 	SPI_7XX_5,
 
- 	SPI_7XX_6,
 
- 	/* UART */
 
- 	UART_7XX_1,
 
- 	UART_7XX_2,
 
- };
 
- enum omap1xxx_index {
 
- 	/* UART1 (BT_UART_GATING)*/
 
- 	UART1_TX = 0,
 
- 	UART1_RTS,
 
- 	/* UART2 (COM_UART_GATING)*/
 
- 	UART2_TX,
 
- 	UART2_RX,
 
- 	UART2_CTS,
 
- 	UART2_RTS,
 
- 	/* UART3 (GIGA_UART_GATING) */
 
- 	UART3_TX,
 
- 	UART3_RX,
 
- 	UART3_CTS,
 
- 	UART3_RTS,
 
- 	UART3_CLKREQ,
 
- 	UART3_BCLK,	/* 12MHz clock out */
 
- 	Y15_1610_UART3_RTS,
 
- 	/* PWT & PWL */
 
- 	PWT,
 
- 	PWL,
 
- 	/* USB master generic */
 
- 	R18_USB_VBUS,
 
- 	R18_1510_USB_GPIO0,
 
- 	W4_USB_PUEN,
 
- 	W4_USB_CLKO,
 
- 	W4_USB_HIGHZ,
 
- 	W4_GPIO58,
 
- 	/* USB1 master */
 
- 	USB1_SUSP,
 
- 	USB1_SEO,
 
- 	W13_1610_USB1_SE0,
 
- 	USB1_TXEN,
 
- 	USB1_TXD,
 
- 	USB1_VP,
 
- 	USB1_VM,
 
- 	USB1_RCV,
 
- 	USB1_SPEED,
 
- 	R13_1610_USB1_SPEED,
 
- 	R13_1710_USB1_SE0,
 
- 	/* USB2 master */
 
- 	USB2_SUSP,
 
- 	USB2_VP,
 
- 	USB2_TXEN,
 
- 	USB2_VM,
 
- 	USB2_RCV,
 
- 	USB2_SEO,
 
- 	USB2_TXD,
 
- 	/* OMAP-1510 GPIO */
 
- 	R18_1510_GPIO0,
 
- 	R19_1510_GPIO1,
 
- 	M14_1510_GPIO2,
 
- 	/* OMAP1610 GPIO */
 
- 	P18_1610_GPIO3,
 
- 	Y15_1610_GPIO17,
 
- 	/* OMAP-1710 GPIO */
 
- 	R18_1710_GPIO0,
 
- 	V2_1710_GPIO10,
 
- 	N21_1710_GPIO14,
 
- 	W15_1710_GPIO40,
 
- 	/* MPUIO */
 
- 	MPUIO2,
 
- 	N15_1610_MPUIO2,
 
- 	MPUIO4,
 
- 	MPUIO5,
 
- 	T20_1610_MPUIO5,
 
- 	W11_1610_MPUIO6,
 
 
  |