All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>
To: Heiko Thiery <heiko.thiery@gmail.com>
Cc: "Marek Vasut" <marek.vasut@gmail.com>,
	U-Boot-Denx <u-boot@lists.denx.de>,
	"Ying-Chun Liu" <paul.liu@linaro.org>,
	"Peng Fan" <peng.fan@nxp.com>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Marcel Ziswiler" <marcel.ziswiler@toradex.com>,
	"Tim Harvey" <tharvey@gateworks.com>,
	"Sean Anderson" <seanga2@gmail.com>,
	"Thomas Schäfer" <thomas.schaefer@kontron.com>,
	"Stefano Babic" <sbabic@denx.de>,
	"Fabio Estevam" <festevam@denx.de>
Subject: Re: [PATCH v4] imx: add i.MX8MN DDR3L evk board support
Date: Mon, 22 Aug 2022 13:42:41 +0200	[thread overview]
Message-ID: <CAOf5uwm0V+Uotbc=N3DWdo0kpUCEMg7Gd+AB-g9=2wWAqq64yg@mail.gmail.com> (raw)
In-Reply-To: <CAEyMn7aJPcL6Z_59wz=7xvJuuwgC0Ey6A5oHddkr_9_Fp8NLmg@mail.gmail.com>

Hi Heiko

Did you solve it after your patch on regulator?

Michael

On Sun, Jun 19, 2022 at 4:54 PM Heiko Thiery <heiko.thiery@gmail.com> wrote:
>
> Hi,
>
> Am So., 19. Juni 2022 um 16:51 Uhr schrieb Michael Nazzareno Trimarchi
> <michael@amarulasolutions.com>:
> >
> > Hi
> >
> > Il dom 19 giu 2022, 16:47 Heiko Thiery <heiko.thiery@gmail.com> ha scritto:
> >>
> >> Hi,
> >>
> >> Am So., 19. Juni 2022 um 16:40 Uhr schrieb Michael Nazzareno Trimarchi
> >> <michael@amarulasolutions.com>:
> >> >
> >> > Hi Heiko
> >> >
> >> > On Sun, Jun 19, 2022 at 8:12 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:
> >> > >
> >> > > Hi,
> >> > >
> >> > > Am So., 19. Juni 2022 um 07:59 Uhr schrieb Michael Nazzareno Trimarchi
> >> > > <michael@amarulasolutions.com>:
> >> > > >
> >> > > > Hi
> >> > > >
> >> > > > Il sab 18 giu 2022, 23:56 Heiko Thiery <heiko.thiery@gmail.com> ha scritto:
> >> > > >>
> >> > > >> Hi Michael, Hi Marek,
> >> > > >>
> >> > > >> Am Mi., 15. Juni 2022 um 08:43 Uhr schrieb Michael Nazzareno Trimarchi
> >> > > >> <michael@amarulasolutions.com>:
> >> > > >> >
> >> > > >> > Hi Heiko
> >> > > >> >
> >> > > >> > On Wed, Jun 15, 2022 at 8:23 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:
> >> > > >> > >
> >> > > >> > > Hi Marek,
> >> > > >> > >
> >> > > >> > > [SNIP]
> >> > > >> > >
> >> > > >> > > > > diff --git a/board/freescale/imx8mn_evk/spl.c b/board/freescale/imx8mn_evk/spl.c
> >> > > >> > > > > index 14cb51368f..0d9909a662 100644
> >> > > >> > > > > --- a/board/freescale/imx8mn_evk/spl.c
> >> > > >> > > > > +++ b/board/freescale/imx8mn_evk/spl.c
> >> > > >> > > > > @@ -83,6 +83,15 @@ int power_init_board(void)
> >> > > >> > > > >  #ifdef CONFIG_IMX8MN_LOW_DRIVE_MODE
> >> > > >> > > > >         /* Set VDD_SOC/VDD_DRAM to 0.8v for low drive mode */
> >> > > >> > > > >         pmic_reg_write(dev, PCA9450_BUCK1OUT_DVS0, 0x10);
> >> > > >> > > > > +#elif defined(CONFIG_TARGET_IMX8MN_DDR3L_EVK)
> >> > > >> > > > > +       /* Set VDD_SOC to 0.85v for DDR3L at 1600MTS */
> >> > > >> > > > > +       pmic_reg_write(dev, PCA9450_BUCK1OUT_DVS0, 0x14);
> >> > > >> > > > > +
> >> > > >> > > > > +       /* Disable the BUCK2 */
> >> > > >> > > > > +       pmic_reg_write(dev, PCA9450_BUCK2CTRL, 0x48);
> >> > > >> > > > > +
> >> > > >> > > > > +       /* Set NVCC_DRAM to 1.35v */
> >> > > >> > > > > +       pmic_reg_write(dev, PCA9450_BUCK6OUT, 0x1E);
> >> > > >> > > > >  #else
> >> > > >> > > >
> >> > > >> > > > All this part is not done by the spl pmic driver?
> >> > > >> > >
> >> > > >> > > I saw that you added the PCA9450 driver. Do you know if this
> >> > > >> > > initialization can be done by the driver when CONFIG_SPL_DM_REGULATOR
> >> > > >> > > is enabled? If I see this correctly, it can't be done. Is that
> >> > > >> > > correct?
> >> > > >> >
> >> > > >> > +&i2c1 {
> >> > > >> > +       u-boot,dm-spl;
> >> > > >> > +};
> >> > > >> > +
> >> > > >> > +&{/soc@0/bus@30800000/i2c@30a20000/pmic@4b} {
> >> > > >> > +       u-boot,dm-spl;
> >> > > >> > +};
> >> > > >> > +
> >> > > >> > +&{/soc@0/bus@30800000/i2c@30a20000/pmic@4b/regulators} {
> >> > > >> > +       u-boot,dm-spl;
> >> > > >> > +};
> >> > > >> > +
> >> > > >> > +&pinctrl_i2c1 {
> >> > > >> > +       u-boot,dm-spl;
> >> > > >> > +};
> >> > > >> > +
> >> > > >> > +&pinctrl_pmic {
> >> > > >> > +       u-boot,dm-spl;
> >> > > >> > +};
> >> > > >> > +
> >> > > >> >
> >> > > >> > Maybe something like this should work. Now question is about should be
> >> > > >> > done in pre-reloc or not
> >> > > >>
> >> > > >> It took me a little while to understand what was meant by this. In the
> >> > > >> meantime I could
> >> > > >> change the PMIC/Regulator initialization to DT/DM and can make the setting so.
> >> > > >> What is not clear to me yet is at which point this should be done
> >> > > >> (regulators_enable_boot_on()). Currently I do it in the board/spl
> >> > > >> specific board_init_f().
> >> > > >>
> >> > > >> Do any of you have any advice here?
> >> > > >
> >> > > >
> >> > > > After having a discussion with you, i found that maybe i have some problem and some of the setting should be done before ddr inizialization. I will take a look on it on afternoon. I know marek was working on some way to probe driver during binding and we need even to be sure that this can happen before memory training.
> >> > > >
> >> > >
> >> > > Currently I added it in  board_init_f() right before spl_dram_init()
> >> > > [1] and it works. I also tried to put it in power_init_board() [2] but
> >> > > this does not work.
> >> > >
> >> > > [1] https://elixir.bootlin.com/u-boot/v2022.04/source/board/freescale/imx8mn_evk/spl.c#L162
> >> > > [2] https://elixir.bootlin.com/u-boot/v2022.04/source/board/freescale/imx8mn_evk/spl.c#L62
> >> >
> >> > Does it work if you mark pre-reoloc, pmic, i2c, and  pinctrl?
> >>
> >> I added on all nodes the u-boot,dm-pre-reloc but this does not help
> >> when trying to do the init in power_init_board().
> >
> >
> > From code I navigate spl_early_init should bind the driver in pre-reloc
>
> What function should be called  to probe the driver? Currently I use
> regulators_enable_boot_on().
>
> > Michael
> >>
> >>
> >> >
> >> > Michael
> >> >
> >> > >
> >> > > --
> >> > > Heiko
> >> > >
> >> > > > Michael
> >> > > >>
> >> > > >>
> >> > > >> Thanks
> >> > > >> --
> >> > > >> Heiko
> >> > > >>
> >> > > >> > Michael
> >> > > >> > >
> >> > > >> > > --
> >> > > >> > > Heiko
> >> > > >> >
> >> > > >> >
> >> > > >> >
> >> > > >> > --
> >> > > >> > Michael Nazzareno Trimarchi
> >> > > >> > Co-Founder & Chief Executive Officer
> >> > > >> > M. +39 347 913 2170
> >> > > >> > michael@amarulasolutions.com
> >> > > >> > __________________________________
> >> > > >> >
> >> > > >> > Amarula Solutions BV
> >> > > >> > Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
> >> > > >> > T. +31 (0)85 111 9172
> >> > > >> > info@amarulasolutions.com
> >> > > >> > www.amarulasolutions.com
> >> >
> >> >
> >> >
> >> > --
> >> > Michael Nazzareno Trimarchi
> >> > Co-Founder & Chief Executive Officer
> >> > M. +39 347 913 2170
> >> > michael@amarulasolutions.com
> >> > __________________________________
> >> >
> >> > Amarula Solutions BV
> >> > Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
> >> > T. +31 (0)85 111 9172
> >> > info@amarulasolutions.com
> >> > www.amarulasolutions.com



