Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] soc: qcom: Kconfig improvements
@ 2026-07-11 13:25 Krzysztof Kozlowski
  2026-07-11 13:25 ` [PATCH v2 1/5] soc: qcom: Hide all drivers behind selectable menu Krzysztof Kozlowski
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-11 13:25 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rafael J. Wysocki, Daniel Lezcano,
	Christian Loehle
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, linux-pm,
	Krzysztof Kozlowski, Konrad Dybcio

Merging
=======
Defconfig change (last commit) depends on earlier changes, thus that
patch could wait a cycle.
Alternatively, everything through Qualcomm SoC tree, but then please
keep these on a dedicated branch in case defconfig has to be shared
with soc tree to avoid conflicts.

Changes in v2:
- Implement review - changes in individual patch changelogs
- Add tags
- New patch: soc: qcom: Avoid SCM and SPM for cpuidle drivers

Make important drivers default, so people will not have to choose
obvious things and few other re-organizations.

This matches my other work for Qualcomm drivers (clock, interconnect,
pinctrl).

Best regards,
Krzysztof

---
Krzysztof Kozlowski (5):
      soc: qcom: Hide all drivers behind selectable menu
      soc: qcom: Restrict drivers per ARM/ARM64
      soc: qcom: Make important drivers default
      soc: qcom: Avoid SCM and SPM for cpuidle drivers
      ARM: defconfig: qcom: Drop Qualcomm SoC drivers with defaults

 arch/arm/configs/multi_v7_defconfig |  11 ----
 arch/arm/configs/qcom_defconfig     |   7 ---
 arch/arm64/configs/defconfig        |  18 ------
 drivers/cpuidle/Kconfig.arm         |   4 +-
 drivers/soc/qcom/Kconfig            | 108 ++++++++++++++++++++++--------------
 5 files changed, 67 insertions(+), 81 deletions(-)
---
base-commit: bee763d5f341b99cf472afeb508d4988f62a6ca1
change-id: 20260429-qcom-soc-kconfig-1b9b31d9702a

Best regards,
--  
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/5] soc: qcom: Hide all drivers behind selectable menu
  2026-07-11 13:25 [PATCH v2 0/5] soc: qcom: Kconfig improvements Krzysztof Kozlowski
@ 2026-07-11 13:25 ` Krzysztof Kozlowski
  2026-07-11 13:25 ` [PATCH v2 2/5] soc: qcom: Restrict drivers per ARM/ARM64 Krzysztof Kozlowski
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-11 13:25 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rafael J. Wysocki, Daniel Lezcano,
	Christian Loehle
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, linux-pm,
	Krzysztof Kozlowski

Switch from a simple menu to menuconfig, so all Qualcomm SoC drivers
will be under one selectable option, allowing to disable them all which
should make kernel configuration easier when preparing a non-Qualcomm
kernel.

This has few benefits (functional impact of this commit):

1. Allow compile testing of QCOM_OCMEM, which previously required
   ARCH_QCOM.

2. Hide behind ARCH_QCOM or COMPILE_TEST drivers specific to Qualcomm
   which should not be available to other kernel builds:
   QCOM_PMIC_PDCHARGER_ULOG, QCOM_PMIC_GLINK, QCOM_SPM and QCOM_PBS.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

---

Changes in v2:
1. Hide also QCOM_KRYO_L2_ACCESSORS
---
 drivers/soc/qcom/Kconfig | 82 +++++++++++++++++++++++-------------------------
 1 file changed, 40 insertions(+), 42 deletions(-)

diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index f6970431d07d..f3d9c9d776e5 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -2,11 +2,21 @@
 #
 # QCOM Soc drivers
 #
-menu "Qualcomm SoC drivers"
+menuconfig QCOM_SOC
+	bool "Qualcomm SoC drivers"
+	depends on ARCH_QCOM || COMPILE_TEST
+	default ARCH_QCOM
+	help
+	  This collection of drivers is specific to Qualcomm System-on-Chips
+	  and most of them are necessary for a fully functional boot of the
+	  Linux kernel (plus a few debugging drivers).
+	  Drivers can be skipped when building Linux kernel not intended to run
+	  said processors.
+
+if QCOM_SOC
 
 config QCOM_AOSS_QMP
 	tristate "Qualcomm AOSS Driver"
-	depends on ARCH_QCOM || COMPILE_TEST
 	depends on MAILBOX
 	depends on COMMON_CLK && PM
 	select PM_GENERIC_DOMAINS
@@ -18,7 +28,6 @@ config QCOM_AOSS_QMP
 
 config QCOM_COMMAND_DB
 	tristate "Qualcomm Command DB"
-	depends on ARCH_QCOM || COMPILE_TEST
 	depends on OF_RESERVED_MEM
 	help
 	  Command DB queries shared memory by key string for shared system
@@ -28,7 +37,6 @@ config QCOM_COMMAND_DB
 
 config QCOM_GENI_SE
 	tristate "Qualcomm GENI Serial Engine Driver"
-	depends on ARCH_QCOM || COMPILE_TEST
 	help
 	  This driver is used to manage Generic Interface (GENI) firmware based
 	  Qualcomm Technologies, Inc. Universal Peripheral (QUP) Wrapper. This
@@ -37,7 +45,6 @@ config QCOM_GENI_SE
 
 config QCOM_GSBI
 	tristate "Qualcomm General Serial Bus Interface"
-	depends on ARCH_QCOM || COMPILE_TEST
 	select MFD_SYSCON
 	help
 	  Say y here to enable GSBI support.  The GSBI provides control
@@ -46,7 +53,6 @@ config QCOM_GSBI
 
 config QCOM_LLCC
 	tristate "Qualcomm LLCC driver"
-	depends on ARCH_QCOM || COMPILE_TEST
 	select REGMAP_MMIO
 	help
 	  Qualcomm Technologies, Inc. platform specific
@@ -54,17 +60,8 @@ config QCOM_LLCC
 	  SDM845. This provides interfaces to clients that use the LLCC.
 	  Say yes here to enable LLCC slice driver.
 
-config QCOM_KRYO_L2_ACCESSORS
-	bool
-	depends on (ARCH_QCOM || COMPILE_TEST) && ARM64
-
-config QCOM_MDT_LOADER
-	tristate
-	select QCOM_SCM
-
 config QCOM_OCMEM
 	tristate "Qualcomm On Chip Memory (OCMEM) driver"
-	depends on ARCH_QCOM
 	select QCOM_SCM
 	help
 	  The On Chip Memory (OCMEM) allocator allows various clients to
@@ -77,7 +74,7 @@ config QCOM_PD_MAPPER
 	select QCOM_QMI_HELPERS
 	select QCOM_PDR_MSG
 	select AUXILIARY_BUS
-	depends on NET && QRTR && (ARCH_QCOM || COMPILE_TEST)
+	depends on NET && QRTR
 	default QCOM_RPROC_COMMON
 	help
 	  The Protection Domain Mapper maps registered services to the domains
@@ -85,12 +82,6 @@ config QCOM_PD_MAPPER
 	  implementation of the service. It is a simpler alternative to the
 	  userspace daemon.
 
-config QCOM_PDR_HELPERS
-	tristate
-	select QCOM_QMI_HELPERS
-	select QCOM_PDR_MSG
-	depends on NET
-
 config QCOM_PDR_MSG
 	tristate
 
@@ -124,13 +115,8 @@ config QCOM_PMIC_GLINK
 	  Say yes here to support USB-C and battery status on modern Qualcomm
 	  platforms.
 
-config QCOM_QMI_HELPERS
-	tristate
-	depends on NET
-
 config QCOM_RAMP_CTRL
 	tristate "Qualcomm Ramp Controller driver"
-	depends on ARCH_QCOM || COMPILE_TEST
 	help
 	  The Ramp Controller is used to program the sequence ID for pulse
 	  swallowing, enable sequence and link sequence IDs for the CPU
@@ -139,7 +125,6 @@ config QCOM_RAMP_CTRL
 
 config QCOM_RMTFS_MEM
 	tristate "Qualcomm Remote Filesystem memory driver"
-	depends on ARCH_QCOM || COMPILE_TEST
 	select QCOM_SCM
 	help
 	  The Qualcomm remote filesystem memory driver is used for allocating
@@ -151,7 +136,6 @@ config QCOM_RMTFS_MEM
 
 config QCOM_RPM_MASTER_STATS
 	tristate "Qualcomm RPM Master stats"
-	depends on ARCH_QCOM || COMPILE_TEST
 	help
 	  The RPM Master sleep stats driver provides detailed per-subsystem
 	  sleep/wake data, read from the RPM message RAM. It can be used to
@@ -162,7 +146,6 @@ config QCOM_RPM_MASTER_STATS
 
 config QCOM_RPMH
 	tristate "Qualcomm RPM-Hardened (RPMH) Communication"
-	depends on ARCH_QCOM || COMPILE_TEST
 	depends on (QCOM_COMMAND_DB || !QCOM_COMMAND_DB)
 	help
 	  Support for communication with the hardened-RPM blocks in
@@ -173,7 +156,6 @@ config QCOM_RPMH
 
 config QCOM_SMEM
 	tristate "Qualcomm Shared Memory Manager (SMEM)"
-	depends on ARCH_QCOM || COMPILE_TEST
 	depends on HWSPINLOCK
 	help
 	  Say y here to enable support for the Qualcomm Shared Memory Manager.
@@ -182,7 +164,6 @@ config QCOM_SMEM
 
 config QCOM_SMD_RPM
 	tristate "Qualcomm Resource Power Manager (RPM) over SMD"
-	depends on ARCH_QCOM || COMPILE_TEST
 	depends on RPMSG
 	depends on RPMSG_QCOM_SMD || RPMSG_QCOM_SMD=n
 	help
@@ -229,7 +210,6 @@ config QCOM_SOCINFO
 
 config QCOM_SPM
 	tristate "Qualcomm Subsystem Power Manager (SPM)"
-	depends on ARCH_QCOM || COMPILE_TEST
 	select QCOM_SCM
 	help
 	  Enable the support for the Qualcomm Subsystem Power Manager, used
@@ -238,7 +218,7 @@ config QCOM_SPM
 
 config QCOM_STATS
 	tristate "Qualcomm Sleep stats driver"
-	depends on (ARCH_QCOM && DEBUG_FS) || COMPILE_TEST
+	depends on DEBUG_FS || COMPILE_TEST
 	depends on QCOM_SMEM
 	depends on QCOM_AOSS_QMP || QCOM_AOSS_QMP=n
 	help
@@ -249,7 +229,6 @@ config QCOM_STATS
 
 config QCOM_WCNSS_CTRL
 	tristate "Qualcomm WCNSS control driver"
-	depends on ARCH_QCOM || COMPILE_TEST
 	depends on RPMSG
 	help
 	  Client driver for the WCNSS_CTRL SMD channel, used to download nv
@@ -257,7 +236,6 @@ config QCOM_WCNSS_CTRL
 
 config QCOM_APR
 	tristate "Qualcomm APR/GPR Bus (Asynchronous/Generic Packet Router)"
-	depends on ARCH_QCOM || COMPILE_TEST
 	depends on RPMSG
 	depends on NET
 	select QCOM_PDR_HELPERS
@@ -269,7 +247,6 @@ config QCOM_APR
 
 config QCOM_ICC_BWMON
 	tristate "Qualcomm Interconnect Bandwidth Monitor driver"
-	depends on ARCH_QCOM || COMPILE_TEST
 	select PM_OPP
 	select REGMAP_MMIO
 	help
@@ -282,10 +259,6 @@ config QCOM_ICC_BWMON
 	  the fixed bandwidth votes from cpufreq (CPU nodes) thus achieve high
 	  memory throughput even with lower CPU frequencies.
 
-config QCOM_INLINE_CRYPTO_ENGINE
-	tristate
-	select QCOM_SCM
-
 config QCOM_PBS
 	tristate "PBS trigger support for Qualcomm PMICs"
 	depends on SPMI
@@ -295,7 +268,32 @@ config QCOM_PBS
 	  This module provides the APIs to the client drivers that wants to send the
 	  PBS trigger event to the PBS RAM.
 
-endmenu
+endif
+
+# Options selected by other drivers from different subsystems must be outside
+# of the menuconfig if-block:
+
+config QCOM_INLINE_CRYPTO_ENGINE
+	tristate
+	select QCOM_SCM
+
+config QCOM_KRYO_L2_ACCESSORS
+	bool
+	depends on ARM64
+
+config QCOM_MDT_LOADER
+	tristate
+	select QCOM_SCM
+
+config QCOM_PDR_HELPERS
+	tristate
+	select QCOM_QMI_HELPERS
+	select QCOM_PDR_MSG
+	depends on NET
+
+config QCOM_QMI_HELPERS
+	tristate
+	depends on NET
 
 config QCOM_UBWC_CONFIG
 	tristate

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/5] soc: qcom: Restrict drivers per ARM/ARM64
  2026-07-11 13:25 [PATCH v2 0/5] soc: qcom: Kconfig improvements Krzysztof Kozlowski
  2026-07-11 13:25 ` [PATCH v2 1/5] soc: qcom: Hide all drivers behind selectable menu Krzysztof Kozlowski
