From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/6] arm: mvf600: Add IOMUX support for Vybrid MVF600
Date: Wed, 15 May 2013 10:16:40 +0200 [thread overview]
Message-ID: <51934468.4020309@denx.de> (raw)
In-Reply-To: <1368525108-2266-3-git-send-email-b18965@freescale.com>
On 14/05/2013 11:51, Alison Wang wrote:
> This patch adds the IOMUX support for Vybrid MVF600 platform.
>
> There is a little difference for IOMUXC module between MVF600 and i.MX
> platform, the muxmode and pad configuration share one 32bit register on
> MVF600, 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: Alison Wang <b18965@freescale.com>
> ---
> Changes in v2:
> - Use common iomux-v3 code
>
> arch/arm/imx-common/Makefile | 2 +-
> arch/arm/imx-common/iomux-v3.c | 6 ++++++
> arch/arm/include/asm/imx-common/iomux-v3.h | 18 ++++++++++++++++++
> 3 files changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile
> index 8bba8a5..3378931 100644
> --- a/arch/arm/imx-common/Makefile
> +++ b/arch/arm/imx-common/Makefile
> @@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk
>
> LIB = $(obj)libimx-common.o
>
> -ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6))
> +ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 mvf600))
> COBJS-y = iomux-v3.o
> endif
> ifeq ($(SOC),$(filter $(SOC),mx5 mx6))
> diff --git a/arch/arm/imx-common/iomux-v3.c b/arch/arm/imx-common/iomux-v3.c
> index 7fe5ce7..35880c7 100644
> --- a/arch/arm/imx-common/iomux-v3.c
> +++ b/arch/arm/imx-common/iomux-v3.c
> @@ -48,8 +48,14 @@ void imx_iomux_v3_setup_pad(iomux_v3_cfg_t pad)
> if (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)
> __raw_writel(pad_ctrl, base + pad_ctrl_ofs);
> +#endif
> }
>
> void imx_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t const *pad_list,
> diff --git a/arch/arm/include/asm/imx-common/iomux-v3.h b/arch/arm/include/asm/imx-common/iomux-v3.h
> index 0b4e763..7005fde 100644
> --- a/arch/arm/include/asm/imx-common/iomux-v3.h
> +++ b/arch/arm/include/asm/imx-common/iomux-v3.h
> @@ -121,6 +121,24 @@ typedef u64 iomux_v3_cfg_t;
> #define PAD_CTL_DSE_40ohm (6 << 3)
> #define PAD_CTL_DSE_34ohm (7 << 3)
>
> +#elif defined(CONFIG_MVF600)
> +
> +#define PAD_MUX_MODE_SHIFT 20
> +
> +#define PAD_CTL_PUS_47K_UP (1 << 4)
> +#define PAD_CTL_PUS_100K_UP (2 << 4)
> +#define PAD_CTL_PUE (1 << 2)
> +#define PAD_CTL_PKE (1 << 3)
> +
> +#define PAD_CTL_SPEED_HIGH (3 << 12)
> +#define PAD_CTL_SPEED_MED (1 << 12)
> +
> +#define PAD_CTL_DSE_20ohm (7 << 6)
> +#define PAD_CTL_DSE_25ohm (6 << 6)
> +#define PAD_CTL_DSE_50ohm (3 << 6)
> +
> +#define PAD_CTL_OBE_IBE_ENABLE (3 << 0)
> +
> #else
>
> #define PAD_CTL_DVS (1 << 13)
>
Acked-by: Stefano Babic <sbabic@denx.de>
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2013-05-15 8:16 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 9:51 [U-Boot] [PATCH v2 0/6] arm: mvf600: Add Freescale Vybrid MVF600 CPU and MVF600TWR board support Alison Wang
2013-05-14 9:51 ` [U-Boot] [PATCH v2 1/6] arm: mvf600: Add Vybrid MVF600 CPU support Alison Wang
2013-05-15 8:13 ` Stefano Babic
2013-05-15 12:09 ` Albert ARIBAUD
2013-05-15 12:24 ` Stefano Babic
2013-05-15 12:39 ` Albert ARIBAUD
2013-05-15 13:20 ` Stefano Babic
[not found] ` <81BA6E5E0BC2344391CABCEE22D1B6D8322144@039-SN1MPN1-002.039d.mgd.msft.net>
2013-05-15 14:23 ` [U-Boot] 答复: " Stefano Babic
2013-05-16 4:00 ` [U-Boot] " Wang Huan-B18965
2013-05-14 9:51 ` [U-Boot] [PATCH v2 2/6] arm: mvf600: Add IOMUX support for Vybrid MVF600 Alison Wang
2013-05-15 8:16 ` Stefano Babic [this message]
2013-05-15 13:53 ` Benoît Thébaudeau
2013-05-14 9:51 ` [U-Boot] [PATCH v2 3/6] arm: mvf600: Add FEC " Alison Wang
2013-05-15 8:15 ` Stefano Babic
2013-05-15 14:19 ` Benoît Thébaudeau
2013-05-14 9:51 ` [U-Boot] [PATCH v2 4/6] arm: mvf600: Add watchdog " Alison Wang
2013-05-14 9:51 ` [U-Boot] [PATCH v2 5/6] arm: mvf600: Add uart " Alison Wang
2013-05-14 9:51 ` [U-Boot] [PATCH v2 6/6] arm: mvf600: Add basic support for Vybrid MVF600TWR board Alison Wang
2013-05-15 4:14 ` Shawn Guo
2013-05-15 8:11 ` Wang Huan-B18965
2013-05-15 9:01 ` Stefano Babic
2013-05-17 15:20 ` Wang Huan-B18965
2013-05-17 16:07 ` Stefano Babic
2013-05-17 16:06 ` Benoît Thébaudeau
2013-05-17 16:57 ` Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51934468.4020309@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox