From patchwork Fri Nov 3 16:43:13 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: 10040705 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 E2A76602D8 for ; Fri, 3 Nov 2017 16:44:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D33FA29669 for ; Fri, 3 Nov 2017 16:44:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7BA4296FE; Fri, 3 Nov 2017 16:44:28 +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 4484129669 for ; Fri, 3 Nov 2017 16:44:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756120AbdKCQo0 (ORCPT ); Fri, 3 Nov 2017 12:44:26 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:64695 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755932AbdKCQoY (ORCPT ); Fri, 3 Nov 2017 12:44:24 -0400 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20171103164422epoutp011fa9e0863b0e4c7e54141916eb0e6024~zoSDTSo5D0517805178epoutp01U; Fri, 3 Nov 2017 16:44:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20171103164422epoutp011fa9e0863b0e4c7e54141916eb0e6024~zoSDTSo5D0517805178epoutp01U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1509727462; bh=P9XRxXGXcV4A4BFvX3gxzh8HXqoMRxANJBCl9TjwjUg=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=EWvwDXhx5LBKR+cwsDazrAE6MNY/1PJ6usvDx3tYDmIbPWYyQSsxdrr2FAeQRfOct qGzjT2v+S6im+MvtVzxOex6eSjytagHYz3i+jbXKzRyaydcxCr9qOMHhQQVDAVnOoh CZQStqTcsKjzLQSKTpaZkYVZxmSrdblpn9tfbsl8= Received: from epsmges2p1.samsung.com (unknown [182.195.42.69]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20171103164421epcas2p19e27b6a903bae06481e3c8158d475826~zoSC3j6WK0662806628epcas2p1m; Fri, 3 Nov 2017 16:44:21 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 94.31.04393.5EC9CF95; Sat, 4 Nov 2017 01:44:21 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20171103164421epcas2p349b51fda04251253c1f789ad1d298424~zoSCRYn1g1831518315epcas2p36; Fri, 3 Nov 2017 16:44:21 +0000 (GMT) X-AuditID: b6c32a45-34bff70000001129-7e-59fc9ce52dcd Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 91.95.03859.5EC9CF95; Sat, 4 Nov 2017 01:44:21 +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 <0OYU00G6FP447J60@mmp1.samsung.com>; Sat, 04 Nov 2017 01:44:21 +0900 (KST) From: Sylwester Nawrocki To: krzk@kernel.org Cc: kgene@kernel.org, mihailescu2m@gmail.com, m.szyprowski@samsung.com, b.zolnierkie@samsung.com, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Sylwester Nawrocki Subject: [PATCH 1/2] ARM: dts: exynos: Switch to dedicated Odroid-XU3 sound card binding Date: Fri, 03 Nov 2017 17:43:13 +0100 Message-id: <20171103164314.14919-2-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.14.2 In-reply-to: <20171103164314.14919-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMIsWRmVeSWpSXmKPExsWy7bCmhe7TOX8iDZavN7XYOGM9q8X8I+dY Lfofv2a2OH9+A7vFpsfXWC0u75rDZjHj/D4mi7VH7rJbrJ/2k9Xi8Jt2Vgcuj52z7rJ7bFrV yeaxeUm9R9+WVYwenzfJBbBGcdmkpOZklqUW6dslcGX8mriSsWC9QsW0HX4NjP8luxg5OSQE TCQar29j62Lk4hAS2MEoMaNtFSuE851RYvKRZcwwVbP+tkNV7WaUOLhzLxOE84tR4srz6Uwg VWwChhK9R/sYQWwRAWGJe0uXs4MUMQtMY5JYNfUgC0hCWCBKYuq2fWBFLAKqEm13/wA1c3Dw ClhLnL0JdZO8xPsF98FKOAVsJL59g7hPQmABm8Sdr1MYIYpcJNoXPoA6T1ji1fEt7BC2tMSz VRsZIRr6GSVOrGmGcmYwStxpn8AEUWUtcfj4RVYQm1mAT6Lj8F92kCskBHglOtqEIEo8JBre 3IIa6iix620DNGCAhjYsu8Q4gVFqASPDKkax1ILi3PTUYqMCQ73ixNzi0rx0veT83E2M4KjV ct3BOOOczyFGAQ5GJR7eDRN+RwqxJpYVV+YeYpTgYFYS4X1Z9CdSiDclsbIqtSg/vqg0J7X4 EKM0B4uSOG/9tmsRQgLpiSWp2ampBalFMFkmDk6pBsb6xS23zv9POiwc+8T6mqtaQcSPLf83 pR9hYbJ8lsxx8nfqHZnVr+0uahlUHd7C03jgRZD322f/RBjdSo0vePrHWJhJnWmdUFDKbGKh 8ylubrWuClv2Mglt750rV3TZdbvf/bpv/WLO86FTjrxr+OQ0Y4eqQZ3Rs8OXpWZJP4tlauhs YXpgHabEUpyRaKjFXFScCABlNTn51gIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJLMWRmVeSWpSXmKPExsVy+t9jAd2nc/5EGuw5IGyxccZ6Vov5R86x WvQ/fs1scf78BnaLTY+vsVpc3jWHzWLG+X1MFmuP3GW3WD/tJ6vF4TftrA5cHjtn3WX32LSq k81j85J6j74tqxg9Pm+SC2CN4rJJSc3JLEst0rdL4Mr4NXElY8F6hYppO/waGP9LdjFyckgI mEjM+tvO1sXIxSEksJNRYvmdrVDOL0aJtUeaWUCq2AQMJXqP9jGC2CICwhL3li5nByliFpjG JHFr8jWwhLBAlMTUbfvAbBYBVYm2u3+Yuhg5OHgFrCXO3oTaJi/xfsF9sBJOARuJb9+2sYHY QkAlxxbPZJ7AyLOAkWEVo2RqQXFuem6xUYFRXmq5XnFibnFpXrpecn7uJkZggG07rNW/g/Hx kvhDjAIcjEo8vByTf0cKsSaWFVfmHmKU4GBWEuF9WfQnUog3JbGyKrUoP76oNCe1+BCjNAeL kjgvf/6xSCGB9MSS1OzU1ILUIpgsEwenVAOj20ebVWWGcQZtxy9nb9UuZ9+/aHN2m6Hx6n9W /ieMitl6Vmxe/uqR+hnBEwvel18+6Ca9W2fRi/1pjo+fHZ70z0/OUmfvuoMPZvLcMbRSuyWh 8ay/WKY08OKyh52NnZbrC/Tm+xT/9bXedKDrocVLzw27+vy6bpdy9N1ZoviaJXj9b72ch+Z/ lViKMxINtZiLihMBBpVyliwCAAA= X-CMS-MailID: 20171103164421epcas2p349b51fda04251253c1f789ad1d298424 X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20171103164421epcas2p349b51fda04251253c1f789ad1d298424 X-RootMTR: 20171103164421epcas2p349b51fda04251253c1f789ad1d298424 References: <20171103164314.14919-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 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 | 64 +++++++++++++++-------- 3 files changed, 43 insertions(+), 23 deletions(-) diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index 5739389f5bb8..f82647c0adb1 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi @@ -755,6 +755,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 88e5d6d3f901..6f0414cce854 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 da3141a307d5..f0cfb0796923 100644 --- a/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi @@ -1,5 +1,5 @@ /* - * Hardkernel Odroid XU3 Audio Codec device tree source + * Hardkernel Odroid XU3 audio subsystem device tree source * * Copyright (c) 2015 Krzysztof Kozlowski * Copyright (c) 2014 Collabora Ltd. @@ -15,13 +15,13 @@ / { 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", @@ -29,31 +29,20 @@ "Speakers", "SPKL", "Speakers", "SPKR"; - simple-audio-card,format = "i2s"; - simple-audio-card,bitclock-master = <&link0_codec>; - simple-audio-card,frame-master = <&link0_codec>; - - 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_MOUT_AUDSS>, - <&clock_audss EXYNOS_MOUT_I2S>, - <&clock_audss EXYNOS_DOUT_AUD_BUS>; - assigned-clock-parents = <&clock CLK_FIN_PLL>, - <&clock_audss EXYNOS_MOUT_AUDSS>; - assigned-clock-rates = <0>, - <0>, - <19200000>; + assigned-clocks = <&clock_audss EXYNOS_DOUT_SRP>, + <&clock CLK_FOUT_EPLL>; + assigned-clock-rates = <(196608000 / 256)>, + <196608000>; }; &hsi2c_5 { @@ -72,3 +61,32 @@ &i2s0 { status = "okay"; }; + +&sound { + assigned-clocks = <&i2s0 CLK_I2S_RCLK_SRC>, + <&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_audss EXYNOS_SCLK_I2S>, + <&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>, + <0>, + <196608001>, + <(196608002 / 2)>, + <196608000>; +};