@ 2026-07-11 13:25 ` Krzysztof Kozlowski
  2026-07-11 13:25 ` [PATCH v2 3/5] soc: qcom: Make important drivers default Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-11 13:25 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rafael J. Wysocki, Daniel Lezcano,
	Christian Loehle
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, linux-pm,
	Krzysztof Kozlowski

There is no point to allow selecting core SoC drivers for Qualcomm ARMv7
SoCs when building ARM64 kernel, and vice versa.

This makes kernel configuration more difficult as many do not remember
the Qualcomm SoCs model names/numbers and their properties like
architecture.  No features should be lost because:
1. There won't be a single image for ARMv7 and ARMv8/9 SoCs.
2. Newer ARMv8/9 SoCs won't be running in arm32 emulation mode.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

---

Changes in v2:
1. Do not restrict per arm64: QCOM_PBS, QCOM_APR, QCOM_LLCC and QCOM_AOSS_QMP
---
 drivers/soc/qcom/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index f3d9c9d776e5..7207814cac85 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -37,6 +37,7 @@ config QCOM_COMMAND_DB
 
 config QCOM_GENI_SE
 	tristate "Qualcomm GENI Serial Engine Driver"
+	depends on ARM64 || COMPILE_TEST
 	help
 	  This driver is used to manage Generic Interface (GENI) firmware based
 	  Qualcomm Technologies, Inc. Universal Peripheral (QUP) Wrapper. This
