SDM670 LPASS LPI pin controller support
Subsystems (7)
v3 cover SDM670 LPASS LPI pin controller support
This adds support for the LPASS LPI pin controller on SDM670, which controls some audio pins (e.g. TDM or PDM busses). The ADSP patches are not sent yet.
Dependencies:
- SDM670 Basic SoC thermal zones (devicetree nodes are touching)
https://lore.kernel.org/r/[email protected]
- Support for the Pixel 3a XL with the Tianma panel (for reserved GPIOs)
https://lore.kernel.org/r/[email protected]
Changes since v2 (https://lore.kernel.org/r/[email protected]):
- add minItems and maxItems (1/5)
- add review tags (2-5/5)
Changes since v1 (https://lore.kernel.org/r/[email protected]):
- add LPASS in dt-bindings patch subject (2/5)
- change pin names (2/5, 3/5, 4/5)
- add reviewed-by from Krzysztof (2/5)
- specify gpio-reserved-ranges (1/5, 5/5)
Richard Acayan (5):
dt-bindings: qcom: lpass-lpi-common: add reserved GPIOs property
dt-bindings: pinctrl: qcom: Add SDM670 LPASS LPI pinctrl
pinctrl: qcom: add sdm670 lpi tlmm
arm64: dts: qcom: sdm670: add lpi pinctrl
arm64: dts: qcom: sdm670-google: add reserved lpi gpios
.../pinctrl/qcom,lpass-lpi-common.yaml | 8 + .../qcom,sdm670-lpass-lpi-pinctrl.yaml | 81 +++++++++ .../boot/dts/qcom/sdm670-google-common.dtsi | 4 + arch/arm64/boot/dts/qcom/sdm670.dtsi | 73 ++++++++ drivers/pinctrl/qcom/Kconfig | 10 ++ drivers/pinctrl/qcom/Makefile | 1 + .../pinctrl/qcom/pinctrl-sdm670-lpass-lpi.c | 166 ++++++++++++++++++ 7 files changed, 343 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,sdm670-lpass-lpi-pinctrl.yaml create mode 100644 drivers/pinctrl/qcom/pinctrl-sdm670-lpass-lpi.c
Signature · 1 line
2.53.0
PATCH v3 1/5 dt-bindings: qcom: lpass-lpi-common: add reserved GPIOs property
There can be reserved GPIOs on the LPASS LPI pin controller to possibly control sensors. Add the property for reserved GPIOs so they can be avoided appropriately.
Adapted from the same entry in qcom,tlmm-common.yaml.
--- .../bindings/pinctrl/qcom,lpass-lpi-common.yaml | 8 ++++++++ 1 file changed, 8 insertions(+)
Documentation/devicetree/bindings/pinctrl/qcom,lpass-lpi-common.yaml +8 -0
@@ -27,6 +27,14 @@ properties: gpio-ranges: maxItems: 1 + gpio-reserved-ranges: + minItems: 1 + maxItems: 30 + description: + Pins can be reserved for trusted applications or for LPASS, thereby + inaccessible from the OS. This property can be used to mark the pins + which resources should not be accessed by the OS. + required: - gpio-controller - "#gpio-cells"
Signature · 1 line
2.53.0
Re: [PATCH v3 1/5] dt-bindings: qcom: lpass-lpi-common: add reserved GPIOs property
Quoted 10 lines · Richard Acayan
There can be reserved GPIOs on the LPASS LPI pin controller to possibly control sensors. Add the property for reserved GPIOs so they can be avoided appropriately.
Adapted from the same entry in qcom,tlmm-common.yaml.
Signed-off-by Richard Acayan <[email protected]>--- .../bindings/pinctrl/qcom,lpass-lpi-common.yaml | 8 ++++++++ 1 file changed, 8 insertions(+)
Best regards,
Krzysztof
PATCH v3 2/5 dt-bindings: pinctrl: qcom: Add SDM670 LPASS LPI pinctrl
In reply to Richard AcayanAdd the pin controller for the audio Low-Power Island (LPI) on SDM670.
--- .../qcom,sdm670-lpass-lpi-pinctrl.yaml | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,sdm670-lpass-lpi-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/qcom,sdm670-lpass-lpi-pinctrl.yaml new file +81 -0
@@ -0,0 +1,81 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/qcom,sdm670-lpass-lpi-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm SDM670 SoC LPASS LPI TLMM + +maintainers: + - Richard Acayan <[email protected]> + +description: + Top Level Mode Multiplexer pin controller in the Low Power Audio SubSystem + (LPASS) Low Power Island (LPI) of Qualcomm SDM670 SoC. + +properties: + compatible: + const: qcom,sdm670-lpass-lpi-pinctrl + + reg: + items: + - description: LPASS LPI TLMM Control and Status registers + +patternProperties: + "-state$": + oneOf: + - $ref: "#/$defs/qcom-sdm670-lpass-state" + - patternProperties: + "-pins$": + $ref: "#/$defs/qcom-sdm670-lpass-state" + additionalProperties: false + +$defs: + qcom-sdm670-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: [ gpio, comp_rx, dmic1_clk, dmic1_data, dmic2_clk, dmic2_data, + i2s1_clk, i2s_data, i2s_ws, lpi_cdc_rst, mclk0, pdm_rx, + pdm_sync, pdm_tx, slimbus_clk ] + description: + Specify the alternative function to be configured for the specified + pins. + +allOf: + - $ref: qcom,lpass-lpi-common.yaml# + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + lpi_tlmm: pinctrl@62b40000 { + compatible = "qcom,sdm670-lpass-lpi-pinctrl"; + reg = <0x62b40000 0x20000>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&lpi_tlmm 0 0 32>; + + cdc_comp_default: cdc-comp-default-state { + pins = "gpio22", "gpio24"; + function = "comp_rx"; + drive-strength = <4>; + }; + };
Signature · 1 line
2.53.0
PATCH v3 3/5 pinctrl: qcom: add sdm670 lpi tlmm
In reply to Richard AcayanThe Snapdragon 670 has an Low-Power Island (LPI) TLMM for configuring pins related to audio. Add the driver for this.
--- drivers/pinctrl/qcom/Kconfig | 10 ++ drivers/pinctrl/qcom/Makefile | 1 + .../pinctrl/qcom/pinctrl-sdm670-lpass-lpi.c | 166 ++++++++++++++++++ 3 files changed, 177 insertions(+) create mode 100644 drivers/pinctrl/qcom/pinctrl-sdm670-lpass-lpi.c
drivers/pinctrl/qcom/Kconfig +10 -0
@@ -89,6 +89,16 @@ config PINCTRL_SM4250_LPASS_LPI Qualcomm Technologies Inc LPASS (Low Power Audio SubSystem) LPI (Low Power Island) found on the Qualcomm Technologies Inc SM4250 platform. +config PINCTRL_SDM670_LPASS_LPI + tristate "Qualcomm Technologies Inc SDM670 LPASS LPI pin controller driver" + depends on GPIOLIB + 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 SDM670 platform. + config PINCTRL_SM6115_LPASS_LPI tristate "Qualcomm Technologies Inc SM6115 LPASS LPI pin controller driver" depends on ARM64 || COMPILE_TEST
drivers/pinctrl/qcom/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_PINCTRL_SC8280XP) += pinctrl-sc8280xp.o obj-$(CONFIG_PINCTRL_SDM660) += pinctrl-sdm660.o obj-$(CONFIG_PINCTRL_SDM660_LPASS_LPI) += pinctrl-sdm660-lpass-lpi.o obj-$(CONFIG_PINCTRL_SDM670) += pinctrl-sdm670.o +obj-$(CONFIG_PINCTRL_SDM670_LPASS_LPI) += pinctrl-sdm670-lpass-lpi.o obj-$(CONFIG_PINCTRL_SDM845) += pinctrl-sdm845.o obj-$(CONFIG_PINCTRL_SDX55) += pinctrl-sdx55.o obj-$(CONFIG_PINCTRL_SDX65) += pinctrl-sdx65.o
drivers/pinctrl/qcom/pinctrl-sdm670-lpass-lpi.c new file +166 -0
166 lines not on this page · raw message
Signature · 1 line
2.53.0
PATCH v3 4/5 arm64: dts: qcom: sdm670: add lpi pinctrl
In reply to Richard AcayanThe Snapdragon 670 has a separate TLMM for audio pins. Add the device node for it.
--- arch/arm64/boot/dts/qcom/sdm670.dtsi | 73 ++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+)
arch/arm64/boot/dts/qcom/sdm670.dtsi +73 -0
@@ -2346,6 +2346,79 @@ lmh_cluster0: lmh@17d78800 { interrupt-controller; #interrupt-cells = <1>; }; + + lpi_tlmm: pinctrl@62b40000 { + compatible = "qcom,sdm670-lpass-lpi-pinctrl"; + reg = <0 0x62b40000 0 0x20000>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&lpi_tlmm 0 0 32>; + + cdc_pdm_default: cdc-pdm-default-state { + clk-pins { + pins = "gpio18"; + function = "slimbus_clk"; + drive-strength = <4>; + output-low; + }; + + sync-pins { + pins = "gpio19"; + function = "pdm_sync"; + drive-strength = <4>; + output-low; + }; + + tx-pins { + pins = "gpio20"; + function = "pdm_tx"; + drive-strength = <8>; + }; + + rx-pins { + pins = "gpio21", "gpio23", "gpio25"; + function = "pdm_rx"; + drive-strength = <4>; + output-low; + }; + }; + + cdc_comp_default: cdc-comp-default-state { + pins = "gpio22", "gpio24"; + function = "comp_rx"; + drive-strength = <4>; + }; + + cdc_dmic_default: cdc-dmic-default-state { + clk1-pins { + pins = "gpio26"; + function = "dmic1_clk"; + drive-strength = <8>; + output-high; + }; + + clk2-pins { + pins = "gpio28"; + function = "dmic2_clk"; + drive-strength = <8>; + output-high; + }; + + data1-pins { + pins = "gpio27"; + function = "dmic1_data"; + drive-strength = <8>; + input-enable; + }; + + data2-pins { + pins = "gpio29"; + function = "dmic2_data"; + drive-strength = <8>; + input-enable; + }; + }; + }; }; thermal-zones {
Signature · 1 line
2.53.0
PATCH v3 5/5 arm64: dts: qcom: sdm670-google: add reserved lpi gpios
In reply to Richard AcayanSome of the GPIOs are reserved for sensors since the ADSP also handles sensors on SDM670. Add the reserved GPIOs for the LPI pin controller.
--- arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi +4 -0
@@ -519,6 +519,10 @@ rmi4_f12: rmi4-f12@12 { }; }; +&lpi_tlmm { + gpio-reserved-ranges = <0 8>, <12 6>; +}; + &mdss { status = "okay"; };
Signature · 1 line
2.53.0
Quoted 10 lines · Richard Acayan
This adds support for the LPASS LPI pin controller on SDM670, which controls some audio pins (e.g. TDM or PDM busses). The ADSP patches are not sent yet.
Dependencies:
- SDM670 Basic SoC thermal zones (devicetree nodes are touching)
https://lore.kernel.org/r/[email protected]
- Support for the Pixel 3a XL with the Tianma panel (for reserved GPIOs)
https://lore.kernel.org/r/[email protected]
Quoted 3 lines
Changes since v2 (https://lore.kernel.org/r/[email protected]):
- add minItems and maxItems (1/5)
- add review tags (2-5/5)
Uh, it seems I dropped them (pun intended).
Quoted 11 lines · Richard Acayan
Quoted 10 lines · Richard Acayan
This adds support for the LPASS LPI pin controller on SDM670, which controls some audio pins (e.g. TDM or PDM busses). The ADSP patches are not sent yet.
Dependencies:
- SDM670 Basic SoC thermal zones (devicetree nodes are touching)
https://lore.kernel.org/r/[email protected]
- Support for the Pixel 3a XL with the Tianma panel (for reserved GPIOs)
https://lore.kernel.org/r/[email protected]
Quoted 5 lines
Quoted 3 lines
Changes since v2 (https://lore.kernel.org/r/[email protected]):
- add minItems and maxItems (1/5)
- add review tags (2-5/5)Uh, it seems I dropped them (pun intended).
Please send a v4 with them re-collected (incl. Krzysztof's new tag on your dt patch)
Konrad