linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: qcs404: fix default pinctrl settings for blsp1_spi1
@ 2022-06-11 19:57 Andrey Konovalov
  2022-06-11 20:03 ` Andrey Konovalov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andrey Konovalov @ 2022-06-11 19:57 UTC (permalink / raw)
  To: bjorn.andersson, agross
  Cc: robh+dt, krzysztof.kozlowski+dt, vinod.koul, linux-arm-msm,
	devicetree, linux-kernel, Andrey Konovalov

The current settings refer to "blsp_spi1" function which isn't defined.
For this reason an attempt to enable blsp1_spi1 interface results in
the probe failure below:

[    3.492900] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
[    3.502460] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
[    3.517725] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
[    3.532998] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
[    3.548277] spi_qup: probe of 78b6000.spi failed with error -22

Fix this by making the functions used in qcs404.dtsi to match the contents
of drivers/pinctrl/qcom/pinctrl-qcs404.c.

Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi
index d912166b7552..0d9e1f19aa67 100644
--- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
@@ -669,8 +669,25 @@ blsp1_spi0_default: blsp1-spi0-default {
 			};
 
 			blsp1_spi1_default: blsp1-spi1-default {
-				pins = "gpio22", "gpio23", "gpio24", "gpio25";
-				function = "blsp_spi1";
+				mosi {
+					pins = "gpio22";
+					function = "blsp_spi_mosi_a1";
+				};
+
+				miso {
+					pins = "gpio23";
+					function = "blsp_spi_miso_a1";
+				};
+
+				cs_n {
+					pins = "gpio24";
+					function = "blsp_spi_cs_n_a1";
+				};
+
+				clk {
+					pins = "gpio25";
+					function = "blsp_spi_clk_a1";
+				};
 			};
 
 			blsp1_spi2_default: blsp1-spi2-default {
-- 
2.25.1


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

* Re: [PATCH] arm64: dts: qcom: qcs404: fix default pinctrl settings for blsp1_spi1
  2022-06-11 19:57 [PATCH] arm64: dts: qcom: qcs404: fix default pinctrl settings for blsp1_spi1 Andrey Konovalov
@ 2022-06-11 20:03 ` Andrey Konovalov
  2022-06-22  5:18 ` Vinod Koul
  2022-07-03  3:55 ` (subset) " Bjorn Andersson
  2 siblings, 0 replies; 6+ messages in thread
From: Andrey Konovalov @ 2022-06-11 20:03 UTC (permalink / raw)
  To: bjorn.andersson, agross
  Cc: robh+dt, krzysztof.kozlowski+dt, vinod.koul, linux-arm-msm,
	devicetree, linux-kernel

On 6/11/22 22:57, Andrey Konovalov wrote:
> The current settings refer to "blsp_spi1" function which isn't defined.
> For this reason an attempt to enable blsp1_spi1 interface results in
> the probe failure below:
> 
> [    3.492900] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> [    3.502460] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> [    3.517725] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> [    3.532998] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> [    3.548277] spi_qup: probe of 78b6000.spi failed with error -22
> 
> Fix this by making the functions used in qcs404.dtsi to match the contents
> of drivers/pinctrl/qcom/pinctrl-qcs404.c.

... and Documentation/devicetree/bindings/pinctrl/qcom,qcs404-pinctrl.txt.

