Skip to contentSkip to conversation

Initial MSM8953 support

PATCH New Luca Weiss 1 participant 5 messages Jul 16

Subsystems (8)
lore
Share & tools
lore

Luca Weiss

author
#0 lore raw

cover Initial MSM8953 support

Add clock and pinctrl drivers for the MSM8953 SoC, and activate reserved memory carveout for MSM8953 and its sibling SDM632.

Note, that to boot successfully some more changes/quirks are needed:
* Decrease CONFIG_SYS_MALLOC_LEN to e.g. 0x1000000, default value crashes u-boot.
* Disable prng in msm8953.dtsi, crashes u-boot.
* Optionally disable probe of psci-sysreset driver, not functional on msm8953 and prohibits the pshold driver from getting active and working.
* Optionally add simple-framebuffer to sdm632-fairphone-fp3.dts, together with some lk2nd parameter this makes framebuffer somewhat functional. Have not played around too much to get that working 100%, since booting via lk2nd anyways is maybe one bootloader too much.

---
Luca Weiss (4):
clk/qcom: Add MSM8953 clock driver
qcom_defconfig: Enable MSM8953 clock driver
drivers: pinctrl: Add Qualcomm MSM8953 TLMM driver
mach-snapdragon: Do reserved memory carveout for MSM8953/SDM632

 arch/arm/mach-snapdragon/board.c       |   6 +-
 configs/qcom_defconfig                 |   1 +
 drivers/clk/qcom/Kconfig               |   8 ++
 drivers/clk/qcom/Makefile              |   1 +
 drivers/clk/qcom/clock-msm8953.c       | 141 +++++++++++++++++++++++++++++++++
 drivers/pinctrl/qcom/Kconfig           |   8 ++
 drivers/pinctrl/qcom/Makefile          |   1 +
 drivers/pinctrl/qcom/pinctrl-msm8953.c |  80 +++++++++++++++++++
 8 files changed, 244 insertions(+), 2 deletions(-)

---
base-commit: 501d76ca801343cce6dafb17740a8b679ed17072
change-id: 20260715-msm8953-basic-3bcd53790a65

Best regards,

Signature · 1 line
Luca Weiss <[email protected]>
author
#1 lore raw

PATCH 1/4 clk/qcom: Add MSM8953 clock driver

Add Clock driver for the GCC block found in the MSM8953 SoC.

---
 drivers/clk/qcom/Kconfig         |   8 +++
 drivers/clk/qcom/Makefile        |   1 +
 drivers/clk/qcom/clock-msm8953.c | 141 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 150 insertions(+)
drivers/clk/qcom/Kconfig +8 -0
index 9ad233c83ac..8d980acd0a7 100644
@@ -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_MSM8953
+	bool "Qualcomm MSM8953 GCC"
+	select CLK_QCOM
+	help
+	  Say Y here to enable support for the Global Clock Controller
+	  on the Snapdragon MSM8953 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
index c0d95a6300e..4f7eae589cc 100644
@@ -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_MSM8953) += clock-msm8953.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-msm8953.c new file +141 -0

141 lines not on this page · raw message

Signature · 1 line
2.55.0
author
#2 lore raw

PATCH 2/4 qcom_defconfig: Enable MSM8953 clock driver

In reply to Luca Weiss

Enable the driver so that MSM8953 devices can boot with qcom_defconfig.

---
 configs/qcom_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/qcom_defconfig +1 -0
index c52f619850d..9b54903869e 100644
@@ -59,6 +59,7 @@ CONFIG_CLK_STUB=y
 CONFIG_CLK_QCOM_APQ8016=y
 CONFIG_CLK_QCOM_APQ8096=y
 CONFIG_CLK_QCOM_MILOS=y
+CONFIG_CLK_QCOM_MSM8953=y
 CONFIG_CLK_QCOM_QCM2290=y
 CONFIG_CLK_QCOM_QCS404=y
 CONFIG_CLK_QCOM_QCS615=y
Signature · 1 line
2.55.0
author
#3 lore raw

PATCH 3/4 drivers: pinctrl: Add Qualcomm MSM8953 TLMM driver

In reply to Luca Weiss

Add support for TLMM pin controller block (Top Level Mode Multiplexer) on MSM8953 SoC.

---
 drivers/pinctrl/qcom/Kconfig           |  8 ++++
 drivers/pinctrl/qcom/Makefile          |  1 +
 drivers/pinctrl/qcom/pinctrl-msm8953.c | 80 ++++++++++++++++++++++++++++++++++
 3 files changed, 89 insertions(+)
drivers/pinctrl/qcom/Kconfig +8 -0
index 0bea461fcc3..21e735a2b99 100644
@@ -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_MSM8953
+	bool "Qualcomm MSM8953 Pinctrl"
+	default y if PINCTRL_QCOM_GENERIC
+	select PINCTRL_QCOM
+	help
+	  Say Y here to enable support for pinctrl on the MSM8953 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
index 87cb128c4d4..064c75207cf 100644
@@ -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_MSM8953) += pinctrl-msm8953.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-msm8953.c new file +80 -0

80 lines not on this page · raw message

Signature · 1 line
2.55.0
author
#4 lore raw

PATCH 4/4 mach-snapdragon: Do reserved memory carveout for MSM8953/SDM632

In reply to Luca Weiss

The MSM8953/SDM632 SoCs also requires the carveout, otherwise it crashes in early init in initcall_run_f -> board_init_f -> initcall_run_r -> initr_caches -> enable_caches -> dcache_enable -> mmu_setup -> set_sctlr.

---
 arch/arm/mach-snapdragon/board.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-snapdragon/board.c +4 -2
index 35735f1551c..d7059473282 100644
@@ -745,8 +745,10 @@ void enable_caches(void)
 	gd->arch.tlb_addr = tlb_addr;
 	gd->arch.tlb_size = tlb_size;
 
-	/* We do the carveouts only for QCS404, for now. */
-	if (fdt_node_check_compatible(gd->fdt_blob, 0, "qcom,qcs404") == 0) {
+	/* We do the carveouts only for some SoCs, for now. */
+	if (fdt_node_check_compatible(gd->fdt_blob, 0, "qcom,qcs404") == 0 ||
+	    fdt_node_check_compatible(gd->fdt_blob, 0, "qcom,msm8953") == 0 ||
+	    fdt_node_check_compatible(gd->fdt_blob, 0, "qcom,sdm632") == 0) {
 		carveout_start = get_timer(0);
 		/* Takes ~20-50ms on SDM845 */
 		carve_out_reserved_memory();
Signature · 1 line
2.55.0