drivers/firmware/ti_sci.c | 131 +++++++++++++++++++++++++++++++++++++++------- drivers/firmware/ti_sci.h | 5 ++ 2 files changed, 117 insertions(+), 19 deletions(-)
Hi,
This series adds support for Partial-IO to the ti-sci driver,
implementing the firmware interface necessary to enter this low power
state. It processes the wakeup-source properties from the devicetree and
communicates with the system firmware to enter Partial-IO mode when
appropriate wakeup sources are enabled.
Partial-IO Overview
------------------
Partial-IO is a low power system state in which nearly everything is
turned off except the pins of the CANUART group (mcu_mcan0, mcu_mcan1,
wkup_uart0 and mcu_uart0). These devices can trigger a wakeup of the
system on pin activity. Note that this does not resume the system as the
DDR is off as well. So this state can be considered a power-off state
with wakeup capabilities.
A documentation can also be found in section 6.2.4 in the TRM:
https://www.ti.com/lit/pdf/spruiv7
Implementation Details
----------------------
The complete Partial-IO feature requires three coordinated series, each
handling a different aspect of the implementation:
1. [MERGED] m_can driver series: Implements device-specific wakeup functionality
for m_can devices, allowing them to be set as wakeup sources. This is
now available in linux-next.
https://lore.kernel.org/r/20251001-topic-mcan-wakeup-source-v6-12-v10-0-4ab508ac5d1e@baylibre.com
2. Devicetree series: Defines system states and wakeup sources in the
devicetree for am62, am62a and am62p.
https://gitlab.baylibre.com/msp8/linux/-/tree/topic/am62-dt-partialio/v6.18?ref_type=heads
https://lore.kernel.org/r/20251103-topic-am62-dt-partialio-v6-15-v5-0-b8d9ff5f2742@baylibre.com
3. This series (TI-SCI firmware): Implements the firmware interface to
enter Partial-IO mode when appropriate wakeup sources are enabled.
Testing
-------
A test branch is available here that includes all patches required to
test Partial-IO:
https://gitlab.baylibre.com/msp8/linux/-/tree/integration/am62-partialio/v6.18?ref_type=heads
After enabling Wake-on-LAN the system can be powered off and will enter
the Partial-IO state in which it can be woken up by activity on the
specific pins:
ethtool -s can0 wol p
ethtool -s can1 wol p
poweroff
These patches are tested on am62-lp-sk.
Best,
Markus
Previous versions "firmware: ti_sci: Partial-IO support":
v1: https://lore.kernel.org/lkml/20240523080225.1288617-1-msp@baylibre.com/
v2: https://lore.kernel.org/lkml/20240729080101.3859701-1-msp@baylibre.com/
v3: https://lore.kernel.org/r/20241012-topic-am62-partialio-v6-13-b4-v3-0-f7c6c2739681@baylibre.com
v4: https://lore.kernel.org/r/20241219-topic-am62-partialio-v6-12-b4-v4-0-1cb8eabd407e@baylibre.com
v5: https://lore.kernel.org/r/20250306-topic-am62-partialio-v6-12-b4-v5-0-f9323d3744a2@baylibre.com
v6: https://lore.kernel.org/r/20250421-topic-am62-partialio-v6-12-b4-v6-0-3b5cefab1339@baylibre.com
v7: https://lore.kernel.org/r/20250812-topic-am62-partialio-v6-12-b4-v7-0-ac10865c2d87@baylibre.com
v8: https://lore.kernel.org/r/20251001-topic-am62-partialio-v6-12-b4-v8-0-76a742605110@baylibre.com
v9: https://lore.kernel.org/r/20251030-topic-am62-partialio-v6-12-b4-v9-0-074f55d9c16b@baylibre.com
Previous versions "can: m_can: Add am62 wakeup support":
v1: https://lore.kernel.org/lkml/20240523075347.1282395-1-msp@baylibre.com/
v2: https://lore.kernel.org/lkml/20240729074135.3850634-1-msp@baylibre.com/
v3: https://lore.kernel.org/lkml/20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@baylibre.com
v4: https://lore.kernel.org/r/20241015-topic-mcan-wakeup-source-v6-12-v4-0-fdac1d1e7aa6@baylibre.com
v5: https://lore.kernel.org/r/20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com
v6: https://lore.kernel.org/r/20241219-topic-mcan-wakeup-source-v6-12-v6-0-1356c7f7cfda@baylibre.com
Changes in v10:
- Remove unnecessary empty line
- Make ti_sci_cmd_prepare_sleep aware of PARTIAL_IO mode and the
not-expected response, because both Kendall and Andrew seem to
prefer this.
- Moved the removal of the ctx_lo, ctx_hi and debug_flags to the end of
the series so merging is optional.
Changes in v9:
- Rebased to next-20251029
Changes in v8:
- Add a patch to remove constant 0 argument passing to
ti_sci_cmd_prepare_sleep
- Move partial-io functions further up in the file before the first
static const initializations
Changes in v7:
- Rebase to v6.17-rc1
- Update the idle-state-name used to off-wake as introduced in
dt-schema
Changes in v6:
- Narrowed down the wakeup-source binding to phandle lists
- Split off the mcan and DT changes into separate series
Changes in v5:
- Rebased to v6.14-rc1
- Merged m_can and ti_sci series to avoid conflicts and show
dependencies more easily
- Added definitions of system-states for am62/am62a/am62p
- Moved wakeup-source definitions into board dts files as they require
a bit of support on the board.
- Updated ti_sci support to walk through the wakeup-source phandle
lists
- Added pinctrl settings for mcu_mcan0/1 on all boards
- Minor style updates for ti_sci support for transfers without response
- Update and move the dt-binding for wakeup-source from the m_can
binding to the dt-schema repository
Changes in v4:
- Rebased to v6.13-rc1
- Removed all regulator related structures from patches and implemented
the wakeup-source property use instead.
Changes in v3:
- Remove other modes declared for PREPARE_SLEEP as they probably won't
ever be used in upstream.
- Replace the wait loop after sending PREPARE_SLEEP with msleep and do
an emergency_restart if it exits
- Remove uarts from DT wakeup sources
- Split no response handling in ti_sci_do_xfer() into a separate patch
and use goto instead of if ()
- Remove DT binding parital-io-wakeup-sources. Instead I am modeling
the devices that are in the relevant group that are powered during
Partial-IO with the power supplies that are externally provided to
the SoC. In this case they are provided through 'vddshv_canuart'. All
devices using this regulator can be considered a potential wakeup
source if they are wakeup capable and wakeup enabled.
- Added devicetree patches adding vcc_3v3_sys regulator and
vddshv_canuart for am62-lp-sk
- Add pinctrl entries for am62-lp-sk to add WKUP_EN for mcu_mcan0 and
mcu_mcan1
Changes in v2:
- Rebase to v6.11-rc1
- dt-binding:
- Update commit message
- Add more verbose description of the new binding for a better
explanation.
- ti_sci driver:
- Combine ti_sci_do_send() into ti_sci_do_xfer and only wait on a
response if a flag is set.
- On failure to enter Partial-IO, do emergency_restart()
- Add comments
- Fix small things
Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com>
---
Markus Schneider-Pargmann (TI.com) (3):
firmware: ti_sci: Support transfers without response
firmware: ti_sci: Partial-IO support
firmware: ti_sci: Remove constant 0 function arguments
drivers/firmware/ti_sci.c | 131 +++++++++++++++++++++++++++++++++++++++-------
drivers/firmware/ti_sci.h | 5 ++
2 files changed, 117 insertions(+), 19 deletions(-)
---
base-commit: c9a389ffad27e7847c69f4d2b67ba56b77190209
change-id: 20241008-topic-am62-partialio-v6-12-b4-c273fbac4447
Best regards,
--
Markus Schneider-Pargmann (TI.com) <msp@baylibre.com>
On 11/3/25 06:42, Markus Schneider-Pargmann (TI.com) wrote: > Hi, > > This series adds support for Partial-IO to the ti-sci driver, > implementing the firmware interface necessary to enter this low power > state. It processes the wakeup-source properties from the devicetree and > communicates with the system firmware to enter Partial-IO mode when > appropriate wakeup sources are enabled. > > Partial-IO Overview > ------------------ > Partial-IO is a low power system state in which nearly everything is > turned off except the pins of the CANUART group (mcu_mcan0, mcu_mcan1, > wkup_uart0 and mcu_uart0). These devices can trigger a wakeup of the > system on pin activity. Note that this does not resume the system as the > DDR is off as well. So this state can be considered a power-off state > with wakeup capabilities. > > A documentation can also be found in section 6.2.4 in the TRM: > https://www.ti.com/lit/pdf/spruiv7 > > Implementation Details > ---------------------- > The complete Partial-IO feature requires three coordinated series, each > handling a different aspect of the implementation: > > 1. [MERGED] m_can driver series: Implements device-specific wakeup functionality > for m_can devices, allowing them to be set as wakeup sources. This is > now available in linux-next. > https://lore.kernel.org/r/20251001-topic-mcan-wakeup-source-v6-12-v10-0-4ab508ac5d1e@baylibre.com > > 2. Devicetree series: Defines system states and wakeup sources in the > devicetree for am62, am62a and am62p. > https://gitlab.baylibre.com/msp8/linux/-/tree/topic/am62-dt-partialio/v6.18?ref_type=heads > https://lore.kernel.org/r/20251103-topic-am62-dt-partialio-v6-15-v5-0-b8d9ff5f2742@baylibre.com > > 3. This series (TI-SCI firmware): Implements the firmware interface to > enter Partial-IO mode when appropriate wakeup sources are enabled. > > Testing > ------- > A test branch is available here that includes all patches required to > test Partial-IO: > > https://gitlab.baylibre.com/msp8/linux/-/tree/integration/am62-partialio/v6.18?ref_type=heads > > After enabling Wake-on-LAN the system can be powered off and will enter > the Partial-IO state in which it can be woken up by activity on the > specific pins: > ethtool -s can0 wol p > ethtool -s can1 wol p > poweroff > > These patches are tested on am62-lp-sk. > > Best, > Markus > > Previous versions "firmware: ti_sci: Partial-IO support": > v1: https://lore.kernel.org/lkml/20240523080225.1288617-1-msp@baylibre.com/ > v2: https://lore.kernel.org/lkml/20240729080101.3859701-1-msp@baylibre.com/ > v3: https://lore.kernel.org/r/20241012-topic-am62-partialio-v6-13-b4-v3-0-f7c6c2739681@baylibre.com > v4: https://lore.kernel.org/r/20241219-topic-am62-partialio-v6-12-b4-v4-0-1cb8eabd407e@baylibre.com > v5: https://lore.kernel.org/r/20250306-topic-am62-partialio-v6-12-b4-v5-0-f9323d3744a2@baylibre.com > v6: https://lore.kernel.org/r/20250421-topic-am62-partialio-v6-12-b4-v6-0-3b5cefab1339@baylibre.com > v7: https://lore.kernel.org/r/20250812-topic-am62-partialio-v6-12-b4-v7-0-ac10865c2d87@baylibre.com > v8: https://lore.kernel.org/r/20251001-topic-am62-partialio-v6-12-b4-v8-0-76a742605110@baylibre.com > v9: https://lore.kernel.org/r/20251030-topic-am62-partialio-v6-12-b4-v9-0-074f55d9c16b@baylibre.com > > Previous versions "can: m_can: Add am62 wakeup support": > v1: https://lore.kernel.org/lkml/20240523075347.1282395-1-msp@baylibre.com/ > v2: https://lore.kernel.org/lkml/20240729074135.3850634-1-msp@baylibre.com/ > v3: https://lore.kernel.org/lkml/20241011-topic-mcan-wakeup-source-v6-12-v3-0-9752c714ad12@baylibre.com > v4: https://lore.kernel.org/r/20241015-topic-mcan-wakeup-source-v6-12-v4-0-fdac1d1e7aa6@baylibre.com > v5: https://lore.kernel.org/r/20241028-topic-mcan-wakeup-source-v6-12-v5-0-33edc0aba629@baylibre.com > v6: https://lore.kernel.org/r/20241219-topic-mcan-wakeup-source-v6-12-v6-0-1356c7f7cfda@baylibre.com > > Changes in v10: > - Remove unnecessary empty line > - Make ti_sci_cmd_prepare_sleep aware of PARTIAL_IO mode and the > not-expected response, because both Kendall and Andrew seem to > prefer this. > - Moved the removal of the ctx_lo, ctx_hi and debug_flags to the end of > the series so merging is optional. > > Changes in v9: > - Rebased to next-20251029 > > Changes in v8: > - Add a patch to remove constant 0 argument passing to > ti_sci_cmd_prepare_sleep > - Move partial-io functions further up in the file before the first > static const initializations > > Changes in v7: > - Rebase to v6.17-rc1 > - Update the idle-state-name used to off-wake as introduced in > dt-schema > > Changes in v6: > - Narrowed down the wakeup-source binding to phandle lists > - Split off the mcan and DT changes into separate series > > Changes in v5: > - Rebased to v6.14-rc1 > - Merged m_can and ti_sci series to avoid conflicts and show > dependencies more easily > - Added definitions of system-states for am62/am62a/am62p > - Moved wakeup-source definitions into board dts files as they require > a bit of support on the board. > - Updated ti_sci support to walk through the wakeup-source phandle > lists > - Added pinctrl settings for mcu_mcan0/1 on all boards > - Minor style updates for ti_sci support for transfers without response > - Update and move the dt-binding for wakeup-source from the m_can > binding to the dt-schema repository > > Changes in v4: > - Rebased to v6.13-rc1 > - Removed all regulator related structures from patches and implemented > the wakeup-source property use instead. > > Changes in v3: > - Remove other modes declared for PREPARE_SLEEP as they probably won't > ever be used in upstream. > - Replace the wait loop after sending PREPARE_SLEEP with msleep and do > an emergency_restart if it exits > - Remove uarts from DT wakeup sources > - Split no response handling in ti_sci_do_xfer() into a separate patch > and use goto instead of if () > - Remove DT binding parital-io-wakeup-sources. Instead I am modeling > the devices that are in the relevant group that are powered during > Partial-IO with the power supplies that are externally provided to > the SoC. In this case they are provided through 'vddshv_canuart'. All > devices using this regulator can be considered a potential wakeup > source if they are wakeup capable and wakeup enabled. > - Added devicetree patches adding vcc_3v3_sys regulator and > vddshv_canuart for am62-lp-sk > - Add pinctrl entries for am62-lp-sk to add WKUP_EN for mcu_mcan0 and > mcu_mcan1 > > Changes in v2: > - Rebase to v6.11-rc1 > - dt-binding: > - Update commit message > - Add more verbose description of the new binding for a better > explanation. > - ti_sci driver: > - Combine ti_sci_do_send() into ti_sci_do_xfer and only wait on a > response if a flag is set. > - On failure to enter Partial-IO, do emergency_restart() > - Add comments > - Fix small things > > Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com> > --- > Markus Schneider-Pargmann (TI.com) (3): > firmware: ti_sci: Support transfers without response > firmware: ti_sci: Partial-IO support > firmware: ti_sci: Remove constant 0 function arguments > > drivers/firmware/ti_sci.c | 131 +++++++++++++++++++++++++++++++++++++++------- > drivers/firmware/ti_sci.h | 5 ++ > 2 files changed, 117 insertions(+), 19 deletions(-) > --- > base-commit: c9a389ffad27e7847c69f4d2b67ba56b77190209 > change-id: 20241008-topic-am62-partialio-v6-12-b4-c273fbac4447 > > Best regards, LGTM, for the whole series, Reviewed-by: Kendall Willis <k-willis@ti.com> Best, Kendall Willis
Hi On 03/11/25 18:12, Markus Schneider-Pargmann (TI.com) wrote: > Hi, > > This series adds support for Partial-IO to the ti-sci driver, > implementing the firmware interface necessary to enter this low power > state. It processes the wakeup-source properties from the devicetree and > communicates with the system firmware to enter Partial-IO mode when > appropriate wakeup sources are enabled. > > Partial-IO Overview > ------------------ > Partial-IO is a low power system state in which nearly everything is > turned off except the pins of the CANUART group (mcu_mcan0, mcu_mcan1, > wkup_uart0 and mcu_uart0). These devices can trigger a wakeup of the > system on pin activity. Note that this does not resume the system as the > DDR is off as well. So this state can be considered a power-off state > with wakeup capabilities. > > A documentation can also be found in section 6.2.4 in the TRM: > https://www.ti.com/lit/pdf/spruiv7 > [...] > Changes in v2: > - Rebase to v6.11-rc1 > - dt-binding: > - Update commit message > - Add more verbose description of the new binding for a better > explanation. > - ti_sci driver: > - Combine ti_sci_do_send() into ti_sci_do_xfer and only wait on a > response if a flag is set. > - On failure to enter Partial-IO, do emergency_restart() > - Add comments > - Fix small things > > Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com> > --- Changes looks good. Reviewed-by: Sebin Francis <sebin.francis@ti.com> > Markus Schneider-Pargmann (TI.com) (3): > firmware: ti_sci: Support transfers without response > firmware: ti_sci: Partial-IO support > firmware: ti_sci: Remove constant 0 function arguments > > drivers/firmware/ti_sci.c | 131 +++++++++++++++++++++++++++++++++++++++------- > drivers/firmware/ti_sci.h | 5 ++ > 2 files changed, 117 insertions(+), 19 deletions(-) > --- > base-commit: c9a389ffad27e7847c69f4d2b67ba56b77190209 > change-id: 20241008-topic-am62-partialio-v6-12-b4-c273fbac4447 > > Best regards,
Hi Markus Schneider-Pargmann (TI.com),
On Mon, 03 Nov 2025 13:42:18 +0100, Markus Schneider-Pargmann (TI.com) wrote:
> This series adds support for Partial-IO to the ti-sci driver,
> implementing the firmware interface necessary to enter this low power
> state. It processes the wakeup-source properties from the devicetree and
> communicates with the system firmware to enter Partial-IO mode when
> appropriate wakeup sources are enabled.
>
> Partial-IO Overview
> ------------------
> Partial-IO is a low power system state in which nearly everything is
> turned off except the pins of the CANUART group (mcu_mcan0, mcu_mcan1,
> wkup_uart0 and mcu_uart0). These devices can trigger a wakeup of the
> system on pin activity. Note that this does not resume the system as the
> DDR is off as well. So this state can be considered a power-off state
> with wakeup capabilities.
>
> [...]
I have applied the following to branch ti-drivers-soc-next on [1].
Thank you!
[1/3] firmware: ti_sci: Support transfers without response
commit: 170a3ef6052cfa2462b3bb572a6bb985bf83d21e
[2/3] firmware: ti_sci: Partial-IO support
commit: e0431ff998bd32dcc1e591a45b4e156fcb0325a3
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
https://ti.com/opensource
© 2016 - 2025 Red Hat, Inc.