How to programe different MAC addresses into each iMX28 based board through MfgTool

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

How to programe different MAC addresses into each iMX28 based board through MfgTool

1,511 Views
x10
Contributor V

Hi, all

 

I'm considering how to programe an unique MAC address into each iMX28 board through MfgTool. Can I get the source code of MfgTool from somewhere? My last project is based in iMX25, and I just did modification on ATK as its source code is available on freesacle web site. The unique MAC address is programmed into board through ATK. So I wander if I can get the source code of MfgTool.

 

Thanks for any help.

 

BR

 

Cheng Shi

www.emtronix.com

Labels (1)
0 Kudos
5 Replies

717 Views
x10
Contributor V

BitBurner can flash HW_OCOTP_CUST0, HW_OCOTP_CUST1 manually, which is too slow to meet our requirements. It will be fine if MfgTool can run an exe program after the current programming process done each time. Is it possible to implement?

0 Kudos

717 Views
x10
Contributor V

Thanks for your suggestion so quickly. I download BitBurner_1.0.5.3, is it the latest version. I haven't used BitBurner before, so I'm not sure if it can program OTP bits automatically and sequentially. Anyway, I'll learn hwo to use it.

 

Thanks again.

 

BR

 

Cheng Shi

0 Kudos

717 Views
DanielYou
Contributor I

/linux/arch/arm/mach-mx28

..

static void __init mx28_init_fec(void)

{

{
 struct platform_device *pdev;
 struct mxs_dev_lookup *lookup;
 struct fec_platform_data *pfec;
 int i;
 u32 val;

 __raw_writel(BM_OCOTP_CTRL_RD_BANK_OPEN,
   IO_ADDRESS(OCOTP_PHYS_ADDR) + HW_OCOTP_CTRL_SET);

 while (BM_OCOTP_CTRL_BUSY &
  __raw_readl(IO_ADDRESS(OCOTP_PHYS_ADDR) + HW_OCOTP_CTRL))
  udelay(10);

 lookup = mxs_get_devices("mxs-fec");
 if (lookup == NULL || IS_ERR(lookup))
  return;

 for (i = 0; i < lookup->size; i++) {
  pdev = lookup->pdev + i;
  val =  __raw_readl(IO_ADDRESS(OCOTP_PHYS_ADDR) +
      HW_OCOTP_CUSTn(pdev->id));
  switch (pdev->id) {
  case 0:
   pdev->resource = fec0_resource;
   pdev->num_resources = ARRAY_SIZE(fec0_resource);
   pdev->dev.platform_data = &fec_pdata0;
   break;
  case 1:
   pdev->resource = fec1_resource;
   pdev->num_resources = ARRAY_SIZE(fec1_resource);
   pdev->dev.platform_data = &fec_pdata1;
   break;
  default:
   return;
  }

  pfec = (struct fec_platform_data *)pdev->dev.platform_data;
  pfec->mac[0] = 0x00;
  pfec->mac[1] = 0x04;
  pfec->mac[2] = (val >> 24) & 0xFF;
  pfec->mac[3] = (val >> 16) & 0xFF;
  pfec->mac[4] = (val >> 8) & 0xFF;
  pfec->mac[5] = (val >> 0) & 0xFF;

  mxs_add_device(pdev, 2);
 }
}

so use Bitburner to flash HW_OCOTP_CUST0, HW_OCOTP_CUST1. if you don't have this tools, contact your FAE.

0 Kudos

717 Views
chris321
Contributor IV

I also want to change the MACs, butthe device.c which is delivered with the freescale vm for ltib doesn't look like yours.

static void __init mx28_init_fec(void)

{

    struct platform_device *pdev;

    struct mxs_dev_lookup *lookup;

    int i;

    lookup = mxs_get_devices("mxs-fec");

    if (lookup == NULL || IS_ERR(lookup))

        return;

    for (i = 0; i < lookup->size; i++) {

        pdev = lookup->pdev + i;

        switch (pdev->id) {

        case 0:

            pdev->resource = fec0_resource;

            pdev->num_resources = ARRAY_SIZE(fec0_resource);

            pdev->dev.platform_data = &fec_pdata0;

            break;

        case 1:

            pdev->resource = fec1_resource;

            pdev->num_resources = ARRAY_SIZE(fec1_resource);

            pdev->dev.platform_data = &fec_pdata1;

            break;

        default:

            return;

        }

        mxs_add_device(pdev, 2);

    }

}



0 Kudos

717 Views
chris321
Contributor IV

Patch 0087-ENGR00125760-2-MX28-read-mac-address-from-fuse.patch is the answer.

0 Kudos