mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] ARM: rdu2: config PMIC SW1AB and SW1C rails to 1.375
Date: Mon, 17 Sep 2018 18:41:36 +0200	[thread overview]
Message-ID: <1537202496.3362.133.camel@pengutronix.de> (raw)
In-Reply-To: <20180917163627.14746-1-l.stach@pengutronix.de>

Am Montag, den 17.09.2018, 18:36 +0200 schrieb Lucas Stach:
> This is the default out-of-reset voltage, but if only the i.MX6 SoC
> got reset, the PMIC might still be stuck at the lower volatge for the
> slow operating point.
> 
Please ignore, this patch is incomplete and I have a few more that
might fit into this series, so will resend later.

Regards,
Lucas

> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  arch/arm/boards/zii-imx6q-rdu2/board.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/arch/arm/boards/zii-imx6q-rdu2/board.c b/arch/arm/boards/zii-imx6q-rdu2/board.c
> index f6c908c9f16d..bce221bf8d20 100644
> --- a/arch/arm/boards/zii-imx6q-rdu2/board.c
> +++ b/arch/arm/boards/zii-imx6q-rdu2/board.c
> @@ -137,10 +137,27 @@ late_initcall(rdu2_enable_front_panel_usb);
>  
>  static int rdu2_devices_init(void)
>  {
> > +	struct i2c_client client;
> +
> >  	if (!of_machine_is_compatible("zii,imx6q-zii-rdu2") &&
> >  	    !of_machine_is_compatible("zii,imx6qp-zii-rdu2"))
> >  		return 0;
>  
> > +	client.adapter = i2c_get_adapter(1);
> > +	if (client.adapter) {
> > +		u8 reg;
> +
> > +		/*
> > +		 * Reset PMIC SW1AB and SW1C rails to 1.375V. If an event
> > +		 * caused only the i.MX6 SoC reset, the PMIC might still be
> > +		 * stuck on the low voltage for the slow operating point.
> > +		 */
> > +		client.addr = 0x08; /* PMIC i2c address */
> > +		reg = 0x2b; /* 1.375V, valid for both rails */
> > +		i2c_write_reg(&client, 0x20, &reg, 1);
> > +		i2c_write_reg(&client, 0x2e, &reg, 1);
> > +	}
> +
> >  	barebox_set_hostname("rdu2");
>  
> >  	imx6_bbu_internal_spi_i2c_register_handler("SPI", "/dev/m25p0.barebox",

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2018-09-17 16:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-17 16:36 Lucas Stach
2018-09-17 16:36 ` [PATCH 2/2] ARM: rdu2: configure the USB port as OTG Lucas Stach
2018-09-17 16:41 ` Lucas Stach [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=1537202496.3362.133.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=barebox@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