@@ -45,6 +46,7 @@ config QCOM_GENI_SE
 
 config QCOM_GSBI
 	tristate "Qualcomm General Serial Bus Interface"
+	depends on ARM || COMPILE_TEST
 	select MFD_SYSCON
 	help
 	  Say y here to enable GSBI support.  The GSBI provides control
@@ -104,6 +106,7 @@ config QCOM_PMIC_GLINK
 	depends on DRM
 	depends on NET
 	depends on OF
+	depends on ARM64 || COMPILE_TEST
 	select AUXILIARY_BUS
 	select QCOM_PDR_HELPERS
 	select DRM_AUX_HPD_BRIDGE
@@ -247,6 +250,7 @@ config QCOM_APR
 
 config QCOM_ICC_BWMON
 	tristate "Qualcomm Interconnect Bandwidth Monitor driver"
+	depends on ARM64 || COMPILE_TEST
 	select PM_OPP
 	select REGMAP_MMIO
 	help

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 3/5] soc: qcom: Make important drivers default
  2026-07-11 13:25 [PATCH v2 0/5] soc: qcom: Kconfig improvements Krzysztof Kozlowski
  2026-07-11 13:25 ` [PATCH v2 1/5] soc: qcom: Hide all drivers behind selectable menu Krzysztof Kozlowski
  2026-07-11 13:25 ` [PATCH v2 2/5] soc: qcom: Restrict drivers per ARM/ARM64 Krzysztof Kozlowski
