Received: by 10.223.185.116 with SMTP id b49csp1255268wrg; Wed, 14 Feb 2018 14:09:20 -0800 (PST) X-Google-Smtp-Source: AH8x225Jm96wC0T+fgMFFasQT6dacL3nEdjLmorcQ4NbpE82OrU1nFVGNoWTwyCdWwe4MzU2BJZU X-Received: by 10.99.112.20 with SMTP id l20mr414013pgc.412.1518646160265; Wed, 14 Feb 2018 14:09:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518646160; cv=none; d=google.com; s=arc-20160816; b=WPxCp5FSGeQGrpIG0652yPC7z9ZvpLWgkGB2jEU049RiQEA6CtD01S8Aj0waz7P3T/ uZr9EW7h7s2peYY5AtZ3GVB2KUBVtxsyPxLx+I96/mauz3Gc2ubPoIe1Rxn97cySTloU GUfX2QcLLW/tehCEMHfKTNjwSFqNtdNDUBW7ac3ar82O8xOwfOhoVlhxi1yeX0uvJUT3 /gaYMFfCO6E51/y74RjRGpwjt3i72bjxv1ktfvX6oZGfrCyvyK0t9cFZQs42YcLETKGW 5y8kH9lOJNoHnoSQWAR7QEndKSbPpTFZr+kfcRcojuMuHeGO0DyeTJVKb/6Cx51vUBO8 +CUA== 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=sCAR8W+z1tblfRC0cu4xMaadnDHj4YBWpfxphkgnAqQ=; b=FXd52r7hGTfnpNZaG+RC6sgYy1id6KfuWog2BIWwKhs7cMDYJcHlCNmA0o4ZDxTZUv dsFewIfYuewY8VtDdbi+RjBBIsO56UFrUUJ2VjEzDTGIChoZdz2w4RVN/ZMjFm+o0W2E x7DtOEn9sGK07yy+emlT0hax4aofxea++z1CTEI60S9Qh3jNqjj6qedTfSqVkaaRSWTP wk91zWSsV512i4lq0/1mplDl3mW1yGIxc13YPdGhHvjuOVhTvWewNrD/Sm6TJKbcY77F ZFP4lSC8PNBleiMTjZDq71V4BWNLNlRfgAxpUNcnrvH79ccyHjal3pDq8AwE1HEXl4sa oKwg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12-v6si420574pla.564.2018.02.14.14.09.05; Wed, 14 Feb 2018 14:09:20 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031812AbeBNWIS (ORCPT + 99 others); Wed, 14 Feb 2018 17:08:18 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:51848 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031754AbeBNWIB (ORCPT ); Wed, 14 Feb 2018 17:08:01 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 4696A270C37 From: Sebastian Reichel To: Sebastian Reichel , Liam Girdwood , Mark Brown , Rob Herring , Tony Lindgren Cc: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel Subject: [PATCHv4 4/4] ARM: dts: omap4-droid4: add soundcard Date: Wed, 14 Feb 2018 23:07:41 +0100 Message-Id: <20180214220741.28306-5-sebastian.reichel@collabora.co.uk> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180214220741.28306-1-sebastian.reichel@collabora.co.uk> References: <20180214220741.28306-1-sebastian.reichel@collabora.co.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add sound support to Motorola Droid 4 using simple-soundcard and CPCAP's audio codec. This does not yet correctly represent the whole audio routing, since McBSP3 is also connected to Bluetooth and MDM6600 modem (and probably also 4G modem). These extra DAI links are not yet supported and have not been tested. Signed-off-by: Sebastian Reichel --- arch/arm/boot/dts/omap4-droid4-xt894.dts | 84 ++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts index e11a24397163..bfb0e0ddc269 100644 --- a/arch/arm/boot/dts/omap4-droid4-xt894.dts +++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts @@ -118,6 +118,26 @@ }; }; + + soundcard { + compatible = "audio-graph-card"; + label = "Droid 4 Audio"; + + simple-graph-card,widgets = + "Speaker", "Earpiece", + "Speaker", "Loudspeaker", + "Headphone", "Headphone Jack", + "Microphone", "Internal Mic"; + + simple-graph-card,routing = + "Earpiece", "EP", + "Loudspeaker", "SPKR", + "Headphone Jack", "HSL", + "Headphone Jack", "HSR", + "MICR", "Internal Mic"; + + dais = <&mcbsp2_port>, <&mcbsp3_port>; + }; }; &dss { @@ -515,6 +535,24 @@ OMAP4_IOPAD(0x112, PIN_OUTPUT_PULLUP | MUX_MODE5) /* uart4_rts */ >; }; + + mcbsp2_pins: pinmux_mcbsp2_pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x0f6, PIN_INPUT | MUX_MODE0) /* abe_mcbsp2_clkx */ + OMAP4_IOPAD(0x0f8, PIN_INPUT | MUX_MODE0) /* abe_mcbsp2_dr */ + OMAP4_IOPAD(0x0fa, PIN_OUTPUT | MUX_MODE0) /* abe_mcbsp2_dx */ + OMAP4_IOPAD(0x0fc, PIN_INPUT | MUX_MODE0) /* abe_mcbsp2_fsx */ + >; + }; + + mcbsp3_pins: pinmux_mcbsp3_pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x106, PIN_INPUT | MUX_MODE1) /* abe_mcbsp3_dr */ + OMAP4_IOPAD(0x108, PIN_OUTPUT | MUX_MODE1) /* abe_mcbsp3_dx */ + OMAP4_IOPAD(0x10a, PIN_INPUT | MUX_MODE1) /* abe_mcbsp3_clkx */ + OMAP4_IOPAD(0x10c, PIN_INPUT | MUX_MODE1) /* abe_mcbsp3_fsx */ + >; + }; }; &omap4_pmx_wkup { @@ -600,3 +638,49 @@ "0", "0", "1"; }; }; + +&mcbsp2 { + #sound-dai-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mcbsp2_pins>; + status = "okay"; + + mcbsp2_port: port { + cpu_dai2: endpoint { + dai-format = "i2s"; + remote-endpoint = <&cpcap_audio_codec0>; + frame-master = <&cpcap_audio_codec0>; + bitclock-master = <&cpcap_audio_codec0>; + }; + }; +}; + +&mcbsp3 { + #sound-dai-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mcbsp3_pins>; + status = "okay"; + + mcbsp3_port: port { + cpu_dai3: endpoint { + dai-format = "dsp_a"; + frame-master = <&cpcap_audio_codec1>; + bitclock-master = <&cpcap_audio_codec1>; + remote-endpoint = <&cpcap_audio_codec1>; + }; + }; +}; + +&cpcap_audio { + port@0 { + cpcap_audio_codec0: endpoint { + remote-endpoint = <&cpu_dai2>; + }; + }; + + port@1 { + cpcap_audio_codec1: endpoint { + remote-endpoint = <&cpu_dai3>; + }; + }; +}; -- 2.15.1