diff mbox series

[RFT,09/25] ARM: dts: s5pv210: fix number of I2S DAI cells

Message ID 20200907161141.31034-10-krzk@kernel.org (mailing list archive)
State Under Review
Headers show
Series ARM: dts: s5pv210: Cleanup - dtschema warnings | expand

Commit Message

Krzysztof Kozlowski Sept. 7, 2020, 4:11 p.m. UTC
The bindings describe I2S DAI has 1 cells.  This makes especially sense
for i2s0 which registers two DAIs.  Adjust the cells to fix dtbs_check
warnings like:

  i2s@e2100000: #sound-dai-cells:0:0: 1 was expected

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm/boot/dts/s5pv210-fascinate4g.dts | 2 +-
 arch/arm/boot/dts/s5pv210-galaxys.dts     | 2 +-
 arch/arm/boot/dts/s5pv210.dtsi            | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

Comments

Jonathan Bakker Sept. 7, 2020, 11:55 p.m. UTC | #1
Sadly, this is causing issues for me.  The machine driver is no longer probing correctly
on the Galaxy S.

The failing call in sound/soc/samsung/aries_wm8994.c is

	/* Set CPU of_node for BT DAI */
	aries_dai[2].cpus->of_node = of_parse_phandle(cpu,
			"sound-dai", 1);

where cpus->of_node is not set properly.  Which is definitely weird because it doesn't
look like this should affect that.

Let me know if there's any specific test that you want me to do.

Thanks,
Jonathan


On 2020-09-07 9:11 a.m., Krzysztof Kozlowski wrote:
> The bindings describe I2S DAI has 1 cells.  This makes especially sense
> for i2s0 which registers two DAIs.  Adjust the cells to fix dtbs_check
> warnings like:
> 
>   i2s@e2100000: #sound-dai-cells:0:0: 1 was expected
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  arch/arm/boot/dts/s5pv210-fascinate4g.dts | 2 +-
>  arch/arm/boot/dts/s5pv210-galaxys.dts     | 2 +-
>  arch/arm/boot/dts/s5pv210.dtsi            | 6 +++---
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/s5pv210-fascinate4g.dts b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> index ca064359dd30..a6dc8a173af1 100644
> --- a/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> +++ b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> @@ -102,7 +102,7 @@
>  		pinctrl-0 = <&headset_det &earpath_sel>;
>  
>  		cpu {
> -			sound-dai = <&i2s0>, <&bt_codec>;
> +			sound-dai = <&i2s0 0>, <&bt_codec>;
>  		};
>  
>  		codec {
> diff --git a/arch/arm/boot/dts/s5pv210-galaxys.dts b/arch/arm/boot/dts/s5pv210-galaxys.dts
> index 560f830b6f6b..0eba06f56ac7 100644
> --- a/arch/arm/boot/dts/s5pv210-galaxys.dts
> +++ b/arch/arm/boot/dts/s5pv210-galaxys.dts
> @@ -132,7 +132,7 @@
>  		pinctrl-0 = <&headset_det &earpath_sel>;
>  
>  		cpu {
> -			sound-dai = <&i2s0>, <&bt_codec>;
> +			sound-dai = <&i2s0 0>, <&bt_codec>;
>  		};
>  
>  		codec {
> diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
> index 2871351ab907..96e667ba1c3f 100644
> --- a/arch/arm/boot/dts/s5pv210.dtsi
> +++ b/arch/arm/boot/dts/s5pv210.dtsi
> @@ -251,7 +251,7 @@
>  			samsung,idma-addr = <0xc0010000>;
>  			pinctrl-names = "default";
>  			pinctrl-0 = <&i2s0_bus>;
> -			#sound-dai-cells = <0>;
> +			#sound-dai-cells = <1>;
>  			status = "disabled";
>  		};
>  
> @@ -266,7 +266,7 @@
>  			clocks = <&clocks CLK_I2S1>, <&clocks SCLK_AUDIO1>;
>  			pinctrl-names = "default";
>  			pinctrl-0 = <&i2s1_bus>;
> -			#sound-dai-cells = <0>;
> +			#sound-dai-cells = <1>;
>  			status = "disabled";
>  		};
>  
> @@ -281,7 +281,7 @@
>  			clocks = <&clocks CLK_I2S2>, <&clocks SCLK_AUDIO2>;
>  			pinctrl-names = "default";
>  			pinctrl-0 = <&i2s2_bus>;
> -			#sound-dai-cells = <0>;
> +			#sound-dai-cells = <1>;
>  			status = "disabled";
>  		};
>  
>
Krzysztof Kozlowski Sept. 8, 2020, 6:53 a.m. UTC | #2
On Mon, Sep 07, 2020 at 04:55:26PM -0700, Jonathan Bakker wrote:
> Sadly, this is causing issues for me.  The machine driver is no longer probing correctly
> on the Galaxy S.
> 
> The failing call in sound/soc/samsung/aries_wm8994.c is
> 
> 	/* Set CPU of_node for BT DAI */
> 	aries_dai[2].cpus->of_node = of_parse_phandle(cpu,
> 			"sound-dai", 1);
> 
> where cpus->of_node is not set properly.  Which is definitely weird because it doesn't
> look like this should affect that.
> 
> Let me know if there's any specific test that you want me to do.

