From patchwork Fri Apr 21 17:19:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 9693435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C79636038D for ; Fri, 21 Apr 2017 18:35:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCD772862B for ; Fri, 21 Apr 2017 18:35:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B149828663; Fri, 21 Apr 2017 18:35:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11BD92862B for ; Fri, 21 Apr 2017 18:35:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423494AbdDUSfT (ORCPT ); Fri, 21 Apr 2017 14:35:19 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:52269 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1041121AbdDUSex (ORCPT ); Fri, 21 Apr 2017 14:34:53 -0400 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OOR016T4S6USH20@mailout3.samsung.com>; Sat, 22 Apr 2017 02:20:54 +0900 (KST) Received: from epsmges1p5.samsung.com (unknown [182.195.42.57]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20170421172054epcas1p141a9e636fdb70cdf9d2844df86c8f5c9~3eV-yGG6_1694716947epcas1p14; Fri, 21 Apr 2017 17:20:54 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id 62.21.03717.67F3AF85; Sat, 22 Apr 2017 02:20:54 +0900 (KST) Received: from epcpsbgm1new.samsung.com (u26.gpu120.samsung.co.kr [203.254.230.26]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20170421172053epcas1p26cbba167969b1bffb48e3b7e6f5c3604~3eV_73AII0971809718epcas1p2f; Fri, 21 Apr 2017 17:20:53 +0000 (GMT) X-AuditID: b6c32a39-f790c6d000000e85-e9-58fa3f76c76a Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id AE.59.05715.57F3AF85; Sat, 22 Apr 2017 02:20:53 +0900 (KST) Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OOR00KJBS560G40@mmp1.samsung.com>; Sat, 22 Apr 2017 02:20:53 +0900 (KST) From: Sylwester Nawrocki To: linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org Cc: inki.dae@samsung.com, sw0312.kim@samsung.com, cw00.choi@samsung.com, javier@osg.samsung.com, krzk@kernel.org, jy0922.shim@samsung.com, broonie@kernel.org, robh+dt@kernel.org, b.zolnierkie@samsung.com, Sylwester Nawrocki Subject: [PATCH RFC 7/7] ARM: dts: samsung: Switch to dedicated Odroid sound card binding Date: Fri, 21 Apr 2017 19:19:51 +0200 Message-id: <1492795191-31298-8-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1492795191-31298-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJIsWRmVeSWpSXmKPExsWy7bCmvm6Z/a8Ig0uPpS2uXDzEZLFxxnpW i6kPn7BZXP/ynNVi/pFzrBZXvr5ns5h0fwKLxZu3a5gsXty7yGJx/vwGdouPPfdYLWac38dk 0br3CLvF4TftQO7kl2wO/B4bPjexeWxa1cnmcb/7OJPHlv677B59W1YxenzeJBfAFsVlk5Ka k1mWWqRvl8CV8WpHE3PBErmKK48/szcwbpToYuTkkBAwkTjc8YgVwhaTuHBvPVsXIxeHkMAO RollSy4yQjjtTBLXZx9hgum4uf04O4gtJLCcUWLzUROIol+MEtdv32ADSbAJGEr0Hu0D6xYR mMcocW3bBLC5zAL/GCWmXZgM1i4sEC2x8/IXMJtFQFVi14mVzCA2r4CbxLspO9kg1slJnDw2 GehADg5OAXeJi0/ZQeZICOxil5j5rJkdJC4hICux6QAzhOki0TzFHaJTWOLV8S3sELa0xKp/ t5ggWvsZJU6saWaEcGYwStxpnwD1mrXE4eMXwYHBLMAn8e5rDyvEUF6JjjYhiBIPibkHpkIN dZSYvuA4C8T3sxgldj56xDyBUWYBI8MqRrHUguLc9NRiwwJTveLE3OLSvHS95PzcTYzgBKFl uYPx2DmfQ4wCHIxKPLwrWH5FCLEmlhVX5h5ilOBgVhLh9dYHCvGmJFZWpRblxxeV5qQWH2KU 5mBREucVXX8tQkggPbEkNTs1tSC1CCbLxMEp1cA4/3Rec+X8kKsHYkqW1Z8w/RT3S2DRAdHw KonnroUrzzOorOjdpnLtVOVP8wfGGjFqipwL+K03yDrt7W65NmtC9JXA3tRzJ3Z5zhB7UFou tfPPlsDMBxIz2jXl5me/ee0XaiUW01tx+p6h7OuA4kMTXGumrz240HyXq7/bTeOUPtP2KyGa pnOVWIozEg21mIuKEwFdCBQzDAMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFIsWRmVeSWpSXmKPExsVy+t9jAd1S+18RBoueKFhcuXiIyWLjjPWs FlMfPmGzuP7lOavF/CPnWC2ufH3PZjHp/gQWizdv1zBZvLh3kcXi/PkN7BYfe+6xWsw4v4/J onXvEXaLw2/agdzJL9kc+D02fG5i89i0qpPN4373cSaPLf132T36tqxi9Pi8SS6ALcrNJiM1 MSW1SCE1Lzk/JTMv3VYpNMRN10JJIS8xN9VWKULXNyRISaEsMacUyDMyQAMOzgHuwUr6dglu Ga92NDEXLJGruPL4M3sD40aJLkZODgkBE4mb24+zQ9hiEhfurWfrYuTiEBJYyiixtb2PBSQh JPCLUWLzbUsQm03AUKL3aB8jSJGIwDxGiQ0n14I5zAL/GCWONfWDdQgLREvsvPwFbCyLgKrE rhMrmUFsXgE3iXdTdrJBrJOTOHlsMmsXIwcHp4C7xMWn7BDL3CSW9l9mncDIu4CRYRWjRGpB ckFxUnquYV5quV5xYm5xaV66XnJ+7iZGcLw8k9rBeHCX+yFGAQ5GJR7eFSy/IoRYE8uKK3MP MUpwMCuJ8HrrA4V4UxIrq1KL8uOLSnNSiw8xmgLdNZFZSjQ5HxjLeSXxhibmJubGBhbmlpYm RkrivI2zn4ULCaQnlqRmp6YWpBbB9DFxcEo1MK48mZJacnzj2b68cx4uH2Nt7DdtexaQd5K5 3WSddPy8f9t67z74fbluZsiPJ6rM/u/Pn0nxqap8cDNYqX3WScVV+ReOLrutctjDpCJPYuG2 /w1nLvf62r5efuF7Sd8txQ/tfoYlr22O/O84/PLG9pkG+zWfrJx6SKDthfE3VY38Uw8lX3o4 KaxXYinOSDTUYi4qTgQAINHRcK0CAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170421172053epcas1p26cbba167969b1bffb48e3b7e6f5c3604 X-Msg-Generator: CA X-Sender-IP: 203.254.230.26 X-Local-Sender: =?UTF-8?B?U3lsd2VzdGVyIE5hd3JvY2tpG1NSUE9MLUtlcm5lbCAoVFAp?= =?UTF-8?B?G+yCvOyEseyghOyekBtTZW5pb3IgU29mdHdhcmUgRW5naW5lZXI=?= X-Global-Sender: =?UTF-8?B?U3lsd2VzdGVyIE5hd3JvY2tpG1NSUE9MLUtlcm5lbCAoVFAp?= =?UTF-8?B?G1NhbXN1bmcgRWxlY3Ryb25pY3MbU2VuaW9yIFNvZnR3YXJlIEVuZ2luZWVy?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 101P X-HopCount: 7 X-CMS-RootMailID: 20170421172053epcas1p26cbba167969b1bffb48e3b7e6f5c3604 X-RootMTR: 20170421172053epcas1p26cbba167969b1bffb48e3b7e6f5c3604 References: <1492795191-31298-1-git-send-email-s.nawrocki@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The new sound card DT binding is used for Odroid XU3 in order to properly support the HDMI audio path. Clocks configuration is changed so the I2S controller is now the bit and the frame clock master with EPLL as the root clock source. Signed-off-by: Sylwester Nawrocki --- arch/arm/boot/dts/exynos4.dtsi | 1 + arch/arm/boot/dts/exynos5420.dtsi | 1 + arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi | 59 ++++++++++++++++++----- 3 files changed, 48 insertions(+), 13 deletions(-) diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index 18def1c..f3dcb7f 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi @@ -761,6 +761,7 @@ phy = <&hdmi_i2c_phy>; power-domains = <&pd_tv>; samsung,syscon-phandle = <&pmu_system_controller>; + #sound-dai-cells = <0>; status = "disabled"; }; diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index 7dc9dc8..c7d29b6 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi @@ -618,6 +618,7 @@ samsung,syscon-phandle = <&pmu_system_controller>; status = "disabled"; power-domains = <&disp_pd>; + #sound-dai-cells = <0>; }; hdmiphy: hdmiphy@145D0000 { diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi index 9493923..84703f7 100644 --- a/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi @@ -11,15 +11,17 @@ * published by the Free Software Foundation. */ +#include + / { sound: sound { - compatible = "simple-audio-card"; + compatible = "samsung,odroid-xu3-audio"; + model = "Odroid-XU3"; - simple-audio-card,name = "Odroid-XU3"; - simple-audio-card,widgets = + samsung,audio-widgets = "Headphone", "Headphone Jack", "Speakers", "Speakers"; - simple-audio-card,routing = + samsung,audio-routing = "Headphone Jack", "HPL", "Headphone Jack", "HPR", "Headphone Jack", "MICBIAS", @@ -27,22 +29,51 @@ "Speakers", "SPKL", "Speakers", "SPKR"; - simple-audio-card,format = "i2s"; - simple-audio-card,bitclock-master = <&link0_codec>; - simple-audio-card,frame-master = <&link0_codec>; + clocks = <&clock CLK_FOUT_EPLL>, <&i2s0 CLK_I2S_RCLK_SRC>; + clock-names = "epll", "i2s_rclk"; - simple-audio-card,cpu { + cpu { sound-dai = <&i2s0 0>; - system-clock-frequency = <19200000>; }; - - link0_codec: simple-audio-card,codec { - sound-dai = <&max98090>; - clocks = <&i2s0 CLK_I2S_CDCLK>; + codec { + sound-dai = <&hdmi>, <&max98090>; }; }; }; +&clock_audss { + assigned-clocks = <&clock_audss EXYNOS_DOUT_SRP>, + <&clock CLK_FOUT_EPLL>; + assigned-clock-rates = <(196608000 / 256)>, + <196608000>; +}; + +&sound { + assigned-clocks = <&clock CLK_MOUT_EPLL>, + <&clock CLK_MOUT_MAU_EPLL>, + <&clock CLK_MOUT_USER_MAU_EPLL>, + <&clock_audss EXYNOS_MOUT_AUDSS>, + <&clock_audss EXYNOS_MOUT_I2S>, + <&clock_audss EXYNOS_DOUT_SRP>, + <&clock_audss EXYNOS_DOUT_AUD_BUS>, + <&clock_audss EXYNOS_DOUT_I2S>; + + assigned-clock-parents = <&clock CLK_FOUT_EPLL>, + <&clock CLK_MOUT_EPLL>, + <&clock CLK_MOUT_MAU_EPLL>, + <&clock CLK_MAU_EPLL>, + <&clock_audss EXYNOS_MOUT_AUDSS>; + + assigned-clock-rates = <0>, + <0>, + <0>, + <0>, + <0>, + <196608000>, + <(196608000 / 2)>, + <196608000>; +}; + &hsi2c_5 { status = "okay"; max98090: max98090@10 { @@ -58,4 +89,6 @@ &i2s0 { status = "okay"; + assigned-clocks = <&i2s0 CLK_I2S_RCLK_SRC>; + assigned-clock-parents = <&clock_audss EXYNOS_SCLK_I2S>; };