All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: qcom: sa8540p-ride: Fix some i2c pinctrl settings
@ 2023-01-24 19:23 Andrew Halaney
  2023-01-24 19:23 ` [PATCH 2/2] arm64: dts: qcom: sa8540p-ride: Document i2c busses Andrew Halaney
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Andrew Halaney @ 2023-01-24 19:23 UTC (permalink / raw)
  To: andersson
  Cc: agross, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
	linux-arm-msm, devicetree, linux-kernel, bmasney, quic_shazhuss,
	Andrew Halaney

Some of the pinctrl groups were invalid for the selected pins. Select
the proper qup group to fix these warnings:

[    6.523566] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio135" for function "qup15"
[    6.535042] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio136" for function "qup15"
[    6.597536] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio158" for function "qup15"
[    6.597544] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio159" for function "qup15"
[    6.597991] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio0" for function "qup15"
[    6.597996] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio1" for function "qup15"

Fixes: e073899ec3e1 ("arm64: dts: qcom: sa8540p-ride: add i2c nodes")
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
---
 arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
index eacc1764255b..cb9fbdeb5a9e 100644
--- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
+++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
@@ -318,21 +318,21 @@ &xo_board_clk {
 &tlmm {
 	i2c0_default: i2c0-default-state {
 		pins = "gpio135", "gpio136";
-		function = "qup15";
+		function = "qup0";
 		drive-strength = <2>;
 		bias-pull-up;
 	};
 
 	i2c1_default: i2c1-default-state {
 		pins = "gpio158", "gpio159";
-		function = "qup15";
+		function = "qup1";
 		drive-strength = <2>;
 		bias-pull-up;
 	};
 
 	i2c12_default: i2c12-default-state {
 		pins = "gpio0", "gpio1";
-		function = "qup15";
+		function = "qup12";
 		drive-strength = <2>;
 		bias-pull-up;
 	};
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] arm64: dts: qcom: sa8540p-ride: Document i2c busses
  2023-01-24 19:23 [PATCH 1/2] arm64: dts: qcom: sa8540p-ride: Fix some i2c pinctrl settings Andrew Halaney
@ 2023-01-24 19:23 ` Andrew Halaney
  2023-01-24 21:45   ` Konrad Dybcio
  2023-01-25  6:55   ` Shazad Hussain
  2023-01-24 20:31 ` [PATCH 1/2] arm64: dts: qcom: sa8540p-ride: Fix some i2c pinctrl settings Brian Masney
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 7+ messages in thread
From: Andrew Halaney @ 2023-01-24 19:23 UTC (permalink / raw)
  To: andersson
  Cc: agross, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
	linux-arm-msm, devicetree, linux-kernel, bmasney, quic_shazhuss,
	Andrew Halaney

It isn't obvious in the current devicetree what is connected. Go ahead
and document what's on the other end.

Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
---

Not sure if this sort of patch is actually welcomed or not but I went
through this exercise (for the prior patch) and thought it might be
useful to document.

Shazad, this also highlights (unless I misread things) that i2c12 has no
use for us, right? If agreed I can remove it but sorting through the
lore links that provided all this it seems like at the time it was
desired to be added.

Thanks,
Andrew

 arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
index cb9fbdeb5a9e..3478ab91fe73 100644
--- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
+++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
@@ -317,6 +317,7 @@ &xo_board_clk {
 
 &tlmm {
 	i2c0_default: i2c0-default-state {
+		/* To USB7002T-I/KDXVA0 USB hub (SIP1 only) */
 		pins = "gpio135", "gpio136";
 		function = "qup0";
 		drive-strength = <2>;
@@ -324,6 +325,7 @@ i2c0_default: i2c0-default-state {
 	};
 
 	i2c1_default: i2c1-default-state {
+		/* To PM40028B-F3EI PCIe switch */
 		pins = "gpio158", "gpio159";
 		function = "qup1";
 		drive-strength = <2>;
@@ -331,6 +333,7 @@ i2c1_default: i2c1-default-state {
 	};
 
 	i2c12_default: i2c12-default-state {
+		/* Not connected */
 		pins = "gpio0", "gpio1";
 		function = "qup12";
 		drive-strength = <2>;
@@ -338,6 +341,7 @@ i2c12_default: i2c12-default-state {
 	};
 
 	i2c15_default: i2c15-default-state {
+		/* To display connector (SIP1 only) */
 		pins = "gpio36", "gpio37";
 		function = "qup15";
 		drive-strength = <2>;
@@ -345,6 +349,7 @@ i2c15_default: i2c15-default-state {
 	};
 
 	i2c18_default: i2c18-default-state {
+		/* To ASM330LHH IMU (SIP1 only) */
 		pins = "gpio66", "gpio67";
 		function = "qup18";
 		drive-strength = <2>;
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] arm64: dts: qcom: sa8540p-ride: Fix some i2c pinctrl settings
  2023-01-24 19:23 [PATCH 1/2] arm64: dts: qcom: sa8540p-ride: Fix some i2c pinctrl settings Andrew Halaney
  2023-01-24 19:23 ` [PATCH 2/2] arm64: dts: qcom: sa8540p-ride: Document i2c busses Andrew Halaney
