Skip to content

add SMC based regmap driver for secure syscon access

Clément Léger linux-devicetree lkml oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3regmap: add regmap using ARM SMCCCdrivers/base/regmap/Kconfig drivers/base/regmap/Makefile drivers/base/regmap/regmap-smccc.c +1 more+176 -13 replies
2/3syscon: add support for "syscon-smc" compatibledrivers/mfd/syscon.c+145 -255 replies
3/3dt-bindings: mfd: add "syscon-smc" YAML descriptionDocumentation/devicetree/bindings/mfd/syscon-smc.yaml+57 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] add SMC based regmap driver for secure syscon access

When running under a secure monitor, some peripherals are setup as accessible by secure world only. When those peripherals are system controllers, they might need to be accessed by the normal world for some peripheral configuration.

In order to keep the existing code working for such devices (which usually uses the regmap from a syscon), this series adds support for a regmap that uses SMCs (Secure Monitor Call) to request access to registers. The secure monitor will then catch these accesses and decide whether or not the normal world is allowed to access the requested register.

As said, most drivers that needs access to registers that are shared in a system controller often uses syscon. Currently, syscon uses a regmap_mmio which allows to read and write registers using MMIO accesses. Support is added in this series to also support "syscon-smc" compatible which will use a SMC regmap instead of a MMIO one.

Clément Léger (3):
regmap: add regmap using ARM SMCCC
syscon: add support for "syscon-smc" compatible
dt-bindings: mfd: add "syscon-smc" YAML description

 .../devicetree/bindings/mfd/syscon-smc.yaml   |  57 ++++++
 drivers/base/regmap/Kconfig                   |   7 +-
 drivers/base/regmap/Makefile                  |   1 +
 drivers/base/regmap/regmap-smccc.c            | 131 ++++++++++++++
 drivers/mfd/syscon.c                          | 170 +++++++++++++++---
 include/linux/regmap.h                        |  38 ++++
 6 files changed, 378 insertions(+), 26 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/syscon-smc.yaml
 create mode 100644 drivers/base/regmap/regmap-smccc.c
Signature · 1 line
2.32.0