From 17a88540fd81154284838d836a6771dd93b074a5 Mon Sep 17 00:00:00 2001 From: Kapil Porwal Date: Mon, 25 Aug 2025 09:38:33 +0530 Subject: [PATCH] soc/qualcomm/x1p42100: Use SPMI driver Use SPMI PMIC ARB driver to communicate with SPMI slave devices. BUG=b:438004604 TEST=Communicate with SPMI slaves. Change-Id: I44b7249d82abdbb82cb53d9c9aa04ce8bbff068b Signed-off-by: Kapil Porwal Reviewed-on: https://review.coreboot.org/c/coreboot/+/88927 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik --- src/soc/qualcomm/x1p42100/Makefile.mk | 1 + src/soc/qualcomm/x1p42100/include/soc/addressmap.h | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/src/soc/qualcomm/x1p42100/Makefile.mk b/src/soc/qualcomm/x1p42100/Makefile.mk index c483b5f691..86aeb36fa4 100644 --- a/src/soc/qualcomm/x1p42100/Makefile.mk +++ b/src/soc/qualcomm/x1p42100/Makefile.mk @@ -36,6 +36,7 @@ romstage-y += qclib.c romstage-y += mmu.c romstage-y += ../common/aop_load_reset.c romstage-$(CONFIG_DRIVERS_UART) += ../common/qupv3_uart.c +romstage-y += ../common/spmi.c ################################################################################ ramstage-y += soc.c diff --git a/src/soc/qualcomm/x1p42100/include/soc/addressmap.h b/src/soc/qualcomm/x1p42100/include/soc/addressmap.h index 79e2b782e9..bfb51ad7b2 100644 --- a/src/soc/qualcomm/x1p42100/include/soc/addressmap.h +++ b/src/soc/qualcomm/x1p42100/include/soc/addressmap.h @@ -113,4 +113,13 @@ #define TCSR_GCC_PCIE_4L_CLKREF_EN_PCIE_ENABLE ((void *)0x1FD512C) #define TCSR_PCIE_CTRL_4LN_CONFIG_SEL ((void *)0x1FDA000) +/* SPMI PMIC ARB */ +#define SPMI_PMIC_ARB_CORE_BASE 0x0C400000 +#define FIRST_APID_MAP_OFFSET 0x2000 +#define LAST_APID_MAP_OFFSET 0x3000 +#define SPMI_PMIC_ARB_APID_COUNT ((LAST_APID_MAP_OFFSET - FIRST_APID_MAP_OFFSET) / 4) +#define SPMI_PMIC_ARB_APID_MAP_BASE (SPMI_PMIC_ARB_CORE_BASE + FIRST_APID_MAP_OFFSET) +#define SPMI_PMIC_ARB_CHANNEL_BASE 0x0C500000 +#define SPMI_PMIC_ARB_CHANNEL_SIZE 0x1000 + #endif /* __SOC_QUALCOMM_X1P42100_ADDRESS_MAP_H__ */