i.mx 53 qsb start-r pin pad macros

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.mx 53 qsb start-r pin pad macros

Jump to solution
1,619 Views
poornat
Contributor II

hi everyone......

I am new to embedded...., presently working on imx53 QSB start-r.

Can anyone clarify what following macros actually return or what actually they mean....?

Macros are available in \kernel\arch\arm\plat-mxc\include\mach\iomux-mx53.h

.

I am using linaro build of ICS.

 

#define MX53_PAD_KEY_ROW0__UART4_RXD_MUX      (_MX53_PAD_KEY_ROW0__UART4_RXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))
and

#define MX53_PAD_CSI0_DAT13__UART4_RXD_MUX      (_MX53_PAD_CSI0_DAT13__UART4_RXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))

 

What is the actual difference in using these macros, in which context should each be used??

here I am also attaching iomux-mx53.h file....

Thanks...

Original Attachment has been moved to: iomux-mx53.h.zip

Labels (1)
Tags (1)
0 Kudos
1 Solution
1,296 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Poorna,

       Try to do following :

(1)Adjusting muxing sequence of UART4

static iomux_v3_cfg_t mx53_loco_pads[] = {

.....

/* CSI0 */

// MX53_PAD_CSI0_DAT13__IPU_CSI0_D_13,

MX53_PAD_CSI0_DAT14__IPU_CSI0_D_14,

MX53_PAD_CSI0_DAT15__IPU_CSI0_D_15,

// MX53_PAD_CSI0_DAT16__IPU_CSI0_D_16,

// MX53_PAD_CSI0_DAT17__IPU_CSI0_D_17,

MX53_PAD_CSI0_DAT18__IPU_CSI0_D_18,

MX53_PAD_CSI0_DAT19__IPU_CSI0_D_19,

MX53_PAD_CSI0_VSYNC__IPU_CSI0_VSYNC,

MX53_PAD_CSI0_MCLK__IPU_CSI0_HSYNC,

MX53_PAD_CSI0_PIXCLK__IPU_CSI0_PIXCLK,

/*UART4*/

MX53_PAD_CSI0_DAT12__UART4_TXD_MUX,

MX53_PAD_CSI0_DAT13__UART4_RXD_MUX,

MX53_PAD_CSI0_DAT17__UART4_CTS,

MX53_PAD_CSI0_DAT16__UART4_RTS,

.....

}

(2)Comment MX53_PAD_CSI0_DAT12__GPIO5_30

In funciton static void __init mx53_loco_board_init(void), CSI0_DAT12 pin has been muxed as GPIO5_30, You should consider how to comment it .

static void __init mx53_loco_board_init(void)

