SDM670 LPASS LPI pin controller support
Subsystems (7)
v5 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 v4 (https://lore.kernel.org/r/[email protected]):
- squash reserved gpios patch (Dmitry's review tag dropped) (4/4, previously 5/5)
- add review tags (3/4, 4/4)
- correct changelog (0/4)
Changes since v3 (https://lore.kernel.org/r/[email protected]):
- restore review tags (2-5/5)
- add review tags (1/5)
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 (4):
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
.../pinctrl/qcom,lpass-lpi-common.yaml | 8 + .../qcom,sdm670-lpass-lpi-pinctrl.yaml | 81 +++++++++ .../boot/dts/qcom/sdm670-google-common.dtsi | 5 + 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, 344 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 v5 1/4 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
PATCH v5 2/4 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 v5 3/4 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 v5 4/4 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.
Also add reserved GPIOs for the Pixel 3a, which blocks access to the sensor GPIOs.
--- .../boot/dts/qcom/sdm670-google-common.dtsi | 5 ++ arch/arm64/boot/dts/qcom/sdm670.dtsi | 73 +++++++++++++++++++ 2 files changed, 78 insertions(+)
arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi +5 -0
@@ -522,6 +522,11 @@ rmi4_f12: rmi4-f12@12 { }; }; +&lpi_tlmm { + /* sensor gpios are protected */ + gpio-reserved-ranges = <0 8>, <12 6>; +}; + &mdss { status = "okay"; };
arch/arm64/boot/dts/qcom/sdm670.dtsi +73 -0
79 lines not on this page · raw message
Signature · 1 line
2.53.0
Re: [PATCH v5 4/4] arm64: dts: qcom: sdm670: add lpi pinctrl
Quoted 8 lines · Richard Acayan
The Snapdragon 670 has a separate TLMM for audio pins. Add the device node for it.
Also add reserved GPIOs for the Pixel 3a, which blocks access to the sensor GPIOs.
Signed-off-by Richard Acayan <[email protected]>Reviewed-by Konrad Dybcio <[email protected]>
Yours,
Linus Walleij
Linus Walleij
maintainerQuoted 4 lines · Richard Acayan
Richard Acayan (4):
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
These three patches applied to the pinctrl tree for v7.1
Quoted 1 line
arm64: dts: qcom: sdm670: add lpi pinctrl
Please funnel this patch through the SoC tree!
Yours,
Linus Walleij
Re: (subset) [PATCH v5 0/4] SDM670 LPASS LPI pin controller support
In reply to Richard AcayanQuoted 11 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][...]
Applied, thanks!
[4/4] arm64: dts: qcom: sdm670: add lpi pinctrl
commit: c4b423835ee7529854ab39b50cf766bc4c6b4d66
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>