Linux-Renesas-SoC Archive on lore.kernel.org
 help / Atom feed
* [PATCH/RFT] arm64: dts: renesas: r8a77990-ebisu: Add BD9571 PMIC
@ 2018-12-01 14:43 Yoshihiro Kaneko
  2018-12-03  8:25 ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Yoshihiro Kaneko @ 2018-12-01 14:43 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Simon Horman, Geert Uytterhoeven, Magnus Damm, linux-arm-kernel

From: Takeshi Kihara <takeshi.kihara.df@renesas.com>

This patch adds the regulator definition required for operation of
S2RAM.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
---

This patch is based on the devel branch of Simon Horman's renesas tree.

 arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
index 62bdddc..3eee419 100644
--- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
@@ -425,6 +425,26 @@
 	};
 };
 
+&i2c_dvfs {
+	status = "okay";
+
+	clock-frequency = <400000>;
+
+	pmic: pmic@30 {
+		pinctrl-0 = <&irq0_pins>;
+		pinctrl-names = "default";
+
+		compatible = "rohm,bd9571mwv";
+		reg = <0x30>;
+		interrupt-parent = <&intc_ex>;
+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
+};
+
 &lvds0 {
 	status = "okay";
 
@@ -480,6 +500,11 @@
 		function = "du";
 	};
 
+	irq0_pins: irq0 {
+		groups = "intc_ex_irq0";
+		function = "intc_ex";
+	};
+
 	pwm3_pins: pwm3 {
 		groups = "pwm3_b";
 		function = "pwm3";
-- 
1.9.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH/RFT] arm64: dts: renesas: r8a77990-ebisu: Add BD9571 PMIC
  2018-12-01 14:43 [PATCH/RFT] arm64: dts: renesas: r8a77990-ebisu: Add BD9571 PMIC Yoshihiro Kaneko
@ 2018-12-03  8:25 ` Geert Uytterhoeven
  2019-01-04 13:26   ` Simon Horman
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2018-12-03  8:25 UTC (permalink / raw)
  To: Yoshihiro Kaneko
  Cc: Linux-Renesas, Simon Horman, Magnus Damm, Linux ARM, Marek Vasut

Hi Kaneko-san,

On Sat, Dec 1, 2018 at 3:43 PM Yoshihiro Kaneko <ykaneko0929@gmail.com> wrote:
> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>
> This patch adds the regulator definition required for operation of
> S2RAM.
>
> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>

Thanks for your patch!

> --- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> @@ -425,6 +425,26 @@
>         };
>  };
>
> +&i2c_dvfs {
> +       status = "okay";
> +
> +       clock-frequency = <400000>;
> +
> +       pmic: pmic@30 {
> +               pinctrl-0 = <&irq0_pins>;
> +               pinctrl-names = "default";
> +
> +               compatible = "rohm,bd9571mwv";
> +               reg = <0x30>;
> +               interrupt-parent = <&intc_ex>;
> +               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> +               interrupt-controller;
> +               #interrupt-cells = <2>;
> +               gpio-controller;
> +               #gpio-cells = <2>;

Just adding this node is not sufficient to make S2RAM work.
As per Documentation/devicetree/bindings/mfd/bd9571mwv.txt, you also have
to describe the DDR-Backup Power configuration.

On the Ebisu-4D development board, only the DDR0 power rail is used, and
needs to be kept powered when backup mode is enabled.

        rohm,ddr-backup-power = <0x1>;
        rohm,rstbmode-level;

Unfortunately resume from s2ram doesn't work with this, probably due to an
issue in ATF.  This may have been fixed in IPL and Secure Monitor Rev1.0.22,
which claims to add support for the Ebisu-4D board.

I don't know if plain Ebisu needs a different configuration.

> +       };
> +};
> +
>  &lvds0 {
>         status = "okay";
>

The rest is fine, hence with the above fixed and tested:

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH/RFT] arm64: dts: renesas: r8a77990-ebisu: Add BD9571 PMIC
  2018-12-03  8:25 ` Geert Uytterhoeven
@ 2019-01-04 13:26   ` Simon Horman
  2019-02-07 10:33     ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2019-01-04 13:26 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Yoshihiro Kaneko, Linux-Renesas, Magnus Damm, Linux ARM, Marek Vasut

