diff mbox series

[RFT,25/25] ARM: dts: s5pv210: align DMA channels with dtschema

Message ID 20200907161141.31034-26-krzk@kernel.org
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
dtschema expects DMA channels in specific order (tx, rx and tx-sec).
The order actually should not matter because dma-names is used however
let's make it aligned with dtschema to suppress warnings like:

  i2s@eee30000: dma-names: ['rx', 'tx', 'tx-sec'] is not valid under any of the given schemas

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm/boot/dts/s5pv210.dtsi | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Jonathan Bakker Sept. 8, 2020, 12:17 a.m. UTC | #1
Initial testing on both an i9000 and an SGH-T959P are showing that the audio has
stopped working with this.  I'm not 100% convinced as I've had DMA issues in the
past.  However trying to play something just results in a hang after 1.5s while
it works just fine without this patch.

Thanks,
Jonathan

On 2020-09-07 9:11 a.m., Krzysztof Kozlowski wrote:
> dtschema expects DMA channels in specific order (tx, rx and tx-sec).
> The order actually should not matter because dma-names is used however
> let's make it aligned with dtschema to suppress warnings like:
> 
>   i2s@eee30000: dma-names: ['rx', 'tx', 'tx-sec'] is not valid under any of the given schemas
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  arch/arm/boot/dts/s5pv210.dtsi | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
> index 96e667ba1c3f..72fb9d9f7ba3 100644
> --- a/arch/arm/boot/dts/s5pv210.dtsi
> +++ b/arch/arm/boot/dts/s5pv210.dtsi
> @@ -240,8 +240,8 @@
>  			reg = <0xeee30000 0x1000>;
>  			interrupt-parent = <&vic2>;
>  			interrupts = <16>;
> -			dma-names = "rx", "tx", "tx-sec";
> -			dmas = <&pdma1 9>, <&pdma1 10>, <&pdma1 11>;
> +			dma-names = "tx", "rx", "tx-sec";
> +			dmas = <&pdma1 10>, <&pdma1 9>, <&pdma1 11>;
>  			clock-names = "iis",
>  				      "i2s_opclk0",
>  				      "i2s_opclk1";
> @@ -260,8 +260,8 @@
>  			reg = <0xe2100000 0x1000>;
>  			interrupt-parent = <&vic2>;
>  			interrupts = <17>;
> -			dma-names = "rx", "tx";
> -			dmas = <&pdma1 12>, <&pdma1 13>;
> +			dma-names = "tx", "rx";
> +			dmas = <&pdma1 13>, <&pdma1 12>;
>  			clock-names = "iis", "i2s_opclk0";
>  			clocks = <&clocks CLK_I2S1>, <&clocks SCLK_AUDIO1>;
>  			pinctrl-names = "default";
> @@ -275,8 +275,8 @@
>  			reg = <0xe2a00000 0x1000>;
>  			interrupt-parent = <&vic2>;
>  			interrupts = <18>;
> -			dma-names = "rx", "tx";
> -			dmas = <&pdma1 14>, <&pdma1 15>;
> +			dma-names = "tx", "rx";
> +			dmas = <&pdma1 15>, <&pdma1 14>;
>  			clock-names = "iis", "i2s_opclk0";
>  			clocks = <&clocks CLK_I2S2>, <&clocks SCLK_AUDIO2>;
>  			pinctrl-names = "default";
>
Jonathan Bakker Sept. 8, 2020, 12:28 a.m. UTC | #2
Ah, I figured out why the dma stopped working.  In s5pv210-aries.dtsi the dma's for i2s0
are overriden to use pdma0 instead of pdma1.  That also needs changing for this to
work properly.

Thanks,
Jonathan

