linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: rockchip: add SPDIF node for rk3399-rockpro64
@ 2020-08-10  9:16 Katsuhiro Suzuki
  2020-08-30 19:08 ` Heiko Stuebner
  2021-01-09 15:39 ` Heiko Stuebner
  0 siblings, 2 replies; 4+ messages in thread
From: Katsuhiro Suzuki @ 2020-08-10  9:16 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: linux-rockchip, linux-arm-kernel, linux-kernel, Katsuhiro Suzuki

This patch adds 'disabled' SPDIF sound node and related settings
for rk3399-rockpro64.

There are 2 reasons:
  - All RK3399 dma-bus channels have been already used by I2S0/1/2
  - RockPro64 does not have SPDIF optical nor coaxial connector,
    just have 3pins

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>

---

Changes in v2:
  - Remove redundant status property
---
 .../boot/dts/rockchip/rk3399-rockpro64.dtsi   | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
index 6e553ff47534..58097245994a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
@@ -76,6 +76,23 @@ sound {
 		dais = <&i2s1_p0>;
 	};
 
+	sound-dit {
+		compatible = "audio-graph-card";
+		label = "rockchip,rk3399";
+		dais = <&spdif_p0>;
+	};
+
+	spdif-dit {
+		compatible = "linux,spdif-dit";
+		#sound-dai-cells = <0>;
+
+		port {
+			dit_p0_0: endpoint {
+				remote-endpoint = <&spdif_p0_0>;
+			};
+		};
+	};
+
 	vcc12v_dcin: vcc12v-dcin {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc12v_dcin";
@@ -698,6 +715,16 @@ &sdhci {
 	status = "okay";
 };
 
+&spdif {
+	pinctrl-0 = <&spdif_bus_1>;
+
+	spdif_p0: port {
+		spdif_p0_0: endpoint {
+			remote-endpoint = <&dit_p0_0>;
+		};
+	};
+};
+
 &spi1 {
 	status = "okay";
 
-- 
2.28.0


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

* Re: [PATCH v2] arm64: dts: rockchip: add SPDIF node for rk3399-rockpro64
  2020-08-10  9:16 [PATCH v2] arm64: dts: rockchip: add SPDIF node for rk3399-rockpro64 Katsuhiro Suzuki
@ 2020-08-30 19:08 ` Heiko Stuebner
  2020-08-31  1:10   ` Katsuhiro Suzuki
  2021-01-09 15:39 ` Heiko Stuebner
  1 sibling, 1 reply; 4+ messages in thread
From: Heiko Stuebner @ 2020-08-30 19:08 UTC (permalink / raw)
  To: Katsuhiro Suzuki
  Cc: linux-rockchip, linux-arm-kernel, linux-kernel, Katsuhiro Suzuki

Hi,

Am Montag, 10. August 2020, 11:16:19 CEST schrieb Katsuhiro Suzuki:
> This patch adds 'disabled' SPDIF sound node and related settings
> for rk3399-rockpro64.
> 
> There are 2 reasons:
>   - All RK3399 dma-bus channels have been already used by I2S0/1/2
>   - RockPro64 does not have SPDIF optical nor coaxial connector,
>     just have 3pins

I don't really understand what you mean here.

Like is there spdif on the board or not? Because you call it "disabled"
and also indicate that no i2s is available anymore, yet you mention 3 pins.
What do they do then?

Thanks
Heiko


> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
> 
> ---
> 
> Changes in v2:
>   - Remove redundant status property
> ---
>  .../boot/dts/rockchip/rk3399-rockpro64.dtsi   | 27 +++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> index 6e553ff47534..58097245994a 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
> @@ -76,6 +76,23 @@ sound {
>  		dais = <&i2s1_p0>;
>  	};
>  
> +	sound-dit {
> +		compatible = "audio-graph-card";
> +		label = "rockchip,rk3399";
> +		dais = <&spdif_p0>;
> +	};
> +
> +	spdif-dit {
> +		compatible = "linux,spdif-dit";
> +		#sound-dai-cells = <0>;
> +
> +		port {
> +			dit_p0_0: endpoint {
> +				remote-endpoint = <&spdif_p0_0>;
> +			};
> +		};
> +	};
> +
>  	vcc12v_dcin: vcc12v-dcin {
>  		compatible = "regulator-fixed";
>  		regulator-name = "vcc12v_dcin";
> @@ -698,6 +715,16 @@ &sdhci {
>  	status = "okay";
>  };
>  
> +&spdif {
> +	pinctrl-0 = <&spdif_bus_1>;
> +
> +	spdif_p0: port {
> +		spdif_p0_0: endpoint {
> +			remote-endpoint = <&dit_p0_0>;
> +		};
> +	};
> +};
> +
>  &spi1 {
>  	status = "okay";
>  
> 





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

* Re: [PATCH v2] arm64: dts: rockchip: add SPDIF node for rk3399-rockpro64
  2020-08-30 19:08 ` Heiko Stuebner
@ 2020-08-31  1:10   ` Katsuhiro Suzuki
  0 siblings, 0 replies; 4+ messages in thread
From: Katsuhiro Suzuki @ 2020-08-31  1:10 UTC (permalink / raw)
  To: Heiko Stuebner; +Cc: linux-rockchip, linux-arm-kernel, linux-kernel

Hello Heiko,

On 2020/08/31 4:08, Heiko Stuebner wrote:
> Hi,
> 
> Am Montag, 10. August 2020, 11:16:19 CEST schrieb Katsuhiro Suzuki:
>> This patch adds 'disabled' SPDIF sound node and related settings
>> for rk3399-rockpro64.
>>
>> There are 2 reasons:
>>    - All RK3399 dma-bus channels have been already used by I2S0/1/2
>>    - RockPro64 does not have SPDIF optical nor coaxial connector,
>>      just have 3pins
> 
> I don't really understand what you mean here.
> 
> Like is there spdif on the board or not? Because you call it "disabled"
> and also indicate that no i2s is available anymore, yet you mention 3 pins.
> What do they do then?
> 

RockPro64 has output pins for SPDIF Tx. But RK3399 does not have enough DMA
channel for enabling SPDIF tx. Current settings are:

   - I2S0     (Req number 0, 1): Enabled  : Output to 40pin headers (CON40)
   - I2S1     (Req number 2, 3): Enabled  : Output to ES8316 on board
   - I2S2     (Req number 4, 5): Enabled  : Output to internal HDMI core
   - SPDIF Tx (Req number 7)   : Disabled : Output to other connector (J10)

If we want to enable ALL sound I/Os, we need 7 DMA channels for it.
But... Unfortunately, RK3399 has only 6 DMA channels for sounds, PWM and SPIs.

So users of RockPro64 have to choose from the following:

   - Disable one of I2S (Ex. I2S0) and enable SPDIF tx
   - Keep enable I2S0/1/2 and disable SPDIF tx

> Thanks
> Heiko
> 
> 

Best Regards,
Katsuhiro Suzuki


>> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
>>
>> ---
>>
>> Changes in v2:
>>    - Remove redundant status property
>> ---
>>   .../boot/dts/rockchip/rk3399-rockpro64.dtsi   | 27 +++++++++++++++++++
>>   1 file changed, 27 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> index 6e553ff47534..58097245994a 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi
>> @@ -76,6 +76,23 @@ sound {
>>   		dais = <&i2s1_p0>;
>>   	};
>>   
>> +	sound-dit {
>> +		compatible = "audio-graph-card";
>> +		label = "rockchip,rk3399";
>> +		dais = <&spdif_p0>;
>> +	};
>> +
>> +	spdif-dit {
>> +		compatible = "linux,spdif-dit";
>> +		#sound-dai-cells = <0>;
>> +
>> +		port {
>> +			dit_p0_0: endpoint {
>> +				remote-endpoint = <&spdif_p0_0>;
>> +			};
>> +		};
>> +	};
>> +
>>   	vcc12v_dcin: vcc12v-dcin {
>>   		compatible = "regulator-fixed";
>>   		regulator-name = "vcc12v_dcin";
>> @@ -698,6 +715,16 @@ &sdhci {
>>   	status = "okay";
>>   };
>>   
>> +&spdif {
>> +	pinctrl-0 = <&spdif_bus_1>;
>> +
>> +	spdif_p0: port {
>> +		spdif_p0_0: endpoint {
>> +			remote-endpoint = <&dit_p0_0>;
>> +		};
>> +	};
>> +};
>> +
>>   &spi1 {
>>   	status = "okay";
>>   
>>
> 
> 
> 
> 


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

* Re: [PATCH v2] arm64: dts: rockchip: add SPDIF node for rk3399-rockpro64
  2020-08-10  9:16 [PATCH v2] arm64: dts: rockchip: add SPDIF node for rk3399-rockpro64 Katsuhiro Suzuki
  2020-08-30 19:08 ` Heiko Stuebner
@ 2021-01-09 15:39 ` Heiko Stuebner
  1 sibling, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2021-01-09 15:39 UTC (permalink / raw)
  To: Katsuhiro Suzuki
  Cc: Heiko Stuebner, linux-rockchip, linux-arm-kernel, linux-kernel

On Mon, 10 Aug 2020 18:16:19 +0900, Katsuhiro Suzuki wrote:
> This patch adds 'disabled' SPDIF sound node and related settings
> for rk3399-rockpro64.
> 
> There are 2 reasons:
>   - All RK3399 dma-bus channels have been already used by I2S0/1/2
>   - RockPro64 does not have SPDIF optical nor coaxial connector,
>     just have 3pins

Applied, thanks!

[1/1] arm64: dts: rockchip: add SPDIF node for rk3399-rockpro64
      commit: 7f02feb56d9dc8ee2fffe00993f7b9aadd8902ba

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>

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

end of thread, other threads:[~2021-01-09 15:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10  9:16 [PATCH v2] arm64: dts: rockchip: add SPDIF node for rk3399-rockpro64 Katsuhiro Suzuki
2020-08-30 19:08 ` Heiko Stuebner
2020-08-31  1:10   ` Katsuhiro Suzuki
2021-01-09 15:39 ` Heiko Stuebner

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