diff mbox series

[v4,20/22] ARM: tegra: Add HDMI audio graph to Tegra20 device-tree

Message ID 20211204143725.31646-21-digetx@gmail.com
State New
Headers show
Series None | expand

Commit Message

Dmitry Osipenko Dec. 4, 2021, 2:37 p.m. UTC
Add HDMI audio graph to Tegra20 device-tree to enable HDMI audio on
Tegra20 devices.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 arch/arm/boot/dts/tegra20.dtsi | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

Comments

Thierry Reding Dec. 16, 2021, 1:46 p.m. UTC | #1
On Sat, Dec 04, 2021 at 05:37:23PM +0300, Dmitry Osipenko wrote:
> Add HDMI audio graph to Tegra20 device-tree to enable HDMI audio on
> Tegra20 devices.
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  arch/arm/boot/dts/tegra20.dtsi | 22 +++++++++++++++++++++-
>  1 file changed, 21 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
> index 72cbe32d0c1d..dde228bcbbff 100644
> --- a/arch/arm/boot/dts/tegra20.dtsi
> +++ b/arch/arm/boot/dts/tegra20.dtsi
> @@ -186,7 +186,7 @@ rgb {
>  			};
>  		};
>  
> -		hdmi@54280000 {
> +		tegra_hdmi: hdmi@54280000 {
>  			compatible = "nvidia,tegra20-hdmi";
>  			reg = <0x54280000 0x00040000>;
>  			interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
> @@ -1063,4 +1063,24 @@ pmu {
>  		interrupt-affinity = <&{/cpus/cpu@0}>,
>  				     <&{/cpus/cpu@1}>;
>  	};
> +
> +	sound-hdmi {
> +		compatible = "simple-audio-card";
> +		simple-audio-card,name = "NVIDIA Tegra20 HDMI";
> +
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		simple-audio-card,dai-link@0 {
> +			reg = <0>;
> +
> +			cpu {
> +				sound-dai = <&tegra_spdif>;
> +			};
> +
> +			codec {
> +				sound-dai = <&tegra_hdmi>;
> +			};
> +		};
> +	};

Should this be status = "disabled" and then only enabled for platforms
that actually enable HDMI?

Thierry
Dmitry Osipenko Dec. 16, 2021, 2:24 p.m. UTC | #2
16.12.2021 16:46, Thierry Reding пишет:
> On Sat, Dec 04, 2021 at 05:37:23PM +0300, Dmitry Osipenko wrote:
>> Add HDMI audio graph to Tegra20 device-tree to enable HDMI audio on
>> Tegra20 devices.
>>
>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
>> ---
>>  arch/arm/boot/dts/tegra20.dtsi | 22 +++++++++++++++++++++-
>>  1 file changed, 21 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
>> index 72cbe32d0c1d..dde228bcbbff 100644
>> --- a/arch/arm/boot/dts/tegra20.dtsi
>> +++ b/arch/arm/boot/dts/tegra20.dtsi
>> @@ -186,7 +186,7 @@ rgb {
>>  			};
>>  		};
>>  
>> -		hdmi@54280000 {
>> +		tegra_hdmi: hdmi@54280000 {
>>  			compatible = "nvidia,tegra20-hdmi";
>>  			reg = <0x54280000 0x00040000>;
>>  			interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
>> @@ -1063,4 +1063,24 @@ pmu {
>>  		interrupt-affinity = <&{/cpus/cpu@0}>,
>>  				     <&{/cpus/cpu@1}>;
>>  	};
>> +
>> +	sound-hdmi {
>> +		compatible = "simple-audio-card";
>> +		simple-audio-card,name = "NVIDIA Tegra20 HDMI";
>> +
>> +		#address-cells = <1>;
>> +		#size-cells = <0>;
>> +
>> +		simple-audio-card,dai-link@0 {
>> +			reg = <0>;
>> +
>> +			cpu {
>> +				sound-dai = <&tegra_spdif>;
>> +			};
>> +
>> +			codec {
>> +				sound-dai = <&tegra_hdmi>;
>> +			};
>> +		};
>> +	};
> 
> Should this be status = "disabled" and then only enabled for platforms
> that actually enable HDMI?

Assuming that HDMI node is disabled, we assume that the card won't be
initialized. It won't be a problem to restructure this card in DT later
on if we will have any other use-cases than we currently have, but this
is unlikely to happen in practice.
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 72cbe32d0c1d..dde228bcbbff 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -186,7 +186,7 @@  rgb {
 			};
 		};
 
-		hdmi@54280000 {
+		tegra_hdmi: hdmi@54280000 {
 			compatible = "nvidia,tegra20-hdmi";
 			reg = <0x54280000 0x00040000>;
 			interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
@@ -1063,4 +1063,24 @@  pmu {
 		interrupt-affinity = <&{/cpus/cpu@0}>,
 				     <&{/cpus/cpu@1}>;
 	};
+
+	sound-hdmi {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "NVIDIA Tegra20 HDMI";
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		simple-audio-card,dai-link@0 {
+			reg = <0>;
+
+			cpu {
+				sound-dai = <&tegra_spdif>;
+			};
+
+			codec {
+				sound-dai = <&tegra_hdmi>;
+			};
+		};
+	};
 };