Add preliminary support for MSM8917
Subsystems (8)
v3 cover Add preliminary support for MSM8917
This patch series adds preliminary support for booting Qualcomm MSM8917.
Specifically, it includes carving out reserved memory regions (no-map) at early init to avoid security violations, A Global Clock Controller (GCC) driver providing essential clocks, resets, and GDSCs needed for U-Boot and a pinctrl driver to configure pin parameters and manage GPIOs.
This patch series depends on the GDSC flags series by Luca Weiss and Alexey Minnekhanov [1], specifically patch 4/4 ("clk/qcom: Treat different GDSCs differently") [2]. On MSM8917, MDSS_GDSC does not have POLL_CFG_GDSCR and requires polling the GDSCR register directly instead of CFG_GDSCR, which is addressed by [2].
Changes in v3:
- Drop "clk: qcom: Add an option to poll for GDSCR GDSC_POWER_ON bit" in favor of Alexey Minnekhanov's series [1] / [2].
- Update MDSS_GDSC in clock-msm8917 to comply with the new 'flags' member in struct qcom_power_map introduced by [2].
Changes in v2:
- Change license to GPL-2.0-only
- Mention the source of the ported code
- Add error check for out-of-range pin selector
- Use macros for RCGR address constants
v2: https://lore.kernel.org/u-boot/[email protected]
v1: https://lore.kernel.org/u-boot/[email protected]
1: https://lore.kernel.org/u-boot/[email protected]
2: https://lore.kernel.org/u-boot/[email protected]
---
Reza Kurniawan (3):
mach-snapdragon: Carve out reserved memory at init for MSM8917
clk: qcom: Add Global Clock Controller (GCC) driver for MSM8917
pinctrl: qcom: Add pinctrl driver for MSM8917
arch/arm/mach-snapdragon/mem_map.c | 3 +- configs/qcom_defconfig | 1 + drivers/clk/qcom/Kconfig | 8 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/clock-msm8917.c | 210 +++++++++++ drivers/pinctrl/qcom/Kconfig | 8 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-msm8917.c | 645 +++++++++++++++++++++++++++++++++ 8 files changed, 876 insertions(+), 1 deletion(-)
---
base-commit: d27c992cebb95bd903d09f3d1da55032a7a145da
change-id: 20260915-msm8917-support-e56f0d21881b
prerequisite-message-id: <[email protected]>
prerequisite-patch-id: a1b270485786a326cb40fda882935fcc0fbf3bba
prerequisite-patch-id: 1d4a1450016d914394cf6a7e24ec9e5bc12fe80a
prerequisite-patch-id: 568826d73bd992c6ff16681ad33e6891e25af5f5
prerequisite-patch-id: bad5df259c02085a5aa51d130459ae1eecd0f638
Best regards,
Signature · 1 line
Reza Kurniawan <[email protected]>
PATCH v3 1/3 mach-snapdragon: Carve out reserved memory at init for MSM8917
Certain regions of memory in MSM8917 are marked as 'no-map'. These regions may cause security violation when included in the standard mapping.
--- arch/arm/mach-snapdragon/mem_map.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-snapdragon/mem_map.c +2 -1
@@ -216,7 +216,8 @@ void enable_caches(void)* reserved regions as inacessible (PTE_TYPE_FAULT) */ if (qcom_memmap_source ==QCOM_MEMMAP_SOURCE_SMEM || -fdt_node_check_compatible (gd->fdt_blob,0 ,"qcom,qcs404" ) ==0 ) { +fdt_node_check_compatible (gd->fdt_blob,0 ,"qcom,qcs404" ) ==0 || +fdt_node_check_compatible (gd->fdt_blob,0 ,"qcom,msm8917" ) ==0 ) { carveout_start =get_timer (0 );/* Takes ~20-50ms on SDM845 */ configure_reserved_memory ();
Signature · 1 line
2.55.0
PATCH v3 2/3 clk: qcom: Add Global Clock Controller (GCC) driver for MSM8917
In reply to Reza KurniawanAdd Global Clock Controller (GCC) driver for MSM8917 to manage clocks, resets, and gdscs. This driver includes the essential clocks and resets for U-Boot to function.
Taken from Linux commit 08df884 ("Merge tag 'thermal-7.3-rc3' ofgit://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm") at drivers/clk/qcom/gcc-msm8917.c
--- configs/qcom_defconfig | 1 + drivers/clk/qcom/Kconfig | 8 ++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/clock-msm8917.c | 210 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 220 insertions(+)
configs/qcom_defconfig +1 -0
@@ -57,6 +57,7 @@ CONFIG_CLK_STUB=y CONFIG_CLK_QCOM_APQ8016=y CONFIG_CLK_QCOM_APQ8096=y CONFIG_CLK_QCOM_MILOS=y +CONFIG_CLK_QCOM_MSM8917=y CONFIG_CLK_QCOM_QCM2290=y CONFIG_CLK_QCOM_QCS404=y CONFIG_CLK_QCOM_QCS615=y
drivers/clk/qcom/Kconfig +8 -0
@@ -55,6 +55,14 @@ config CLK_QCOM_MILOS on the Snapdragon Milos SoC. This driver supports the clocks and resets exposed by the GCC hardware block. +config CLK_QCOM_MSM8917 + bool "Qualcomm MSM8917 GCC" + select CLK_QCOM + help + Say Y here to enable support for the Global Clock Controller + on the Snapdragon MSM8917 SoC. This driver supports the clocks + and resets exposed by the GCC hardware block. + config CLK_QCOM_QCM2290 bool "Qualcomm QCM2290 GCC" select CLK_QCOM
drivers/clk/qcom/Makefile +1 -0
@@ -10,6 +10,7 @@ obj-$(CONFIG_CLK_QCOM_IPQ4019) += clock-ipq4019.o obj-$(CONFIG_CLK_QCOM_IPQ5424) += clock-ipq5424.o obj-$(CONFIG_CLK_QCOM_IPQ9574) += clock-ipq9574.o obj-$(CONFIG_CLK_QCOM_MILOS) += clock-milos.o +obj-$(CONFIG_CLK_QCOM_MSM8917) += clock-msm8917.o obj-$(CONFIG_CLK_QCOM_QCM2290) += clock-qcm2290.o obj-$(CONFIG_CLK_QCOM_QCS404) += clock-qcs404.o obj-$(CONFIG_CLK_QCOM_QCS8300) += clock-qcs8300.o
drivers/clk/qcom/clock-msm8917.c new file +210 -0
210 lines not on this page · raw message
Signature · 1 line
2.55.0
PATCH v3 3/3 pinctrl: qcom: Add pinctrl driver for MSM8917
In reply to Reza KurniawanAdd pinctrl driver to configure pin parameters and managing GPIOs necessary for certain peripherals.
Taken from Linux commit 08df884 ("Merge tag 'thermal-7.3-rc3' ofgit://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm") at drivers/pinctrl/qcom/pinctrl-msm8917.c
--- drivers/pinctrl/qcom/Kconfig | 8 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-msm8917.c | 645 +++++++++++++++++++++++++++++++++ 3 files changed, 654 insertions(+)
drivers/pinctrl/qcom/Kconfig +8 -0
@@ -62,6 +62,14 @@ config PINCTRL_QCOM_MILOS Say Y here to enable support for pinctrl on the Snapdragon Milos SoC, as well as the associated GPIO driver. +config PINCTRL_QCOM_MSM8917 + bool "Qualcomm MSM8917 Pinctrl" + default y if PINCTRL_QCOM_GENERIC + select PINCTRL_QCOM + help + Say Y here to enable support for pinctrl on the Snapdragon MSM8917 SoC, + as well as the associated GPIO driver. + config PINCTRL_QCOM_QCM2290 bool "Qualcomm QCM2290 Pinctrl" default y if PINCTRL_QCOM_GENERIC
drivers/pinctrl/qcom/Makefile +1 -0
@@ -9,6 +9,7 @@ obj-$(CONFIG_PINCTRL_QCOM_IPQ5424) += pinctrl-ipq5424.o obj-$(CONFIG_PINCTRL_QCOM_IPQ9574) += pinctrl-ipq9574.o obj-$(CONFIG_PINCTRL_QCOM_APQ8096) += pinctrl-apq8096.o obj-$(CONFIG_PINCTRL_QCOM_MILOS) += pinctrl-milos.o +obj-$(CONFIG_PINCTRL_QCOM_MSM8917) += pinctrl-msm8917.o obj-$(CONFIG_PINCTRL_QCOM_QCM2290) += pinctrl-qcm2290.o obj-$(CONFIG_PINCTRL_QCOM_QCS404) += pinctrl-qcs404.o obj-$(CONFIG_PINCTRL_QCOM_QCS615) += pinctrl-qcs615.o
drivers/pinctrl/qcom/pinctrl-msm8917.c new file +645 -0
645 lines not on this page · raw message
Signature · 1 line
2.55.0
Quoted 55 lines · On Wed, 16 Sep 2026 04:16:01 +0000 Reza Kurniawan <[email protected]> wrote:
This patch series adds preliminary support for booting Qualcomm MSM8917.
Specifically, it includes carving out reserved memory regions (no-map) at early init to avoid security violations, A Global Clock Controller (GCC) driver providing essential clocks, resets, and GDSCs needed for U-Boot and a pinctrl driver to configure pin parameters and manage GPIOs.
This patch series depends on the GDSC flags series by Luca Weiss and Alexey Minnekhanov [1], specifically patch 4/4 ("clk/qcom: Treat different GDSCs differently") [2]. On MSM8917,
MDSS_GDSCdoes not havePOLL_CFG_GDSCRand requires polling the GDSCR register directly instead ofCFG_GDSCR, which is addressed by [2].Changes in v3:
- Drop "clk: qcom: Add an option to poll for GDSCRGDSC_POWER_ONbit" in favor of Alexey Minnekhanov's series [1] / [2].
- UpdateMDSS_GDSCin clock-msm8917 to comply with the new 'flags' member in structqcom_power_mapintroduced by [2].Changes in v2:
- Change license to GPL-2.0-only
- Mention the source of the ported code
- Add error check for out-of-range pin selector
- Use macros for RCGR address constantsv2: https://lore.kernel.org/u-boot/[email protected]
v1: https://lore.kernel.org/u-boot/[email protected]1: https://lore.kernel.org/u-boot/[email protected]
2: https://lore.kernel.org/u-boot/[email protected]---
Reza Kurniawan (3):
mach-snapdragon: Carve out reserved memory at init for MSM8917
clk: qcom: Add Global Clock Controller (GCC) driver for MSM8917
pinctrl: qcom: Add pinctrl driver for MSM8917arch/arm/mach-snapdragon/mem_map.c | 3 +- configs/qcom_defconfig | 1 + drivers/clk/qcom/Kconfig | 8 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/clock-msm8917.c | 210 +++++++++++ drivers/pinctrl/qcom/Kconfig | 8 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-msm8917.c | 645 +++++++++++++++++++++++++++++++++ 8 files changed, 876 insertions(+), 1 deletion(-)---
base-commit:d27c992cebb95bd903d09f3d1da55032a7a145da
change-id: 20260915-msm8917-support-e56f0d21881b
prerequisite-message-id: <[email protected]>
prerequisite-patch-id:a1b270485786a326cb40fda882935fcc0fbf3bba
prerequisite-patch-id:1d4a1450016d914394cf6a7e24ec9e5bc12fe80a
prerequisite-patch-id:568826d73bd992c6ff16681ad33e6891e25af5f5
prerequisite-patch-id:bad5df259c02085a5aa51d130459ae1eecd0f638
Quoted 5 lines
Best regards,
Signature · 1 line
Reza Kurniawan <[email protected]>
I have tested all the patches with msm8937 Xiaomi Redmi 3S (land) phone. U-Boot can boot Linux and fastboot, USB serial console, SD card work too.
Thanks <3
Quoted 13 lines · Reza Kurniawan
This patch series adds preliminary support for booting Qualcomm MSM8917.
Specifically, it includes carving out reserved memory regions (no-map) at early init to avoid security violations, A Global Clock Controller (GCC) driver providing essential clocks, resets, and GDSCs needed for U-Boot and a pinctrl driver to configure pin parameters and manage GPIOs.
This patch series depends on the GDSC flags series by Luca Weiss and Alexey Minnekhanov [1], specifically patch 4/4 ("clk/qcom: Treat different GDSCs differently") [2]. On MSM8917,
MDSS_GDSCdoes not havePOLL_CFG_GDSCRand requires polling the GDSCR register directly instead ofCFG_GDSCR, which is addressed by [2].
Quoted 5 lines
Changes in v3:
- Drop "clk: qcom: Add an option to poll for GDSCRGDSC_POWER_ONbit" in favor of Alexey Minnekhanov's series [1] / [2].
- UpdateMDSS_GDSCin clock-msm8917 to comply with the new 'flags' member in structqcom_power_mapintroduced by [2].
Series look good to me, FWIW:
-Sumit
Quoted 41 lines
Changes in v2:
- Change license to GPL-2.0-only
- Mention the source of the ported code
- Add error check for out-of-range pin selector
- Use macros for RCGR address constantsv2: https://lore.kernel.org/u-boot/[email protected]
v1: https://lore.kernel.org/u-boot/[email protected]1: https://lore.kernel.org/u-boot/[email protected]
2: https://lore.kernel.org/u-boot/[email protected]---
Reza Kurniawan (3):
mach-snapdragon: Carve out reserved memory at init for MSM8917
clk: qcom: Add Global Clock Controller (GCC) driver for MSM8917
pinctrl: qcom: Add pinctrl driver for MSM8917arch/arm/mach-snapdragon/mem_map.c | 3 +- configs/qcom_defconfig | 1 + drivers/clk/qcom/Kconfig | 8 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/clock-msm8917.c | 210 +++++++++++ drivers/pinctrl/qcom/Kconfig | 8 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-msm8917.c | 645 +++++++++++++++++++++++++++++++++ 8 files changed, 876 insertions(+), 1 deletion(-)---
base-commit:d27c992cebb95bd903d09f3d1da55032a7a145da
change-id: 20260915-msm8917-support-e56f0d21881b
prerequisite-message-id: <[email protected]>
prerequisite-patch-id:a1b270485786a326cb40fda882935fcc0fbf3bba
prerequisite-patch-id:1d4a1450016d914394cf6a7e24ec9e5bc12fe80a
prerequisite-patch-id:568826d73bd992c6ff16681ad33e6891e25af5f5
prerequisite-patch-id:bad5df259c02085a5aa51d130459ae1eecd0f638Best regards,
--
Reza Kurniawan <[email protected]>
Quoted 20 lines · Sumit Garg
Quoted 13 lines · Reza Kurniawan
This patch series adds preliminary support for booting Qualcomm MSM8917.
Specifically, it includes carving out reserved memory regions (no-map) at early init to avoid security violations, A Global Clock Controller (GCC) driver providing essential clocks, resets, and GDSCs needed for U-Boot and a pinctrl driver to configure pin parameters and manage GPIOs.
This patch series depends on the GDSC flags series by Luca Weiss and Alexey Minnekhanov [1], specifically patch 4/4 ("clk/qcom: Treat different GDSCs differently") [2]. On MSM8917,
MDSS_GDSCdoes not havePOLL_CFG_GDSCRand requires polling the GDSCR register directly instead ofCFG_GDSCR, which is addressed by [2].Quoted 5 lines
Changes in v3:
- Drop "clk: qcom: Add an option to poll for GDSCRGDSC_POWER_ONbit" in favor of Alexey Minnekhanov's series [1] / [2].
- UpdateMDSS_GDSCin clock-msm8917 to comply with the new 'flags' member in structqcom_power_mapintroduced by [2].
Quoted 4 lines
Series look good to me, FWIW:
Reviewed-by Sumit Garg <[email protected]>
Casey, Tom,
This series has been reviewed, pending to be picked up?
-Sumit
Quoted 44 lines
Quoted 42 lines
Changes in v2:
- Change license to GPL-2.0-only
- Mention the source of the ported code
- Add error check for out-of-range pin selector
- Use macros for RCGR address constantsv2: https://lore.kernel.org/u-boot/[email protected]
v1: https://lore.kernel.org/u-boot/[email protected]1: https://lore.kernel.org/u-boot/[email protected]
2: https://lore.kernel.org/u-boot/[email protected]---
Reza Kurniawan (3):
mach-snapdragon: Carve out reserved memory at init for MSM8917
clk: qcom: Add Global Clock Controller (GCC) driver for MSM8917
pinctrl: qcom: Add pinctrl driver for MSM8917arch/arm/mach-snapdragon/mem_map.c | 3 +- configs/qcom_defconfig | 1 + drivers/clk/qcom/Kconfig | 8 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/clock-msm8917.c | 210 +++++++++++ drivers/pinctrl/qcom/Kconfig | 8 + drivers/pinctrl/qcom/Makefile | 1 + drivers/pinctrl/qcom/pinctrl-msm8917.c | 645 +++++++++++++++++++++++++++++++++ 8 files changed, 876 insertions(+), 1 deletion(-)---
base-commit:d27c992cebb95bd903d09f3d1da55032a7a145da
change-id: 20260915-msm8917-support-e56f0d21881b
prerequisite-message-id: <[email protected]>
prerequisite-patch-id:a1b270485786a326cb40fda882935fcc0fbf3bba
prerequisite-patch-id:1d4a1450016d914394cf6a7e24ec9e5bc12fe80a
prerequisite-patch-id:568826d73bd992c6ff16681ad33e6891e25af5f5
prerequisite-patch-id:bad5df259c02085a5aa51d130459ae1eecd0f638Best regards,
--
Reza Kurniawan <[email protected]>