linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC][PATCH 08/10] arm: mxc: Add IO multiplexing support for FEC
Date: Fri, 4 Dec 2009 12:30:54 +0100	[thread overview]
Message-ID: <20091204113054.GO15126@pengutronix.de> (raw)
In-Reply-To: <dbab65547b41b82719df19067b50db9c82eeb6d6.1259893118.git.amit.kucheria@canonical.com>

On Fri, Dec 04, 2009 at 04:47:08AM +0200, Amit Kucheria wrote:
> From: Dinh Nguyen <Dinh.Nguyen@freescale.com>
> 
> Setup correct multiplexing in order to use the FEC ethernet device on the
> Babbage board.
> 
> Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
> Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
> ---
>  arch/arm/mach-mx5/board-mx51_babbage.c    |   43 +++++++++++++++++++++++++++++
>  arch/arm/plat-mxc/include/mach/iomux-v3.h |    8 +++++
>  2 files changed, 51 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
> index a1bc9c4..cefcb90 100644
> --- a/arch/arm/mach-mx5/board-mx51_babbage.c
> +++ b/arch/arm/mach-mx5/board-mx51_babbage.c
> @@ -33,6 +33,8 @@ extern void __init mx51_babbage_io_init(void);
>  #define MX51_UART2_PAD_CTRL	(PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_DSE_HIGH | PAD_CTL_SRE_FAST)
>  #define MX51_UART3_PAD_CTRL	(PAD_CTL_PKE | PAD_CTL_DSE_HIGH | PAD_CTL_SRE_FAST)
>  
> +#define MX51_FEC_PAD_CTRL	(PAD_CTL_DRV_VOT_HIGH | PAD_CTL_DRV_HIGH)
> +
>  /* UART1 */
>  #define MX51_BABBAGE_PAD_UART1_RXD__UART1_RXD	IOMUX_PAD(0x618, 0x228,	IOMUX_CONFIG_ALT0, 0x9e4,   0, MX51_UART1_PAD_CTRL | PAD_CTL_SRE_FAST)
>  #define MX51_BABBAGE_PAD_UART1_TXD__UART1_TXD	IOMUX_PAD(0x61C, 0x22C, IOMUX_CONFIG_ALT0, 0x0,   0, MX51_UART1_PAD_CTRL | PAD_CTL_SRE_FAST)
> @@ -52,6 +54,28 @@ extern void __init mx51_babbage_io_init(void);
>  
>  #define MX51_BABBAGE_PAD_GPIO_1_8__GPIO1_8	IOMUX_PAD(0x814, 0x3E8, 0, 0x0, 1, (PAD_CTL_SRE_SLOW | PAD_CTL_DSE_MED | PAD_CTL_PUS_100K_UP |  PAD_CTL_HYS))
>  
> +/* FEC */
> +#define MX51_BABBAGE_PAD_EIM_EB2__MDIO		IOMUX_PAD(0x468, 0x0d4, IOMUX_CONFIG_ALT3, 0x954,   0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_NANDF_CS3__MDC		IOMUX_PAD(0x524, 0x13C, IOMUX_CONFIG_ALT2, 0x0, 0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_EIM_CS3__RDATA3	IOMUX_PAD(0x480, 0x0ec, IOMUX_CONFIG_ALT3, 0x964,   0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_EIM_CS2__RDATA2	IOMUX_PAD(0x47c, 0x0e8, IOMUX_CONFIG_ALT3, 0x960,   0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_EIM_EB3__RDATA1	IOMUX_PAD(0x46c, 0x0d8, IOMUX_CONFIG_ALT3, 0x95c,   0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_NANDF_RB6__RDATA0	IOMUX_PAD(0x5DC, 0x134, IOMUX_CONFIG_ALT1, 0x958, 0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_NANDF_D11__RX_DV	IOMUX_PAD(0x54C, 0x164, IOMUX_CONFIG_ALT2, 0x96c, 0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_NANDF_RB3__RX_CLK	IOMUX_PAD(0x504, 0x128, IOMUX_CONFIG_ALT1, 0x968, 0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_EIM_CS4__RX_ER		IOMUX_PAD(0x484, 0x0f0, IOMUX_CONFIG_ALT3, 0x970,   0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_NANDF_RDY_INT__TX_CLK	IOMUX_PAD(0x538, 0x150, IOMUX_CONFIG_ALT1, 0x974, 0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_NANDF_CS7__TX_EN	IOMUX_PAD(0x534, 0x14C, IOMUX_CONFIG_ALT1, 0x0, 0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_NANDF_D8__TDATA0	IOMUX_PAD(0x558, 0x170, IOMUX_CONFIG_ALT2, 0x0, 0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_NANDF_CS4__TDATA1	IOMUX_PAD(0x528, 0x140, IOMUX_CONFIG_ALT2, 0x0, 0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_NANDF_CS5__TDATA2	IOMUX_PAD(0x52C, 0x144, IOMUX_CONFIG_ALT2, 0x0, 0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_NANDF_CS6__TDATA3	IOMUX_PAD(0x530, 0x148, IOMUX_CONFIG_ALT2, 0x0, 0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_NANDF_RB2__COL		IOMUX_PAD(0x500, 0x124, IOMUX_CONFIG_ALT1, 0x94c, 0, MX51_FEC_PAD_CTRL)
> +#define MX51_BABBAGE_PAD_EIM_CS5__CRS		IOMUX_PAD(0x52C, 0x144, IOMUX_CONFIG_ALT3, 0x950, 0, MX51_FEC_PAD_CTRL)

