There is an existing SCMI pinctrl driver in drivers/pinctrl/nxp/ which lets you configure the initial state of the pins via device tree. This patchset is a more generic version which provides GPIO as well.
I wrote two small cleanup patches to the NXP driver, one which renamed an enum and another which made some white space changes. The next patch adds an pinctrl driver which lets you configure the initial state for the pins. But the main thing is that we need one driver to handle the SCMI pinctrl protocol so the pinctrl driver does this. The last patch adds GPIO support over SCMI. I tested this code using the SCP SCMI server on OP-TEE over Qemu. I created a custom mock pinctrl device in SCP. Dan Carpenter (4): scmi: pinctrl: add pinctrl message IDs scmi: update comments for scmi_pinctrl_config_set_in() scmi: pinctrl: add pinctrl driver for SCMI gpio: scmi: Add gpio_scmi driver drivers/firmware/scmi/Makefile | 1 + drivers/firmware/scmi/pinctrl.c | 363 +++++++++++++++++++++ drivers/firmware/scmi/scmi_agent-uclass.c | 4 +- drivers/gpio/Kconfig | 6 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio_scmi.c | 221 +++++++++++++ drivers/pinctrl/Kconfig | 9 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/nxp/pinctrl-imx-scmi.c | 2 +- drivers/pinctrl/pinctrl-scmi.c | 357 ++++++++++++++++++++ include/scmi_agent-uclass.h | 2 +- include/scmi_protocols.h | 379 +++++++++++++++++++++- 12 files changed, 1334 insertions(+), 12 deletions(-) create mode 100644 drivers/firmware/scmi/pinctrl.c create mode 100644 drivers/gpio/gpio_scmi.c create mode 100644 drivers/pinctrl/pinctrl-scmi.c -- 2.51.0