Thanks for the tests. I wonder now if this was working before because
really my change should not break it... I'll think more about it.

Best regards,
Krzysztof

> 
> Thanks,
> Jonathan
> 
> 
> On 2020-09-07 9:11 a.m., Krzysztof Kozlowski wrote:
> > The bindings describe I2S DAI has 1 cells.  This makes especially sense
> > for i2s0 which registers two DAIs.  Adjust the cells to fix dtbs_check
> > warnings like:
> > 
> >   i2s@e2100000: #sound-dai-cells:0:0: 1 was expected
> > 
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > ---
> >  arch/arm/boot/dts/s5pv210-fascinate4g.dts | 2 +-
> >  arch/arm/boot/dts/s5pv210-galaxys.dts     | 2 +-
> >  arch/arm/boot/dts/s5pv210.dtsi            | 6 +++---
> >  3 files changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/arch/arm/boot/dts/s5pv210-fascinate4g.dts b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> > index ca064359dd30..a6dc8a173af1 100644
> > --- a/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> > +++ b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> > @@ -102,7 +102,7 @@
> >  		pinctrl-0 = <&headset_det &earpath_sel>;
> >  
> >  		cpu {
> > -			sound-dai = <&i2s0>, <&bt_codec>;
> > +			sound-dai = <&i2s0 0>, <&bt_codec>;
> >  		};
> >  
> >  		codec {
> > diff --git a/arch/arm/boot/dts/s5pv210-galaxys.dts b/arch/arm/boot/dts/s5pv210-galaxys.dts
> > index 560f830b6f6b..0eba06f56ac7 100644
> > --- a/arch/arm/boot/dts/s5pv210-galaxys.dts
> > +++ b/arch/arm/boot/dts/s5pv210-galaxys.dts
> > @@ -132,7 +132,7 @@
> >  		pinctrl-0 = <&headset_det &earpath_sel>;
> >  
> >  		cpu {
> > -			sound-dai = <&i2s0>, <&bt_codec>;
> > +			sound-dai = <&i2s0 0>, <&bt_codec>;
> >  		};
> >  
> >  		codec {
> > diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
> > index 2871351ab907..96e667ba1c3f 100644
> > --- a/arch/arm/boot/dts/s5pv210.dtsi
> > +++ b/arch/arm/boot/dts/s5pv210.dtsi
> > @@ -251,7 +251,7 @@
> >  			samsung,idma-addr = <0xc0010000>;
> >  			pinctrl-names = "default";
> >  			pinctrl-0 = <&i2s0_bus>;
> > -			#sound-dai-cells = <0>;
> > +			#sound-dai-cells = <1>;
> >  			status = "disabled";
> >  		};
> >  
> > @@ -266,7 +266,7 @@
> >  			clocks = <&clocks CLK_I2S1>, <&clocks SCLK_AUDIO1>;
> >  			pinctrl-names = "default";
> >  			pinctrl-0 = <&i2s1_bus>;
> > -			#sound-dai-cells = <0>;
> > +			#sound-dai-cells = <1>;
> >  			status = "disabled";
> >  		};
> >  
> > @@ -281,7 +281,7 @@
> >  			clocks = <&clocks CLK_I2S2>, <&clocks SCLK_AUDIO2>;
> >  			pinctrl-names = "default";
> >  			pinctrl-0 = <&i2s2_bus>;
> > -			#sound-dai-cells = <0>;
> > +			#sound-dai-cells = <1>;
> >  			status = "disabled";
> >  		};
> >  
> >
Sylwester Nawrocki Sept. 8, 2020, 8:38 a.m. UTC | #3
On 9/8/20 08:53, Krzysztof Kozlowski wrote:
> On Mon, Sep 07, 2020 at 04:55:26PM -0700, Jonathan Bakker wrote:
>> Sadly, this is causing issues for me.  The machine driver is no longer probing correctly
>> on the Galaxy S.
>>
>> The failing call in sound/soc/samsung/aries_wm8994.c is
>>
>> 	/* Set CPU of_node for BT DAI */
>> 	aries_dai[2].cpus->of_node = of_parse_phandle(cpu,
>> 			"sound-dai", 1);
>>
>> where cpus->of_node is not set properly.  Which is definitely weird because it doesn't
>> look like this should affect that.
>>
>> Let me know if there's any specific test that you want me to do.
> Thanks for the tests. I wonder now if this was working before because
> really my change should not break it... I'll think more about it.