These are generic and should go to iomux-mx51.h

> +
> +
> +
> +
>  static struct platform_device *devices[] __initdata = {
>  	&mxc_fec_device,
>  };
> @@ -72,6 +96,25 @@ static struct pad_desc mx51babbage_pads[] = {
>  	MX51_BABBAGE_PAD_EIM_D26__UART3_TXD,
>  	MX51_BABBAGE_PAD_EIM_D27__UART3_RTS,
>  	MX51_BABBAGE_PAD_EIM_D24__UART3_CTS,
> +
> +	/* FEC */
> +	MX51_BABBAGE_PAD_EIM_EB2__MDIO,
> +	MX51_BABBAGE_PAD_NANDF_CS3__MDC,
> +	MX51_BABBAGE_PAD_EIM_CS3__RDATA3,
> +	MX51_BABBAGE_PAD_EIM_CS2__RDATA2,
> +	MX51_BABBAGE_PAD_EIM_EB3__RDATA1,
> +	MX51_BABBAGE_PAD_NANDF_RB6__RDATA0,
> +	MX51_BABBAGE_PAD_NANDF_D11__RX_DV,
> +	MX51_BABBAGE_PAD_NANDF_RB3__RX_CLK,
> +	MX51_BABBAGE_PAD_EIM_CS4__RX_ER,
> +	MX51_BABBAGE_PAD_NANDF_RDY_INT__TX_CLK,
> +	MX51_BABBAGE_PAD_NANDF_CS7__TX_EN,
> +	MX51_BABBAGE_PAD_NANDF_D8__TDATA0,
> +	MX51_BABBAGE_PAD_NANDF_CS4__TDATA1,
> +	MX51_BABBAGE_PAD_NANDF_CS5__TDATA2,
> +	MX51_BABBAGE_PAD_NANDF_CS6__TDATA3,
> +	MX51_BABBAGE_PAD_NANDF_RB2__COL,
> +	MX51_BABBAGE_PAD_EIM_CS5__CRS	,
>  };
>  
>  /* Serial ports */
> diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h
> index 8c351d6..78c71f0 100644
> --- a/arch/arm/plat-mxc/include/mach/iomux-v3.h
> +++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h
> @@ -89,6 +89,14 @@ struct pad_desc {
>  #define PAD_CTL_SRE_FAST		(1 << 0)
>  #define PAD_CTL_SRE_SLOW		(0 << 0)
>  
> +#define PAD_CTL_DRV_LOW			(0 << 1)
> +#define PAD_CTL_DRV_MEDIUM		(1 << 1)
> +#define PAD_CTL_DRV_HIGH		(2 << 1)
> +#define PAD_CTL_DRV_MAX			(3 << 1)

These are duplicates of PAD_CTL_SRE_* defined directly above.

> +
> +#define PAD_CTL_DRV_VOT_LOW		(0 << 13)
> +#define PAD_CTL_DRV_VOT_HIGH		(1 << 13)
> +
>  /*
>   * setups a single pad:
>   * 	- reserves the pad so that it is not claimed by another driver
> -- 
> 1.6.3.3
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  parent reply	other threads:[~2009-12-04 11:30 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04  2:47 [RFC][PATCH 00/10] Base support for Freescale i.MX51 SoC platform Amit Kucheria
2009-12-04  2:47 ` [RFC][PATCH 01/10] arm: mxc: New interrupt controller (TZIC) for i.MX5 family Amit Kucheria
2009-12-04  2:47   ` [RFC][PATCH 02/10] arm: mxc: base support for Freescale i.MX51 processor Amit Kucheria
2009-12-04  2:47     ` [RFC][PATCH 03/10] arm: mxc: changes to common plat-mxc code to add support for i.MX5 Amit Kucheria
2009-12-04  2:47       ` [RFC][PATCH 04/10] arm: mxc: Fix Drive Strength Field in the IOMUX controller Amit Kucheria
2009-12-04  2:47         ` [RFC][PATCH 05/10] mxc: Add board support for the i.MX51 babbage board Amit Kucheria
2009-12-04  2:47           ` [RFC][PATCH 06/10] fec: fix uninitialized rx buffer usage Amit Kucheria
2009-12-04  2:47             ` [RFC][PATCH 07/10] fec: Add LAN8700 phy support Amit Kucheria
2009-12-04  2:47               ` [RFC][PATCH 08/10] arm: mxc: Add IO multiplexing support for FEC Amit Kucheria
2009-12-04  2:47                 ` [RFC][PATCH 09/10] fec: Add ARCH_MX5 as a dependency Amit Kucheria
2009-12-04  2:47                   ` [RFC][PATCH 10/10] arm: mxc: Add imx51_defconfig Amit Kucheria
2009-12-04 11:30                 ` Sascha Hauer [this message]
2009-12-04 11:15               ` [RFC][PATCH 07/10] fec: Add LAN8700 phy support Sascha Hauer
2009-12-04 11:13             ` [RFC][PATCH 06/10] fec: fix uninitialized rx buffer usage Sascha Hauer
2009-12-08  4:31               ` Herring Robert-RA7055
2009-12-04 10:25           ` [RFC][PATCH 05/10] mxc: Add board support for the i.MX51 babbage board Sascha Hauer
2009-12-04 11:03           ` Sascha Hauer
2009-12-10 10:31           ` Russell King - ARM Linux
2009-12-04  9:38         ` [RFC][PATCH 04/10] arm: mxc: Fix Drive Strength Field in the IOMUX controller Uwe Kleine-König
2009-12-04 11:28           ` Sascha Hauer
2009-12-04  3:12       ` [RFC][PATCH 03/10] arm: mxc: changes to common plat-mxc code to add support for i.MX5 Herring Robert-RA7055
2009-12-04  8:34         ` Sascha Hauer
2009-12-04 10:31           ` Amit Kucheria
2009-12-04 10:59             ` Sascha Hauer
2009-12-07 17:17               ` [RFC][PATCH 03/10] arm: mxc: changes to common plat-mxc codeto " Herring Robert-RA7055
2009-12-07 20:03                 ` Robert Schwebel
2009-12-07 21:21                   ` [RFC][PATCH 03/10] arm: mxc: changes to common plat-mxc codetoadd " Herring Robert-RA7055
2009-12-07 18:06           ` [RFC][PATCH 03/10] arm: mxc: changes to common plat-mxc codeto add " Herring Robert-RA7055
2009-12-04  4:05       ` [RFC][PATCH 03/10] arm: mxc: changes to common plat-mxc code to " Andres Salomon
2009-12-04 11:16         ` Amit Kucheria
2009-12-04 10:43       ` Russell King - ARM Linux
2009-12-04  9:41     ` [RFC][PATCH 02/10] arm: mxc: base support for Freescale i.MX51 processor Uwe Kleine-König
2009-12-04 10:24       ` Amit Kucheria
2009-12-04 10:38     ` Russell King - ARM Linux
2009-12-04  9:36   ` [RFC][PATCH 01/10] arm: mxc: New interrupt controller (TZIC) for i.MX5 family Uwe Kleine-König
2009-12-04 10:38   ` Russell King - ARM Linux
2009-12-04 17:01   ` Randy Dunlap
2009-12-04 20:30     ` Amit Kucheria

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=20091204113054.GO15126@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).