> 
> Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
> ---
>   arch/arm64/boot/dts/qcom/qcs404.dtsi | 21 +++++++++++++++++++--
>   1 file changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> index d912166b7552..0d9e1f19aa67 100644
> --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
> +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> @@ -669,8 +669,25 @@ blsp1_spi0_default: blsp1-spi0-default {
>   			};
>   
>   			blsp1_spi1_default: blsp1-spi1-default {
> -				pins = "gpio22", "gpio23", "gpio24", "gpio25";
> -				function = "blsp_spi1";
> +				mosi {
> +					pins = "gpio22";
> +					function = "blsp_spi_mosi_a1";
> +				};
> +
> +				miso {
> +					pins = "gpio23";
> +					function = "blsp_spi_miso_a1";
> +				};
> +
> +				cs_n {
> +					pins = "gpio24";
> +					function = "blsp_spi_cs_n_a1";
> +				};
> +
> +				clk {
> +					pins = "gpio25";
> +					function = "blsp_spi_clk_a1";
> +				};
>   			};
>   
>   			blsp1_spi2_default: blsp1-spi2-default {

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

* Re: [PATCH] arm64: dts: qcom: qcs404: fix default pinctrl settings for blsp1_spi1
  2022-06-11 19:57 [PATCH] arm64: dts: qcom: qcs404: fix default pinctrl settings for blsp1_spi1 Andrey Konovalov
  2022-06-11 20:03 ` Andrey Konovalov
@ 2022-06-22  5:18 ` Vinod Koul
  2022-06-30 14:18   ` Bjorn Andersson
  2022-07-03  3:55 ` (subset) " Bjorn Andersson
  2 siblings, 1 reply; 6+ messages in thread
From: Vinod Koul @ 2022-06-22  5:18 UTC (permalink / raw)
  To: Andrey Konovalov, Bjorn Andersson
  Cc: agross, robh+dt, krzysztof.kozlowski+dt, linux-arm-msm,
	devicetree, linux-kernel

On 11-06-22, 22:57, Andrey Konovalov wrote:
> The current settings refer to "blsp_spi1" function which isn't defined.
> For this reason an attempt to enable blsp1_spi1 interface results in
> the probe failure below:
> 
> [    3.492900] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> [    3.502460] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> [    3.517725] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> [    3.532998] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> [    3.548277] spi_qup: probe of 78b6000.spi failed with error -22
> 
> Fix this by making the functions used in qcs404.dtsi to match the contents
> of drivers/pinctrl/qcom/pinctrl-qcs404.c.

Right, I cannot find blsp_spi1 which is the only one which is missing,
not sure why...

Bjorn do you recall why SPI1 is treated differently...

> 
> Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/qcs404.dtsi | 21 +++++++++++++++++++--
>  1 file changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> index d912166b7552..0d9e1f19aa67 100644
> --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
> +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> @@ -669,8 +669,25 @@ blsp1_spi0_default: blsp1-spi0-default {
>  			};
>  
>  			blsp1_spi1_default: blsp1-spi1-default {
> -				pins = "gpio22", "gpio23", "gpio24", "gpio25";
> -				function = "blsp_spi1";
> +				mosi {
> +					pins = "gpio22";
> +					function = "blsp_spi_mosi_a1";
> +				};
> +
> +				miso {
> +					pins = "gpio23";
> +					function = "blsp_spi_miso_a1";
> +				};
> +
> +				cs_n {
> +					pins = "gpio24";
> +					function = "blsp_spi_cs_n_a1";
> +				};
> +
> +				clk {
> +					pins = "gpio25";
> +					function = "blsp_spi_clk_a1";
> +				};
>  			};
>  
>  			blsp1_spi2_default: blsp1-spi2-default {
> -- 
> 2.25.1

-- 
~Vinod

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

* Re: [PATCH] arm64: dts: qcom: qcs404: fix default pinctrl settings for blsp1_spi1
  2022-06-22  5:18 ` Vinod Koul
@ 2022-06-30 14:18   ` Bjorn Andersson
  2022-07-01  4:40     ` Vinod Koul
  0 siblings, 1 reply; 6+ messages in thread
From: Bjorn Andersson @ 2022-06-30 14:18 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andrey Konovalov, agross, robh+dt, krzysztof.kozlowski+dt,
	linux-arm-msm, devicetree, linux-kernel

On Wed 22 Jun 00:18 CDT 2022, Vinod Koul wrote:

> On 11-06-22, 22:57, Andrey Konovalov wrote:
> > The current settings refer to "blsp_spi1" function which isn't defined.
> > For this reason an attempt to enable blsp1_spi1 interface results in
> > the probe failure below:
> > 
> > [    3.492900] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> > [    3.502460] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> > [    3.517725] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> > [    3.532998] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> > [    3.548277] spi_qup: probe of 78b6000.spi failed with error -22
> > 
> > Fix this by making the functions used in qcs404.dtsi to match the contents
> > of drivers/pinctrl/qcom/pinctrl-qcs404.c.
> 
> Right, I cannot find blsp_spi1 which is the only one which is missing,
> not sure why...
> 
> Bjorn do you recall why SPI1 is treated differently...
> 

Looking at the available pinctrl functions, I believe that blsp_spi1 has
two possible mux options; identified b y blsp_spi_*_a1 and
blsp_spi_*_b1.

Regards,
Bjorn

> > 
> > Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
> > ---
> >  arch/arm64/boot/dts/qcom/qcs404.dtsi | 21 +++++++++++++++++++--
> >  1 file changed, 19 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > index d912166b7552..0d9e1f19aa67 100644
> > --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi
> > @@ -669,8 +669,25 @@ blsp1_spi0_default: blsp1-spi0-default {
> >  			};
> >  
> >  			blsp1_spi1_default: blsp1-spi1-default {
> > -				pins = "gpio22", "gpio23", "gpio24", "gpio25";
> > -				function = "blsp_spi1";
> > +				mosi {
> > +					pins = "gpio22";
> > +					function = "blsp_spi_mosi_a1";
> > +				};
> > +
> > +				miso {
> > +					pins = "gpio23";
> > +					function = "blsp_spi_miso_a1";
> > +				};
> > +
> > +				cs_n {
> > +					pins = "gpio24";
> > +					function = "blsp_spi_cs_n_a1";
> > +				};
> > +
> > +				clk {
> > +					pins = "gpio25";
> > +					function = "blsp_spi_clk_a1";
> > +				};
> >  			};
> >  
> >  			blsp1_spi2_default: blsp1-spi2-default {
> > -- 
> > 2.25.1
> 
> -- 
> ~Vinod

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

* Re: [PATCH] arm64: dts: qcom: qcs404: fix default pinctrl settings for blsp1_spi1
  2022-06-30 14:18   ` Bjorn Andersson
@ 2022-07-01  4:40     ` Vinod Koul
  0 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2022-07-01  4:40 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andrey Konovalov, agross, robh+dt, krzysztof.kozlowski+dt,
	linux-arm-msm, devicetree, linux-kernel

On 30-06-22, 09:18, Bjorn Andersson wrote:
> On Wed 22 Jun 00:18 CDT 2022, Vinod Koul wrote:
> 
> > On 11-06-22, 22:57, Andrey Konovalov wrote:
> > > The current settings refer to "blsp_spi1" function which isn't defined.
> > > For this reason an attempt to enable blsp1_spi1 interface results in
> > > the probe failure below:
> > > 
> > > [    3.492900] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> > > [    3.502460] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> > > [    3.517725] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> > > [    3.532998] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> > > [    3.548277] spi_qup: probe of 78b6000.spi failed with error -22
> > > 
> > > Fix this by making the functions used in qcs404.dtsi to match the contents
> > > of drivers/pinctrl/qcom/pinctrl-qcs404.c.
> > 
> > Right, I cannot find blsp_spi1 which is the only one which is missing,
> > not sure why...
> > 
> > Bjorn do you recall why SPI1 is treated differently...
> 
> Looking at the available pinctrl functions, I believe that blsp_spi1 has
> two possible mux options; identified b y blsp_spi_*_a1 and
> blsp_spi_*_b1.

Yes, so are we good to merge this?

-- 
~Vinod

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

* Re: (subset) [PATCH] arm64: dts: qcom: qcs404: fix default pinctrl settings for blsp1_spi1
  2022-06-11 19:57 [PATCH] arm64: dts: qcom: qcs404: fix default pinctrl settings for blsp1_spi1 Andrey Konovalov
  2022-06-11 20:03 ` Andrey Konovalov
  2022-06-22  5:18 ` Vinod Koul
@ 2022-07-03  3:55 ` Bjorn Andersson
  2 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2022-07-03  3:55 UTC (permalink / raw)
  To: Andrey Konovalov, agross
  Cc: linux-arm-msm, linux-kernel, devicetree, vinod.koul,
	krzysztof.kozlowski+dt, robh+dt

On Sat, 11 Jun 2022 22:57:13 +0300, Andrey Konovalov wrote:
> The current settings refer to "blsp_spi1" function which isn't defined.
> For this reason an attempt to enable blsp1_spi1 interface results in
> the probe failure below:
> 
> [    3.492900] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> [    3.502460] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> [    3.517725] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> [    3.532998] qcs404-pinctrl 1000000.pinctrl: invalid function blsp_spi1 in map table
> [    3.548277] spi_qup: probe of 78b6000.spi failed with error -22
> 
> [...]

Applied, thanks!

[1/1] arm64: dts: qcom: qcs404: fix default pinctrl settings for blsp1_spi1
      commit: 2cac6baf0249cdd3748128f3196c2d203b06a4af

Best regards,
-- 
Bjorn Andersson <bjorn.andersson@linaro.org>

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

end of thread, other threads:[~2022-07-03  3:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-11 19:57 [PATCH] arm64: dts: qcom: qcs404: fix default pinctrl settings for blsp1_spi1 Andrey Konovalov
2022-06-11 20:03 ` Andrey Konovalov
2022-06-22  5:18 ` Vinod Koul
2022-06-30 14:18   ` Bjorn Andersson
2022-07-01  4:40     ` Vinod Koul
2022-07-03  3:55 ` (subset) " Bjorn Andersson

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).