1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Pin-multiplex helper macros for TI DaVinci family devices
5 * Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com>
7 * 2007 (c) MontaVista Software, Inc.
9 * Copyright (C) 2008 Texas Instruments.
11 #ifndef _MACH_DAVINCI_MUX_H_
12 #define _MACH_DAVINCI_MUX_H_
16 const char *mux_reg_name
;
17 const unsigned char mux_reg
;
18 const unsigned char mask_offset
;
19 const unsigned char mask
;
20 const unsigned char mode
;
172 DA830_RMII_MHZ_50_CLK
,
379 DA830_NLCD_AC_ENB_CS
,
428 enum davinci_da850_index
{
480 DA850_RMII_MHZ_50_CLK
,
527 DA850_NLCD_AC_ENB_CS
,
529 /* MMC/SD0 function */
537 /* MMC/SD1 function */
545 /* EMIF2.5/EMIFA function */
652 #define PINMUX(x) (4 * (x))
654 #ifdef CONFIG_DAVINCI_MUX
655 /* setup pin muxing */
656 extern int davinci_cfg_reg(unsigned long reg_cfg
);
658 /* boot loader does it all (no warnings from CONFIG_DAVINCI_MUX_WARNINGS) */
659 static inline int davinci_cfg_reg(unsigned long reg_cfg
) { return 0; }
663 #define MUX_CFG(soc, desc, muxreg, mode_offset, mode_mask, mux_mode, dbg)\
667 .mux_reg_name = "PINMUX"#muxreg, \
668 .mux_reg = PINMUX(muxreg), \
669 .mask_offset = mode_offset, \
674 #define INT_CFG(soc, desc, mode_offset, mode_mask, mux_mode, dbg) \
678 .mux_reg_name = "INTMUX", \
680 .mask_offset = mode_offset, \
685 #define EVT_CFG(soc, desc, mode_offset, mode_mask, mux_mode, dbg) \
689 .mux_reg_name = "EVTMUX", \
691 .mask_offset = mode_offset, \
696 #endif /* _MACH_DAVINCI_MUX_H */