On 2020-09-07 5:17 p.m., Jonathan Bakker wrote:
> Initial testing on both an i9000 and an SGH-T959P are showing that the audio has
> stopped working with this.  I'm not 100% convinced as I've had DMA issues in the
> past.  However trying to play something just results in a hang after 1.5s while
> it works just fine without this patch.
> 
> Thanks,
> Jonathan
> 
> On 2020-09-07 9:11 a.m., Krzysztof Kozlowski wrote:
>> dtschema expects DMA channels in specific order (tx, rx and tx-sec).
>> The order actually should not matter because dma-names is used however
>> let's make it aligned with dtschema to suppress warnings like:
>>
>>   i2s@eee30000: dma-names: ['rx', 'tx', 'tx-sec'] is not valid under any of the given schemas
>>
>> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>> ---
>>  arch/arm/boot/dts/s5pv210.dtsi | 12 ++++++------
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
>> index 96e667ba1c3f..72fb9d9f7ba3 100644
>> --- a/arch/arm/boot/dts/s5pv210.dtsi
>> +++ b/arch/arm/boot/dts/s5pv210.dtsi
>> @@ -240,8 +240,8 @@
>>  			reg = <0xeee30000 0x1000>;
>>  			interrupt-parent = <&vic2>;
>>  			interrupts = <16>;
>> -			dma-names = "rx", "tx", "tx-sec";
>> -			dmas = <&pdma1 9>, <&pdma1 10>, <&pdma1 11>;
>> +			dma-names = "tx", "rx", "tx-sec";
>> +			dmas = <&pdma1 10>, <&pdma1 9>, <&pdma1 11>;
>>  			clock-names = "iis",
>>  				      "i2s_opclk0",
>>  				      "i2s_opclk1";
>> @@ -260,8 +260,8 @@
>>  			reg = <0xe2100000 0x1000>;
>>  			interrupt-parent = <&vic2>;
>>  			interrupts = <17>;
>> -			dma-names = "rx", "tx";
>> -			dmas = <&pdma1 12>, <&pdma1 13>;
>> +			dma-names = "tx", "rx";
>> +			dmas = <&pdma1 13>, <&pdma1 12>;
>>  			clock-names = "iis", "i2s_opclk0";
>>  			clocks = <&clocks CLK_I2S1>, <&clocks SCLK_AUDIO1>;
>>  			pinctrl-names = "default";
>> @@ -275,8 +275,8 @@
>>  			reg = <0xe2a00000 0x1000>;
>>  			interrupt-parent = <&vic2>;
>>  			interrupts = <18>;
>> -			dma-names = "rx", "tx";
>> -			dmas = <&pdma1 14>, <&pdma1 15>;
>> +			dma-names = "tx", "rx";
>> +			dmas = <&pdma1 15>, <&pdma1 14>;
>>  			clock-names = "iis", "i2s_opclk0";
>>  			clocks = <&clocks CLK_I2S2>, <&clocks SCLK_AUDIO2>;
>>  			pinctrl-names = "default";
>>
Krzysztof Kozlowski Sept. 8, 2020, 6:57 a.m. UTC | #3
On Mon, Sep 07, 2020 at 05:28:54PM -0700, Jonathan Bakker wrote:
> Ah, I figured out why the dma stopped working.  In s5pv210-aries.dtsi the dma's for i2s0
> are overriden to use pdma0 instead of pdma1.  That also needs changing for this to
> work properly.

Indeed I missed this, thanks for review and tests.

Best regards,
Krzysztof

> 
> Thanks,
> Jonathan
> 
> On 2020-09-07 5:17 p.m., Jonathan Bakker wrote:
> > Initial testing on both an i9000 and an SGH-T959P are showing that the audio has
> > stopped working with this.  I'm not 100% convinced as I've had DMA issues in the
> > past.  However trying to play something just results in a hang after 1.5s while
> > it works just fine without this patch.
> > 
> > Thanks,
> > Jonathan
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
index 96e667ba1c3f..72fb9d9f7ba3 100644
--- a/arch/arm/boot/dts/s5pv210.dtsi
+++ b/arch/arm/boot/dts/s5pv210.dtsi
@@ -240,8 +240,8 @@ 
 			reg = <0xeee30000 0x1000>;
 			interrupt-parent = <&vic2>;
 			interrupts = <16>;
-			dma-names = "rx", "tx", "tx-sec";
-			dmas = <&pdma1 9>, <&pdma1 10>, <&pdma1 11>;
+			dma-names = "tx", "rx", "tx-sec";
+			dmas = <&pdma1 10>, <&pdma1 9>, <&pdma1 11>;
 			clock-names = "iis",
 				      "i2s_opclk0",
 				      "i2s_opclk1";
@@ -260,8 +260,8 @@ 
 			reg = <0xe2100000 0x1000>;
 			interrupt-parent = <&vic2>;
 			interrupts = <17>;
-			dma-names = "rx", "tx";
-			dmas = <&pdma1 12>, <&pdma1 13>;
+			dma-names = "tx", "rx";
+			dmas = <&pdma1 13>, <&pdma1 12>;
 			clock-names = "iis", "i2s_opclk0";
 			clocks = <&clocks CLK_I2S1>, <&clocks SCLK_AUDIO1>;
 			pinctrl-names = "default";
@@ -275,8 +275,8 @@ 
 			reg = <0xe2a00000 0x1000>;
 			interrupt-parent = <&vic2>;
 			interrupts = <18>;
-			dma-names = "rx", "tx";
-			dmas = <&pdma1 14>, <&pdma1 15>;
+			dma-names = "tx", "rx";
+			dmas = <&pdma1 15>, <&pdma1 14>;
 			clock-names = "iis", "i2s_opclk0";
 			clocks = <&clocks CLK_I2S2>, <&clocks SCLK_AUDIO2>;
 			pinctrl-names = "default";