From patchwork Mon Mar 19 13:53:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 10292391 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 BABEB600F6 for ; Mon, 19 Mar 2018 14:11:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A78E8294A4 for ; Mon, 19 Mar 2018 14:11:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BC31294AC; Mon, 19 Mar 2018 14:11:01 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 E057129492 for ; Mon, 19 Mar 2018 14:11:00 +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:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=etf3eC02FeXnk25jEj7He+4md3jHsKZhy0j7eR5MdsU=; b=NnrWuomxkC+FE2 2pVyel5M6mz8cDaBzTw2wIJMhEXkFr4A6XKuzdu/1Q3PlgdNpRBOgL+gcRGL3/vd+t316gkuMvGpD uzOdXC/1GZOIG2WY6KoYYphJ4nz7Dv4vBgH96VPCG3Q9EvLCTst06aySlOeUjs+wjpJcfLon/97ij 4IS2sM5Fo//6KRxsntg1aI+bhnuFsDSBHqp7a41Vs8ZrndN+U/KwUnZQT0nDIzGd79JRVOikz0OQk SFkh6jjfP91e3lyaH06zVeSpb2UTRnO8K80AO1fds75Vyf8q4yP5YG4wzDg4GhMTSIg1iFzu7SuWG ldvALxodPsJCXfMYMULg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1exvUy-0001pb-9U; Mon, 19 Mar 2018 14:10:52 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1exvTr-0008VZ-Sq for linux-arm-kernel@bombadil.infradead.org; Mon, 19 Mar 2018 14:09:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Tk40DwTWdQTvCZwAcZrPO/Qvll2pzJ9kY/7gtdrVXq4=; b=kWhAPnpYN+KunGCNsb2+Uj2DQ4 o6r4rAqMPQn1pb1sKc35ONQcVhamh9ZO6vdTFFEcCEdixd8tWNqT2dI7wYGLq26qiHlipnsSa0im9 ERLTR006qMbsHJlGB6ncVbWNKwLjjW3fM89yJCssL8fkg9W+BB8fFnUdF1gcWli6QVCokQlgANDbi +YOCiGvzSBB6yKAYMKC2WIqPVpaf8LdTJFgHO4G0qxr5OSYjXyRkmsYX4VAwccBrGsuv+JuHtDESt zlPAZVgFFIDvMqwaUnuqbws8wwJU8hNc2YzwjrSUraw8s+AdR8YXkSb2/a7El9hQorNUG4mRPfTRA SjRGCCGg==; Received: from mail-io0-x241.google.com ([2607:f8b0:4001:c06::241]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1exvEQ-0007fU-Hz for linux-arm-kernel@lists.infradead.org; Mon, 19 Mar 2018 13:53:48 +0000 Received: by mail-io0-x241.google.com with SMTP id 141so348416iou.12 for ; Mon, 19 Mar 2018 06:53:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:subject:date:message-id; bh=Tk40DwTWdQTvCZwAcZrPO/Qvll2pzJ9kY/7gtdrVXq4=; b=gPRwrnQU3AYV0QLNpv642E/2SKhPMmk+I+IeWNhZWj7mgbsI2BGGnBxAftvZvBiFZD oJGd6BRa2VEP5xGfnmD64hWDbYobJs3KmmKxDl/MO8t/+DLP5nyFcBuN6Clm46KgGlF8 xjANOL9wcntjV9pI++VDFOyukYFxAcarRXp4M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=Tk40DwTWdQTvCZwAcZrPO/Qvll2pzJ9kY/7gtdrVXq4=; b=RmLzeFxsssOhGwkT+JWiXrS2VmH87vJhOf+a/FFB+Rvs87wzQyA5l3y3xkSYjgPKOx Qm3ZnzeNqgIcu6WglptdRt2un7b87+GAVNXxZBF/VMwF09Q0CHTG+nPqgooWIm93HcWc Wioc9Hp562udHNqxnK7R9fMhta8ms6RiJLGEdFsULDBF4Hcw1hthtFqdrcUMBLj3vxAz QpNyG6f+VIc8ND7h/fScHCGbEsYa7hPJm2Eci6zKjMewYmQcGBJO0YaphjNpx/VMaTtk CVsMZRm80Eyb7mEEtWb8XtRyx0L7lcOX4++CM8WznCWTW5+cNCCu+2JyRVDy9sypJG12 3kYQ== X-Gm-Message-State: AElRT7HH4VW5o5fuUBij8XBSaMNu4yG5JjPVT/sJbZDjLWe6JFRWWNBF bl0KdZViWv5tB8un9Hm9yzjBQg== X-Google-Smtp-Source: AG47ELv+blaq8VoupDN0rAXZYNwGC2U3vTH2aYYAIvB+JF6C008PCourIEVr3ZCZy2J+5LHoBxD7yg== X-Received: by 10.107.129.92 with SMTP id c89mr11722694iod.218.1521467614068; Mon, 19 Mar 2018 06:53:34 -0700 (PDT) Received: from beef.ohporter.com (cpe-173-90-206-207.neo.res.rr.com. [173.90.206.207]) by smtp.gmail.com with ESMTPSA id l3sm26931ioa.59.2018.03.19.06.53.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Mar 2018 06:53:33 -0700 (PDT) From: Matt Porter To: Shawn Guo , Sascha Hauer , Fabio Estevam , Rob Herring , Mark Rutland , Russell King , linux-arm-kernel@lists.infradead.org (moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] arm: dts: hummingboard2: convert onboard audio to simple-audio-card Date: Mon, 19 Mar 2018 09:53:26 -0400 Message-Id: <20180319135326.24357-1-mporter@konsulko.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180319_135346_585505_9749155D X-CRM114-Status: GOOD ( 15.33 ) 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: , 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 The HB2 onboard audio currently makes use of the imx-audio-sgtl5000 binding. This binding does not support auxiliary audio devices such as external amplifiers. The simple-audio-card binding does support this property which allows systems incorporating the HB2 to easily add an auxiliary device that's attached to the HB2 audio jack with an overlay. Convert HB2 to use simple-audio-card for the onboard audio to allow for this additional flexibility. Signed-off-by: Matt Porter Reviewed-by: Fabio Estevam --- arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 48 +++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi index dffbc92e0023..587251ab76ec 100644 --- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi +++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi @@ -38,6 +38,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ +#include / { chosen { @@ -145,22 +146,52 @@ vin-supply = <&v_5v0>; }; - sound-sgtl5000 { - audio-codec = <&sgtl5000>; - audio-routing = + audio: sound-sgtl5000 { + compatible = "simple-audio-card"; + simple-audio-card,name = "On-Board Codec"; + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&sound_codec>; + simple-audio-card,frame-master = <&sound_codec>; + simple-audio-card,widgets = + "Microphone", "Mic Jack", + "Headphone", "Headphone Jack"; + simple-audio-card,routing = "MIC_IN", "Mic Jack", "Mic Jack", "Mic Bias", "Headphone Jack", "HP_OUT"; - compatible = "fsl,imx-audio-sgtl5000"; - model = "On-board Codec"; - mux-ext-port = <5>; - mux-int-port = <1>; - ssi-controller = <&ssi1>; + + sound_cpu: simple-audio-card,cpu { + sound-dai = <&ssi1>; + }; + + sound_codec: simple-audio-card,codec { + sound-dai = <&sgtl5000>; + }; }; }; &audmux { status = "okay"; + + ssi1 { + fsl,audmux-port = <0>; + fsl,port-config = < + (IMX_AUDMUX_V2_PTCR_SYN | + IMX_AUDMUX_V2_PTCR_TFSEL(4) | + IMX_AUDMUX_V2_PTCR_TCSEL(4) | + IMX_AUDMUX_V2_PTCR_TFSDIR | + IMX_AUDMUX_V2_PTCR_TCLKDIR) + IMX_AUDMUX_V2_PDCR_RXDSEL(4) + >; + }; + + pins5 { + fsl,audmux-port = <4>; + fsl,port-config = < + IMX_AUDMUX_V2_PTCR_SYN + IMX_AUDMUX_V2_PDCR_RXDSEL(0) + >; + }; }; &ecspi2 { @@ -193,6 +224,7 @@ compatible = "fsl,sgtl5000"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_hummingboard2_sgtl5000>; + #sound-dai-cells = <0>; reg = <0x0a>; VDDA-supply = <&v_3v2>; VDDD-supply = <&vcc_1p8>;