From patchwork Wed Nov 21 05:17:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Khoruzhick X-Patchwork-Id: 10691973 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9273A16B1 for ; Wed, 21 Nov 2018 05:20:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FB572B394 for ; Wed, 21 Nov 2018 05:20:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73EF62B443; Wed, 21 Nov 2018 05:20:43 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 25E882B394 for ; Wed, 21 Nov 2018 05:20:43 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=bqe4bcN9EoskSXI9zA4No2teG3isGxghqdLl4345kg8=; b=rbOTPEugcXNQma eIBzlHVPo8mXGmkHiZVqV3YTfb8fpZojSO5zHilmnsc0vuCLdkDdOJEhOKZrAjXc44CuTKM1iQqL3 q6VqhLeGduxCM5Yt2N36yD8DrIOrhFC2z69JI9rehR7zo4LUNojhRqEklDYYCbcmDjN+K+9S0xnSy O3R8g+xumCj5T/8fKSrU34K7Bcwx1GeVy3SixAaSvJ/jEG5ny56xRxS9H1pLsv2a+b8eGYIbKfMg6 qQ5UmewiU9xcODWROq6LGzTOTkkwAs5vBb/2Ij+JiD9Ye126m8o4g4MIJAUdtOLSobcMnJc5j+hx6 DDbNnARNyi38PG8RgmYQ==; 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 1gPKwF-0006oQ-Ey; Wed, 21 Nov 2018 05:20:35 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPKv5-00042a-V0 for linux-arm-kernel@lists.infradead.org; Wed, 21 Nov 2018 05:19:29 +0000 Received: by mail-pl1-x642.google.com with SMTP id v1-v6so3727705plo.2 for ; Tue, 20 Nov 2018 21:19:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=wZK3MXC0BgxFudZkKrtKDmVgPJY+2qVduScM2Wgb+TU=; b=N8KxI3St9DK2CV7RP7qd1Yagb+kk/dTr3h1K5XGkDFjRUxtSwxGpAuoD4hdQh6Lmda s+Zf9V4a+/xLEA1DOZ3OffGZsOxepnM0Y8niGr2cmvKWK892qzuJKQXTBuNZaiedn9zj 7QJxy6EB8yMGh/Xl/5hL3diBcGqfnkbm6C6ZS0QETxreCjoM/rebtIwXVN4la1xAOuxW Yel+yZ++c/uPi97V9e+7TDPrDCspZiQC1PLaRvuP2nZaaainbqkhmGNaU+zJYANr/p+y l8733nt1iQzwN0GS2I6r2SLKXnI2kfEy2ifNApJS6PMU0yEYdove+An9kkbYJVTYYx/A 0HGw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=wZK3MXC0BgxFudZkKrtKDmVgPJY+2qVduScM2Wgb+TU=; b=N3vBnyYYS/w/XoemS8uThRP+zF/M6Ab94Enhd1jPX5Uiz7omk8StsBoL5Ld7gn/xj2 bF3oCnlajkbCEEYIc8W4lIBmD8leU3KbTGprHGThClpYnd6WPOmbMyPjWrdtnHAcOE3y 9Ue+ZHbSNIrnU7CsXjqlo8yFjca0gGr/eEtkeE863g4bUqGy5rSSH6AwxXGEcfyAFnuB JcX+ePYguEh33RdKZaS6ib7y6SBuFbKWEBPFUCnoYhGyU7ZtGsanbOcvrXnO8uqFDR2S COaEd1EmuIYPzd6HDe11tQm0GSH2T3kt6wW0lmCF9/xPHA8cA6ph8jSHr34X/4ZtGLfr eI3A== X-Gm-Message-State: AGRZ1gInurcOT76lVayjM69KakCM+GIL7NbB3iB13jx5ekpJxtRG4f6x qgsX2C+vxI++vm3zqDSWfj8= X-Google-Smtp-Source: AJdET5c1+VGE1mBRwooaqaGBJlOH5HiqxmUCyTy2g9d3VfsO6TnFswT0QE8q5xpkNZTtN4hje+MJ0Q== X-Received: by 2002:a62:e501:: with SMTP id n1-v6mr5287942pff.71.1542777556338; Tue, 20 Nov 2018 21:19:16 -0800 (PST) Received: from anarsoul-thinkpad.lan (216-71-193-140.dyn.novuscom.net. [216.71.193.140]) by smtp.gmail.com with ESMTPSA id v70sm8293074pfa.152.2018.11.20.21.19.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 21:19:15 -0800 (PST) From: Vasily Khoruzhick To: Liam Girdwood , Mark Brown , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Jaroslav Kysela , Takashi Iwai , Vasily Khoruzhick , Jerome Brunet , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v8 6/7] arm64: dts: allwinner: a64: enable sound on Pine64 and SoPine Date: Tue, 20 Nov 2018 21:17:51 -0800 Message-Id: <20181121051752.18387-7-anarsoul@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181121051752.18387-1-anarsoul@gmail.com> References: <20181121051752.18387-1-anarsoul@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_211924_007898_CDEA2D97 X-CRM114-Status: GOOD ( 12.44 ) 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: , 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 This commit enables I2S, digital and analog parts of audiocodec on Pine64 and SoPine boards. Signed-off-by: Vasily Khoruzhick --- .../boot/dts/allwinner/sun50i-a64-pine64.dts | 35 +++++++++++++++++++ .../allwinner/sun50i-a64-sopine-baseboard.dts | 35 +++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts index c077b6c1f458..30d0743d0d79 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts @@ -73,6 +73,24 @@ }; }; }; + + headphone_amp: headphone_amp { + compatible = "simple-audio-amplifier"; + VCC-supply = <®_eldo1>; + sound-name-prefix = "HP"; + }; +}; + +&codec { + status = "okay"; +}; + +&codec_analog { + status = "okay"; +}; + +&dai { + status = "okay"; }; &de { @@ -259,6 +277,23 @@ vcc-hdmi-supply = <®_dldo1>; }; +&sound { + simple-audio-card,aux-devs = <&codec_analog>, <&headphone_amp>; + simple-audio-card,widgets = "Microphone", "Microphone Jack", + "Headphone", "Headphone Jack"; + simple-audio-card,routing = + "Left DAC", "AIF1 Slot 0 Left", + "Right DAC", "AIF1 Slot 0 Right", + "HP INL", "HP", + "HP INR", "HP", + "Headphone Jack", "HP OUTL", + "Headphone Jack", "HP OUTR", + "AIF1 Slot 0 Left ADC", "Left ADC", + "AIF1 Slot 0 Right ADC", "Right ADC", + "MIC2", "Microphone Jack"; + status = "okay"; +}; + /* On Euler connector */ &spdif { status = "disabled"; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts index 53fcc9098df3..81d85ad127a2 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts @@ -72,6 +72,12 @@ }; }; + headphone_amp: headphone_amp { + compatible = "simple-audio-amplifier"; + VCC-supply = <®_eldo1>; + sound-name-prefix = "HP"; + }; + reg_vcc1v8: vcc1v8 { compatible = "regulator-fixed"; regulator-name = "vcc1v8"; @@ -80,6 +86,18 @@ }; }; +&codec { + status = "okay"; +}; + +&codec_analog { + status = "okay"; +}; + +&dai { + status = "okay"; +}; + &de { status = "okay"; }; @@ -164,6 +182,23 @@ vcc-hdmi-supply = <®_dldo1>; }; +&sound { + simple-audio-card,aux-devs = <&codec_analog>, <&headphone_amp>; + simple-audio-card,widgets = "Microphone", "Microphone Jack", + "Headphone", "Headphone Jack"; + simple-audio-card,routing = + "Left DAC", "AIF1 Slot 0 Left", + "Right DAC", "AIF1 Slot 0 Right", + "HP INL", "HP", + "HP INR", "HP", + "Headphone Jack", "HP OUTL", + "Headphone Jack", "HP OUTR", + "AIF1 Slot 0 Left ADC", "Left ADC", + "AIF1 Slot 0 Right ADC", "Right ADC", + "MIC2", "Microphone Jack"; + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pb_pins>;