I think of_parse_phandle_with_args() needs to be used instead of just
of_parse_phandle() for that to work, as AFAICS the latter assumes the
cells count == 0. We would need first to update the driver and then dts.
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/s5pv210-fascinate4g.dts b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
index ca064359dd30..a6dc8a173af1 100644
--- a/arch/arm/boot/dts/s5pv210-fascinate4g.dts
+++ b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
@@ -102,7 +102,7 @@ 
 		pinctrl-0 = <&headset_det &earpath_sel>;
 
 		cpu {
-			sound-dai = <&i2s0>, <&bt_codec>;
+			sound-dai = <&i2s0 0>, <&bt_codec>;
 		};
 
 		codec {
diff --git a/arch/arm/boot/dts/s5pv210-galaxys.dts b/arch/arm/boot/dts/s5pv210-galaxys.dts
index 560f830b6f6b..0eba06f56ac7 100644
--- a/arch/arm/boot/dts/s5pv210-galaxys.dts
+++ b/arch/arm/boot/dts/s5pv210-galaxys.dts
@@ -132,7 +132,7 @@ 
 		pinctrl-0 = <&headset_det &earpath_sel>;
 
 		cpu {
-			sound-dai = <&i2s0>, <&bt_codec>;
+			sound-dai = <&i2s0 0>, <&bt_codec>;
 		};
 
 		codec {
diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
index 2871351ab907..96e667ba1c3f 100644
--- a/arch/arm/boot/dts/s5pv210.dtsi
+++ b/arch/arm/boot/dts/s5pv210.dtsi
@@ -251,7 +251,7 @@ 
 			samsung,idma-addr = <0xc0010000>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&i2s0_bus>;
-			#sound-dai-cells = <0>;
+			#sound-dai-cells = <1>;
 			status = "disabled";
 		};
 
@@ -266,7 +266,7 @@ 
 			clocks = <&clocks CLK_I2S1>, <&clocks SCLK_AUDIO1>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&i2s1_bus>;
-			#sound-dai-cells = <0>;
+			#sound-dai-cells = <1>;
 			status = "disabled";
 		};
 
@@ -281,7 +281,7 @@ 
 			clocks = <&clocks CLK_I2S2>, <&clocks SCLK_AUDIO2>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&i2s2_bus>;
-			#sound-dai-cells = <0>;
+			#sound-dai-cells = <1>;
 			status = "disabled";
 		};