pinctrl: qcom: Add QCS615 LPASS LPI pinctrl support
Subsystems (6)
v2 cover pinctrl: qcom: Add QCS615 LPASS LPI pinctrl support
This series adds LPASS (Low Power Audio SubSystem) LPI (Low Power Island) pinctrl support for Qualcomm QCS615 SoC.
The LPASS LPI TLMM is a dedicated pin controller for audio pins on QCS615 which supports 32 GPIOs (gpio0-gpio31) with mux functions for i2s1, i2s2, dmic1, dmic2 and spkr_i2s_mclk_a.
---
Changes since v1:
- Retained pinctrl-qcs615-lpass-lpi as a separate driver rather than extending sdm670-lpass-lpi, due to register layout and function mux deviations between the two SoCs.
- Added i2s2_clk, i2s2_ws and i2s2_data mux functions on GPIO23-28 to support a 4-lane I2S bus.
- Removed unused gpio*_pins[] arrays that were mistakenly copied from the top-level msm pinctrl driver.
- Split defconfig enablement into a separate patch per subsystem convention.
Karthik S (3):
dt-bindings: pinctrl: qcom: Add QCS615 LPASS LPI pinctrl bindings
pinctrl: qcom: Add qcs615 lpass lpi pinctrl driver
arm64: defconfig: Enable QCS615 LPASS LPI pinctrl
.../qcom,qcs615-lpass-lpi-pinctrl.yaml | 114 +++++++++++++ arch/arm64/configs/defconfig | 1 + drivers/pinctrl/qcom/Kconfig | 10 ++ drivers/pinctrl/qcom/Makefile | 1 + .../pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c | 161 ++++++++++++++++++ 5 files changed, 287 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,qcs615-lpass-lpi-pinctrl.yaml create mode 100644 drivers/pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c
Signature · 1 line
2.34.1
PATCH v2 1/3 dt-bindings: pinctrl: qcom: Add QCS615 LPASS LPI pinctrl bindings
Add bindings for the pin controller in the QCS615 Low Power Audio SubSystem (LPASS) Low Power Island (LPI).
The LPASS LPI TLMM is a dedicated pin controller for audio pins on QCS615 which supports 32 GPIOs (gpio0-gpio31) with functions including i2s1, dmic1, dmic2 and spkr_i2s_mclk_a.
--- .../qcom,qcs615-lpass-lpi-pinctrl.yaml | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,qcs615-lpass-lpi-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/qcom,qcs615-lpass-lpi-pinctrl.yaml new file +114 -0
@@ -0,0 +1,114 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/qcom,qcs615-lpass-lpi-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm QCS615 SoC LPASS LPI TLMM + +maintainers: + - Karthik S <[email protected]> + +description: + Top Level Mode Multiplexer pin controller in the Low Power Audio SubSystem + (LPASS) Low Power Island (LPI) of Qualcomm QCS615 SoC. + +properties: + compatible: + const: qcom,qcs615-lpass-lpi-pinctrl + + reg: + items: + - description: LPASS LPI TLMM Control and Status registers + - description: LPASS LPI MCC registers + + clocks: + items: + - description: LPASS Core voting clock + + clock-names: + items: + - const: core + +patternProperties: + "-state$": + oneOf: + - $ref: "#/$defs/qcom-qcs615-lpass-state" + - patternProperties: + "-pins$": + $ref: "#/$defs/qcom-qcs615-lpass-state" + additionalProperties: false + +$defs: + qcom-qcs615-lpass-state: + type: object + description: + Pinctrl node's client devices use subnodes for desired pin configuration. + Client device subnodes use below standard properties. + $ref: qcom,lpass-lpi-common.yaml#/$defs/qcom-tlmm-state + unevaluatedProperties: false + + properties: + pins: + description: + List of gpio pins affected by the properties specified in this + subnode. + items: + pattern: "^gpio([0-9]|1[0-9]|2[0-9]|3[0-1])$" + + function: + enum: [ dmic1_clk, dmic1_data, dmic2_clk, dmic2_data, gpio, i2s1_clk, + i2s1_data, i2s1_ws, spkr_i2s_mclk_a ] + description: + Specify the alternative function to be configured for the specified + pins. + +allOf: + - $ref: qcom,lpass-lpi-common.yaml# + +required: + - compatible + - reg + - clocks + - clock-names + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/sound/qcom,q6afe.h> + lpi_tlmm: pinctrl@62b40000 { + compatible = "qcom,qcs615-lpass-lpi-pinctrl"; + reg = <0x62b40000 0x20000>, + <0x62b00000 0x10000>; + clocks = <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + clock-names = "core"; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&lpi_tlmm 0 0 32>; + + i2s1-active-state { + clk-pins { + pins = "gpio8"; + function = "i2s1_clk"; + drive-strength = <8>; + bias-disable; + output-high; + }; + + ws-pins { + pins = "gpio9"; + function = "i2s1_ws"; + drive-strength = <8>; + bias-disable; + output-high; + }; + + data-pins { + pins = "gpio10", "gpio11"; + function = "i2s1_data"; + drive-strength = <8>; + bias-disable; + }; + }; + };
Signature · 1 line
2.34.1
Re: [PATCH v2 1/3] dt-bindings: pinctrl: qcom: Add QCS615 LPASS LPI pinctrl bindings
On 17/11/2026 08:50, Karthik S wrote:
A nit, subject: drop second/last, redundant "bindings". The "dt-bindings" prefix is already stating that these are bindings. See also:
https://elixir.bootlin.com/linux/v7.1-rc7/source/Documentation/devicetree/bindings/submitting-patches.rst#L23
Documentation/devicetree/bindings/pinctrl/qcom,qcs615-lpass-lpi-pinctrl.yaml line 61
Quoted 11 lines
Documentation/devicetree/bindings/pinctrl/qcom,qcs615-lpass-lpi-pinctrl.yaml new file +11
-0+ properties: + pins: + description: + List of gpio pins affected by the properties specified in this + subnode. + items: + pattern: "^gpio([0-9]|1[0-9]|2[0-9]|3[0-1])$" + + function: + enum: [ dmic1_clk, dmic1_data, dmic2_clk, dmic2_data, gpio, i2s1_clk, + i2s1_data, i2s1_ws, spkr_i2s_mclk_a ]
It's the first time spkr_i2s_mclk_a name appears. Are you sure that is the name of the pin function in the datasheet? You won't be able to change it later.
Best regards,
Krzysztof
PATCH v2 2/3 pinctrl: qcom: Add qcs615 lpass lpi pinctrl driver
In reply to Karthik SAdd pinctrl driver to support pin configuration for LPASS (Low Power Audio SubSystem) LPI (Low Power Island) pinctrl on QCS615.
This IP is an additional pin control block for Audio Pins on top the existing SoC Top level pin-controller.
This pin controller has some similarities compared to Top level msm SoC Pin controller like 'each pin belongs to a single group' and so on. However this one is intended to control only audio pins in particular, which can not be configured/touched by the Top level SoC pin controller except setting them as gpios.
--- drivers/pinctrl/qcom/Kconfig | 10 ++ drivers/pinctrl/qcom/Makefile | 1 + .../pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c | 161 ++++++++++++++++++ 3 files changed, 172 insertions(+) create mode 100644 drivers/pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c
drivers/pinctrl/qcom/Kconfig +10 -0
@@ -72,6 +72,16 @@ config PINCTRL_HAWI_LPASS_LPI (Low Power Island) found on the Qualcomm Technologies Inc Hawi platform. +config PINCTRL_QCS615_LPASS_LPI + tristate "Qualcomm Technologies Inc QCS615 LPASS LPI pin controller driver" + depends on ARM64 || COMPILE_TEST + depends on PINCTRL_LPASS_LPI + help + This is the pinctrl, pinmux, pinconf and gpiolib driver for the + Qualcomm Technologies Inc LPASS (Low Power Audio SubSystem) LPI + (Low Power Island) found on the Qualcomm Technologies Inc QCS615 + platform. + config PINCTRL_MILOS_LPASS_LPI tristate "Qualcomm Milos LPASS LPI pin controller driver" depends on ARM64 || COMPILE_TEST
drivers/pinctrl/qcom/Makefile +1 -0
@@ -36,6 +36,7 @@ obj-$(CONFIG_PINCTRL_MSM8998) += pinctrl-msm8998.o obj-$(CONFIG_PINCTRL_QCM2290) += pinctrl-qcm2290.o obj-$(CONFIG_PINCTRL_QCS404) += pinctrl-qcs404.o obj-$(CONFIG_PINCTRL_QCS615) += pinctrl-qcs615.o +obj-$(CONFIG_PINCTRL_QCS615_LPASS_LPI) += pinctrl-qcs615-lpass-lpi.o obj-$(CONFIG_PINCTRL_QCS8300) += pinctrl-qcs8300.o obj-$(CONFIG_PINCTRL_QDF2XXX) += pinctrl-qdf2xxx.o obj-$(CONFIG_PINCTRL_MDM9607) += pinctrl-mdm9607.o
drivers/pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c new file +161 -0
161 lines not on this page · raw message
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 2/3] pinctrl: qcom: Add qcs615 lpass lpi pinctrl driver
Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Medium] pinctrl: qcom: missing LPI_FUNCTION(gpio) in qcs615_functions - [Low] pinctrl: qcom: i2s2…
Thank you for your contribution! Sashiko AI review found 2 potential issues to consider:
- [Medium] pinctrl: qcom: missing LPI_FUNCTION(gpio) in qcs615_functions
- [Low] pinctrl: qcom: i2s2 functions in qcs615_functions mismatch DT binding
--
commit 90c734ca8b12506dd8f24f8affa76e931746bc81
Author: Karthik S <[email protected]>
pinctrl: qcom: Add qcs615 lpass lpi pinctrl driver
This commit adds the LPASS LPI pinctrl driver for the Qualcomm QCS615 platform.
Quoted 6 lines
drivers/pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c new file +0
-0@@ -0,0 +1,161 @@
[ ... ]
Quoted 15 lines
drivers/pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c new file +15
-0+enum lpass_lpi_functions { + LPI_MUX_i2s1_clk, + LPI_MUX_i2s1_ws, + LPI_MUX_i2s1_data, + LPI_MUX_spkr_i2s_mclk_a, + LPI_MUX_i2s2_clk, + LPI_MUX_i2s2_ws, + LPI_MUX_i2s2_data, + LPI_MUX_dmic1_clk, + LPI_MUX_dmic1_data, + LPI_MUX_dmic2_clk, + LPI_MUX_dmic2_data, + LPI_MUX_gpio, +LPI_MUX__ , +};
[ ... ]
Quoted 36 lines
drivers/pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c new file +36
-0+static const char *const i2s1_clk_groups[] = {"gpio8" }; +static const char *const i2s1_ws_groups[] = {"gpio9" }; +static const char *const i2s1_data_groups[] = {"gpio10" ,"gpio11" }; +static const char *const spkr_i2s_mclk_a_groups[] = {"gpio19" }; +static const char *const i2s2_clk_groups[] = {"gpio23" }; +static const char *const i2s2_ws_groups[] = {"gpio24" }; +static const char *const i2s2_data_groups[] = {"gpio25" ,"gpio26" ,"gpio27" ,"gpio28" }; +static const char *const dmic1_clk_groups[] = {"gpio26" }; +static const char *const dmic1_data_groups[] = {"gpio27" }; +static const char *const dmic2_clk_groups[] = {"gpio28" }; +static const char *const dmic2_data_groups[] = {"gpio29" }; + +static const struct lpi_pingroup qcs615_groups[] = { +LPI_PINGROUP (0 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (1 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (2 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (3 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (4 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (5 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (6 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (7 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (8 ,LPI_NO_SLEW , _, _, i2s1_clk, _), +LPI_PINGROUP (9 ,LPI_NO_SLEW , _, _, i2s1_ws, _), +LPI_PINGROUP (10 ,LPI_NO_SLEW , _, _, _, i2s1_data), +LPI_PINGROUP (11 ,LPI_NO_SLEW , _, i2s1_data, _, _), +LPI_PINGROUP (12 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (13 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (14 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (15 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (16 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (17 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (18 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (19 ,LPI_NO_SLEW , spkr_i2s_mclk_a, _, _, _), +LPI_PINGROUP (20 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (21 ,LPI_NO_SLEW , _, _, _, _), +LPI_PINGROUP (22 ,LPI_NO_SLEW , _, _, _, _),
drivers/pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c line 111
Quoted 10 lines
drivers/pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c new file +10
-0+LPI_PINGROUP (23 ,LPI_NO_SLEW , _, _, i2s2_clk, _), +LPI_PINGROUP (24 ,LPI_NO_SLEW , i2s2_ws, _, _, _), +LPI_PINGROUP (25 ,LPI_NO_SLEW , i2s2_data, _, _, _), +LPI_PINGROUP (26 ,LPI_NO_SLEW , dmic1_clk, i2s2_data, _, _), +LPI_PINGROUP (27 ,LPI_NO_SLEW , dmic1_data, i2s2_data, _, _), +LPI_PINGROUP (28 ,LPI_NO_SLEW , dmic2_clk, i2s2_data, _, _), +LPI_PINGROUP (29 ,LPI_NO_SLEW , dmic2_data, _, _, _), +LPI_PINGROUP (30 ,LPI_NO_SLEW , _, _, _, _), + LPI_PINGROUP(31, LPI_NO_SLEW, _, _, _, _), +};
[Severity: Low]
Are i2s2_clk, i2s2_ws and i2s2_data valid functions on QCS615 LPASS LPI?
The driver exposes them on gpio23 through gpio28 and in qcs615_functions[], but Documentation/devicetree/bindings/pinctrl/qcom,qcs615-lpass-lpi-pinctrl.yaml only allows dmic1_clk, dmic1_data, dmic2_clk, dmic2_data, gpio, i2s1_clk, i2s1_data, i2s1_ws and spkr_i2s_mclk_a, so any Device Tree node using i2s2 will fail dtbs_check.
Quoted 4 lines
drivers/pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c new file +4
-0+ +static const struct lpi_function qcs615_functions[] = { +LPI_FUNCTION (i2s1_clk), +LPI_FUNCTION (i2s1_ws),
drivers/pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c line 125
Quoted 10 lines
drivers/pinctrl/qcom/pinctrl-qcs615-lpass-lpi.c new file +10
-0+LPI_FUNCTION (i2s1_data), +LPI_FUNCTION (spkr_i2s_mclk_a), +LPI_FUNCTION (i2s2_clk), +LPI_FUNCTION (i2s2_ws), +LPI_FUNCTION (i2s2_data), +LPI_FUNCTION (dmic1_clk), +LPI_FUNCTION (dmic1_data), +LPI_FUNCTION (dmic2_clk), + LPI_FUNCTION(dmic2_data), +};
[Severity: Medium]
Should qcs615_functions[] also include LPI_FUNCTION(gpio) with a matching gpio_groups[] array?
LPI_MUX_gpio is defined in enum lpass_lpi_functions and placed in .funcs[0] by LPI_PINGROUP() for all 32 pins (21 of which have no other function), and the DT binding permits function = "gpio". Without LPI_FUNCTION(gpio) in qcs615_functions[], pinmux_func_name_to_selector() rejects function = "gpio" with -EINVAL, and lpi_gpio_set_mux() can never select GPIO_FUNC because lpi_gpio_pinmux_ops does not implement .gpio_request_enable.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Re: [PATCH v2 2/3] pinctrl: qcom: Add qcs615 lpass lpi pinctrl driver
In reply to Karthik Sdrivers/pinctrl/qcom/Kconfig config PINCTRL_HAWI_LPASS_LPI · line 75
Quoted 9 lines · Karthik S
drivers/pinctrl/qcom/Kconfig +1
-0@@ -72,6 +72,16 @@ config PINCTRL_HAWI_LPASS_LPI (Low Power Island) found on the Qualcomm Technologies Inc Hawi platform. +config PINCTRL_QCS615_LPASS_LPI
Why breaking the alphabetical order? It's not really difficult to spot the next entry after this one.
drivers/pinctrl/qcom/Kconfig config PINCTRL_HAWI_LPASS_LPI · line 87
Quoted 12 lines
drivers/pinctrl/qcom/Kconfig +9
-0+ tristate "Qualcomm Technologies Inc QCS615 LPASS LPI pin controller driver" + depends on ARM64 || COMPILE_TEST + depends on PINCTRL_LPASS_LPI + help + This is the pinctrl, pinmux, pinconf and gpiolib driver for the + Qualcomm Technologies Inc LPASS (Low Power Audio SubSystem) LPI + (Low Power Island) found on the Qualcomm Technologies Inc QCS615 + platform. + config PINCTRL_MILOS_LPASS_LPI tristate "Qualcomm Milos LPASS LPI pin controller driver" depends on ARM64 || COMPILE_TEST
Best regards,
Krzysztof
PATCH v2 3/3 arm64: defconfig: Enable QCS615 LPASS LPI pinctrl
In reply to Karthik SEnable the QCS615 LPASS LPI pin controller driver as a module.
--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
@@ -706,6 +706,7 @@ CONFIG_PINCTRL_IMX_SCMI=y CONFIG_PINCTRL_IMX91=y CONFIG_PINCTRL_QCOM_SPMI_PMIC=y CONFIG_PINCTRL_LPASS_LPI=m +CONFIG_PINCTRL_QCS615_LPASS_LPI=m CONFIG_PINCTRL_MILOS_LPASS_LPI=m CONFIG_PINCTRL_SC7280_LPASS_LPI=m CONFIG_PINCTRL_SM6115_LPASS_LPI=m
Signature · 1 line
2.34.1
Re: [PATCH v2 3/3] arm64: defconfig: Enable QCS615 LPASS LPI pinctrl
Quoted 1 line · Karthik S
Enable the QCS615 LPASS LPI pin controller driver as a module.
Why? Please look at multiple previous review comments or git history. I don't get why defconfig update from Qualcomm every time receives the same comment, even though it is documented what is supposed to be here and previous discussions/git give clear guidance.
Best regards,
Krzysztof