From 0146aabdcc6a80c9c153b936ab4419bbbbe25f8c Mon Sep 17 00:00:00 2001 From: Cheng Tong Date: Mon, 20 May 2019 13:46:33 +0800 Subject: [PATCH] audio: S905X2 add clk tuning_enable control in dts [1/1] PD#SWPL-10180 Problem: can't enable clk tuning Solution: add control interface in dts to enable clk tuning and start clk before codec init for s905x2 Verify: verify on franklin Change-Id: Icc97b04923bcc317b8259449ba068d1eddef0854 Signed-off-by: Cheng Tong --- arch/arm/boot/dts/amlogic/g12a_s905x2_u212.dts | 7 +++++++ arch/arm/boot/dts/amlogic/g12a_s905x2_u212_1g.dts | 7 +++++++ arch/arm64/boot/dts/amlogic/g12a_s905x2_u212.dts | 7 +++++++ arch/arm64/boot/dts/amlogic/g12a_s905x2_u212_1g.dts | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/arch/arm/boot/dts/amlogic/g12a_s905x2_u212.dts b/arch/arm/boot/dts/amlogic/g12a_s905x2_u212.dts index 439cc94..3acaaf7 100644 --- a/arch/arm/boot/dts/amlogic/g12a_s905x2_u212.dts +++ b/arch/arm/boot/dts/amlogic/g12a_s905x2_u212.dts @@ -922,6 +922,11 @@ * 4: spdifout_b; */ samesource_sel = <3>; + /*enable default mclk(12.288M), before extern codec start*/ + start_clk_enable = <1>; + + /*tdm clk tuning enable*/ + clk_tuning_enable = <1>; }; aml_tdmc: tdmc { @@ -998,6 +1003,8 @@ pinctrl-0 = <&spdifout>; pinctrl-1 = <&spdifout_a_mute>; status = "okay"; + /*spdif clk tuning enable*/ + clk_tuning_enable = <1>; }; aml_spdif_b: spdif_b { compatible = "amlogic, g12a-snd-spdif-b"; diff --git a/arch/arm/boot/dts/amlogic/g12a_s905x2_u212_1g.dts b/arch/arm/boot/dts/amlogic/g12a_s905x2_u212_1g.dts index 57a3e29..ad3d5cc 100644 --- a/arch/arm/boot/dts/amlogic/g12a_s905x2_u212_1g.dts +++ b/arch/arm/boot/dts/amlogic/g12a_s905x2_u212_1g.dts @@ -918,6 +918,11 @@ * 4: spdifout_b; */ samesource_sel = <3>; + /*enable default mclk(12.288M), before extern codec start*/ + start_clk_enable = <1>; + + /*tdm clk tuning enable*/ + clk_tuning_enable = <1>; }; aml_tdmc: tdmc { @@ -994,6 +999,8 @@ pinctrl-0 = <&spdifout>; pinctrl-1 = <&spdifout_a_mute>; status = "okay"; + /*spdif clk tuning enable*/ + clk_tuning_enable = <1>; }; aml_spdif_b: spdif_b { compatible = "amlogic, g12a-snd-spdif-b"; diff --git a/arch/arm64/boot/dts/amlogic/g12a_s905x2_u212.dts b/arch/arm64/boot/dts/amlogic/g12a_s905x2_u212.dts index 58a59a4..44c6714 100644 --- a/arch/arm64/boot/dts/amlogic/g12a_s905x2_u212.dts +++ b/arch/arm64/boot/dts/amlogic/g12a_s905x2_u212.dts @@ -922,6 +922,11 @@ * 4: spdifout_b; */ samesource_sel = <3>; + /*enable default mclk(12.288M), before extern codec start*/ + start_clk_enable = <1>; + + /*tdm clk tuning enable*/ + clk_tuning_enable = <1>; }; aml_tdmc: tdmc { @@ -997,6 +1002,8 @@ pinctrl-0 = <&spdifout>; pinctrl-1 = <&spdifout_a_mute>; status = "okay"; + /*spdif clk tuning enable*/ + clk_tuning_enable = <1>; }; aml_spdif_b: spdif_b { compatible = "amlogic, g12a-snd-spdif-b"; diff --git a/arch/arm64/boot/dts/amlogic/g12a_s905x2_u212_1g.dts b/arch/arm64/boot/dts/amlogic/g12a_s905x2_u212_1g.dts index d73a3e6..f607a00 100644 --- a/arch/arm64/boot/dts/amlogic/g12a_s905x2_u212_1g.dts +++ b/arch/arm64/boot/dts/amlogic/g12a_s905x2_u212_1g.dts @@ -914,6 +914,11 @@ * 4: spdifout_b; */ samesource_sel = <3>; + /*enable default mclk(12.288M), before extern codec start*/ + start_clk_enable = <1>; + + /*tdm clk tuning enable*/ + clk_tuning_enable = <1>; }; aml_tdmc: tdmc { @@ -989,6 +994,8 @@ pinctrl-0 = <&spdifout>; pinctrl-1 = <&spdifout_a_mute>; status = "okay"; + /*spdif clk tuning enable*/ + clk_tuning_enable = <1>; }; aml_spdif_b: spdif_b { compatible = "amlogic, g12a-snd-spdif-b"; -- 2.7.4