From patchwork Tue Feb 13 13:01:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Katsuhiro Suzuki X-Patchwork-Id: 128230 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4229605ljc; Tue, 13 Feb 2018 05:02:48 -0800 (PST) X-Google-Smtp-Source: AH8x224Ea0oOzFohn2TDJ5YKZI1mbJNBfUtUqVvN5yOP8DCTh07wHusnHuYbsD00ljR0dvzj+Uft X-Received: by 10.101.64.193 with SMTP id u1mr986893pgp.24.1518526968399; Tue, 13 Feb 2018 05:02:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518526968; cv=none; d=google.com; s=arc-20160816; b=wy7IYin41Ez7ED6kENwbmAaadPAIucAC70ygHLWe17xgeIjc/Vb/QiVOZKJ8c5m1iQ v3KoiHuigzIx5XWDZUyVjxQgzXy3qV0+zfqiMSBP/bnT8iOk6MxpEtry40Wd1EJcBU0p VS9YPAkFPjRnGfazgtnpOS+QjpihV0heYRfn+CxCTW55BvjWzd5Unp+Te5ChGdTCx3hd tg812kL/9tyLTegJYQ6x9XvyJAyDu6bkz7mL1fAs5t2rCGwPgO77LFRusq7WFN3u+5+j m7CR19Lg5Q6c7sz1ys+QYqkneF2abxd0KfRuudPHvNG6ua8XP/z416mW0HUx53zw3iCs uKyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=wcGCeDgzd7/Mq2+EUWo7cuB3pKUQlamHTZfmgqhP/6g=; b=K9snQFx8zold4PGWNcHj0mCYVb0XvD2+ugH03GS53hOPBkqk08nJAU0ncsrtOJbLmR vvUBN369D3dDXUFtgUfeQaoSfobG6DfjFsDNiHXE3pElzAjMOkQIQxU0bGnJc/lz9Ik4 UxlpBBGpDCSK4oOaiNrsGp/urnWI7VSPBHRXr/Z7wSz8NS0b6XBpC2XJi8+d67FR8djI Q6o0+OdWTMIz25IyrIUPPyRR1Dm3CLoliOGnfelGZbZQxNe7WZXjs8N2n/uWAJInPw06 bogCdIxm9s3GdyAYibUaFSylwvjDWHjjeQgO7v2g9f1bmYVuqTouIhvxvDG2lKazuUep vcYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x6si743890pgc.357.2018.02.13.05.02.48; Tue, 13 Feb 2018 05:02:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935317AbeBMNCo (ORCPT + 28 others); Tue, 13 Feb 2018 08:02:44 -0500 Received: from mx.socionext.com ([202.248.49.38]:19017 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935118AbeBMNCF (ORCPT ); Tue, 13 Feb 2018 08:02:05 -0500 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 13 Feb 2018 22:02:03 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id B073A600D0; Tue, 13 Feb 2018 22:02:03 +0900 (JST) Received: from 172.31.9.53 (172.31.9.53) by m-FILTER with ESMTP; Tue, 13 Feb 2018 22:02:34 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by iyokan.css.socionext.com (Postfix) with ESMTP id 3F48E40372; Tue, 13 Feb 2018 22:02:03 +0900 (JST) Received: from aegis.e01.socionext.com (unknown [10.213.134.210]) by yuzu.css.socionext.com (Postfix) with ESMTP id 166031209D6; Tue, 13 Feb 2018 22:02:03 +0900 (JST) From: Katsuhiro Suzuki To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Masahiro Yamada Cc: alsa-devel@alsa-project.org, Masami Hiramatsu , Jassi Brar , linux-kernel@vger.kernel.org, Katsuhiro Suzuki Subject: [PATCH v3 1/3] arm64: dts: uniphier: add sound node for UniPhier Date: Tue, 13 Feb 2018 22:01:54 +0900 Message-Id: <20180213130156.27827-2-suzuki.katsuhiro@socionext.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180213130156.27827-1-suzuki.katsuhiro@socionext.com> References: <20180213130156.27827-1-suzuki.katsuhiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds audio controller, codec and simple card node of UniPhier AIO sound system for LD11/20 SoCs. Signed-off-by: Katsuhiro Suzuki --- Changes in v3: - Move sound and spdif-out nodes to root from soc node - Use phandle of endpoint directly instead of port node - Describe connections between AIO and EVEA in *.dtsi because these cores are in inside of SoC --- .../boot/dts/socionext/uniphier-ld11-global.dts | 25 ++++++ arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 92 +++++++++++++++++++++ .../boot/dts/socionext/uniphier-ld20-global.dts | 25 ++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 96 ++++++++++++++++++++++ 4 files changed, 238 insertions(+) -- 2.15.1 diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts b/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts index 2452b2243f42..fb6bf435dc96 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts @@ -37,6 +37,27 @@ device_type = "memory"; reg = <0 0x80000000 0 0x40000000>; }; + + sound { + compatible = "audio-graph-card"; + label = "UniPhier LD11"; + widgets = "Headphone", "Headphone Jack"; + + dais = <&i2s_port2 + &i2s_port4 + &spdif_port0>; + }; + + spdif-out { + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + + port@0 { + spdif_tx: endpoint { + remote-endpoint = <&spdif_hiecout1>; + }; + }; + }; }; &serial0 { @@ -72,3 +93,7 @@ &nand { status = "okay"; }; + +&spdif_hiecout1 { + remote-endpoint = <&spdif_tx>; +}; diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi b/arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi index cd7c2d0a1f64..f4eb1c6353a5 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi +++ b/arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi @@ -187,6 +187,90 @@ <21 217 3>; }; + audio: audio@56000000 { + compatible = "socionext,uniphier-ld11-aio"; + reg = <0x56000000 0x80000>; + interrupts = <0 144 4>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_aout>; + clock-names = "aio"; + clocks = <&sys_clk 40>; + reset-names = "aio"; + resets = <&sys_rst 40>; + #sound-dai-cells = <1>; + + i2s_port0: port@0 { + i2s_hdmi: endpoint { + }; + }; + + i2s_port1: port@1 { + i2s_pcmin2: endpoint { + }; + }; + + i2s_port2: port@2 { + i2s_line: endpoint { + dai-format = "i2s"; + remote-endpoint = <&evea_line>; + }; + }; + + i2s_port3: port@3 { + i2s_hpcmout1: endpoint { + }; + }; + + i2s_port4: port@4 { + i2s_hp: endpoint { + dai-format = "i2s"; + remote-endpoint = <&evea_hp>; + }; + }; + + spdif_port0: port@5 { + spdif_hiecout1: endpoint { + }; + }; + + src_port0: port@6 { + i2s_epcmout2: endpoint { + }; + }; + + src_port1: port@7 { + i2s_epcmout3: endpoint { + }; + }; + + comp_spdif_port0: port@8 { + comp_spdif_hiecout1: endpoint { + }; + }; + }; + + evea: codec@57900000 { + compatible = "socionext,uniphier-evea"; + reg = <0x57900000 0x1000>; + clock-names = "evea", "exiv"; + clocks = <&sys_clk 41>, <&sys_clk 42>; + reset-names = "evea", "exiv", "adamv"; + resets = <&sys_rst 41>, <&sys_rst 42>, <&adamv_rst 0>; + #sound-dai-cells = <1>; + + evea_line_port: port@0 { + evea_line: endpoint { + remote-endpoint = <&i2s_line>; + }; + }; + + evea_hp_port: port@1 { + evea_hp: endpoint { + remote-endpoint = <&i2s_hp>; + }; + }; + }; + adamv@57920000 { compatible = "socionext,uniphier-ld11-adamv", "simple-mfd", "syscon"; @@ -475,3 +559,11 @@ }; #include "uniphier-pinctrl.dtsi" + +&pinctrl_aout { + drive-strength = <4>; /* default: 4mA */ + group_1 { + pins = "AO1ARC"; + drive-strength = <8>; /* 8mA */ + }; +}; diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts b/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts index fc2bc9d75d35..2d49163cfde4 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts @@ -37,6 +37,27 @@ device_type = "memory"; reg = <0 0x80000000 0 0xc0000000>; }; + + sound { + compatible = "audio-graph-card"; + label = "UniPhier LD20"; + widgets = "Headphone", "Headphone Jack"; + + dais = <&i2s_port2 + &i2s_port4 + &spdif_port0>; + }; + + spdif-out { + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0>; + + port@0 { + spdif_tx: endpoint { + remote-endpoint = <&spdif_hiecout1>; + }; + }; + }; }; &serial0 { @@ -54,3 +75,7 @@ &nand { status = "okay"; }; + +&spdif_hiecout1 { + remote-endpoint = <&spdif_tx>; +}; diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi index 8a3276ba2da1..9d0f23f100df 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi @@ -287,6 +287,90 @@ <21 217 3>; }; + audio: audio@56000000 { + compatible = "socionext,uniphier-ld20-aio"; + reg = <0x56000000 0x80000>; + interrupts = <0 144 4>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_aout>; + clock-names = "aio"; + clocks = <&sys_clk 40>; + reset-names = "aio"; + resets = <&sys_rst 40>; + #sound-dai-cells = <1>; + + i2s_port0: port@0 { + i2s_hdmi: endpoint { + }; + }; + + i2s_port1: port@1 { + i2s_pcmin2: endpoint { + }; + }; + + i2s_port2: port@2 { + i2s_line: endpoint { + dai-format = "i2s"; + remote-endpoint = <&evea_line>; + }; + }; + + i2s_port3: port@3 { + i2s_hpcmout1: endpoint { + }; + }; + + i2s_port4: port@4 { + i2s_hp: endpoint { + dai-format = "i2s"; + remote-endpoint = <&evea_hp>; + }; + }; + + spdif_port0: port@5 { + spdif_hiecout1: endpoint { + }; + }; + + src_port0: port@6 { + i2s_epcmout2: endpoint { + }; + }; + + src_port1: port@7 { + i2s_epcmout3: endpoint { + }; + }; + + comp_spdif_port0: port@8 { + comp_spdif_hiecout1: endpoint { + }; + }; + }; + + evea: codec@57900000 { + compatible = "socionext,uniphier-evea"; + reg = <0x57900000 0x1000>; + clock-names = "evea", "exiv"; + clocks = <&sys_clk 41>, <&sys_clk 42>; + reset-names = "evea", "exiv", "adamv"; + resets = <&sys_rst 41>, <&sys_rst 42>, <&adamv_rst 0>; + #sound-dai-cells = <1>; + + evea_line_port: port@0 { + evea_line: endpoint { + remote-endpoint = <&i2s_line>; + }; + }; + + evea_hp_port: port@1 { + evea_hp: endpoint { + remote-endpoint = <&i2s_hp>; + }; + }; + }; + adamv@57920000 { compatible = "socionext,uniphier-ld20-adamv", "simple-mfd", "syscon"; @@ -528,3 +612,15 @@ }; #include "uniphier-pinctrl.dtsi" + +&pinctrl_aout { + drive-strength = <4>; /* default: 3.5mA */ + group_1 { + pins = "AO1DACCK"; + drive-strength = <5>; /* 5mA */ + }; + group_2 { + pins = "AO1ARC"; + drive-strength = <11>; /* 11mA */ + }; +};