{

int i, ret;

iomux_v3_cfg_t mc34708_int = MX53_PAD_CSI0_DAT12__GPIO5_30;

...

if (board_is_mx53_loco_mc34708()) {

  if (board_is_rev(IMX_BOARD_REV_2)) {/*Board RevA*/

   mc34708_int = MX53_PAD_CSI0_DAT12__GPIO5_30;

   mx53_loco_mc34708_irq = MX53_LOCO_MC34708_IRQ_REVA;

  } else if (board_is_rev(IMX_BOARD_REV_4)) {/*Board RevB*/

   mc34708_int = MX53_PAD_CSI0_DAT5__GPIO5_23;

   mx53_loco_mc34708_irq = MX53_LOCO_MC34708_IRQ_REVB;

  }

  mxc_iomux_v3_setup_pad(mc34708_int);

  ret = gpio_request(mx53_loco_mc34708_irq, "mc34708-int");

  if (ret) {

   printk(KERN_ERR"request mc34708-int error!!\n");

   return;

....

}

Regards,

Weidong

View solution in original post

0 Kudos
15 Replies
1,296 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Poorna,

    The definitions of  all signals muxing are in iomux-mx53.h file. For example:

>>#define MX53_PAD_KEY_ROW0__UART4_RXD_MUX      (_MX53_PAD_KEY_ROW0__UART4_RXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))

It means KEY_ROW0 pad is muxed as UART4_RXD signal.

>>#define MX53_PAD_CSI0_DAT13__UART4_RXD_MUX      (_MX53_PAD_CSI0_DAT13__UART4_RXD_MUX | MUX_PAD_CTRL(MX53_UART_PAD_CTRL))

It means CSI0_DAT13 pad is muxed as UART4_RXD signal.

That's to say, One signal(such as UART4_RXD) in internal IP can be muxed out through different PADs. then which one you will use ? you can determine it according to your applicaion.

Regards,

Weidong

1,296 Views
poornat
Contributor II

Thank you Weidong for your quick reply.

I have to work  with UART4 pins for connecting the device which i need to work with. In order to enable UART4 I need to use cts,rts.tx.rx pins of uart4. In some cases we usually pull-up/pull-down some pins to enable UART, in IMX53 how can i enable and disable uart4 pins through programming. I will be grateful for your reply. I need to implement some functions to enable and disable UART4 on imx53.

0 Kudos
1,296 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Poorna,

     Please tell me which CPU PADs you use to mux UART4_CTS,UART4_RTS,UART4_TXD,UART4_RXD On your schematic.

UART4_CTS---> ?

UART4_RTS--->?

UART4_TXD---> ?

UART4_RXD---> ?

"?" - means which CPU pads.

weidong

0 Kudos
1,296 Views
poornat
Contributor II

Hi Weidong,

One more help, how to do similar operation like pullup and puldown for UART4 in order to enable and disable UART4 ....

I am using ICS version of android from Linaro. I am using Software control. And if I wish to up a gpio pin like "MX53_PAD_CSI0_DAT14__GPIO6_0" do we have some functio/macro like set_gpio()??

0 Kudos
1,296 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Poorna,

     The final reslease version of android BSP for i.MX53 is R10.4 , it is android 2.3.7 and linux kernel is 2.6.35. But R13.4.1 version, even there is android BSP for i.MX53, we didn't do complete test for this version.

weidong

0 Kudos
1,296 Views
poornat
Contributor II

Hi,

I am using Linaro ICS bsp with kernel 3.1.0, basically this release is for QSB board but we are using it on Start-r board. Is there any problem with respect to the PMIC and presently we don't worry about the power aspects.

We have commented "MX53_PAD_CSI0_DAT12__IPU_CSI0_D_12" in file board-mx53_loco.c, even after commenting cant we use this pin for UART4 ?

with reagrds

poorna t

0 Kudos
1,296 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Poorna,

      Since you have muxed CSI0_DAT12 as CSI0_D_12, you can't mux it as "UART4_TXD". you should mux UART4_TXD via other pads. Such as KEY_COL0 pin (MX53_PAD_KEY_COL0__UART4_TXD_MUX).

weidong

0 Kudos
1,296 Views
poornat
Contributor II

hello Weidong,

      Thanks, I have commented MX53_PAD_CSI0_DAT12__IPU_CSI0_D_12 line in file  'board-mx53_loco.c', still can't I use it for UART4. I am noway concerned about PMIC. Will pmic effect my operation?.

          Can you Give me a brief on PMIC usage, or a way to completely disable it.

    The other issue I am facing is Mouse isn't working with ICS build.

Thanks

- Poorna T

0 Kudos
1,296 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi,Poorna,

      The board you are using is MX53QSB(DA9053+I.MX535) or MX53-START-R(MC34708+I.MX535) ?

weidong

0 Kudos
1,296 Views
poornat
Contributor II

Hello Weidong,

     I am using MX53-START-R, as i have also mentioned this in my first post.

Thank You....

0 Kudos
1,297 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Poorna,

       Try to do following :

(1)Adjusting muxing sequence of UART4

static iomux_v3_cfg_t mx53_loco_pads[] = {

.....

/* CSI0 */

// MX53_PAD_CSI0_DAT13__IPU_CSI0_D_13,

MX53_PAD_CSI0_DAT14__IPU_CSI0_D_14,

MX53_PAD_CSI0_DAT15__IPU_CSI0_D_15,

// MX53_PAD_CSI0_DAT16__IPU_CSI0_D_16,

// MX53_PAD_CSI0_DAT17__IPU_CSI0_D_17,

MX53_PAD_CSI0_DAT18__IPU_CSI0_D_18,

MX53_PAD_CSI0_DAT19__IPU_CSI0_D_19,

MX53_PAD_CSI0_VSYNC__IPU_CSI0_VSYNC,

MX53_PAD_CSI0_MCLK__IPU_CSI0_HSYNC,

MX53_PAD_CSI0_PIXCLK__IPU_CSI0_PIXCLK,

/*UART4*/

MX53_PAD_CSI0_DAT12__UART4_TXD_MUX,

MX53_PAD_CSI0_DAT13__UART4_RXD_MUX,

MX53_PAD_CSI0_DAT17__UART4_CTS,

MX53_PAD_CSI0_DAT16__UART4_RTS,

.....

}

(2)Comment MX53_PAD_CSI0_DAT12__GPIO5_30

In funciton static void __init mx53_loco_board_init(void), CSI0_DAT12 pin has been muxed as GPIO5_30, You should consider how to comment it .

static void __init mx53_loco_board_init(void)

{

int i, ret;

iomux_v3_cfg_t mc34708_int = MX53_PAD_CSI0_DAT12__GPIO5_30;

...

if (board_is_mx53_loco_mc34708()) {

  if (board_is_rev(IMX_BOARD_REV_2)) {/*Board RevA*/

   mc34708_int = MX53_PAD_CSI0_DAT12__GPIO5_30;

   mx53_loco_mc34708_irq = MX53_LOCO_MC34708_IRQ_REVA;

  } else if (board_is_rev(IMX_BOARD_REV_4)) {/*Board RevB*/

   mc34708_int = MX53_PAD_CSI0_DAT5__GPIO5_23;

   mx53_loco_mc34708_irq = MX53_LOCO_MC34708_IRQ_REVB;

  }

  mxc_iomux_v3_setup_pad(mc34708_int);

  ret = gpio_request(mx53_loco_mc34708_irq, "mc34708-int");

  if (ret) {

   printk(KERN_ERR"request mc34708-int error!!\n");

   return;

....

}

Regards,

Weidong

0 Kudos
1,296 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi,Poorna,

       Can UART4 be used now ?

Regards,

Weidong

0 Kudos
1,296 Views
poornat
Contributor II

Hi Weidong,

Thankyou... now I am able to work with UART4 on imx53. As I am using ICS build I am facing some problems.

0 Kudos
1,296 Views
poornat
Contributor II

Hi Weidong,

I am using following pins

MX53_PAD_CSI0_DAT17__UART4_CTS

    MX53_PAD_CSI0_DAT16__UART4_RTS

    MX53_PAD_CSI0_DAT13__UART4_RXD_MUX

    MX53_PAD_CSI0_DAT12__UART4_TXD_MUX

ThankYou.....

Regards

Poorna T


0 Kudos
1,296 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Poorna,

    Open linux/arch/arm/mach-mx5/mx53_loco.c and add those pin definitions:

static iomux_v3_cfg_t mx53_loco_pads[] = {

.....

/* CSI0 */

// MX53_PAD_CSI0_DAT13__IPU_CSI0_D_13,

MX53_PAD_CSI0_DAT14__IPU_CSI0_D_14,

MX53_PAD_CSI0_DAT15__IPU_CSI0_D_15,

// MX53_PAD_CSI0_DAT16__IPU_CSI0_D_16,

// MX53_PAD_CSI0_DAT17__IPU_CSI0_D_17,

MX53_PAD_CSI0_DAT18__IPU_CSI0_D_18,

MX53_PAD_CSI0_DAT19__IPU_CSI0_D_19,

MX53_PAD_CSI0_VSYNC__IPU_CSI0_VSYNC,

MX53_PAD_CSI0_MCLK__IPU_CSI0_HSYNC,

MX53_PAD_CSI0_PIXCLK__IPU_CSI0_PIXCLK,

/*UART4*/

MX53_PAD_CSI0_DAT17__UART4_CTS,

MX53_PAD_CSI0_DAT16__UART4_RTS,

MX53_PAD_CSI0_DAT13__UART4_RXD_MUX,

MX53_PAD_CSI0_DAT12__UART4_TXD_MUX,

.....

}

But by default, CSI0_DAT12 is used for interrupt of pmic on MX53QSB, please check your board.

mc34708_int = MX53_PAD_CSI0_DAT12__GPIO5_30; //QSB-STAR-R board , PMIC is MC34708

da9052_csi0_d12 = MX53_PAD_CSI0_DAT12__IPU_CSI0_D_12;// QSB board. pmic is DA9053

So if you are using one of above 2 boards, CSI0_DAT12 pin probably can't be used.

In addition, you don't need to do any extra pull-up / pull-down for UART4. these have been done in muxing definitions.

you can try it .

Regards,

Weidong