All of lore.kernel.org
 help / color / mirror / Atom feed
From: Padmarao Begari <padmarao.b@gmail.com>
To: Bin Meng <bmeng.cn@gmail.com>
Cc: Padmarao Begari <padmarao.begari@microchip.com>,
	 U-Boot Mailing List <u-boot@lists.denx.de>,
	Rick Chen <rick@andestech.com>,  Anup Patel <anup.patel@wdc.com>,
	Atish Patra <atish.patra@wdc.com>, Heiko Schocher <hs@denx.de>,
	 cyril.jean@microchip.com,
	Lewis Hanly <lewis.hanly@microchip.com>,
	 Conor Dooley <conor.dooley@microchip.com>,
	Daire McNamara <daire.mcnamara@microchip.com>,
	 ivan.griffin@microchip.com,
	valentina.fernandezalanis@microchip.com
Subject: Re: [PATCH v1 2/5] riscv: Update Microchip MPFS Icicle Kit support
Date: Tue, 2 Nov 2021 16:08:43 +0530	[thread overview]
Message-ID: <CAP95y-gSUtc58H8igyeKn+E3FgOfG6gzEKgXtnZ87=BDdd60eQ@mail.gmail.com> (raw)
In-Reply-To: <CAEUhbmV965rGoKathr6R3LWovNu4aB7voPtRUSvMX7EmPXOvsg@mail.gmail.com>

On Mon, Nov 1, 2021 at 2:13 PM Bin Meng <bmeng.cn@gmail.com> wrote:

> On Fri, Oct 22, 2021 at 4:58 PM Padmarao Begari
> <padmarao.begari@microchip.com> wrote:
> >
> > This patch updates Microchip MPFS Icicle Kit support. For now,
> > add Microchip I2C driver, set environment variables for
> > mac addesses and default build for SBI_V02.
> >
> > Signed-off-by: Padmarao Begari <padmarao.begari@microchip.com>
> > ---
> >  board/microchip/mpfs_icicle/Kconfig       |  5 +++++
> >  board/microchip/mpfs_icicle/mpfs_icicle.c | 17 ++++++++++++++++-
> >  configs/microchip_mpfs_icicle_defconfig   |  1 -
> >  3 files changed, 21 insertions(+), 2 deletions(-)
> >
> > diff --git a/board/microchip/mpfs_icicle/Kconfig
> b/board/microchip/mpfs_icicle/Kconfig
> > index 4678462378..092e411215 100644
> > --- a/board/microchip/mpfs_icicle/Kconfig
> > +++ b/board/microchip/mpfs_icicle/Kconfig
> > @@ -45,5 +45,10 @@ config BOARD_SPECIFIC_OPTIONS # dummy
> >         imply MMC_WRITE
> >         imply MMC_SDHCI
> >         imply MMC_SDHCI_CADENCE
> > +       imply MMC_SDHCI_ADMA
> > +       imply MMC_HS200_SUPPORT
> > +       imply CMD_I2C
> > +       imply DM_I2C
> > +       imply SYS_I2C_MICROCHIP
> >
> >  endif
> > diff --git a/board/microchip/mpfs_icicle/mpfs_icicle.c
> b/board/microchip/mpfs_icicle/mpfs_icicle.c
> > index afef719dff..e74c9fb03c 100644
> > --- a/board/microchip/mpfs_icicle/mpfs_icicle.c
> > +++ b/board/microchip/mpfs_icicle/mpfs_icicle.c
> > @@ -119,7 +119,22 @@ int board_late_init(void)
> >                 if (icicle_mac_addr[idx] == ':')
> >                         icicle_mac_addr[idx] = ' ';
> >         }
> > -       env_set("icicle_mac_addr", icicle_mac_addr);
> > +       env_set("icicle_mac_addr0", icicle_mac_addr);
>
> What's this environment for? Shouldn't the U-Boot standard environment
> variable "ethaddr" be set here?
>
>
The "icicle_mac_addr0" and "icicle_mac_addr1" environment variables are
used for updating the mac
addresses(mac0 and mac1) in the FIT image using fdt overlays like below.

   fdt addr ${fdt_addr_r}
   fdt set /soc/ethernet@20112000 local-mac-address ${icicle_mac_addr0}
   fdt set /soc/ethernet@20110000 local-mac-address ${icicle_mac_addr1}

The "ethaddr" variable comes in the U-Boot like "00:04:a3:d6:45:94" but we
want "[00 04 a3 d6 45 94]" to update the mac address in the FIT Image.