@ 2026-07-11 13:25 ` Krzysztof Kozlowski
  2026-07-11 15:25   ` Krzysztof Kozlowski
  2026-07-11 13:25 ` [PATCH v2 4/5] soc: qcom: Avoid SCM and SPM for cpuidle drivers Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-11 13:25 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rafael J. Wysocki, Daniel Lezcano,
	Christian Loehle
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, linux-pm,
	Konrad Dybcio, Krzysztof Kozlowski

The drivers for Qualcomm SoC components are covering a basic or
fundamental SoC blocks.  Usually they are required for booting or to
achieve basic expected functionality when running Linux.  These drivers
do not represent any sort of buses visible to the board
designers/configurators, thus they should be always enabled, regardless
how SoC is used in the final board.

Kernel configuration should not ask users choice of drivers when that
choice is obvious and known to the developers that answer should be
'yes' or 'module'.

Switch most of the Qualcomm SoC drivers to a default 'yes' or
'module' for ARCH_QCOM, to match existing defconfig usage.

This has no impact on arm64 defconfig, arm qcom_defconfig and arm
multi_v7_defconfig.

multi:
+#define CONFIG_QCOM_PDR_HELPERS_MODULE 1
+#define CONFIG_QCOM_PBS_MODULE 1
+#define CONFIG_QCOM_AOSS_QMP 1
+#define CONFIG_QCOM_APR_MODULE 1
+#define CONFIG_QCOM_LLCC_MODULE 1

qcom:
+#define CONFIG_QCOM_PDR_HELPERS_MODULE 1
+#define CONFIG_QCOM_PBS_MODULE 1
+#define CONFIG_QCOM_AOSS_QMP 1
+#define CONFIG_QCOM_APR_MODULE 1
+#define CONFIG_QCOM_SPM 1
+#define CONFIG_QCOM_LLCC_MODULE 1

The change will however enable by default all drivers for arm or arm64
COMPILE_TEST builds, whenever ARCH_QCOM is selected, which feels
logical: if one selects ARCH_QCOM then probably by default wants to
build test it entirely.  Kernels with COMPILE_TEST are not supposed to
be used for booting.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

---

Changes in v2:
1. Enable also QCOM_SPM
---
 drivers/soc/qcom/Kconfig | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index 7207814cac85..4e6eac2769e5 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -20,6 +20,7 @@ config QCOM_AOSS_QMP
 	depends on MAILBOX
 	depends on COMMON_CLK && PM
 	select PM_GENERIC_DOMAINS
+	default ARCH_QCOM
 	help
 	  This driver provides the means of communicating with and controlling
 	  the low-power state for resources related to the remoteproc
@@ -29,6 +30,7 @@ config QCOM_AOSS_QMP
 config QCOM_COMMAND_DB
 	tristate "Qualcomm Command DB"
 	depends on OF_RESERVED_MEM
+	default ARCH_QCOM
 	help
 	  Command DB queries shared memory by key string for shared system
 	  resources. Platform drivers that require to set state of a shared
@@ -38,6 +40,7 @@ config QCOM_COMMAND_DB
 config QCOM_GENI_SE
 	tristate "Qualcomm GENI Serial Engine Driver"
 	depends on ARM64 || COMPILE_TEST
+	default ARCH_QCOM
 	help
 	  This driver is used to manage Generic Interface (GENI) firmware based
 	  Qualcomm Technologies, Inc. Universal Peripheral (QUP) Wrapper. This
@@ -47,6 +50,7 @@ config QCOM_GENI_SE
 config QCOM_GSBI
 	tristate "Qualcomm General Serial Bus Interface"
 	depends on ARM || COMPILE_TEST
+	default ARCH_QCOM
 	select MFD_SYSCON
 	help
 	  Say y here to enable GSBI support.  The GSBI provides control
@@ -56,6 +60,7 @@ config QCOM_GSBI
 config QCOM_LLCC
 	tristate "Qualcomm LLCC driver"
 	select REGMAP_MMIO
+	default m if ARCH_QCOM
 	help
 	  Qualcomm Technologies, Inc. platform specific
 	  Last Level Cache Controller(LLCC) driver for platforms such as,
@@ -65,6 +70,7 @@ config QCOM_LLCC
 config QCOM_OCMEM
 	tristate "Qualcomm On Chip Memory (OCMEM) driver"
 	select QCOM_SCM
+	default m if ARCH_QCOM
 	help
 	  The On Chip Memory (OCMEM) allocator allows various clients to
 	  allocate memory from OCMEM based on performance, latency and power
@@ -110,6 +116,7 @@ config QCOM_PMIC_GLINK
 	select AUXILIARY_BUS
 	select QCOM_PDR_HELPERS
 	select DRM_AUX_HPD_BRIDGE
+	default m if ARCH_QCOM
 	help
 	  The Qualcomm PMIC GLINK driver provides access, over GLINK, to the
 	  USB and battery firmware running on one of the coprocessors in
@@ -129,6 +136,7 @@ config QCOM_RAMP_CTRL
 config QCOM_RMTFS_MEM
 	tristate "Qualcomm Remote Filesystem memory driver"
 	select QCOM_SCM
+	default m if ARCH_QCOM
 	help
 	  The Qualcomm remote filesystem memory driver is used for allocating
 	  and exposing regions of shared memory with remote processors for the
@@ -150,6 +158,7 @@ config QCOM_RPM_MASTER_STATS
 config QCOM_RPMH
 	tristate "Qualcomm RPM-Hardened (RPMH) Communication"
 	depends on (QCOM_COMMAND_DB || !QCOM_COMMAND_DB)
+	default ARCH_QCOM
 	help
 	  Support for communication with the hardened-RPM blocks in
 	  Qualcomm Technologies Inc (QTI) SoCs. RPMH communication uses an
@@ -160,6 +169,7 @@ config QCOM_RPMH
 config QCOM_SMEM
 	tristate "Qualcomm Shared Memory Manager (SMEM)"
 	depends on HWSPINLOCK
+	default ARCH_QCOM
 	help
 	  Say y here to enable support for the Qualcomm Shared Memory Manager.
 	  The driver provides an interface to items in a heap shared among all
@@ -169,6 +179,7 @@ config QCOM_SMD_RPM
 	tristate "Qualcomm Resource Power Manager (RPM) over SMD"
 	depends on RPMSG
 	depends on RPMSG_QCOM_SMD || RPMSG_QCOM_SMD=n
+	default ARCH_QCOM
 	help
 	  If you say yes to this option, support will be included for the
 	  Resource Power Manager system found in the Qualcomm 8974 based
@@ -189,6 +200,7 @@ config QCOM_SMP2P
 	depends on QCOM_SMEM
 	select QCOM_SMEM_STATE
 	select IRQ_DOMAIN
+	default ARCH_QCOM
 	help
 	  Say yes here to support the Qualcomm Shared Memory Point to Point
 	  protocol.
@@ -199,6 +211,7 @@ config QCOM_SMSM
 	depends on QCOM_SMEM
 	select QCOM_SMEM_STATE
 	select IRQ_DOMAIN
+	default ARCH_QCOM
 	help
 	  Say yes here to support the Qualcomm Shared Memory State Machine.
 	  The state machine is represented by bits in shared memory.
@@ -207,6 +220,7 @@ config QCOM_SOCINFO
 	tristate "Qualcomm socinfo driver"
 	depends on QCOM_SMEM
 	select SOC_BUS
+	default m if ARCH_QCOM
 	help
 	 Say yes here to support the Qualcomm socinfo driver, providing
 	 information about the SoC to user space.
@@ -214,6 +228,7 @@ config QCOM_SOCINFO
 config QCOM_SPM
 	tristate "Qualcomm Subsystem Power Manager (SPM)"
 	select QCOM_SCM
+	default ARCH_QCOM if ARM
 	help
 	  Enable the support for the Qualcomm Subsystem Power Manager, used
 	  to manage cores, L2 low power modes and to configure the internal
@@ -224,6 +239,7 @@ config QCOM_STATS
 	depends on DEBUG_FS || COMPILE_TEST
 	depends on QCOM_SMEM
 	depends on QCOM_AOSS_QMP || QCOM_AOSS_QMP=n
+	default m if ARCH_QCOM
 	help
 	  Qualcomm Technologies, Inc. (QTI) Sleep stats driver to read
 	  the shared memory exported by the remote processor related to
@@ -233,6 +249,7 @@ config QCOM_STATS
 config QCOM_WCNSS_CTRL
 	tristate "Qualcomm WCNSS control driver"
 	depends on RPMSG
+	default m if ARCH_QCOM
 	help
 	  Client driver for the WCNSS_CTRL SMD channel, used to download nv
 	  firmware to a newly booted WCNSS chip.
@@ -242,6 +259,7 @@ config QCOM_APR
 	depends on RPMSG
 	depends on NET
 	select QCOM_PDR_HELPERS
+	default m if ARCH_QCOM
 	help
 	  Enable APR IPC protocol support between
 	  application processor and QDSP6. APR is
@@ -253,6 +271,7 @@ config QCOM_ICC_BWMON
 	depends on ARM64 || COMPILE_TEST
 	select PM_OPP
 	select REGMAP_MMIO
+	default m if ARCH_QCOM
 	help
 	  Sets up driver monitoring bandwidth on various interconnects and
 	  based on that voting for interconnect bandwidth, adjusting their
@@ -266,6 +285,7 @@ config QCOM_ICC_BWMON
 config QCOM_PBS
 	tristate "PBS trigger support for Qualcomm PMICs"
 	depends on SPMI
+	default m if ARCH_QCOM
 	help
 	  This driver supports configuring software programmable boot sequencer (PBS)
 	  trigger event through PBS RAM on Qualcomm Technologies, Inc. PMICs.

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 4/5] soc: qcom: Avoid SCM and SPM for cpuidle drivers
  2026-07-11 13:25 [PATCH v2 0/5] soc: qcom: Kconfig improvements Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2026-07-11 13:25 ` [PATCH v2 3/5] soc: qcom: Make important drivers default Krzysztof Kozlowski