-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com

      reply	other threads:[~2022-08-22 11:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 21:10 [PATCH v4] imx: add i.MX8MN DDR3L evk board support Heiko Thiery
2022-06-14  1:47 ` Peng Fan (OSS)
2022-06-14  6:55 ` Michael Nazzareno Trimarchi
2022-06-14 11:50   ` Heiko Thiery
2022-06-15  6:23   ` Heiko Thiery
2022-06-15  6:43     ` Michael Nazzareno Trimarchi
2022-06-18 21:56       ` Heiko Thiery
2022-06-19  5:58         ` Michael Nazzareno Trimarchi
2022-06-19  6:11           ` Heiko Thiery
2022-06-19 14:40             ` Michael Nazzareno Trimarchi
2022-06-19 14:47               ` Heiko Thiery
2022-06-19 14:50                 ` Heiko Thiery
2022-06-19 14:50                 ` Michael Nazzareno Trimarchi
2022-06-19 14:53                   ` Heiko Thiery
2022-08-22 11:42                     ` Michael Nazzareno Trimarchi [this message]

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='CAOf5uwm0V+Uotbc=N3DWdo0kpUCEMg7Gd+AB-g9=2wWAqq64yg@mail.gmail.com' \
    --to=michael@amarulasolutions.com \
    --cc=festevam@denx.de \
    --cc=festevam@gmail.com \
    --cc=heiko.thiery@gmail.com \
    --cc=marcel.ziswiler@toradex.com \
    --cc=marek.vasut@gmail.com \
    --cc=paul.liu@linaro.org \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@denx.de \
    --cc=seanga2@gmail.com \
    --cc=tharvey@gateworks.com \
    --cc=thomas.schaefer@kontron.com \
    --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 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.