From patchwork Thu Feb 8 18:44:08 2018 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: 10207783 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 1BA9660327 for ; Thu, 8 Feb 2018 18:44:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BD9029615 for ; Thu, 8 Feb 2018 18:44:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F35922962D; Thu, 8 Feb 2018 18:44:50 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 7B26429615 for ; Thu, 8 Feb 2018 18:44:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752037AbeBHSot (ORCPT ); Thu, 8 Feb 2018 13:44:49 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:30043 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751094AbeBHSos (ORCPT ); Thu, 8 Feb 2018 13:44:48 -0500 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20180208184446epoutp01a9f55a04b8a4cd245a93e52401729daf~Rbf32bbdi0927909279epoutp01Z; Thu, 8 Feb 2018 18:44:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20180208184446epoutp01a9f55a04b8a4cd245a93e52401729daf~Rbf32bbdi0927909279epoutp01Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1518115486; bh=tsw2c0MRkolKdErFUytMAbxtvAjewg4ZMyC1VeWIz18=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=ibQkpK8SMM5kqLjDpoKgxHA8W0XYl7j1/ee6HibTclzkEF7FHF8whOOPk2fUWkVyv WxPJPLxux4c3HYWPgR81vo60A3QOS3qyHhjRI2YQQGhDhZ+nbkl7DPd9oSw3IQgqwS scTzgP7OO80/ASjQmW6EECtjujdNbqXSBkyfnoyQ= Received: from epsmges2p1.samsung.com (unknown [182.195.42.69]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20180208184446epcas2p2b8680669a161c922d107f4a7022d6f9f~Rbf3r2h2X2793127931epcas2p2b; Thu, 8 Feb 2018 18:44:46 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 9A.69.04131.E9A9C7A5; Fri, 9 Feb 2018 03:44:46 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20180208184446epcas2p2a5a59112f29b97dad9deb820699eb741~Rbf3dyjds1952319523epcas2p2o; Thu, 8 Feb 2018 18:44:46 +0000 (GMT) X-AuditID: b6c32a45-3ebff70000001023-6b-5a7c9a9efb49 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id B5.B5.03890.E9A9C7A5; Fri, 9 Feb 2018 03:44:46 +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 <0P3U00M8HHDN1B50@mmp1.samsung.com>; Fri, 09 Feb 2018 03:44:46 +0900 (KST) From: Sylwester Nawrocki To: krzk@kernel.org Cc: kgene@kernel.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, jcsing.lee@samsung.com, linux-arm-kernel@lists.infradead.org, b.zolnierkie@samsung.com, m.szyprowski@samsung.com, Sylwester Nawrocki Subject: [PATCH v2 3/3] ARM: dts: exynos: Add support for HDMI audio on exynos5433-tm2 Date: Thu, 08 Feb 2018 19:44:08 +0100 Message-id: <20180208184408.24185-3-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.14.2 In-reply-to: <20180208184408.24185-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFIsWRmVeSWpSXmKPExsWy7bCmue68WTVRBld2altsnLGe1WL+kXOs Fm/3dzNb9D9+zWxx/vwGdotNj6+xWsw4v4/JYu2Ru+wWh9+0szpwemxa1cnmsXlJvUffllWM Hp83yQWwRHHZpKTmZJalFunbJXBlHO7oYSm4JldxrX8/awPjUckuRk4OCQETia3NN5i6GLk4 hAR2MEocvf0AyvnOKDF1z2LGLkYOsKqLX+0h4rsZJSa0bWSHcH4xSrzcuJwZZBSbgKFE79E+ RhBbREBY4t7S5WBFzAI/GCV2fZnOCpIQFoiQOPLwMjuIzSKgKnG48zETiM0rYC0x91sPI8RN 8hLvF9wHszkFbCSmzNjADDJIQmAKm8T99rtQRS4SfzZsYIGwhSVeHd/CDmFLSzxbtZERoqGf UeLj8f0sEM5qRonX33axQlRZSxw+fhHMZhbgk+g4/Jcd4lFeiY42IYgSD4nDN5qhhjpKzNr+ HxowQEM3//nNNoFRagEjwypGsdSC4tz01GKjAkO94sTc4tK8dL3k/NxNjOAY1XLdwTjjnM8h RgEORiUe3gkxNVFCrIllxZW5hxglOJiVRHh1m4FCvCmJlVWpRfnxRaU5qcWHGKU5WJTEedsC XKKEBNITS1KzU1MLUotgskwcnFINjLsz7m4J0hTO2azNeovhxvtatT8rpwjsZ7RX3t1ySFqq nl2vTbB7VoLgQaP6oNN8gdXXVXonXuQ+M3Xdz2yvqu/ZzSUurvnJSpGeRWx9oq0c1Zk5AaoH g2xkniuISbptFEjeySH8MEujpurtfefyil9uYbt5Zje6FGnMmvglc+el/4ecr7IrsRRnJBpq MRcVJwIAXgMKPM0CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprALMWRmVeSWpSXmKPExsVy+t9jAd15s2qiDNaelLDYOGM9q8X8I+dY Ld7u72a26H/8mtni/PkN7BabHl9jtZhxfh+Txdojd9ktDr9pZ3Xg9Ni0qpPNY/OSeo++LasY PT5vkgtgieKySUnNySxLLdK3S+DKONzRw1JwTa7iWv9+1gbGo5JdjBwcEgImEhe/2ncxcnEI CexklDixo4cVwvnFKLFj9zbmLkZODjYBQ4neo32MILaIgLDEvaXL2UGKmAV+MEp83rURLCEs ECFx5OFldhCbRUBV4nDnYyYQm1fAWmLutx6wGgkBeYn3C+6D2ZwCNhJTZmwAWyAEVHO7YSXT BEaeBYwMqxglUwuKc9Nzi40KjPJSy/WKE3OLS/PS9ZLzczcxAsNp22Gt/h2Mj5fEH2IU4GBU 4uF9EVcTJcSaWFZcmXuIUYKDWUmEV7cZKMSbklhZlVqUH19UmpNafIhRmoNFSZyXP/9YpJBA emJJanZqakFqEUyWiYNTqoGx1mibmdXKhQmnnSwkqqqf123+fc7ZIF4so3HiQZMvSw9+/bPx 64LHPJfyhRzr5FgC3i/1992VG73TVlvWSObnKw7FCXUl1jk2GcdfnF6b2fzPQ5L1vf0r4+NO JSsYVx/bc/7k3KqQFaHmUduE0xS4smNDL5+/M8uVOf/drCSrq7qr1H4rv3uixFKckWioxVxU nAgAX5DRryMCAAA= X-CMS-MailID: 20180208184446epcas2p2a5a59112f29b97dad9deb820699eb741 X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20180208184446epcas2p2a5a59112f29b97dad9deb820699eb741 X-RootMTR: 20180208184446epcas2p2a5a59112f29b97dad9deb820699eb741 References: <20180208184408.24185-1-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 This patch updates the sound node of the exynos5433-tm2 board and adds clock tree configuration in order to support HDMI sound. Signed-off-by: Sylwester Nawrocki --- Changes since v1: - dropped unnecessary assigned-clock* properties for AUD PLL in cmu_top node, - changed default AUD PLL frequency so it is withing recommended 252...400 MHz range. --- .../boot/dts/exynos/exynos5433-tm2-common.dtsi | 60 ++++++++++++++++++++-- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 1 + 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi index a77462da4a36..5599f1941c64 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi @@ -14,6 +14,7 @@ #include #include #include +#include / { aliases { @@ -112,8 +113,8 @@ sound { compatible = "samsung,tm2-audio"; - audio-codec = <&wm5110>; - i2s-controller = <&i2s0>; + audio-codec = <&wm5110>, <&hdmi>; + i2s-controller = <&i2s0 0>, <&i2s1 0>; audio-amplifier = <&max98504>; mic-bias-gpios = <&gpr3 2 GPIO_ACTIVE_HIGH>; model = "wm5110"; @@ -216,9 +217,56 @@ status = "okay"; }; +#define TM2_DEF_AUD_PLL_RATE 393216003U + &cmu_aud { - assigned-clocks = <&cmu_aud CLK_MOUT_AUD_PLL_USER>; - assigned-clock-parents = <&cmu_top CLK_FOUT_AUD_PLL>; + assigned-clocks = <&cmu_aud CLK_MOUT_AUD_PLL_USER>, + <&cmu_aud CLK_MOUT_SCLK_AUD_I2S>, + <&cmu_aud CLK_MOUT_SCLK_AUD_PCM>, + <&cmu_top CLK_MOUT_AUD_PLL>, + <&cmu_top CLK_MOUT_AUD_PLL_USER_T>, + <&cmu_top CLK_MOUT_SCLK_AUDIO0>, + <&cmu_top CLK_MOUT_SCLK_AUDIO1>, + <&cmu_top CLK_MOUT_SCLK_SPDIF>, + + <&cmu_aud CLK_DIV_AUD_CA5>, + <&cmu_aud CLK_DIV_ACLK_AUD>, + <&cmu_aud CLK_DIV_PCLK_DBG_AUD>, + <&cmu_aud CLK_DIV_SCLK_AUD_I2S>, + <&cmu_aud CLK_DIV_SCLK_AUD_PCM>, + <&cmu_aud CLK_DIV_SCLK_AUD_SLIMBUS>, + <&cmu_aud CLK_DIV_SCLK_AUD_UART>, + <&cmu_top CLK_DIV_SCLK_AUDIO0>, + <&cmu_top CLK_DIV_SCLK_AUDIO1>, + <&cmu_top CLK_DIV_SCLK_PCM1>, + <&cmu_top CLK_DIV_SCLK_I2S1>; + + assigned-clock-parents = <&cmu_top CLK_FOUT_AUD_PLL>, + <&cmu_aud CLK_MOUT_AUD_PLL_USER>, + <&cmu_aud CLK_MOUT_AUD_PLL_USER>, + <&cmu_top CLK_FOUT_AUD_PLL>, + <&cmu_top CLK_MOUT_AUD_PLL>, + <&cmu_top CLK_MOUT_AUD_PLL_USER_T>, + <&cmu_top CLK_MOUT_AUD_PLL_USER_T>, + <&cmu_top CLK_SCLK_AUDIO0>; + + assigned-clock-rates = <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>, + <((TM2_DEF_AUD_PLL_RATE / 2) + 1)>, + <((TM2_DEF_AUD_PLL_RATE / 6) + 1)>, + <((TM2_DEF_AUD_PLL_RATE / 12) + 1)>, + <((TM2_DEF_AUD_PLL_RATE / 8) + 1)>, + <((TM2_DEF_AUD_PLL_RATE / 192) + 1)>, + <((TM2_DEF_AUD_PLL_RATE / 16) + 1)>, + <((TM2_DEF_AUD_PLL_RATE / 2) + 1)>, + <((TM2_DEF_AUD_PLL_RATE / 16) + 1)>, + <((TM2_DEF_AUD_PLL_RATE / 4) + 1)>, + <((TM2_DEF_AUD_PLL_RATE / 192) + 1)>, + <((TM2_DEF_AUD_PLL_RATE / 8) + 1)>; +}; + +&i2s1 { + assigned-clocks = <&i2s1 CLK_I2S_RCLK_SRC>; + assigned-clock-parents = <&cmu_peric CLK_SCLK_I2S1>; }; &cmu_fsys { @@ -838,6 +886,10 @@ status = "okay"; }; +&i2s1 { + status = "okay"; +}; + &mshc_0 { status = "okay"; mmc-hs200-1_8v; diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi index 2b73bd86bc56..c0231d077fa6 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi @@ -969,6 +969,7 @@ ddc = <&hsi2c_11>; samsung,syscon-phandle = <&pmu_system_controller>; samsung,sysreg-phandle = <&syscon_disp>; + #sound-dai-cells = <0>; status = "disabled"; };