firmware: arm_scmi: Refactoring and enablement of ACPI PCC transport
Status from this message: Applied to sudeep.holla/linux (for-next/scmi/updates), thanks!
Get series with b4
b4 am [email protected] change-id 20251017-acpi_scmi_pcc-e44e1233eae3Versions newest first
- v5 Latest9 patches 2 repliesApplied
- v49 patches 0 repliesSuperseded
- v39 patches 23 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 9 patches | 2 replies | Superseded | |
| v1 | 8 patches | 15 replies | Superseded |
Changes in v5 from the cover letter
- Make DT child-node enumeration and ACPI known-protocol enumeration mutually exclusive, preventing duplicate protocol device and channel initialization when an incorrect ACPI SCMI device has child nodes. (Reported by sashiko)
- Link to v4: https://patch.msgid.link/[email protected]
Patches in v5 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | firmware: arm_scmi: Set generated device fwnode with platform helpersdrivers/ | +4 | 0 replies | |
| 2/9 | firmware: arm_scmi: Extend transport driver macro to support ACPIdrivers/ | +11 | 0 replies | |
| 3/9 | firmware: arm_scmi: Convert OF-only paths to generic fwnode in SCMI coredrivers/ drivers/ drivers/ +4 more | +99 | 0 replies | |
| 4/9 | firmware: arm_scmi: Fall back to ACPI HID when "compatible" is absentdrivers/ | +14 | 0 replies | |
| 5/9 | firmware: arm_scmi: Pass protocol ID to transport chan_available()drivers/ drivers/ drivers/ +3 more | +11 | 0 replies | |
| 6/9 | firmware: arm_scmi: Refactor protocol device creation logicdrivers/ | +34 | 0 replies | |
| 7/9 | firmware: arm_scmi: Add ACPI PCC transportdrivers/ drivers/ drivers/ +2 more | +893 | 1 reply | |
| 8/9 | firmware: arm_scmi: Initialise known ACPI protocol devices and channelsdrivers/ | +47 | 0 replies | |
| 9/9 | firmware: arm_scmi: Validate PCC shared memory signaturedrivers/ | +10 | 0 replies |
Reviews trailers per patch
6 of 9 patches have a Reviewed-by or Acked-by.
| Patch | Jonathan Cameron |
|---|---|
| 1/9 | |
| 2/9 | R-b |
| 3/9 | R-b |
| 4/9 | |
| 5/9 | R-b |
| 6/9 | R-b |
| 7/9 | |
| 8/9 | R-b |
| 9/9 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 0/9] firmware: arm_scmi: Refactoring and enablement of ACPI PCC transport
The SCMI can be utilized in systems using either the FDT or ACPI specification. While FDT-based systems can natively use SCMI, ACPI-based systems often need to abstract the functionality provided by SCMI under ASL methods. So far, there has been no need to support SCMI natively on ACPI systems.
However, with the addition of a few new protocols such as Powercap and Telemetry, which lack abstractions in the ACPI specification, there is now a need to run SCMI natively for those use cases. ACPI for System Control and Management Interface document[1] provides a mechanism which allows ACPI-based systems to discover whether a platform supports SCMI and to natively use SCMI for selected/limited subset of SCMI protocols.
This patch series introduces ACPI PCC transport support for the Arm SCMI framework, alongside several foundational refactors and enhancements to achieve firmware-node neutrality between Device Tree (DT) and ACPI systems.
The key changes include:
1. ACPI/DT abstraction and fwnode transition
Converted the core SCMI code to use fwnode_handle instead of DT-specific structures, ensuring seamless operation across both ACPI and DT environments. All property lookups, child enumeration, and device association paths have been updated accordingly.
2. Unified transport registration for ACPI and DT
Extended the SCMI transport driver macros to support ACPI match tables, enabling transports to probe using ACPI device IDs while maintaining backward compatibility with DT-only systems.
3. Protocol device initialization and refactoring
Refactored the protocol device creation and validation logic into a new helper for improved readability and maintainability. Enhanced the initialization logic to handle ACPI-based SCMI devices without explicit child fwnodes.
4. Introduction of ACPI PCC transport
Added a new SCMI transport driver leveraging ACPI PCCT (Platform Communications Channel Table) subspaces via the Linux PCC mailbox framework. This enables SCMI communication over PCC on ACPI-based platforms.
Collectively, these changes lay the groundwork for robust SCMI operation on ACPI platforms, achieving near parity with DT systems where applicable, while enabling the new PCC transport path for firmware communication.
Note: SCMI will not be run natively for all existing protocols other than Powercap and Telemetry, as they must continue to use ACPI abstractions.
[1] https://developer.arm.com/documentation/111115/latest
-->8
Device (SCM0) {
Name(_HID, "ARML0001")
Name (_UID, 0)
Name (_DSD, Package () {
ToUUID("84a2d1c6-86b6-4199-8dac-9c17449d5e03"), // SCMI Properties UUID
Package () {
Package(2) {
"arm-arml0001-transport-pcc", // Key
Package () { // Value
1, // Revision
3, // Count
Package(){4, 0, 1}, // PCCT Idx, TransportUID, A2P Common
Package(){7, 1, 0}, // PCCT Idx, TransportUID, A2P Exclusive
Package(){9, 2, 2} // PCCT Idx, TransportUID, P2A Exclusive
} // Value
},
Package(2) {
"arm-arml0001-protocol-pcap", // Key
Package () { // Value
1, // Revision
Package() { // Protocol Exclusive Transport Package
// Empty; A2P Common
},
Package() {} // Protocol Association Package
} // Value
},
Package(2) {
"arm-arml0001-protocol-telemetry", // Key
Package () { // Value
1, // Revision
Package() { // Protocol Exclusive Transport Package
Package (2) {1, 0}, // UID=1; Flags=0; A2P Exclusive
Package (2) {2, 0} // UID=2; Flags=0; P2A Exclusive
},
Package() {} // Protocol Association Package
} // Value
},
} // Device Properties
}) // _DSD
} // SCM0---
Changes in v5:
- Make DT child-node enumeration and ACPI known-protocol enumeration mutually exclusive, preventing duplicate protocol device and channel initialization when an incorrect ACPI SCMI device has child nodes. (Reported by sashiko)
- Link to v4: https://patch.msgid.link/[email protected]
Changes in v4:
- Fixed generated platform-device fwnode ownership using the platform-device OF/fwnode helpers.
- Dropped the PCC transport’s default y and clarified its Kconfig help.
- Treated ACPI package integers as 64-bit values and validated PCCT indices before narrowing.
- Reworked PCC parsing with named package indices.
- Made cached PCC transport maps device-managed and protected map cleanup with scoped locking.
- Replaced hard-coded framing and queue limits with symbolic constants.
- Simplified fwnode iteration and made cleanup-helper acquisition and release visibly colocated.
- Link to v3: https://patch.msgid.link/[email protected]
Changes in v3:
- Reworked ACPI _DSD parsing with stricter validation and order-independent transport/protocol processing.
- Added per-fwnode PCC transport maps, serialized access, multi-instance validation, and module-exit cleanup.
- Corrected PCC completion flags and validated shared-memory capacity and signature.
- Restricted protocol enumeration to ACPI-backed instances, handled optional protocols without spurious errors, and fixed CONFIG_ACPI=n builds.
- Removed redundant ACPI companion assignment.
- Enabled the ACPI PCC transport by default when its dependencies are met.
- Link to v2: https://patch.msgid.link/[email protected]
Changes in v2:
- Fixed SCMI fwnode lifetime handling by taking a reference when assigning protocol device fwnodes and releasing it from the device release path.
- Reworked ACPI PCC _DSD parsing to validate package types,
revisions, counts, UID ranges, flags, duplicate UIDs, and channel mappings.
- Parse the SCMI ACPI _DSD UUID package directly as we moved to SCMI specific UUID from the generic device properties UUID and reject malformed or unsupported protocol association data.
- Tightened PCC channel selection so each protocol gets at most one Tx and one Rx channel, with exactly one common A2P channel and at most
one common P2A channel.
- Only set the PCC interrupt-enable flag when the mailbox channel has a txdone IRQ.
- Added the SCMI Telemetry protocol ID(Temporary to get the build working, must come from Cristian's Telemetry support patched)
- Link to v1: https://patch.msgid.link/[email protected]
---
Sudeep Holla (9):
firmware: arm_scmi: Set generated device fwnode with platform helpers
firmware: arm_scmi: Extend transport driver macro to support ACPI
firmware: arm_scmi: Convert OF-only paths to generic fwnode in SCMI core
firmware: arm_scmi: Fall back to ACPI HID when "compatible" is absent
firmware: arm_scmi: Pass protocol ID to transport chan_available()
firmware: arm_scmi: Refactor protocol device creation logic
firmware: arm_scmi: Add ACPI PCC transport
firmware: arm_scmi: Initialise known ACPI protocol devices and channels
firmware: arm_scmi: Validate PCC shared memory signature
drivers/firmware/arm_scmi/bus.c | 37 +- drivers/firmware/arm_scmi/common.h | 39 +- drivers/firmware/arm_scmi/driver.c | 222 ++++--- drivers/firmware/arm_scmi/transports/Kconfig | 12 + drivers/firmware/arm_scmi/transports/Makefile | 2 + drivers/firmware/arm_scmi/transports/mailbox.c | 7 +- drivers/firmware/arm_scmi/transports/optee.c | 7 +- drivers/firmware/arm_scmi/transports/pcc.c | 875 +++++++++++++++++++++++++ drivers/firmware/arm_scmi/transports/smc.c | 10 +- drivers/firmware/arm_scmi/transports/virtio.c | 3 +- include/linux/scmi_protocol.h | 1 + 11 files changed, 1099 insertions(+), 116 deletions(-)
---
base-commit: fd73f4a6659897191fa0d40695fe370925dd3780
change-id: 20251017-acpi_scmi_pcc-e44e1233eae3
Signature · 2 lines
Regards, Sudeep