>
> > +
> > +       mac_addr[5] = device_serial_number[0] + 1;
> > +
> > +       icicle_mac_addr[0] = '[';
> > +
> > +       sprintf(&icicle_mac_addr[1], "%pM", mac_addr);
>
> "eth1addr"?
>
>
No, a second mac address environment variable "icicle_mac_addr1".
only one MAC address is used in the U-Boot and two MAC's in the Linux.


> > +
> > +       icicle_mac_addr[18] = ']';
> > +       icicle_mac_addr[19] = '\0';
> > +
> > +       for (idx = 0; idx < 20; idx++) {
> > +               if (icicle_mac_addr[idx] == ':')
> > +                       icicle_mac_addr[idx] = ' ';
> > +       }
> > +       env_set("icicle_mac_addr1", icicle_mac_addr);
> >
> >         return 0;
> >  }
> > diff --git a/configs/microchip_mpfs_icicle_defconfig
> b/configs/microchip_mpfs_icicle_defconfig
> > index 90ae76cc12..b3c7e6db8f 100644
> > --- a/configs/microchip_mpfs_icicle_defconfig
> > +++ b/configs/microchip_mpfs_icicle_defconfig
> > @@ -6,7 +6,6 @@ CONFIG_DEFAULT_DEVICE_TREE="microchip-mpfs-icicle-kit"
> >  CONFIG_TARGET_MICROCHIP_ICICLE=y
> >  CONFIG_ARCH_RV64I=y
> >  CONFIG_RISCV_SMODE=y
> > -CONFIG_SBI_V01=y
> >  CONFIG_DISTRO_DEFAULTS=y
> >  CONFIG_SYS_LOAD_ADDR=0x80200000
> >  CONFIG_FIT=y
> > --
>
> Regards,
> Bin
>

  reply	other threads:[~2021-11-02 10:39 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22  8:56 [PATCH v1 0/5] Update Microchip PolarFire SoC support Padmarao Begari
2021-10-22  8:56 ` [PATCH v1 1/5] riscv: dts: Split Microchip device tree Padmarao Begari
2021-11-01  8:34   ` Leo Liang
2021-11-01  8:41   ` Bin Meng
2021-11-02  9:52     ` Padmarao Begari
2021-10-22  8:56 ` [PATCH v1 2/5] riscv: Update Microchip MPFS Icicle Kit support Padmarao Begari
2021-11-01  8:36   ` Leo Liang
2021-11-01  8:43   ` Bin Meng
2021-11-02 10:38     ` Padmarao Begari [this message]
2021-10-22  8:56 ` [PATCH v1 3/5] i2c: Add Microchip PolarFire SoC I2C driver Padmarao Begari
2021-11-01  8:53   ` Leo Liang
2021-10-22  8:56 ` [PATCH v1 4/5] net: macb: Compatible as per device tree Padmarao Begari
2021-11-01  8:30   ` Leo Liang
2021-11-01  8:44   ` Bin Meng
2021-11-02 11:03     ` Padmarao Begari
2021-11-02 12:45       ` Bin Meng
2021-11-03 11:47         ` Padmarao Begari
2021-11-03 13:10           ` Padmarao Begari
2021-11-11  8:07             ` Bin Meng
2021-11-11  9:06               ` Padmarao Begari
2021-11-11 12:54                 ` Michael Walle
2021-11-11 13:17                   ` Ivan.Griffin
2021-11-12  1:28                     ` Bin Meng
2021-11-12  9:36                       ` Padmarao Begari
2021-11-11 13:20                   ` Conor.Dooley
2021-11-11  9:41   ` macb clock handling (Was: [PATCH v1 4/5] net: macb: Compatible as per device tree) Heiko Stübner
2021-11-25 19:32     ` Heiko Stübner
2021-10-22  8:56 ` [PATCH v1 5/5] doc: board: Update Microchip MPFS Icicle Kit doc Padmarao Begari
2021-11-01  8:33   ` Leo Liang
2021-11-01  8:46   ` Bin Meng
2021-11-02 11:04     ` Padmarao Begari

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='CAP95y-gSUtc58H8igyeKn+E3FgOfG6gzEKgXtnZ87=BDdd60eQ@mail.gmail.com' \
    --to=padmarao.b@gmail.com \
    --cc=anup.patel@wdc.com \
    --cc=atish.patra@wdc.com \
    --cc=bmeng.cn@gmail.com \
    --cc=conor.dooley@microchip.com \
    --cc=cyril.jean@microchip.com \
    --cc=daire.mcnamara@microchip.com \
    --cc=hs@denx.de \
    --cc=ivan.griffin@microchip.com \
    --cc=lewis.hanly@microchip.com \
    --cc=padmarao.begari@microchip.com \
    --cc=rick@andestech.com \
    --cc=u-boot@lists.denx.de \
    --cc=valentina.fernandezalanis@microchip.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.