diff mbox

[v2,4/4] ARM: dts: Enable HDMI audio on Snow Chromebook

Message ID 20180308162559.391-1-s.nawrocki@samsung.com (mailing list archive)
State Superseded
Headers show

Commit Message

This patch adds new cpu, codec subnodes according to the updated
"google,snow-audio-max98095" DT bindings and the I2S clock tree
configuration so sound on the HDMI interface can also be supported.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
Changes since v2:
 - changed order of codec phandles in codec/cpu-dai property
   to match the DT bindings documentation.
---
 arch/arm/boot/dts/exynos5250-snow-common.dtsi | 4 ++++
 arch/arm/boot/dts/exynos5250-snow.dts         | 8 ++++++++
 2 files changed, 12 insertions(+)

--
2.14.2

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Krzysztof Kozlowski March 9, 2018, 1:01 p.m. UTC | #1
On Thu, Mar 8, 2018 at 5:25 PM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> This patch adds new cpu, codec subnodes according to the updated
> "google,snow-audio-max98095" DT bindings and the I2S clock tree
> configuration so sound on the HDMI interface can also be supported.
>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
> Changes since v2:
>  - changed order of codec phandles in codec/cpu-dai property
>    to match the DT bindings documentation.
> ---
>  arch/arm/boot/dts/exynos5250-snow-common.dtsi | 4 ++++
>  arch/arm/boot/dts/exynos5250-snow.dts         | 8 ++++++++
>  2 files changed, 12 insertions(+)
>
> diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> index bdf59dd3654b..932a00cfd716 100644
> --- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> +++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> @@ -9,6 +9,7 @@
>  #include <dt-bindings/clock/maxim,max77686.h>
>  #include <dt-bindings/interrupt-controller/irq.h>
>  #include <dt-bindings/input/input.h>
> +#include <dt-bindings/sound/samsung-i2s.h>
>  #include "exynos5250.dtsi"
>
>  / {
> @@ -523,6 +524,9 @@
>  };
>
>  &i2s0 {
> +       assigned-clocks = <&i2s0 CLK_I2S_RCLK_SRC>;
> +       assigned-clock-parents = <&clock_audss EXYNOS_I2S_BUS>;
> +       #clock-cells = <1>;

Shouldn't this be property of exynos5250.dtsi? Along with clock-output-names?

BR,
Krzysztof

>         status = "okay";
>  };
>
> diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts
> index 16e37c337a3f..75fdc5e6d423 100644
> --- a/arch/arm/boot/dts/exynos5250-snow.dts
> +++ b/arch/arm/boot/dts/exynos5250-snow.dts
> @@ -18,6 +18,14 @@
>
>                 samsung,model = "Snow-I2S-MAX98095";
>                 samsung,audio-codec = <&max98095>;
> +
> +               cpu {
> +                       sound-dai = <&i2s0 0>;
> +               };
> +
> +               codec {
> +                       sound-dai = <&max98095 0>, <&hdmi>;
> +               };
>         };
>  };
>
> --
> 2.14.2
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
On 03/09/2018 02:01 PM, Krzysztof Kozlowski wrote:
>> diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
>> index bdf59dd3654b..932a00cfd716 100644
>> --- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
>> +++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
>> @@ -9,6 +9,7 @@
>>  #include <dt-bindings/clock/maxim,max77686.h>
>>  #include <dt-bindings/interrupt-controller/irq.h>
>>  #include <dt-bindings/input/input.h>
>> +#include <dt-bindings/sound/samsung-i2s.h>
>>  #include "exynos5250.dtsi"
>>
>>  / {
>> @@ -523,6 +524,9 @@
>>  };
>>
>>  &i2s0 {
>> +       assigned-clocks = <&i2s0 CLK_I2S_RCLK_SRC>;
>> +       assigned-clock-parents = <&clock_audss EXYNOS_I2S_BUS>;
>> +       #clock-cells = <1>;
>
> Shouldn't this be property of exynos5250.dtsi? Along with clock-output-names?

Hmm, it should be safe to move it there. By specifying this property or not
we can control whether the I2S clocks are exposed or not. If we move it to 
exynos5250.dtsi the clocks we always be exposed. But should be the right thing
to do anyway. I will post v3.

Of course we recently made the clock-output-names property deprecated, it will
not bee needed any more. It was there just to ensure the clk names are unique.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
index bdf59dd3654b..932a00cfd716 100644
--- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
+++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
@@ -9,6 +9,7 @@ 
 #include <dt-bindings/clock/maxim,max77686.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/sound/samsung-i2s.h>
 #include "exynos5250.dtsi"

 / {
@@ -523,6 +524,9 @@ 
 };

 &i2s0 {
+	assigned-clocks = <&i2s0 CLK_I2S_RCLK_SRC>;
+	assigned-clock-parents = <&clock_audss EXYNOS_I2S_BUS>;
+	#clock-cells = <1>;
 	status = "okay";
 };

diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts
index 16e37c337a3f..75fdc5e6d423 100644
--- a/arch/arm/boot/dts/exynos5250-snow.dts
+++ b/arch/arm/boot/dts/exynos5250-snow.dts
@@ -18,6 +18,14 @@ 

 		samsung,model = "Snow-I2S-MAX98095";
 		samsung,audio-codec = <&max98095>;
+
+		cpu {
+			sound-dai = <&i2s0 0>;
+		};
+
+		codec {
+			sound-dai = <&max98095 0>, <&hdmi>;
+		};
 	};
 };