public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Dhruva Gole <d-gole@ti.com>
To: Andrew Davis <afd@ti.com>
Cc: Nishanth Menon <nm@ti.com>, Tero Kristo <kristo@kernel.org>,
	"Santosh Shilimkar" <ssantosh@kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-pm@vger.kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Praneeth Bajjuri <praneeth@ti.com>,
	Tony Lindgren <tony@atomide.com>, Dave Gerlach <d-gerlach@ti.com>,
	Vibhore Vardhan <vibhore@ti.com>, Georgi Vlaev <g-vlaev@ti.com>,
	Roger Quadros <rogerq@kernel.org>
Subject: Re: [PATCH V6 1/4] firmware: ti_sci: Introduce Power Management Ops
Date: Thu, 3 Aug 2023 21:12:04 +0530	[thread overview]
Message-ID: <20230803154204.iyohslrpma7bqqpk@dhruva> (raw)
In-Reply-To: <930ffb16-f212-0bcb-4713-2acc138c4035@ti.com>

On Aug 03, 2023 at 10:14:03 -0500, Andrew Davis wrote:
[..snip..]
> >   #define TI_SCI_IRQ_SECONDARY_HOST_INVALID	0xff
> >   /**
> > diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h
> > index bd0d11af76c5..f2d1d74ab8fc 100644
> > --- a/include/linux/soc/ti/ti_sci_protocol.h
> > +++ b/include/linux/soc/ti/ti_sci_protocol.h
> > @@ -195,6 +195,49 @@ struct ti_sci_clk_ops {
> >   			u64 *current_freq);
> >   };
> > +/* TISCI LPM wake up sources */
> > +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_I2C0	0x00
> > +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_UART0	0x10
> > +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_MCU_GPIO0	0x20
> > +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_ICEMELTER0	0x30
> > +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_TIMER0	0x40
> > +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_TIMER1	0x41
> > +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_RTC0	0x50
> > +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_RESET		0x60
> > +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_USB0		0x70
> > +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_USB1		0x71
> > +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_MAIN_IO		0x80
> > +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_MCU_IO		0x81
> > +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_CAN_IO		0x82
> > +#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_INVALID		0xFF
> 
> I don't see these used in this series, do you need them? lpm_wake_reason()

True, we are not currently using these macros. They _maybe required in
future.
I can remove them if required?

> doesn't seem used either and I'm not sure how you plan to use it, could
> you detail that?

When the system wakes from suspend-to-mem we can check which
subsystem has woken us up with the TISCI LPM_WAKEUP_REASON message.
There's no hardware event generated and we have to ask the firmware
for the actual wake reason.

We may want to add support for a wake up interrupt controller that will
generate an interrupt for other subsystems. This might end up using this
lpm_wake_reason API, hence even though the function maybe unused today
it will be required for above described scenario.

However if you prefer that I remove it and then add it in future when we
finally write a working interrupt controller driver, then do let me
know.

> 
> Andrew
> 
> > +
> > +/* TISCI LPM IO isolation control values */
> > +#define TISCI_MSG_VALUE_IO_ENABLE			1
> > +#define TISCI_MSG_VALUE_IO_DISABLE			0
> > +
[..snip..]

-- 
Best regards,
Dhruva Gole <d-gole@ti.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-08-03 15:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03  6:42 [PATCH V6 0/4] firmware: ti_sci: Introduce system suspend support Dhruva Gole
2023-08-03  6:42 ` [PATCH V6 1/4] firmware: ti_sci: Introduce Power Management Ops Dhruva Gole
2023-08-03 15:14   ` Andrew Davis
2023-08-03 15:42     ` Dhruva Gole [this message]
2023-08-03 15:57       ` Andrew Davis
2023-08-03  6:42 ` [PATCH V6 2/4] firmware: ti_sci: Add support for querying the firmware caps Dhruva Gole
2023-08-03 15:21   ` Andrew Davis
2023-08-03  6:42 ` [PATCH V6 3/4] firmware: ti_sci: Allocate memory for Low Power Modes Dhruva Gole
2023-08-03 15:23   ` Andrew Davis
2023-08-03 15:57     ` Dhruva Gole
2023-08-03  6:42 ` [PATCH V6 4/4] firmware: ti_sci: Introduce system suspend resume support Dhruva Gole
2023-08-03 15:26   ` Andrew Davis
2023-08-03 15:55     ` Dhruva Gole
2023-08-03 16:00       ` Andrew Davis
2023-08-03 16:08         ` Dhruva Gole
2023-08-07 21:57           ` Kevin Hilman
2023-08-08 11:54             ` Dhruva Gole
2023-08-09  0:20               ` Kevin Hilman
2023-08-09  7:23                 ` Tony Lindgren
2023-08-09 17:37                   ` Kevin Hilman
2023-08-03 15:18 ` [PATCH V6 0/4] firmware: ti_sci: Introduce system suspend support Andrew Davis

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=20230803154204.iyohslrpma7bqqpk@dhruva \
    --to=d-gole@ti.com \
    --cc=afd@ti.com \
    --cc=d-gerlach@ti.com \
    --cc=g-vlaev@ti.com \
    --cc=kristo@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=praneeth@ti.com \
    --cc=rogerq@kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=tony@atomide.com \
    --cc=vibhore@ti.com \
    --cc=viresh.kumar@linaro.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