devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Geis <pgwipeout@gmail.com>
To: Brian Norris <briannorris@chromium.org>
Cc: "MyungJoo Ham" <myungjoo.ham@samsung.com>,
	"Kyungmin Park" <kyungmin.park@samsung.com>,
	"Chanwoo Choi" <cw00.choi@samsung.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	"Lin Huang" <hl@rock-chips.com>,
	arm-mail-list <linux-arm-kernel@lists.infradead.org>,
	"Derek Basehore" <dbasehore@chromium.org>,
	devicetree <devicetree@vger.kernel.org>,
	linux-pm@vger.kernel.org, "Heiko Stuebner" <heiko@sntech.de>,
	"Enric Balletbo i Serra" <enric.balletbo@collabora.com>,
	"Gaël PORTAY" <gael.portay@collabora.com>,
	"Daniel Lezcano" <daniel.lezcano@linaro.org>
Subject: Re: [PATCH v2 12/15] arm64: dts: rockchip: Enable dmc and dfi nodes on gru
Date: Fri, 4 Mar 2022 09:47:03 -0500	[thread overview]
Message-ID: <CAMdYzYo9Y_pEAAtreQU0B9DVzGsbUgpTA2g7HGRyUXcSBjMy4g@mail.gmail.com> (raw)
In-Reply-To: <20220127150615.v2.12.I3a5c7f21ecd8221b42c2dbcd618386bce7b3e9a6@changeid>

On Thu, Jan 27, 2022 at 6:17 PM Brian Norris <briannorris@chromium.org> wrote:
>
> From: Lin Huang <hl@rock-chips.com>
>
> Enable the DMC (Dynamic Memory Controller) and the DFI (DDR PHY
> Interface) nodes on gru boards so we can support DDR DVFS.
>
> Signed-off-by: Lin Huang <hl@rock-chips.com>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Signed-off-by: Gaël PORTAY <gael.portay@collabora.com>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> Updates since the old series:
>
>  - reordered alphabetically by phandle name, per style
>  - drop a ton of deprecated/unused properties
>  - add required center-supply for scarlet
>  - add new *_idle_dis_freq properties
>  - drop the lowest (200 MHz) OPP; this was never stabilized for
>    production
>  - bump the voltage (0.9V -> 0.925V) for the highest OPP on Chromebook
>    models; later (tablet) models were more stable, with a fixed DDR
>    regulator
>  - bump odt_dis_freq to 666 MHz; early versions used 333 MHz, but
>    stabilization efforts landed on 666 MHz for production
>
> ---
>
> Changes in v2:
>  - Adapt to new properties
>
> Changes in v1:
> This was part of a previous series, at:
> https://lore.kernel.org/r/20210308233858.24741-3-daniel.lezcano@linaro.org
> I've picked up a bunch of changes and fixes, so I've restarted the patch
> series numbering.

Good Morning,

I'm trying to bring this series over to rockpro64 (and eventually the
pinephone-pro) and am running into some snags.
Essentially, anytime a transition happens, the board locks up.
I've disabled the extra power save disable flags and adjusted the OPPs
for rockpro64's power.
Transitions anywhere from the default 800mhz cause a lock.

I'm digging deeper, but I'm hoping you can answer some questions in
the meantime:
1. Does this require something from firmware that isn't available on
Mainline ATF? (AKA special firmware to the Chromebook line)
2. If not, do you have any recommendations off the top of your head?

Thanks,
Peter Geis

>
>  .../dts/rockchip/rk3399-gru-chromebook.dtsi   |  7 +++++
>  .../boot/dts/rockchip/rk3399-gru-scarlet.dtsi | 12 ++++++++
>  arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi  | 28 +++++++++++++++++++
>  .../boot/dts/rockchip/rk3399-op1-opp.dtsi     | 25 +++++++++++++++++
>  4 files changed, 72 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi
> index 9b2c679f5eca..cc8950046d94 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi
> @@ -234,6 +234,13 @@ &cdn_dp {
>         extcon = <&usbc_extcon0>, <&usbc_extcon1>;
>  };
>
> +&dmc {
> +       center-supply = <&ppvar_centerlogic>;
> +       rockchip,pd-idle-dis-freq-hz = <800000000>;
> +       rockchip,sr-idle-dis-freq-hz = <800000000>;
> +       rockchip,sr-mc-gate-idle-dis-freq-hz = <800000000>;
> +};
> +
>  &edp {
>         status = "okay";
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
> index a9817b3d7edc..913d845eb51a 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet.dtsi
> @@ -391,6 +391,18 @@ &cru {
>                 <400000000>;
>  };
>
> +/* The center supply is fixed to .9V on scarlet */
> +&dmc {
> +       center-supply = <&pp900_s0>;
> +};
> +
> +/* We don't need .925 V for 928 MHz on scarlet */
> +&dmc_opp_table {
> +       opp03 {
> +               opp-microvolt = <900000>;
> +       };
> +};
> +
>  &gpio0 {
>         gpio-line-names = /* GPIO0 A 0-7 */
>                           "CLK_32K_AP",
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
> index 162f08bca0d4..23bfba86daab 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
> @@ -373,6 +373,34 @@ &cru {
>                 <200000000>;
>  };
>
> +&dfi {
> +       status = "okay";
> +};
> +
> +&dmc {
> +       status = "okay";
> +
> +       rockchip,pd-idle-ns = <160>;
> +       rockchip,sr-idle-ns = <10240>;
> +       rockchip,sr-mc-gate-idle-ns = <40960>;
> +       rockchip,srpd-lite-idle-ns = <61440>;
> +       rockchip,standby-idle-ns = <81920>;
> +
> +       rockchip,ddr3_odt_dis_freq = <666000000>;
> +       rockchip,lpddr3_odt_dis_freq = <666000000>;
> +       rockchip,lpddr4_odt_dis_freq = <666000000>;
> +
> +       rockchip,sr-mc-gate-idle-dis-freq-hz = <1000000000>;
> +       rockchip,srpd-lite-idle-dis-freq-hz = <0>;
> +       rockchip,standby-idle-dis-freq-hz = <928000000>;
> +};
> +
> +&dmc_opp_table {
> +       opp03 {
> +               opp-suspend;
> +       };
> +};
> +
>  &emmc_phy {
>         status = "okay";
>  };
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi
> index 2180e0f75003..6e29e74f6fc6 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi
> @@ -110,6 +110,27 @@ opp05 {
>                         opp-microvolt = <1075000>;
>                 };
>         };
> +
> +       dmc_opp_table: dmc_opp_table {
> +               compatible = "operating-points-v2";
> +
> +               opp00 {
> +                       opp-hz = /bits/ 64 <400000000>;
> +                       opp-microvolt = <900000>;
> +               };
> +               opp01 {
> +                       opp-hz = /bits/ 64 <666000000>;
> +                       opp-microvolt = <900000>;
> +               };
> +               opp02 {
> +                       opp-hz = /bits/ 64 <800000000>;
> +                       opp-microvolt = <900000>;
> +               };
> +               opp03 {
> +                       opp-hz = /bits/ 64 <928000000>;
> +                       opp-microvolt = <925000>;
> +               };
> +       };
>  };
>
>  &cpu_l0 {
> @@ -136,6 +157,10 @@ &cpu_b1 {
>         operating-points-v2 = <&cluster1_opp>;
>  };
>
> +&dmc {
> +       operating-points-v2 = <&dmc_opp_table>;
> +};
> +
>  &gpu {
>         operating-points-v2 = <&gpu_opp_table>;
>  };
> --
> 2.35.0.rc0.227.g00780c9af4-goog
>
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2022-03-04 14:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 23:07 [PATCH v2 00/15] rk3399: Clean up and enable DDR DVFS Brian Norris
2022-01-27 23:07 ` [PATCH v2 01/15] dt-bindings: devfreq: rk3399_dmc: Convert to YAML Brian Norris
2022-02-09 20:17   ` Rob Herring
2022-03-04 21:23     ` Brian Norris
2022-01-27 23:07 ` [PATCH v2 02/15] dt-bindings: devfreq: rk3399_dmc: Deprecate unused/redundant properties Brian Norris
2022-01-27 23:17   ` Brian Norris
2022-01-27 23:07 ` [PATCH v2 03/15] dt-bindings: devfreq: rk3399_dmc: Fix Hz units Brian Norris
2022-02-04  1:59   ` Chanwoo Choi
2022-02-09 20:19   ` Rob Herring
2022-01-27 23:07 ` [PATCH v2 04/15] dt-bindings: devfreq: rk3399_dmc: Specify idle params in nanoseconds Brian Norris
2022-02-09 20:21   ` Rob Herring
2022-01-27 23:07 ` [PATCH v2 05/15] dt-bindings: devfreq: rk3399_dmc: Add more disable-freq properties Brian Norris
2022-02-09 20:29   ` Rob Herring
2022-01-27 23:07 ` [PATCH v2 06/15] PM / devfreq: rk3399_dmc: Drop undocumented ondemand DT props Brian Norris
2022-01-27 23:07 ` [PATCH v2 07/15] PM / devfreq: rk3399_dmc: Drop excess timing properties Brian Norris
2022-01-27 23:07 ` [PATCH v2 08/15] PM / devfreq: rk3399_dmc: Use bitfield macro definitions for ODT_PD Brian Norris
2022-01-27 23:07 ` [PATCH v2 09/15] PM / devfreq: rk3399_dmc: Support new disable-freq properties Brian Norris
2022-01-27 23:07 ` [PATCH v2 10/15] PM / devfreq: rk3399_dmc: Support new *-ns properties Brian Norris
2022-01-27 23:07 ` [PATCH v2 11/15] arm64: dts: rk3399: Add dfi and dmc nodes Brian Norris
2022-01-27 23:07 ` [PATCH v2 12/15] arm64: dts: rockchip: Enable dmc and dfi nodes on gru Brian Norris
2022-03-04 14:47   ` Peter Geis [this message]
2022-03-04 20:47     ` Brian Norris
2022-04-06  2:05     ` Brian Norris
2022-04-07  0:18       ` Peter Geis
2022-01-27 23:07 ` [PATCH v2 13/15] PM / devfreq: rk3399_dmc: Disable edev on remove() Brian Norris
2022-01-27 23:07 ` [PATCH v2 14/15] PM / devfreq: rk3399_dmc: Use devm_pm_opp_of_add_table() Brian Norris
2022-01-27 23:07 ` [PATCH v2 15/15] PM / devfreq: rk3399_dmc: Avoid static (reused) profile Brian Norris

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=CAMdYzYo9Y_pEAAtreQU0B9DVzGsbUgpTA2g7HGRyUXcSBjMy4g@mail.gmail.com \
    --to=pgwipeout@gmail.com \
    --cc=briannorris@chromium.org \
    --cc=cw00.choi@samsung.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=dbasehore@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=enric.balletbo@collabora.com \
    --cc=gael.portay@collabora.com \
    --cc=heiko@sntech.de \
    --cc=hl@rock-chips.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).