linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Brian Masney <bmasney@redhat.com>,
	andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org
Cc: robh+dt@kernel.org, johan+linaro@kernel.org,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, ahalaney@redhat.com,
	echanude@redhat.com, quic_shazhuss@quicinc.com
Subject: Re: [PATCH 3/4] arm64: dts: qcom: sa8540p-ride: add qup1_i2c15 and qup2_i2c18 nodes
Date: Tue, 13 Dec 2022 15:48:27 +0100	[thread overview]
Message-ID: <309b3fad-933c-6c45-5cd7-4e082da62c15@linaro.org> (raw)
In-Reply-To: <20221212182314.1902632-4-bmasney@redhat.com>



On 12.12.2022 19:23, Brian Masney wrote:
> Add the necessary nodes in order to get qup1_i2c15 and qup2_i2c18
> functioning on the automotive board and exposed to userspace.
> 
> This work was derived from various patches that Qualcomm delivered
> to Red Hat in a downstream kernel. This change was validated by using
> i2c-tools 4.3.3 on CentOS Stream 9:
> 
> [root@localhost ~]# i2cdetect -l
> i2c-15  i2c             Geni-I2C                                I2C adapter
> i2c-18  i2c             Geni-I2C                                I2C adapter
> 
> [root@localhost ~]# i2cdetect -a -y 15
> Warning: Can't use SMBus Quick Write command, will skip some addresses
>      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
> 00:
> 10:
> 20:
> 30: -- -- -- -- -- -- -- --
> 40:
> 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 60:
> 70:
> 
> Bus 18 has the same output. I validated that we get the same output on
> the downstream kernel.
> 
> Signed-off-by: Brian Masney <bmasney@redhat.com>
> ---
>  arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 46 +++++++++++++++++++++++
>  1 file changed, 46 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> index d70859803fbd..6dc3f3ff8ece 100644
> --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> @@ -17,6 +17,8 @@ / {
>  	compatible = "qcom,sa8540p-ride", "qcom,sa8540p";
>  
>  	aliases {
> +		i2c15 = &qup1_i2c15;
> +		i2c18 = &qup2_i2c18;
>  		serial0 = &qup2_uart17;
>  	};
>  
> @@ -188,10 +190,28 @@ &pcie3a_phy {
>  	status = "okay";
>  };
>  
> +&qup1 {
> +	status = "okay";
> +};
> +
> +&qup1_i2c15 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&qup1_i2c15_default>;
> +
> +	status = "okay";
> +};
> +
>  &qup2 {
>  	status = "okay";
>  };
>  
> +&qup2_i2c18 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&qup2_i2c18_default>;
> +
> +	status = "okay";
> +};
> +
>  &qup2_uart17 {
>  	compatible = "qcom,geni-debug-uart";
>  	status = "okay";
> @@ -313,4 +333,30 @@ wake-pins {
>  			bias-pull-up;
>  		};
>  	};
> +
> +	qup1_i2c15_default: qup1-i2c15-state {
You can drop mux/config-pins and have the pin properties live directly
under the qup1-i2cN-state node.

Konrad
> +		mux-pins {
> +			pins = "gpio36", "gpio37";
> +			function = "qup15";
> +		};
> +
> +		config-pins {
> +			pins = "gpio36", "gpio37";
> +			drive-strength = <0x02>;
> +			bias-pull-up;
> +		};
> +	};
> +
> +	qup2_i2c18_default: qup2-i2c18-state {
> +		mux-pins {
> +			pins = "gpio66", "gpio67";
> +			function = "qup18";
> +		};
> +
> +		config-pins {
> +			pins = "gpio66", "gpio67";
> +			drive-strength = <0x02>;
> +			bias-pull-up;
> +		};
> +	};
>  };

  parent reply	other threads:[~2022-12-13 14:49 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 18:23 [PATCH 0/4] arm64: dts: qcom: sc8280xp: add i2c and spi nodes Brian Masney
2022-12-12 18:23 ` [PATCH 1/4] arm64: dts: qcom: sc8280xp: rename i2c5 to i2c21 Brian Masney
2022-12-12 18:48   ` Konrad Dybcio
2022-12-13 14:54   ` Johan Hovold
2022-12-13 15:04     ` Shazad Hussain
2022-12-13 15:19       ` Johan Hovold
2022-12-13 15:05     ` Brian Masney
2022-12-13 15:12     ` Brian Masney
2022-12-13 15:28       ` Johan Hovold
2022-12-13 15:34         ` Shazad Hussain
2022-12-13 15:39           ` Johan Hovold
2022-12-13 15:42             ` Johan Hovold
2022-12-13 15:44               ` Konrad Dybcio
2022-12-13 16:15                 ` Johan Hovold
2022-12-13 15:45             ` Shazad Hussain
2022-12-13 15:17     ` Johan Hovold
2022-12-13 15:29       ` Konrad Dybcio
2022-12-13 15:32         ` Johan Hovold
2022-12-13 15:59           ` Brian Masney
2022-12-13 16:22             ` Johan Hovold
2022-12-12 18:23 ` [PATCH 2/4] arm64: dts: qcom: sc8280xp: add missing i2c nodes Brian Masney
2022-12-12 18:23 ` [PATCH 3/4] arm64: dts: qcom: sa8540p-ride: add qup1_i2c15 and qup2_i2c18 nodes Brian Masney
2022-12-13  7:18   ` Shazad Hussain
2022-12-13 14:48   ` Konrad Dybcio [this message]
2022-12-14 12:30     ` Brian Masney
2022-12-14 12:52       ` Krzysztof Kozlowski
2022-12-14 14:19         ` Brian Masney
2022-12-14 12:53       ` Konrad Dybcio
2022-12-14 15:36       ` Shazad Hussain
2022-12-14 16:24         ` Brian Masney
2022-12-13 14:59   ` Johan Hovold
2022-12-14 12:51   ` Krzysztof Kozlowski
2022-12-12 18:23 ` [PATCH 4/4] arm64: dts: qcom: sc8280xp: add missing spi nodes Brian Masney
2022-12-13  7:16   ` Shazad Hussain
2022-12-13 12:27     ` Brian Masney
2022-12-13 12:47       ` Mark Brown
2022-12-13 13:02       ` Krzysztof Kozlowski
2022-12-13 13:08         ` Javier Martinez Canillas
2022-12-13 14:36           ` Brian Masney
2022-12-13 14:45             ` Shazad Hussain

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=309b3fad-933c-6c45-5cd7-4e082da62c15@linaro.org \
    --to=konrad.dybcio@linaro.org \
    --cc=ahalaney@redhat.com \
    --cc=andersson@kernel.org \
    --cc=bmasney@redhat.com \
    --cc=devicetree@vger.kernel.org \
    --cc=echanude@redhat.com \
    --cc=johan+linaro@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_shazhuss@quicinc.com \
    --cc=robh+dt@kernel.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).