@ 2026-07-11 13:25 ` Krzysztof Kozlowski
  2026-07-11 13:25 ` [PATCH v2 5/5] ARM: defconfig: qcom: Drop Qualcomm SoC drivers with defaults Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-11 13:25 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rafael J. Wysocki, Daniel Lezcano,
	Christian Loehle
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, linux-pm,
	Krzysztof Kozlowski

QCOM_SCM and QCOM_SPM are user-selectable drivers, thus
ARM_QCOM_SPM_CPUIDLE should rather avoid selecting them but instead
depend to avoid any possible unmet dependencies.

ARM_QCOM_SPM_CPUIDLE does use symbols from SCM and SPM, and since it
cannot be built-in, the dependency must be as built-in.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

---

Changes in v2:
1. New patch after suggestions from Konrad
---
 drivers/cpuidle/Kconfig.arm | 4 ++--
 drivers/soc/qcom/Kconfig    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
index a1ee475d180d..b88b01aa5829 100644
--- a/drivers/cpuidle/Kconfig.arm
+++ b/drivers/cpuidle/Kconfig.arm
@@ -120,11 +120,11 @@ config ARM_QCOM_SPM_CPUIDLE
 	bool "CPU Idle Driver for Qualcomm Subsystem Power Manager (SPM)"
 	depends on (ARCH_QCOM || COMPILE_TEST) && !ARM64 && MMU
 	depends on ARCH_SUSPEND_POSSIBLE
+	depends on QCOM_SCM=y
+	depends on QCOM_SPM=y
 	select ARM_CPU_SUSPEND
 	select CPU_IDLE_MULTIPLE_DRIVERS
 	select DT_IDLE_STATES
-	select QCOM_SCM
-	select QCOM_SPM
 	help
 	  Select this to enable cpuidle for Qualcomm processors.
 	  The Subsystem Power Manager (SPM) controls low power modes for the
diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index 4e6eac2769e5..fd4d4ecd2df0 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -227,7 +227,7 @@ config QCOM_SOCINFO
 
 config QCOM_SPM
 	tristate "Qualcomm Subsystem Power Manager (SPM)"
-	select QCOM_SCM
+	depends on QCOM_SCM
 	default ARCH_QCOM if ARM
 	help
 	  Enable the support for the Qualcomm Subsystem Power Manager, used

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 5/5] ARM: defconfig: qcom: Drop Qualcomm SoC drivers with defaults
  2026-07-11 13:25 [PATCH v2 0/5] soc: qcom: Kconfig improvements Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2026-07-11 13:25 ` [PATCH v2 4/5] soc: qcom: Avoid SCM and SPM for cpuidle drivers Krzysztof Kozlowski
@ 2026-07-11 13:25 ` Krzysztof Kozlowski
  2026-07-11 15:13 ` (subset) [PATCH v2 0/5] soc: qcom: Kconfig improvements Bjorn Andersson
  2026-07-11 16:40 ` Bjorn Andersson
  6 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-11 13:25 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rafael J. Wysocki, Daniel Lezcano,
	Christian Loehle
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, linux-pm,
	Krzysztof Kozlowski

Several Qualcomm SoC drivers have defaults, so their defconfig entries
are redundant.  Keep the few options which choose specific choice
different than the default.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 arch/arm/configs/multi_v7_defconfig | 11 -----------
 arch/arm/configs/qcom_defconfig     |  7 -------
 arch/arm64/configs/defconfig        | 18 ------------------
 3 files changed, 36 deletions(-)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 2d6292f8cab3..9347998e495f 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -1141,17 +1141,6 @@ CONFIG_ASPEED_LPC_CTRL=m
 CONFIG_ASPEED_LPC_SNOOP=m
 CONFIG_ASPEED_P2A_CTRL=m
 CONFIG_QCOM_COMMAND_DB=m
-CONFIG_QCOM_GSBI=y
-CONFIG_QCOM_OCMEM=m
-CONFIG_QCOM_RMTFS_MEM=m
-CONFIG_QCOM_RPMH=m
-CONFIG_QCOM_SMEM=y
-CONFIG_QCOM_SMD_RPM=y
-CONFIG_QCOM_SMP2P=y
-CONFIG_QCOM_SMSM=y
-CONFIG_QCOM_SOCINFO=m
-CONFIG_QCOM_STATS=m
-CONFIG_QCOM_WCNSS_CTRL=m
 CONFIG_ROCKCHIP_IODOMAIN=y
 CONFIG_SOC_TI=y
 CONFIG_KEYSTONE_NAVIGATOR_QMSS=y
diff --git a/arch/arm/configs/qcom_defconfig b/arch/arm/configs/qcom_defconfig
index df0a0ce5b097..330d28ecf7f7 100644
--- a/arch/arm/configs/qcom_defconfig
+++ b/arch/arm/configs/qcom_defconfig
@@ -235,16 +235,9 @@ CONFIG_RPMSG_CHAR=y
 CONFIG_RPMSG_CTRL=y
 CONFIG_RPMSG_QCOM_GLINK_SMEM=y
 CONFIG_RPMSG_QCOM_SMD=y
-CONFIG_QCOM_COMMAND_DB=y
-CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_OCMEM=y
 CONFIG_QCOM_PM=y
 CONFIG_QCOM_RMTFS_MEM=y
-CONFIG_QCOM_RPMH=y
-CONFIG_QCOM_SMEM=y
-CONFIG_QCOM_SMD_RPM=y
-CONFIG_QCOM_SMP2P=y
-CONFIG_QCOM_SMSM=y
 CONFIG_QCOM_SOCINFO=y
 CONFIG_QCOM_STATS=y
 CONFIG_QCOM_WCNSS_CTRL=y
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index dfc52e32802e..bb6afa8a6396 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -1645,25 +1645,7 @@ CONFIG_MTK_CMDQ=m
 CONFIG_MTK_DEVAPC=m
 CONFIG_MTK_PMIC_WRAP=y
 CONFIG_MTK_SVS=m
-CONFIG_QCOM_AOSS_QMP=y
-CONFIG_QCOM_COMMAND_DB=y
-CONFIG_QCOM_GENI_SE=y
-CONFIG_QCOM_LLCC=m
-CONFIG_QCOM_OCMEM=m
-CONFIG_QCOM_PMIC_GLINK=m
-CONFIG_QCOM_RMTFS_MEM=m
-CONFIG_QCOM_RPMH=y
-CONFIG_QCOM_SMEM=y
-CONFIG_QCOM_SMD_RPM=y
-CONFIG_QCOM_SMP2P=y
-CONFIG_QCOM_SMSM=y
-CONFIG_QCOM_SOCINFO=m
 CONFIG_QCOM_SPM=m
-CONFIG_QCOM_STATS=m
-CONFIG_QCOM_WCNSS_CTRL=m
-CONFIG_QCOM_APR=m
-CONFIG_QCOM_ICC_BWMON=m
-CONFIG_QCOM_PBS=m
 CONFIG_ROCKCHIP_IODOMAIN=y
 CONFIG_TI_PRUSS=m
 CONFIG_OWL_PM_DOMAINS=y

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: (subset) [PATCH v2 0/5] soc: qcom: Kconfig improvements
  2026-07-11 13:25 [PATCH v2 0/5] soc: qcom: Kconfig improvements Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2026-07-11 13:25 ` [PATCH v2 5/5] ARM: defconfig: qcom: Drop Qualcomm SoC drivers with defaults Krzysztof Kozlowski
@ 2026-07-11 15:13 ` Bjorn Andersson
  2026-07-11 16:48   ` Bjorn Andersson
  2026-07-11 16:40 ` Bjorn Andersson
  6 siblings, 1 reply; 10+ messages in thread
From: Bjorn Andersson @ 2026-07-11 15:13 UTC (permalink / raw)
  To: Konrad Dybcio, Rafael J. Wysocki, Daniel Lezcano,
	Christian Loehle, Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, linux-pm,
	Konrad Dybcio


On Sat, 11 Jul 2026 15:25:00 +0200, Krzysztof Kozlowski wrote:
> Merging
> =======
> Defconfig change (last commit) depends on earlier changes, thus that
> patch could wait a cycle.
> Alternatively, everything through Qualcomm SoC tree, but then please
> keep these on a dedicated branch in case defconfig has to be shared
> with soc tree to avoid conflicts.
> 
> [...]

Applied, thanks!

[5/5] ARM: defconfig: qcom: Drop Qualcomm SoC drivers with defaults
      commit: 86690b3fabd66970e43f1d1fd4a9ed641850b924

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 3/5] soc: qcom: Make important drivers default
  2026-07-11 13:25 ` [PATCH v2 3/5] soc: qcom: Make important drivers default Krzysztof Kozlowski
@ 2026-07-11 15:25   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-07-11 15:25 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rafael J. Wysocki, Daniel Lezcano,
	Christian Loehle
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, linux-pm,
	Konrad Dybcio

On 11/07/2026 15:25, Krzysztof Kozlowski wrote:
> Kernel configuration should not ask users choice of drivers when that
> choice is obvious and known to the developers that answer should be
> 'yes' or 'module'.
> 
> Switch most of the Qualcomm SoC drivers to a default 'yes' or
> 'module' for ARCH_QCOM, to match existing defconfig usage.
> 
> This has no impact on arm64 defconfig, arm qcom_defconfig and arm
> multi_v7_defconfig.

Oh, that's stale message...


> 
> multi:
> +#define CONFIG_QCOM_PDR_HELPERS_MODULE 1
> +#define CONFIG_QCOM_PBS_MODULE 1
> +#define CONFIG_QCOM_AOSS_QMP 1
> +#define CONFIG_QCOM_APR_MODULE 1
> +#define CONFIG_QCOM_LLCC_MODULE 1
> 
> qcom:
> +#define CONFIG_QCOM_PDR_HELPERS_MODULE 1
> +#define CONFIG_QCOM_PBS_MODULE 1
> +#define CONFIG_QCOM_AOSS_QMP 1
> +#define CONFIG_QCOM_APR_MODULE 1
> +#define CONFIG_QCOM_SPM 1
> +#define CONFIG_QCOM_LLCC_MODULE 1
> 

and that I forgot to reformat.

I see this was already applied, so let me know if I should fix it.


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/5] soc: qcom: Kconfig improvements
  2026-07-11 13:25 [PATCH v2 0/5] soc: qcom: Kconfig improvements Krzysztof Kozlowski
                   ` (5 preceding siblings ...)
  2026-07-11 15:13 ` (subset) [PATCH v2 0/5] soc: qcom: Kconfig improvements Bjorn Andersson
@ 2026-07-11 16:40 ` Bjorn Andersson
  6 siblings, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2026-07-11 16:40 UTC (permalink / raw)
  To: Konrad Dybcio, Rafael J. Wysocki, Daniel Lezcano,
	Christian Loehle, Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, linux-pm,
	Konrad Dybcio


On Sat, 11 Jul 2026 15:25:00 +0200, Krzysztof Kozlowski wrote:
> Merging
> =======
> Defconfig change (last commit) depends on earlier changes, thus that
> patch could wait a cycle.
> Alternatively, everything through Qualcomm SoC tree, but then please
> keep these on a dedicated branch in case defconfig has to be shared
> with soc tree to avoid conflicts.
> 
> [...]

Applied, thanks!

[1/5] soc: qcom: Hide all drivers behind selectable menu
      commit: f2866e6a27f7cc26111ce195ddf00d4050bb27e5
[2/5] soc: qcom: Restrict drivers per ARM/ARM64
      commit: e10b198a94c66f7105dbd535f66631c96579c903
[3/5] soc: qcom: Make important drivers default
      commit: 9b3daac1d0eed2564e49a08636e5044c0bfac0b1
[4/5] soc: qcom: Avoid SCM and SPM for cpuidle drivers
      commit: f6540105e0aaf6c1d3fec6070217f199bdc351f7
[5/5] ARM: defconfig: qcom: Drop Qualcomm SoC drivers with defaults
      (no commit info)

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: (subset) [PATCH v2 0/5] soc: qcom: Kconfig improvements
  2026-07-11 15:13 ` (subset) [PATCH v2 0/5] soc: qcom: Kconfig improvements Bjorn Andersson
@ 2026-07-11 16:48   ` Bjorn Andersson
  0 siblings, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2026-07-11 16:48 UTC (permalink / raw)
  To: Konrad Dybcio, Rafael J. Wysocki, Daniel Lezcano,
	Christian Loehle, Krzysztof Kozlowski
  Cc: linux-arm-msm, linux-kernel, linux-arm-kernel, linux-pm,
	Konrad Dybcio

On Sat, Jul 11, 2026 at 10:13:46AM -0500, Bjorn Andersson wrote:
> 
> On Sat, 11 Jul 2026 15:25:00 +0200, Krzysztof Kozlowski wrote:
> > Merging
> > =======
> > Defconfig change (last commit) depends on earlier changes, thus that
> > patch could wait a cycle.
> > Alternatively, everything through Qualcomm SoC tree, but then please
> > keep these on a dedicated branch in case defconfig has to be shared
> > with soc tree to avoid conflicts.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [5/5] ARM: defconfig: qcom: Drop Qualcomm SoC drivers with defaults
>       commit: 86690b3fabd66970e43f1d1fd4a9ed641850b924

Sorry, I tried to unmerge this again, to avoid ordering issues between
Kconfig and defconfig, but failed. It's actually been backed out now.

Given other changes in drivers/soc/qcom/Kconfig, let's merge this last
change at a later time. 

Regards,
Bjorn

> 
> Best regards,
> -- 
> Bjorn Andersson <andersson@kernel.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-07-11 16:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-11 13:25 [PATCH v2 0/5] soc: qcom: Kconfig improvements Krzysztof Kozlowski
2026-07-11 13:25 ` [PATCH v2 1/5] soc: qcom: Hide all drivers behind selectable menu Krzysztof Kozlowski
2026-07-11 13:25 ` [PATCH v2 2/5] soc: qcom: Restrict drivers per ARM/ARM64 Krzysztof Kozlowski
2026-07-11 13:25 ` [PATCH v2 3/5] soc: qcom: Make important drivers default Krzysztof Kozlowski
2026-07-11 15:25   ` Krzysztof Kozlowski
2026-07-11 13:25 ` [PATCH v2 4/5] soc: qcom: Avoid SCM and SPM for cpuidle drivers Krzysztof Kozlowski
2026-07-11 13:25 ` [PATCH v2 5/5] ARM: defconfig: qcom: Drop Qualcomm SoC drivers with defaults Krzysztof Kozlowski
2026-07-11 15:13 ` (subset) [PATCH v2 0/5] soc: qcom: Kconfig improvements Bjorn Andersson
2026-07-11 16:48   ` Bjorn Andersson
2026-07-11 16:40 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox