From patchwork Mon Sep 18 11:28:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 9956531 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 0F39E601E9 for ; Mon, 18 Sep 2017 11:36:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0BBF28B4C for ; Mon, 18 Sep 2017 11:36:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E56B328C17; Mon, 18 Sep 2017 11:36:37 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6A51628B4C for ; Mon, 18 Sep 2017 11:36:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=0d1uLcxSjzvL2ob04wrn3eaB525lM3t+ghO4qc9Vxps=; b=SdG XqqQmBXuNbkjN38bYSilg6rJG8TiEI04iPXJ0lL2nwZOhgSmRLs2Vy5iYy5bqdboBK5Qo2Q83eF2X B12we9YC/7gebtxDanzsf1HOL5J+Tx8EbwP/X7ZwUIqdDPtFB0wvOzdVWa5wFtQ6pqHQLZoOAVdUt hRxsH8eI7Pxk9YdOFzMZwjioxzgvvHJRe3zCRGm5TSj6k/jioorFvi8YK1VykOXBn+MLUE6s6ss4H YSgPiGlmv3s3cNyeAuNPkJxnyPObtcDGegX896d7mQddhZRZn/l8r3/vsHiUUDpsb6v+Y8xaUqHel T4I8yMI2iVQ5zYIcQDTN7AjaiZ1sERQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dtuLn-0006hS-8Z; Mon, 18 Sep 2017 11:36:31 +0000 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dtuLj-0006cd-IX for linux-arm-kernel@lists.infradead.org; Mon, 18 Sep 2017 11:36:29 +0000 Received: by mail-pg0-x244.google.com with SMTP id v82so102932pgb.1 for ; Mon, 18 Sep 2017 04:36:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=hfPrEgVazqeCNaImq0tgZ1OwSjkLLcqUvI+3bnPyRpM=; b=Y4hERxfxhm3eo6S4ucx1qzkzElQaHvHIJCg7AKPHq3tMtDi3eHQvEaXXYRtw5e7sRo seFw8zKJsPccTRF8Fh53vTYwM0H7Co2asQe3GbrwJU52qfs+EMzkZ4SZb/3HC+77fqnS 0jRFGlmckgNIeCxJvJH19kJ03NZUfDNMDh6DSvCztaClmAHdpciAoyqK+4DIPxzBD87j hUXI3zPvWSApm3m5csAll3WaF92nF2LGR22hZAxOdkjeMKOq8Tfa8zAfYnqMkiCzTZd1 PtTPS12SpCETncbC0TQ4VZtyDFaGdeIZCisr4al7prllPEeyb1zuoBYzGk29t3b7hjJi gXXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hfPrEgVazqeCNaImq0tgZ1OwSjkLLcqUvI+3bnPyRpM=; b=Ga/i0FShaKuqVPrS2FYPSNlr+KHv3/RDnPDGb1i/g5WecWAVphoTN4ioXArDAnZ4VG 9MbwOzz1AwOhRng9IxOaUUQ6iFjznpzCCuBuZygvnp6MwSoDzlTWzzxA/vwD87xf3O9l WsRhQAji/0dXV6g2IyX0Pi3G1XazGRt/Ye1roT3ymw7nFYxgnL26krPjlZvbn1iCDGms OEbXhZJPWrw8QsiY1wmjFlpi2HnRPU/rkv2UcTay39biJvJjJSshm7f8NuRFwvzfEZ1O pmvpT4Tf8D+k+TZZ01uNMVJFvsEtqviFMwoOIFYrLJaEwzF0rLZKTjXOmdRUVSOJMi/k J8AQ== X-Gm-Message-State: AHPjjUh0CSYJqMVI2XdIV/gANOU78cbrc8LA0Gp4D6t7dlLiwiIp5+dG 4CAKQTyPAE+Blw== X-Google-Smtp-Source: ADKCNb5VfHTUso2GaGrfj4bihJX4uaYiUac78nS8R5owZthFtUsryKMZh+c6ZiEilGz9FwLiSkFuyA== X-Received: by 10.98.200.76 with SMTP id z73mr32663637pff.154.1505734566497; Mon, 18 Sep 2017 04:36:06 -0700 (PDT) Received: from localhost.localdomain ([115.97.191.18]) by smtp.gmail.com with ESMTPSA id z22sm13517562pfi.166.2017.09.18.04.36.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Sep 2017 04:36:05 -0700 (PDT) From: Jagan Teki X-Google-Original-From: Jagan Teki To: Shawn Guo Subject: [PATCH v5 1/5] ARM: dts: imx6qdl-icore: Add Sound card support Date: Mon, 18 Sep 2017 16:58:29 +0530 Message-Id: <1505734113-9708-1-git-send-email-jteki@openedev.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170918_043627_663222_EFCAA6E2 X-CRM114-Status: GOOD ( 11.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Matteo Lisi , linux-kernel@vger.kernel.org, Jagan Teki , Sascha Hauer , Fabio Estevam , Michael Trimarchi , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jagan Teki Linux Sound card now uses generic simple-audio-card, so add the same along with related audmux and codec(via u2c3) for i.CoreM6 QDL module boards. Cc: Shawn Guo Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- Changes for v5: - Add adumux - Update simple-audio-card,widgets - Add ssi1 fsl,mode - Add #sound-dai-cells in codec Changes for v4: - Moved sgtl5000 node into dtsi instead of multiple copies of same in dts files Changes for v3: - Replace fsl,imx-audio-sgtl5000 and use simple-audio-card Changes for v2: - Use proper [label:] node-name[@unit-address] for codec arch/arm/boot/dts/imx6qdl-icore.dtsi | 97 ++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl-icore.dtsi b/arch/arm/boot/dts/imx6qdl-icore.dtsi index 56d0c5d..9682ae2 100644 --- a/arch/arm/boot/dts/imx6qdl-icore.dtsi +++ b/arch/arm/boot/dts/imx6qdl-icore.dtsi @@ -42,6 +42,7 @@ #include #include +#include / { memory { @@ -55,6 +56,25 @@ default-brightness-level = <7>; }; + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "1P8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + + reg_2p5v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "2P5V"; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + regulator-boot-on; + regulator-always-on; + }; + reg_3p3v: regulator-3p3v { compatible = "regulator-fixed"; regulator-name = "3P3V"; @@ -87,6 +107,59 @@ #clock-cells = <0>; clock-frequency = <25000000>; /* 25MHz for example */ }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "imx6qdl-icore-sgtl5000"; + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&dailink_master>; + simple-audio-card,frame-master = <&dailink_master>; + simple-audio-card,widgets = + "Microphone", "Mic Jack", + "Headphone", "Headphone Jack", + "Line", "Line In Jack", + "Speaker", "Line Out Jack", + "Speaker", "Ext Spk"; + simple-audio-card,routing = + "MIC_IN", "Mic Jack", + "Mic Jack", "Mic Bias", + "Headphone Jack", "HP_OUT"; + + simple-audio-card,cpu { + sound-dai = <&ssi1>; + }; + + dailink_master: simple-audio-card,codec { + sound-dai = <&sgtl5000>; + }; + }; +}; + +&audmux { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_audmux>; + status = "okay"; + + + audmux_ssi1 { + fsl,audmux-port = ; + fsl,port-config = < + (IMX_AUDMUX_V2_PTCR_TFSDIR | + IMX_AUDMUX_V2_PTCR_TFSEL(MX51_AUDMUX_PORT4) | + IMX_AUDMUX_V2_PTCR_TCLKDIR | + IMX_AUDMUX_V2_PTCR_TCSEL(MX51_AUDMUX_PORT4) | + IMX_AUDMUX_V2_PTCR_SYN) + IMX_AUDMUX_V2_PDCR_RXDSEL(MX51_AUDMUX_PORT4) + >; + }; + + audmux_aud4 { + fsl,audmux-port = ; + fsl,port-config = < + IMX_AUDMUX_V2_PTCR_SYN + IMX_AUDMUX_V2_PDCR_RXDSEL(MX51_AUDMUX_PORT1_SSI0) + >; + }; }; &can1 { @@ -141,6 +214,16 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c3>; status = "okay"; + + sgtl5000: codec@a { + #sound-dai-cells = <0>; + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + clocks = <&clks IMX6QDL_CLK_CKO>; + VDDA-supply = <®_2p5v>; + VDDIO-supply = <®_3p3v>; + VDDD-supply = <®_1p8v>; + }; }; &pwm3 { @@ -149,6 +232,11 @@ status = "okay"; }; +&ssi1 { + fsl,mode = "i2s-slave"; + status = "okay"; +}; + &uart4 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart4>; @@ -178,6 +266,15 @@ }; &iomuxc { + pinctrl_audmux: audmux { + fsl,pins = < + MX6QDL_PAD_DISP0_DAT20__AUD4_TXC 0x130b0 + MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x110b0 + MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0 + MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0 + >; + }; + pinctrl_enet: enetgrp { fsl,pins = < MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN 0x1b0b0