ATH11K Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v4] PCI: qcom: Add system PM support
       [not found] ` <20220412060144.GA41348@thinkpad>
@ 2022-04-12 10:40   ` Kalle Valo
  2022-04-13  5:49     ` Manivannan Sadhasivam
  0 siblings, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2022-04-12 10:40 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Prasad Malisetty, agross, bjorn.andersson, lorenzo.pieralisi,
	robh, kw, bhelgaas, linux-pci, linux-arm-msm, linux-kernel,
	rajatja, refactormyself, quic_vbadigan, quic_ramkri, swboyd,
	linux-wireless, ath11k

+ ath11k

Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> writes:

> +Kalle, linux-wireless
>
> On Tue, Mar 08, 2022 at 12:25:06AM +0530, Prasad Malisetty wrote:
>> Add suspend_noirq and resume_noirq callbacks to handle
>> system suspend and resume in dwc PCIe controller driver.
>> 
>> When system suspends, send PME turnoff message to enter
>> link into L2 state. Along with powerdown the PHY, disable
>> pipe clock, switch gcc_pcie_1_pipe_clk_src to XO if mux is
>> supported and disable the pcie clocks, regulators.
>> 
>
> Kalle, is this behaviour appropriate for WLAN devices as well? The devices
> will be put into poweroff state (assuming no Vaux provided in D3cold) during
> system suspend.

ath11k leaves the firmware running during suspend. I don't fully
understand what the patch is doing, but if it cuts the power from the
WLAN chip during suspend that will break ath11k.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* Re: [PATCH v4] PCI: qcom: Add system PM support
  2022-04-12 10:40   ` [PATCH v4] PCI: qcom: Add system PM support Kalle Valo
@ 2022-04-13  5:49     ` Manivannan Sadhasivam
  2022-04-13  6:36       ` Dmitry Baryshkov
  0 siblings, 1 reply; 4+ messages in thread
From: Manivannan Sadhasivam @ 2022-04-13  5:49 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Prasad Malisetty, agross, bjorn.andersson, lorenzo.pieralisi,
	robh, kw, bhelgaas, linux-pci, linux-arm-msm, linux-kernel,
	rajatja, refactormyself, quic_vbadigan, quic_ramkri, swboyd,
	linux-wireless, ath11k

On Tue, Apr 12, 2022 at 01:40:08PM +0300, Kalle Valo wrote:
> + ath11k
> 
> Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> writes:
> 
> > +Kalle, linux-wireless
> >
> > On Tue, Mar 08, 2022 at 12:25:06AM +0530, Prasad Malisetty wrote:
> >> Add suspend_noirq and resume_noirq callbacks to handle
> >> system suspend and resume in dwc PCIe controller driver.
> >> 
> >> When system suspends, send PME turnoff message to enter
> >> link into L2 state. Along with powerdown the PHY, disable
> >> pipe clock, switch gcc_pcie_1_pipe_clk_src to XO if mux is
> >> supported and disable the pcie clocks, regulators.
> >> 
> >
> > Kalle, is this behaviour appropriate for WLAN devices as well? The devices
> > will be put into poweroff state (assuming no Vaux provided in D3cold) during
> > system suspend.
> 
> ath11k leaves the firmware running during suspend. I don't fully
> understand what the patch is doing, but if it cuts the power from the
> WLAN chip during suspend that will break ath11k.
> 

Thanks Kalle for the confirmation. Yes the device will be put into D3cold state
and that will most likely equal to poweroff state.

Prasad, you should try to just turn off the host resources like clocks and
regulators (not refclk) and let the device be in the default state
(D3hot/L{0/1}?) during suspend.

Thanks,
Mani

