From patchwork Wed Feb 7 09:10:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Katsuhiro Suzuki X-Patchwork-Id: 127134 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp272147ljc; Wed, 7 Feb 2018 01:10:56 -0800 (PST) X-Google-Smtp-Source: AH8x227V9NNnBJWiZdGijfG9oz6bjQf+Pcsoh8EjgHvtc/fCLopP5+kMJzctKMHvt/FkjSjPAujA X-Received: by 10.98.98.1 with SMTP id w1mr5321154pfb.9.1517994656653; Wed, 07 Feb 2018 01:10:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517994656; cv=none; d=google.com; s=arc-20160816; b=RjDeaw3P1TGhbBA5TYJEhcFLdIDhBPQ4xhuo7w4dQeaSJUMzkjlD+9gu39MDdRVqC8 Uopsb0AIRjfqOGQQX+4i6cwqSzfEl83D/g64mhskFSHU0oJDmhzBb/6rdrrF+xjOosGr s15KGQaeXucVqW6kjSSI+AbeHig0tY0oM+qcLUkfgccQuW62epM/S4+M5lhSVx+snFfU 3SOmDm25dRnZlEV1CI8l0O/ug/HH7Mk77+EyOZK6scszvktjT/MKZsRnmi8ZLqOVIm64 WwMAXD4/v29kXZfUd+WnhW0RTcGjzVWS4+vjsl4x/7d7RVgOYAhhOyJCxkWP6TCzu8tM /wcA== 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=c69waJ8w732XmlwlDz5avUF53aQ4BKXnN9e1fnPSrbE=; b=xihowf90U2N97UI+JhVjOx2sYR3pjAqyYz29VBk1YGTzweqLZWbrm0vMDVnNiPfkb+ xzVBePSSn9brGfwX6YlrvLd4oz5bVxiJnpbChfvkHA1J32J0fdQuvUY9PW07Yun4AAvX WWOf/qGVVmnfiZIPgqReeye6BQKFxky2wchDdF9oUTSWDAVbqzJ36Wnh1GVYUPx3ixE5 VMWgw/zobm3nWToTC2xZB6G35NMnrnYJU+3BDUnEgRtqgxi6msxhG8qafWqvheUPXRV1 p46n82cjPEOxtbetEq9sitLlEVyneCpywwPsZF51CDDUOM84ey3WLijJ1qPaclI+l1Zr u3lw== 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 c14si839068pfj.132.2018.02.07.01.10.56; Wed, 07 Feb 2018 01:10:56 -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 S932081AbeBGJKu (ORCPT + 10 others); Wed, 7 Feb 2018 04:10:50 -0500 Received: from mx.socionext.com ([202.248.49.38]:3330 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753754AbeBGJKm (ORCPT ); Wed, 7 Feb 2018 04:10:42 -0500 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 07 Feb 2018 18:10:37 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id E5CC418022A; Wed, 7 Feb 2018 18:10:37 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Wed, 7 Feb 2018 18:10:55 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by kinkan.css.socionext.com (Postfix) with ESMTP id BD2A31A124F; Wed, 7 Feb 2018 18:10:37 +0900 (JST) Received: from aegis.e01.socionext.com (unknown [10.213.134.210]) by yuzu.css.socionext.com (Postfix) with ESMTP id 8CD8012062E; Wed, 7 Feb 2018 18:10:37 +0900 (JST) From: Katsuhiro Suzuki To: Mark Brown , alsa-devel@alsa-project.org, Rob Herring , devicetree@vger.kernel.org, Masahiro Yamada Cc: Masami Hiramatsu , Jassi Brar , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Katsuhiro Suzuki Subject: [RESEND PATCH v2 7/9] arm64: dts: uniphier: add sound node for UniPhier Date: Wed, 7 Feb 2018 18:10:47 +0900 Message-Id: <20180207091049.24700-8-suzuki.katsuhiro@socionext.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180207091049.24700-1-suzuki.katsuhiro@socionext.com> References: <20180207091049.24700-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 --- .../boot/dts/socionext/uniphier-ld11-global.dts | 72 ++++++++++++++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi | 31 ++++++++++ .../boot/dts/socionext/uniphier-ld20-global.dts | 72 ++++++++++++++++++++++ arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi | 35 +++++++++++ 4 files changed, 210 insertions(+) -- 2.15.0 diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts b/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts index 2452b2243f42..4eb8d00a8c02 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-ld11-global.dts @@ -37,6 +37,29 @@ device_type = "memory"; reg = <0 0x80000000 0 0x40000000>; }; + + soc@0 { + 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 +95,52 @@ &nand { status = "okay"; }; + +&audio { + i2s_port0: port@0 { + i2s_hdmi: endpoint { + }; + }; + + i2s_port1: port@1 { + i2s_pcmin2: endpoint { + }; + }; + + i2s_port2: port@2 { + i2s_line: endpoint { + remote-endpoint = <&evea_line>; + }; + }; + + i2s_port3: port@3 { + i2s_hpcmout1: endpoint { + }; + }; + + i2s_port4: port@4 { + i2s_pcmout3: endpoint { + remote-endpoint = <&evea_hp>; + }; + }; + + spdif_port0: port@5 { + spdif_hiecout1: endpoint { + remote-endpoint = <&spdif_tx>; + }; + }; +}; + +&evea { + port@0 { + evea_line: endpoint { + remote-endpoint = <&i2s_line>; + }; + }; + + port@1 { + evea_hp: endpoint { + remote-endpoint = <&i2s_pcmout3>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi b/arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi index cd7c2d0a1f64..0e38252c05d7 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi +++ b/arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi @@ -187,6 +187,29 @@ <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>; + }; + + 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>; + }; + adamv@57920000 { compatible = "socionext,uniphier-ld11-adamv", "simple-mfd", "syscon"; @@ -475,3 +498,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..ebcd65631bca 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts @@ -37,6 +37,29 @@ device_type = "memory"; reg = <0 0x80000000 0 0xc0000000>; }; + + soc@0 { + 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 +77,52 @@ &nand { status = "okay"; }; + +&audio { + i2s_port0: port@0 { + i2s_hdmi: endpoint { + }; + }; + + i2s_port1: port@1 { + i2s_pcmin2: endpoint { + }; + }; + + i2s_port2: port@2 { + i2s_line: endpoint { + remote-endpoint = <&evea_line>; + }; + }; + + i2s_port3: port@3 { + i2s_hpcmout1: endpoint { + }; + }; + + i2s_port4: port@4 { + i2s_pcmout3: endpoint { + remote-endpoint = <&evea_hp>; + }; + }; + + spdif_port0: port@5 { + spdif_hiecout1: endpoint { + remote-endpoint = <&spdif_tx>; + }; + }; +}; + +&evea { + port@0 { + evea_line: endpoint { + remote-endpoint = <&i2s_line>; + }; + }; + + port@1 { + evea_hp: endpoint { + remote-endpoint = <&i2s_pcmout3>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi index 8a3276ba2da1..0f74daa7eeb8 100644 --- a/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi +++ b/arch/arm64/boot/dts/socionext/uniphier-ld20.dtsi @@ -287,6 +287,29 @@ <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>; + }; + + 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>; + }; + adamv@57920000 { compatible = "socionext,uniphier-ld20-adamv", "simple-mfd", "syscon"; @@ -528,3 +551,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 */ + }; +};