From 923e777cc1bf32e759626b44288451f4b4b08f39 Mon Sep 17 00:00:00 2001 From: Grygorii Strashko Date: Sat, 17 Aug 2024 13:02:41 +0300 Subject: [PATCH] plat: rpi: rpi5: enable scmi Pin control protocol Enable ARM SCMI Pin control protocol for RPI5. Signed-off-by: Grygorii Strashko --- plat/rpi/rpi5/platform.mk | 9 ++++++++- plat/rpi/rpi5/rpi5_setup.c | 4 +++- plat/rpi/rpi5/scmi/scmi.c | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/plat/rpi/rpi5/platform.mk b/plat/rpi/rpi5/platform.mk index 0389a83f6b..6a901bb1a1 100644 --- a/plat/rpi/rpi5/platform.mk +++ b/plat/rpi/rpi5/platform.mk @@ -99,9 +99,16 @@ BL31_SOURCES += drivers/scmi-msg/base.c \ drivers/scmi-msg/entry.c \ drivers/scmi-msg/smt.c \ drivers/scmi-msg/reset_domain.c \ + drivers/scmi-msg/scmi_pinctrl.c \ + drivers/pinctrl/pinctrl.c \ plat/rpi/rpi5/scmi/scmi.c \ plat/rpi/rpi5/scmi/scmi_reset.c \ - plat/rpi/rpi5/rpi5_svc_setup.c + plat/rpi/rpi5/rpi5_svc_setup.c \ + plat/rpi/rpi5/bcm2712_pinctrl.c + +BL31_SOURCES += drivers/scmi-msg/scmi_pinctrl.c \ + drivers/pinctrl/pinctrl.c \ + plat/rpi/rpi5/bcm2712_pinctrl.c endif $(eval $(call add_define,RPI3_BL33_IN_AARCH32)) diff --git a/plat/rpi/rpi5/rpi5_setup.c b/plat/rpi/rpi5/rpi5_setup.c index a1b1c41642..ff693c69ea 100644 --- a/plat/rpi/rpi5/rpi5_setup.c +++ b/plat/rpi/rpi5/rpi5_setup.c @@ -8,6 +8,7 @@ #include #ifdef SCMI_SERVER_SUPPORT +extern void bcm2712_pinctrl_init(void); extern void rpi5_init_scmi_server(void); #endif @@ -16,7 +17,8 @@ void plat_rpi_bl31_custom_setup(void) /* Enable arch timer */ generic_delay_timer_init(); -#ifdef SCMI_SERVER_SUPPORT +#if SCMI_SERVER_SUPPORT + bcm2712_pinctrl_init(); rpi5_init_scmi_server(); #endif } diff --git a/plat/rpi/rpi5/scmi/scmi.c b/plat/rpi/rpi5/scmi/scmi.c index c6ef243ffa..7837363727 100644 --- a/plat/rpi/rpi5/scmi/scmi.c +++ b/plat/rpi/rpi5/scmi/scmi.c @@ -43,6 +43,7 @@ const char *plat_scmi_sub_vendor_name(void) static const uint8_t plat_protocol_list[] = { SCMI_PROTOCOL_ID_RESET_DOMAIN, + SCMI_PROTOCOL_ID_PINCTRL, 0U /* Null termination */ };