devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, agross@kernel.org,
	robh+dt@kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] arm64: dts: qcom: sm8250: add lpass lpi pin controller node
Date: Tue, 1 Dec 2020 13:14:22 -0600	[thread overview]
Message-ID: <X8aWDj1n6KTM5ma/@builder.lan> (raw)
In-Reply-To: <20201201153706.13450-4-srinivas.kandagatla@linaro.org>

On Tue 01 Dec 09:37 CST 2020, Srinivas Kandagatla wrote:

> Add LPASS LPI pinctrl node required for Audio functionality on RB5.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/sm8250.dtsi | 95 ++++++++++++++++++++++++++++
>  1 file changed, 95 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> index ec5b53b8f656..4e1309b6571e 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> @@ -2607,6 +2607,101 @@
>  			clock-names = "core", "audio", "bus";
>  		};
>  
> +		lpass_tlmm: pinctrl@33c0000{
> +			compatible = "qcom,sm8250-lpass-lpi-pinctrl";
> +			reg = <0 0x33c0000 0x0 0x20000>,
> +				 <0 0x3550000 0x0 0x10000>;
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +			gpio-ranges = <&lpass_tlmm 0 0 14>;
> +
> +			clocks = <&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
> +				<&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
> +			clock-names = "core", "audio";
> +
> +			wsa_swr_clk_pin {

I prefer if you drop this outer "container" node.

> +				wsa_swr_clk_sleep: wsa_swr_clk_sleep {

Per the binding I think the name of this node should match '-pins$' and
the node name may not contain '_' characters.

> +					mux {

The pinctrl state is a collection of all pins, function and pinconf
properties of the phandle pointed to and its immediate child nodes. As
such you can flatten this inner "mux" level.


On the other hand, I'm assuming that you're always going to mux the
clock and data pin together, so instead of designing this around the
pins you could design it around the states and do:

			wsa_swr_active: wsa-swr-active-pins {
				clk {
					pins = "gpio10";
					function = "wsa_swr_clk";
					drive-strength = <2>;
					slew-rate = <1>;
					bias-disable;
				};

				data {
					pins = "gpio11";
					function = "wsa_swr_data";
					drive-strength = <2>;
					slew-rate = <1>;
					bias-bus-hold;

				};
			};

This way the state describes the whole thing and you don't end up with a
bunch of states for each part of the function.

Regards,
Bjorn

> +						pins = "gpio10";
> +						function = "wsa_swr_clk";
> +						drive-strength = <2>;
> +						input-enable;
> +						bias-pull-down;
> +					};
> +				};
> +
> +				wsa_swr_clk_active: wsa_swr_clk_active {
> +					mux {
> +						pins = "gpio10";
> +						function = "wsa_swr_clk";
> +						drive-strength = <2>;
> +						slew-rate = <1>;
> +						bias-disable;
> +					};
> +				};
> +			};
> +
> +			wsa_swr_data_pin {
> +				wsa_swr_data_sleep: wsa_swr_data_sleep {
> +					mux {
> +						pins = "gpio11";
> +						function = "wsa_swr_data";
> +						drive-strength = <2>;
> +						input-enable;
> +						bias-pull-down;
> +					};
> +				};
> +
> +				wsa_swr_data_active: wsa_swr_data_active {
> +					mux {
> +						pins = "gpio11";
> +						function = "wsa_swr_data";
> +						drive-strength = <2>;
> +						slew-rate = <1>;
> +						bias-bus-hold;
> +					};
> +				};
> +			};
> +
> +	                cdc_dmic01_data_active: dmic01_data_active {
> +	                        mux {
> +	                                pins = "gpio7";
> +					function = "dmic1_data";
> +	                                drive-strength = <8>;
> +	                                input-enable;
> +	                        };
> +	                };
> +
> +	                cdc_dmic01_data_sleep: dmic01_data_sleep {
> +	                        mux {
> +	                                pins = "gpio7";
> +					function = "dmic1_data";
> +	                                drive-strength = <2>;
> +	                                pull-down;
> +	                                input-enable;
> +	                        };
> +	                };
> +
> +	                cdc_dmic01_clk_active: dmic01_clk_active {
> +	                        mux {
> +	                                pins = "gpio6";
> +					function = "dmic1_clk";
> +	                                drive-strength = <8>;
> +	                                output-high;
> +	                        };
> +	                };
> +
> +	                cdc_dmic01_clk_sleep: dmic01_clk_sleep {
> +	                        mux {
> +	                                pins = "gpio6";
> +					function = "dmic1_clk";
> +	                                drive-strength = <2>;
> +	                                bias-disable;
> +	                                output-low;
> +	                        };
> +	                };
> +		};
> +
>  		adsp: remoteproc@17300000 {
>  			compatible = "qcom,sm8250-adsp-pas";
>  			reg = <0 0x17300000 0 0x100>;
> -- 
> 2.21.0
> 

  reply	other threads:[~2020-12-01 19:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 15:37 [PATCH 0/6] arm64: dts: qcom: qrb5165-rb5 audio support Srinivas Kandagatla
2020-12-01 15:37 ` [PATCH 1/6] arm64: dts: qcom: sm8250: add apr and its services Srinivas Kandagatla
2020-12-01 19:25   ` Bjorn Andersson
2020-12-02 15:47     ` Srinivas Kandagatla
2020-12-01 15:37 ` [PATCH 2/6] arm64: dts: qcom: sm8250: add audio clock controllers Srinivas Kandagatla
2020-12-01 15:37 ` [PATCH 3/6] arm64: dts: qcom: sm8250: add lpass lpi pin controller node Srinivas Kandagatla
2020-12-01 19:14   ` Bjorn Andersson [this message]
2020-12-01 15:37 ` [PATCH 4/6] arm64: dts: qcom: sm8250: add wsa and va codec macros Srinivas Kandagatla
2020-12-01 15:37 ` [PATCH 5/6] arm64: dts: qcom: sm8250: add mi2s pinconfs Srinivas Kandagatla
2020-12-01 19:19   ` Bjorn Andersson
2020-12-01 15:37 ` [PATCH 6/6] arm64: dts: qcom: qrb5165-rb5: Add Audio support Srinivas Kandagatla
2020-12-01 19:23   ` Bjorn Andersson
2020-12-01 19:55 ` [PATCH 0/6] arm64: dts: qcom: qrb5165-rb5 audio support Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X8aWDj1n6KTM5ma/@builder.lan \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).