> -- 
> https://patchwork.kernel.org/project/linux-wireless/list/
> 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* Re: [PATCH v4] PCI: qcom: Add system PM support
  2022-04-13  5:49     ` Manivannan Sadhasivam
@ 2022-04-13  6:36       ` Dmitry Baryshkov
  2022-04-13  7:05         ` Manivannan Sadhasivam
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Baryshkov @ 2022-04-13  6:36 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Kalle Valo, Prasad Malisetty, agross, bjorn.andersson,
	lorenzo.pieralisi, robh, kw, bhelgaas, linux-pci, linux-arm-msm,
	linux-kernel, rajatja, refactormyself, quic_vbadigan, quic_ramkri,
	swboyd, linux-wireless, ath11k

On Wed, 13 Apr 2022 at 08:49, Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.org> wrote:
>
> On Tue, Apr 12, 2022 at 01:40:08PM +0300, Kalle Valo wrote:
> > + ath11k
> >
> > Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> writes:
> >
> > > +Kalle, linux-wireless
> > >
> > > On Tue, Mar 08, 2022 at 12:25:06AM +0530, Prasad Malisetty wrote:
> > >> Add suspend_noirq and resume_noirq callbacks to handle
> > >> system suspend and resume in dwc PCIe controller driver.
> > >>
> > >> When system suspends, send PME turnoff message to enter
> > >> link into L2 state. Along with powerdown the PHY, disable
> > >> pipe clock, switch gcc_pcie_1_pipe_clk_src to XO if mux is
> > >> supported and disable the pcie clocks, regulators.
> > >>
> > >
> > > Kalle, is this behaviour appropriate for WLAN devices as well? The devices
> > > will be put into poweroff state (assuming no Vaux provided in D3cold) during
> > > system suspend.
> >
> > ath11k leaves the firmware running during suspend. I don't fully
> > understand what the patch is doing, but if it cuts the power from the
> > WLAN chip during suspend that will break ath11k.
> >
>
> Thanks Kalle for the confirmation. Yes the device will be put into D3cold state
> and that will most likely equal to poweroff state.

Just to remind that ath11k on Qualcomm boards has a separate power
supply, not directly tied to the PCIe power supply.

> Prasad, you should try to just turn off the host resources like clocks and
> regulators (not refclk) and let the device be in the default state
> (D3hot/L{0/1}?) during suspend.


-- 
With best wishes
Dmitry

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* Re: [PATCH v4] PCI: qcom: Add system PM support
  2022-04-13  6:36       ` Dmitry Baryshkov
@ 2022-04-13  7:05         ` Manivannan Sadhasivam
  0 siblings, 0 replies; 4+ messages in thread
From: Manivannan Sadhasivam @ 2022-04-13  7:05 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Kalle Valo, Prasad Malisetty, agross, bjorn.andersson,
	lorenzo.pieralisi, robh, kw, bhelgaas, linux-pci, linux-arm-msm,
	linux-kernel, rajatja, refactormyself, quic_vbadigan, quic_ramkri,
	swboyd, linux-wireless, ath11k

On Wed, Apr 13, 2022 at 09:36:30AM +0300, Dmitry Baryshkov wrote:
> On Wed, 13 Apr 2022 at 08:49, Manivannan Sadhasivam
> <manivannan.sadhasivam@linaro.org> wrote:
> >
> > On Tue, Apr 12, 2022 at 01:40:08PM +0300, Kalle Valo wrote:
> > > + ath11k
> > >
> > > Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> writes:
> > >
> > > > +Kalle, linux-wireless
> > > >
> > > > On Tue, Mar 08, 2022 at 12:25:06AM +0530, Prasad Malisetty wrote:
> > > >> Add suspend_noirq and resume_noirq callbacks to handle
> > > >> system suspend and resume in dwc PCIe controller driver.
> > > >>
> > > >> When system suspends, send PME turnoff message to enter
> > > >> link into L2 state. Along with powerdown the PHY, disable
> > > >> pipe clock, switch gcc_pcie_1_pipe_clk_src to XO if mux is
> > > >> supported and disable the pcie clocks, regulators.
> > > >>
> > > >
> > > > Kalle, is this behaviour appropriate for WLAN devices as well? The devices
> > > > will be put into poweroff state (assuming no Vaux provided in D3cold) during
> > > > system suspend.
> > >
> > > ath11k leaves the firmware running during suspend. I don't fully
> > > understand what the patch is doing, but if it cuts the power from the
> > > WLAN chip during suspend that will break ath11k.
> > >
> >
> > Thanks Kalle for the confirmation. Yes the device will be put into D3cold state
> > and that will most likely equal to poweroff state.
> 
> Just to remind that ath11k on Qualcomm boards has a separate power
> supply, not directly tied to the PCIe power supply.
> 

It may change in the future or on a different OEM setup. Irrespective of that,
this patch sends the PME_Turn_Off event to the ep devices. The devices in turn
will shutdown the internal resources for poweroff/refclk removal. Therefore the
device state shall be lost.

Thanks,
Mani

> > Prasad, you should try to just turn off the host resources like clocks and
> > regulators (not refclk) and let the device be in the default state
> > (D3hot/L{0/1}?) during suspend.
> 
> 
> -- 
> With best wishes
> Dmitry

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

end of thread, other threads:[~2022-04-13  7:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1646679306-4768-1-git-send-email-quic_pmaliset@quicinc.com>
     [not found] ` <20220412060144.GA41348@thinkpad>
2022-04-12 10:40   ` [PATCH v4] PCI: qcom: Add system PM support Kalle Valo
2022-04-13  5:49     ` Manivannan Sadhasivam
2022-04-13  6:36       ` Dmitry Baryshkov
2022-04-13  7:05         ` Manivannan Sadhasivam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox