[PATCH v2 0/4] firmware: scmi: add SCMI power domain protocol support

AKASHI Takahiro takahiro.akashi at linaro.org
Mon Oct 16 07:39:42 CEST 2023


This patch series allows users to access SCMI power domain protocol
provided by SCMI server (platform). See SCMI specification document
v3.2 beta 2[1] for more details about SCMI power domain protocol.

The implementation consists of two layers:
- basic helper functions for SCMI power domain protocol
  in drivers/firmware/scmi/pwdom.c (patch#1)
- DM-compliant power domain driver, which utilizes the helper functions,
  in drivers/power/domain/scmi-power-domain.c (patch#2)

[1] https://developer.arm.com/documentation/den0056/e/?lang=en

DT bindings
===========
Standard bindings are applied, i.e.

scmi {
    ...
    pwrdom_scmi: protocol at 11 {
        regs = <0x11>;
        #power-domain-cells = <1>;
    }
    ...
}

som-device {
    ...
    power-domains = <&pwrdom_scmi 2>;
}

Test
====
The patch series was tested on the following platform:
* sandbox ("ut dm scmi_power_domains")


Prerequisite:
=============
* This patch series is based on the master which now includes my "Base
  protocol support" patches v6[2]

[2] https://lists.denx.de/pipermail/u-boot/2023-September/531623.html

Patches:
========
Patch#1: Add SCMI power domain protocol helpers
Patch#2: Add power domain driver
Patch#3-#4: Test related


Change history:
===============
v2 (Oct 16, 2023)
* remove a change on "test_scmi_cmd" because "scmi" command is no longer
  provided with base protocol v6
* some cleanup
v1 (Sep 26, 2023)
* initial release

AKASHI Takahiro (4):
  firmware: scmi: add power domain protocol support
  power: domain: add SCMI driver
  sandbox: add SCMI power domain protocol support for testing
  test: dm: add SCMI power domain protocol test

 arch/sandbox/dts/test.dts                    |   6 +
 arch/sandbox/include/asm/scmi_test.h         |  21 ++
 configs/sandbox_defconfig                    |   1 +
 drivers/firmware/scmi/Makefile               |   1 +
 drivers/firmware/scmi/pwdom.c                | 189 +++++++++++++
 drivers/firmware/scmi/sandbox-scmi_agent.c   | 265 ++++++++++++++++++-
 drivers/firmware/scmi/sandbox-scmi_devices.c |  10 +
 drivers/firmware/scmi/scmi_agent-uclass.c    |  11 +
 drivers/power/domain/Kconfig                 |   7 +
 drivers/power/domain/Makefile                |   1 +
 drivers/power/domain/scmi-power-domain.c     | 193 ++++++++++++++
 include/scmi_agent-uclass.h                  |   2 +
 include/scmi_protocols.h                     | 178 +++++++++++++
 test/dm/scmi.c                               | 103 +++++++
 14 files changed, 987 insertions(+), 1 deletion(-)
 create mode 100644 drivers/firmware/scmi/pwdom.c
 create mode 100644 drivers/power/domain/scmi-power-domain.c

-- 
2.34.1



More information about the U-Boot mailing list