@ 2023-01-24 20:31 ` Brian Masney
  2023-01-24 21:43 ` Konrad Dybcio
  2023-01-25  6:56 ` Shazad Hussain
  3 siblings, 0 replies; 7+ messages in thread
From: Brian Masney @ 2023-01-24 20:31 UTC (permalink / raw)
  To: Andrew Halaney
  Cc: andersson, agross, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
	linux-arm-msm, devicetree, linux-kernel, quic_shazhuss

On Tue, Jan 24, 2023 at 01:23:50PM -0600, Andrew Halaney wrote:
> Some of the pinctrl groups were invalid for the selected pins. Select
> the proper qup group to fix these warnings:
> 
> [    6.523566] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio135" for function "qup15"
> [    6.535042] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio136" for function "qup15"
> [    6.597536] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio158" for function "qup15"
> [    6.597544] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio159" for function "qup15"
> [    6.597991] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio0" for function "qup15"
> [    6.597996] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio1" for function "qup15"
> 
> Fixes: e073899ec3e1 ("arm64: dts: qcom: sa8540p-ride: add i2c nodes")
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>

Reviewed-by: Brian Masney <bmasney@redhat.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] arm64: dts: qcom: sa8540p-ride: Fix some i2c pinctrl settings
  2023-01-24 19:23 [PATCH 1/2] arm64: dts: qcom: sa8540p-ride: Fix some i2c pinctrl settings Andrew Halaney
  2023-01-24 19:23 ` [PATCH 2/2] arm64: dts: qcom: sa8540p-ride: Document i2c busses Andrew Halaney
  2023-01-24 20:31 ` [PATCH 1/2] arm64: dts: qcom: sa8540p-ride: Fix some i2c pinctrl settings Brian Masney
@ 2023-01-24 21:43 ` Konrad Dybcio
  2023-01-25  6:56 ` Shazad Hussain
  3 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2023-01-24 21:43 UTC (permalink / raw)
  To: Andrew Halaney, andersson
  Cc: agross, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
	devicetree, linux-kernel, bmasney, quic_shazhuss



On 24.01.2023 20:23, Andrew Halaney wrote:
> Some of the pinctrl groups were invalid for the selected pins. Select
> the proper qup group to fix these warnings:
> 
> [    6.523566] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio135" for function "qup15"
> [    6.535042] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio136" for function "qup15"
> [    6.597536] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio158" for function "qup15"
> [    6.597544] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio159" for function "qup15"
> [    6.597991] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio0" for function "qup15"
> [    6.597996] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio1" for function "qup15"
> 
> Fixes: e073899ec3e1 ("arm64: dts: qcom: sa8540p-ride: add i2c nodes")
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
> ---
This matches the pinctrl .c driver.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> index eacc1764255b..cb9fbdeb5a9e 100644
> --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> @@ -318,21 +318,21 @@ &xo_board_clk {
>  &tlmm {
>  	i2c0_default: i2c0-default-state {
>  		pins = "gpio135", "gpio136";
> -		function = "qup15";
> +		function = "qup0";
>  		drive-strength = <2>;
>  		bias-pull-up;
>  	};
>  
>  	i2c1_default: i2c1-default-state {
>  		pins = "gpio158", "gpio159";
> -		function = "qup15";
> +		function = "qup1";
>  		drive-strength = <2>;
>  		bias-pull-up;
>  	};
>  
>  	i2c12_default: i2c12-default-state {
>  		pins = "gpio0", "gpio1";
> -		function = "qup15";
> +		function = "qup12";
>  		drive-strength = <2>;
>  		bias-pull-up;
>  	};

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] arm64: dts: qcom: sa8540p-ride: Document i2c busses
  2023-01-24 19:23 ` [PATCH 2/2] arm64: dts: qcom: sa8540p-ride: Document i2c busses Andrew Halaney
@ 2023-01-24 21:45   ` Konrad Dybcio
  2023-01-25  6:55   ` Shazad Hussain
  1 sibling, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2023-01-24 21:45 UTC (permalink / raw)
  To: Andrew Halaney, andersson
  Cc: agross, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
	devicetree, linux-kernel, bmasney, quic_shazhuss



On 24.01.2023 20:23, Andrew Halaney wrote:
> It isn't obvious in the current devicetree what is connected. Go ahead
> and document what's on the other end.
> 
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
> ---
Other boards do similar things under the i2c host nodes (see
e.g. sm8450-sony-xperia-nagara.dtsi..

> 
> Not sure if this sort of patch is actually welcomed or not but I went
> through this exercise (for the prior patch) and thought it might be
> useful to document.
..and yes it is very welcome!

> 
> Shazad, this also highlights (unless I misread things) that i2c12 has no
> use for us, right? If agreed I can remove it but sorting through the
> lore links that provided all this it seems like at the time it was
> desired to be added.
It's fine if you guys decide that it's useful for some kind expansion
mezzanine or other add-on board, but if it's not connected anywhere
you may wish to disable the host and remove the pinctrl entries, as
keeping it enabled essentially wastes some power.

Konrad
> 
> Thanks,
> Andrew
> 
>  arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> index cb9fbdeb5a9e..3478ab91fe73 100644
> --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> @@ -317,6 +317,7 @@ &xo_board_clk {
>  
>  &tlmm {
>  	i2c0_default: i2c0-default-state {
> +		/* To USB7002T-I/KDXVA0 USB hub (SIP1 only) */
>  		pins = "gpio135", "gpio136";
>  		function = "qup0";
>  		drive-strength = <2>;
> @@ -324,6 +325,7 @@ i2c0_default: i2c0-default-state {
>  	};
>  
>  	i2c1_default: i2c1-default-state {
> +		/* To PM40028B-F3EI PCIe switch */
>  		pins = "gpio158", "gpio159";
>  		function = "qup1";
>  		drive-strength = <2>;
> @@ -331,6 +333,7 @@ i2c1_default: i2c1-default-state {
>  	};
>  
>  	i2c12_default: i2c12-default-state {
> +		/* Not connected */
>  		pins = "gpio0", "gpio1";
>  		function = "qup12";
>  		drive-strength = <2>;
> @@ -338,6 +341,7 @@ i2c12_default: i2c12-default-state {
>  	};
>  
>  	i2c15_default: i2c15-default-state {
> +		/* To display connector (SIP1 only) */
>  		pins = "gpio36", "gpio37";
>  		function = "qup15";
>  		drive-strength = <2>;
> @@ -345,6 +349,7 @@ i2c15_default: i2c15-default-state {
>  	};
>  
>  	i2c18_default: i2c18-default-state {
> +		/* To ASM330LHH IMU (SIP1 only) */
>  		pins = "gpio66", "gpio67";
>  		function = "qup18";
>  		drive-strength = <2>;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] arm64: dts: qcom: sa8540p-ride: Document i2c busses
  2023-01-24 19:23 ` [PATCH 2/2] arm64: dts: qcom: sa8540p-ride: Document i2c busses Andrew Halaney
  2023-01-24 21:45   ` Konrad Dybcio
@ 2023-01-25  6:55   ` Shazad Hussain
  1 sibling, 0 replies; 7+ messages in thread
From: Shazad Hussain @ 2023-01-25  6:55 UTC (permalink / raw)
  To: Andrew Halaney, andersson
  Cc: agross, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
	linux-arm-msm, devicetree, linux-kernel, bmasney



On 1/25/2023 12:53 AM, Andrew Halaney wrote:
> It isn't obvious in the current devicetree what is connected. Go ahead
> and document what's on the other end.
> 
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
> ---
> 
> Not sure if this sort of patch is actually welcomed or not but I went
> through this exercise (for the prior patch) and thought it might be
> useful to document.
> 
> Shazad, this also highlights (unless I misread things) that i2c12 has no
> use for us, right? If agreed I can remove it but sorting through the
> lore links that provided all this it seems like at the time it was
> desired to be added.
> 

Andrew, i2c12 has GPU PWR ctl use case, so let's keep it enabled.

-Shazad

> Thanks,
> Andrew
> 
>   arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> index cb9fbdeb5a9e..3478ab91fe73 100644
> --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> @@ -317,6 +317,7 @@ &xo_board_clk {
>   
>   &tlmm {
>   	i2c0_default: i2c0-default-state {
> +		/* To USB7002T-I/KDXVA0 USB hub (SIP1 only) */
>   		pins = "gpio135", "gpio136";
>   		function = "qup0";
>   		drive-strength = <2>;
> @@ -324,6 +325,7 @@ i2c0_default: i2c0-default-state {
>   	};
>   
>   	i2c1_default: i2c1-default-state {
> +		/* To PM40028B-F3EI PCIe switch */
>   		pins = "gpio158", "gpio159";
>   		function = "qup1";
>   		drive-strength = <2>;
> @@ -331,6 +333,7 @@ i2c1_default: i2c1-default-state {
>   	};
>   
>   	i2c12_default: i2c12-default-state {
> +		/* Not connected */
>   		pins = "gpio0", "gpio1";
>   		function = "qup12";
>   		drive-strength = <2>;
> @@ -338,6 +341,7 @@ i2c12_default: i2c12-default-state {
>   	};
>   
>   	i2c15_default: i2c15-default-state {
> +		/* To display connector (SIP1 only) */
>   		pins = "gpio36", "gpio37";
>   		function = "qup15";
>   		drive-strength = <2>;
> @@ -345,6 +349,7 @@ i2c15_default: i2c15-default-state {
>   	};
>   
>   	i2c18_default: i2c18-default-state {
> +		/* To ASM330LHH IMU (SIP1 only) */
>   		pins = "gpio66", "gpio67";
>   		function = "qup18";
>   		drive-strength = <2>;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] arm64: dts: qcom: sa8540p-ride: Fix some i2c pinctrl settings
  2023-01-24 19:23 [PATCH 1/2] arm64: dts: qcom: sa8540p-ride: Fix some i2c pinctrl settings Andrew Halaney
                   ` (2 preceding siblings ...)
  2023-01-24 21:43 ` Konrad Dybcio
@ 2023-01-25  6:56 ` Shazad Hussain
  3 siblings, 0 replies; 7+ messages in thread
From: Shazad Hussain @ 2023-01-25  6:56 UTC (permalink / raw)
  To: Andrew Halaney, andersson
  Cc: agross, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt,
	linux-arm-msm, devicetree, linux-kernel, bmasney



On 1/25/2023 12:53 AM, Andrew Halaney wrote:
> Some of the pinctrl groups were invalid for the selected pins. Select
> the proper qup group to fix these warnings:
> 
> [    6.523566] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio135" for function "qup15"
> [    6.535042] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio136" for function "qup15"
> [    6.597536] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio158" for function "qup15"
> [    6.597544] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio159" for function "qup15"
> [    6.597991] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio0" for function "qup15"
> [    6.597996] sc8280xp-tlmm f100000.pinctrl: invalid group "gpio1" for function "qup15"
> 
> Fixes: e073899ec3e1 ("arm64: dts: qcom: sa8540p-ride: add i2c nodes")
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
> ---

Reviewed-by: Shazad Hussain <quic_shazhuss@quicinc.com>


>   arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> index eacc1764255b..cb9fbdeb5a9e 100644
> --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts
> @@ -318,21 +318,21 @@ &xo_board_clk {
>   &tlmm {
>   	i2c0_default: i2c0-default-state {
>   		pins = "gpio135", "gpio136";
> -		function = "qup15";
> +		function = "qup0";
>   		drive-strength = <2>;
>   		bias-pull-up;
>   	};
>   
>   	i2c1_default: i2c1-default-state {
>   		pins = "gpio158", "gpio159";
> -		function = "qup15";
> +		function = "qup1";
>   		drive-strength = <2>;
>   		bias-pull-up;
>   	};
>   
>   	i2c12_default: i2c12-default-state {
>   		pins = "gpio0", "gpio1";
> -		function = "qup15";
> +		function = "qup12";
>   		drive-strength = <2>;
>   		bias-pull-up;
>   	};

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-25  6:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-24 19:23 [PATCH 1/2] arm64: dts: qcom: sa8540p-ride: Fix some i2c pinctrl settings Andrew Halaney
2023-01-24 19:23 ` [PATCH 2/2] arm64: dts: qcom: sa8540p-ride: Document i2c busses Andrew Halaney
2023-01-24 21:45   ` Konrad Dybcio
2023-01-25  6:55   ` Shazad Hussain
2023-01-24 20:31 ` [PATCH 1/2] arm64: dts: qcom: sa8540p-ride: Fix some i2c pinctrl settings Brian Masney
2023-01-24 21:43 ` Konrad Dybcio
2023-01-25  6:56 ` Shazad Hussain

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.