On Mon, Dec 03, 2018 at 09:25:30AM +0100, Geert Uytterhoeven wrote:
> Hi Kaneko-san,
> 
> On Sat, Dec 1, 2018 at 3:43 PM Yoshihiro Kaneko <ykaneko0929@gmail.com> wrote:
> > From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> >
> > This patch adds the regulator definition required for operation of
> > S2RAM.
> >
> > Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> > Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> 
> Thanks for your patch!
> 
> > --- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> > +++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> > @@ -425,6 +425,26 @@
> >         };
> >  };
> >
> > +&i2c_dvfs {
> > +       status = "okay";
> > +
> > +       clock-frequency = <400000>;
> > +
> > +       pmic: pmic@30 {
> > +               pinctrl-0 = <&irq0_pins>;
> > +               pinctrl-names = "default";
> > +
> > +               compatible = "rohm,bd9571mwv";
> > +               reg = <0x30>;
> > +               interrupt-parent = <&intc_ex>;
> > +               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> > +               interrupt-controller;
> > +               #interrupt-cells = <2>;
> > +               gpio-controller;
> > +               #gpio-cells = <2>;
> 
> Just adding this node is not sufficient to make S2RAM work.
> As per Documentation/devicetree/bindings/mfd/bd9571mwv.txt, you also have
> to describe the DDR-Backup Power configuration.
> 
> On the Ebisu-4D development board, only the DDR0 power rail is used, and
> needs to be kept powered when backup mode is enabled.
> 
>         rohm,ddr-backup-power = <0x1>;
>         rohm,rstbmode-level;
> 
> Unfortunately resume from s2ram doesn't work with this, probably due to an
> issue in ATF.  This may have been fixed in IPL and Secure Monitor Rev1.0.22,
> which claims to add support for the Ebisu-4D board.

Thanks, do you know of any information on how to get IPL and Secure Monitor
running / updated on Ebisu-4D?

> I don't know if plain Ebisu needs a different configuration.
> 
> > +       };
> > +};
> > +
> >  &lvds0 {
> >         status = "okay";
> >
> 
> The rest is fine, hence with the above fixed and tested:
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

I assume that working S2RAM is part of such testing.
Is that correct?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH/RFT] arm64: dts: renesas: r8a77990-ebisu: Add BD9571 PMIC
  2019-01-04 13:26   ` Simon Horman
@ 2019-02-07 10:33     ` Geert Uytterhoeven
  0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2019-02-07 10:33 UTC (permalink / raw)
  To: Simon Horman
  Cc: Yoshihiro Kaneko, Linux-Renesas, Magnus Damm, Linux ARM, Marek Vasut

Hi Simon,

On Fri, Jan 4, 2019 at 2:27 PM Simon Horman <horms@verge.net.au> wrote:
> On Mon, Dec 03, 2018 at 09:25:30AM +0100, Geert Uytterhoeven wrote:
> > On Sat, Dec 1, 2018 at 3:43 PM Yoshihiro Kaneko <ykaneko0929@gmail.com> wrote:
> > > From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> > >
> > > This patch adds the regulator definition required for operation of
> > > S2RAM.
> > >
> > > Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> > > Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
> >
> > Thanks for your patch!
> >
> > > --- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> > > +++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
> > > @@ -425,6 +425,26 @@
> > >         };
> > >  };
> > >
> > > +&i2c_dvfs {
> > > +       status = "okay";
> > > +
> > > +       clock-frequency = <400000>;
> > > +
> > > +       pmic: pmic@30 {
> > > +               pinctrl-0 = <&irq0_pins>;
> > > +               pinctrl-names = "default";
> > > +
> > > +               compatible = "rohm,bd9571mwv";
> > > +               reg = <0x30>;
> > > +               interrupt-parent = <&intc_ex>;
> > > +               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> > > +               interrupt-controller;
> > > +               #interrupt-cells = <2>;
> > > +               gpio-controller;
> > > +               #gpio-cells = <2>;
> >
> > Just adding this node is not sufficient to make S2RAM work.
> > As per Documentation/devicetree/bindings/mfd/bd9571mwv.txt, you also have
> > to describe the DDR-Backup Power configuration.
> >
> > On the Ebisu-4D development board, only the DDR0 power rail is used, and
> > needs to be kept powered when backup mode is enabled.
> >
> >         rohm,ddr-backup-power = <0x1>;
> >         rohm,rstbmode-level;
> >
> > Unfortunately resume from s2ram doesn't work with this, probably due to an
> > issue in ATF.  This may have been fixed in IPL and Secure Monitor Rev1.0.22,
> > which claims to add support for the Ebisu-4D board.
>
> Thanks, do you know of any information on how to get IPL and Secure Monitor
> running / updated on Ebisu-4D?

This is now working with upstream ATF (v2.0-763-ga45ccf135e48efc7)

> > I don't know if plain Ebisu needs a different configuration.
> >
> > > +       };
> > > +};
> > > +
> > >  &lvds0 {
> > >         status = "okay";
> > >
> >
> > The rest is fine, hence with the above fixed and tested:
> >
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> I assume that working S2RAM is part of such testing.
> Is that correct?

That is correct.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-01 14:43 [PATCH/RFT] arm64: dts: renesas: r8a77990-ebisu: Add BD9571 PMIC Yoshihiro Kaneko
2018-12-03  8:25 ` Geert Uytterhoeven
2019-01-04 13:26   ` Simon Horman
2019-02-07 10:33     ` Geert Uytterhoeven

Linux-Renesas-SoC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-renesas-soc/0 linux-renesas-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-renesas-soc linux-renesas-soc/ https://lore.kernel.org/linux-renesas-soc \
		linux-renesas-soc@vger.kernel.org linux-renesas-soc@archiver.kernel.org
	public-inbox-index linux-renesas-soc


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-renesas-soc


AGPL code for this site: git clone https://public-inbox.org/ public-inbox