[PATCH v4 4/5] arm64: dts: qcom: sm4250: add LPASS LPI pin controller

Alexey Klimov posted 5 patches 3 weeks, 2 days ago
There is a newer version of this series
[PATCH v4 4/5] arm64: dts: qcom: sm4250: add LPASS LPI pin controller
Posted by Alexey Klimov 3 weeks, 2 days ago
Add the Low Power Audio SubSystem Low Power Island (LPASS LPI) pin
controller device node required for audio subsystem on Qualcomm
QRB4210 RB2. QRB4210 is based on sm4250 which has a slightly different
lpass pin controller comparing to sm6115.

While at this, also add description of lpi_i2s2 pins (active state)
required for audio playback via HDMI.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm4250.dtsi | 39 ++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm4250.dtsi b/arch/arm64/boot/dts/qcom/sm4250.dtsi
index a0ed61925e12..1b9983ab122e 100644
--- a/arch/arm64/boot/dts/qcom/sm4250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm4250.dtsi
@@ -36,3 +36,42 @@ &cpu6 {
 &cpu7 {
 	compatible = "qcom,kryo240";
 };
+
+&lpass_tlmm {
+	compatible = "qcom,sm4250-lpass-lpi-pinctrl";
+	gpio-ranges = <&lpass_tlmm 0 0 26>;
+
+	lpi_i2s2_active: lpi-i2s2-active-state {
+		sck-pins {
+			pins = "gpio10";
+			function = "i2s2_clk";
+			bias-disable;
+			drive-strength = <8>;
+			output-high;
+		};
+
+		ws-pins {
+			pins = "gpio11";
+			function = "i2s2_ws";
+			bias-disable;
+			drive-strength = <8>;
+			output-high;
+		};
+
+		data-pins {
+			pins = "gpio12";
+			function = "i2s2_data";
+			bias-disable;
+			drive-strength = <8>;
+			output-high;
+		};
+
+		ext-mclk1-pins {
+			pins = "gpio18";
+			function = "ext_mclk1_a";
+			bias-disable;
+			drive-strength = <16>;
+			output-high;
+		};
+	};
+};
-- 
2.45.2
Re: [PATCH v4 4/5] arm64: dts: qcom: sm4250: add LPASS LPI pin controller
Posted by Dmitry Baryshkov 3 weeks, 2 days ago
On Fri, Nov 01, 2024 at 12:59:24AM +0000, Alexey Klimov wrote:
> Add the Low Power Audio SubSystem Low Power Island (LPASS LPI) pin
> controller device node required for audio subsystem on Qualcomm
> QRB4210 RB2. QRB4210 is based on sm4250 which has a slightly different
> lpass pin controller comparing to sm6115.
> 
> While at this, also add description of lpi_i2s2 pins (active state)
> required for audio playback via HDMI.
> 
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/sm4250.dtsi | 39 ++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm4250.dtsi b/arch/arm64/boot/dts/qcom/sm4250.dtsi
> index a0ed61925e12..1b9983ab122e 100644
> --- a/arch/arm64/boot/dts/qcom/sm4250.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm4250.dtsi
> @@ -36,3 +36,42 @@ &cpu6 {
>  &cpu7 {
>  	compatible = "qcom,kryo240";
>  };
> +
> +&lpass_tlmm {
> +	compatible = "qcom,sm4250-lpass-lpi-pinctrl";
> +	gpio-ranges = <&lpass_tlmm 0 0 26>;

I think this should be <&lpass_tlmm 0 0 27>. The driver defines pins
0-26.

> +
> +	lpi_i2s2_active: lpi-i2s2-active-state {
> +		sck-pins {
> +			pins = "gpio10";
> +			function = "i2s2_clk";
> +			bias-disable;
> +			drive-strength = <8>;
> +			output-high;
> +		};
> +
> +		ws-pins {
> +			pins = "gpio11";
> +			function = "i2s2_ws";
> +			bias-disable;
> +			drive-strength = <8>;
> +			output-high;
> +		};
> +
> +		data-pins {
> +			pins = "gpio12";
> +			function = "i2s2_data";
> +			bias-disable;
> +			drive-strength = <8>;
> +			output-high;
> +		};
> +
> +		ext-mclk1-pins {
> +			pins = "gpio18";
> +			function = "ext_mclk1_a";
> +			bias-disable;
> +			drive-strength = <16>;
> +			output-high;
> +		};
> +	};
> +};
> -- 
> 2.45.2
> 

-- 
With best wishes
Dmitry
Re: [PATCH v4 4/5] arm64: dts: qcom: sm4250: add LPASS LPI pin controller
Posted by Alexey Klimov 1 week, 5 days ago
On Fri Nov 1, 2024 at 7:50 AM GMT, Dmitry Baryshkov wrote:
> On Fri, Nov 01, 2024 at 12:59:24AM +0000, Alexey Klimov wrote:
> > Add the Low Power Audio SubSystem Low Power Island (LPASS LPI) pin
> > controller device node required for audio subsystem on Qualcomm
> > QRB4210 RB2. QRB4210 is based on sm4250 which has a slightly different
> > lpass pin controller comparing to sm6115.
> > 
> > While at this, also add description of lpi_i2s2 pins (active state)
> > required for audio playback via HDMI.
> > 
> > Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
> > ---
> >  arch/arm64/boot/dts/qcom/sm4250.dtsi | 39 ++++++++++++++++++++++++++++
> >  1 file changed, 39 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/sm4250.dtsi b/arch/arm64/boot/dts/qcom/sm4250.dtsi
> > index a0ed61925e12..1b9983ab122e 100644
> > --- a/arch/arm64/boot/dts/qcom/sm4250.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sm4250.dtsi
> > @@ -36,3 +36,42 @@ &cpu6 {
> >  &cpu7 {
> >  	compatible = "qcom,kryo240";
> >  };
> > +
> > +&lpass_tlmm {
> > +	compatible = "qcom,sm4250-lpass-lpi-pinctrl";
> > +	gpio-ranges = <&lpass_tlmm 0 0 26>;
>
> I think this should be <&lpass_tlmm 0 0 27>. The driver defines pins
> 0-26.

Nice catch. Thanks, corrected and resend as version 5.

Best regards,
Alexey