Skip to content
Snippets Groups Projects
Commit cfd701b5 authored by Alison Wang's avatar Alison Wang Committed by Stefano Babic
Browse files

arm: vf610: Add IOMUX support for Vybrid VF610


This patch adds the IOMUX support for Vybrid VF610 platform.

There is a little difference for IOMUXC module between VF610 and i.MX
platform, the muxmode and pad configuration share one 32bit register on
VF610, but they are two independent registers on I.MX platform. A
CONFIG_IOMUX_SHARE_CONFIG_REG was introduced to fit this difference.

Signed-off-by: default avatarAlison Wang <b18965@freescale.com>
Acked-by: default avatarStefano Babic <sbabic@denx.de>
Reviewed-by: default avatarBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
parent 8c498377
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk ...@@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)libimx-common.o LIB = $(obj)libimx-common.o
ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6)) ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 vf610))
COBJS-y = iomux-v3.o COBJS-y = iomux-v3.o
endif endif
ifeq ($(SOC),$(filter $(SOC),mx5 mx6)) ifeq ($(SOC),$(filter $(SOC),mx5 mx6))
......
...@@ -48,8 +48,14 @@ void imx_iomux_v3_setup_pad(iomux_v3_cfg_t pad) ...@@ -48,8 +48,14 @@ void imx_iomux_v3_setup_pad(iomux_v3_cfg_t pad)
if (sel_input_ofs) if (sel_input_ofs)
__raw_writel(sel_input, base + sel_input_ofs); __raw_writel(sel_input, base + sel_input_ofs);
#ifdef CONFIG_IOMUX_SHARE_CONF_REG
if (!(pad_ctrl & NO_PAD_CTRL))
__raw_writel((mux_mode << PAD_MUX_MODE_SHIFT) | pad_ctrl,
base + pad_ctrl_ofs);
#else
if (!(pad_ctrl & NO_PAD_CTRL) && pad_ctrl_ofs) if (!(pad_ctrl & NO_PAD_CTRL) && pad_ctrl_ofs)
__raw_writel(pad_ctrl, base + pad_ctrl_ofs); __raw_writel(pad_ctrl, base + pad_ctrl_ofs);
#endif
} }
void imx_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t const *pad_list, void imx_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t const *pad_list,
......
...@@ -121,6 +121,24 @@ typedef u64 iomux_v3_cfg_t; ...@@ -121,6 +121,24 @@ typedef u64 iomux_v3_cfg_t;
#define PAD_CTL_DSE_40ohm (6 << 3) #define PAD_CTL_DSE_40ohm (6 << 3)
#define PAD_CTL_DSE_34ohm (7 << 3) #define PAD_CTL_DSE_34ohm (7 << 3)
#elif defined(CONFIG_VF610)
#define PAD_MUX_MODE_SHIFT 20
#define PAD_CTL_SPEED_MED (1 << 12)
#define PAD_CTL_SPEED_HIGH (3 << 12)
#define PAD_CTL_DSE_50ohm (3 << 6)
#define PAD_CTL_DSE_25ohm (6 << 6)
#define PAD_CTL_DSE_20ohm (7 << 6)
#define PAD_CTL_PUS_47K_UP (1 << 4 | PAD_CTL_PUE)
#define PAD_CTL_PUS_100K_UP (2 << 4 | PAD_CTL_PUE)
#define PAD_CTL_PKE (1 << 3)
#define PAD_CTL_PUE (1 << 2 | PAD_CTL_PKE)
#define PAD_CTL_OBE_IBE_ENABLE (3 << 0)
#else #else
#define PAD_CTL_DVS (1 << 13) #define PAD_CTL_DVS (1 << 13)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment