From: Manivannan Sadhasivam <manisadhasivam.linux@gmail.com>
To: Shawn Lin <shawn.lin@rock-chips.com>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
Bart Van Assche <bvanassche@acm.org>,
YiFeng Zhao <zyf@rock-chips.com>, Liang Chen <cl@rock-chips.com>,
linux-scsi@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 3/3] scsi: ufs: rockchip: init support for UFS
Date: Fri, 16 Aug 2024 13:22:44 +0530 [thread overview]
Message-ID: <20240816075244.sbul4gsaem4skon4@thinkpad> (raw)
In-Reply-To: <9fd536a9-b0bf-46a6-92c2-503ea16f7fcd@rock-chips.com>
On Tue, Aug 13, 2024 at 03:22:45PM +0800, Shawn Lin wrote:
[...]
> > > > For runtime PM case, it's the power-domain driver will power down the
> > > > controller and PHY if UFS stack is not active any more(autosuspend).
> > > >
> > > > For system PM case, it's the SoC's firmware to cutting of all the power
> > > > for controller/PHY and device.
> > > >
> > >
> > > Both cases are not matching the expectations of {rpm/spm}_lvl. So
> > > the platform
> > > (power domain or the firmware) should be fixed. What if the user sets the
> > > {rpm/spm}_lvl to 1? Will the platform power down the controller even
> > > then? If
> > > so, then I'd say that the platform is broken and should be fixed.
> >
> > Ok, it seems I need to set {rpm/spm}_lvl = 6 if I want platform to power
> > down the controller for ultra power-saving. But I still need to add my
> > own system PM callback in that case to recovery the link first. Do I
> > misunderstand it?
> >
> > And for the user who sets the rpm/spm level via
> > ufs_sysfs_pm_lvl_store(), I think there is no way to block it currently,
> > except that we need to fix the power-domain driver and Firmware to
> > respect the level and choose correct policy.
> >
> >
> > So in summary for what the next step I should to:
> > (1) Set {rpm/spm}_lvl = 6 in host driver to reflect the expectation
> > (2) Add own PM callbacks to recovery the link to meet the expectation
> > (3) Fix the broken behaviour of PD or Firmware to respect the actual
> > desired pm level if user changes the pm level.
> >
> >
>
> Sorry, I misunderstood your comment, so the action should be
> (1) Set {rpm/spm}_lvl = 5 in host driver to reflect the expectation
> (2) Use ufshcd_system_suspend/resume, but keep our own runtime PM
> callbacks as we need a extra step to gate refclk.
Ok.
> (3) Fix the broken behaviour of PD or Firmware to respect the actual
> desired pm level if user changes the pm level.
If you do this, then you don't need (1), don't you?
- Mani
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2024-08-16 7:52 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 3:52 [PATCH v2 0/3] Init support for RK3576 UFS controller Shawn Lin
2024-08-08 3:52 ` [PATCH v2 2/3] dt-bindings: ufs: Document Rockchip UFS host controller Shawn Lin
2024-08-08 5:29 ` Rob Herring (Arm)
2024-08-08 6:10 ` Shawn Lin
2024-08-08 10:28 ` Krzysztof Kozlowski
2024-08-08 10:34 ` Krzysztof Kozlowski
2024-08-09 0:33 ` Shawn Lin
2024-08-08 3:52 ` [PATCH v2 3/3] scsi: ufs: rockchip: init support for UFS Shawn Lin
2024-08-08 10:36 ` Krzysztof Kozlowski
2024-08-09 0:53 ` Shawn Lin
2024-08-09 5:44 ` Krzysztof Kozlowski
2024-08-09 6:11 ` Shawn Lin
2024-08-08 10:39 ` Krzysztof Kozlowski
2024-08-09 6:28 ` Manivannan Sadhasivam
2024-08-09 8:16 ` Shawn Lin
2024-08-10 9:28 ` Manivannan Sadhasivam
2024-08-12 1:28 ` Shawn Lin
2024-08-12 4:10 ` Manivannan Sadhasivam
2024-08-12 6:24 ` Shawn Lin
2024-08-12 16:55 ` Manivannan Sadhasivam
2024-08-13 3:52 ` Shawn Lin
2024-08-13 7:22 ` Shawn Lin
2024-08-16 7:52 ` Manivannan Sadhasivam [this message]
2024-08-09 19:06 ` Bart Van Assche
2024-08-08 4:27 ` [RESEND PATCH v2 2/3] dt-bindings: ufs: Document Rockchip UFS host controller Shawn Lin
2024-08-08 9:30 ` Rob Herring (Arm)
2024-08-08 10:30 ` Krzysztof Kozlowski
2024-08-08 10:29 ` Krzysztof Kozlowski
[not found] ` <1723089163-28983-2-git-send-email-shawn.lin@rock-chips.com>
2024-08-09 18:27 ` [PATCH v2 1/3] scsi: ufs: core: Export ufshcd_dme_link_startup() helper Bart Van Assche
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=20240816075244.sbul4gsaem4skon4@thinkpad \
--to=manisadhasivam.linux@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=cl@rock-chips.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=martin.petersen@oracle.com \
--cc=robh+dt@kernel.org \
--cc=shawn.lin@rock-chips.com \
--cc=zyf@rock-chips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox