From patchwork Wed Nov 21 05:17:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Khoruzhick X-Patchwork-Id: 10691957 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 C1FD116B1 for ; Wed, 21 Nov 2018 05:19:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACC0F2B3F4 for ; Wed, 21 Nov 2018 05:19:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9EC592B488; Wed, 21 Nov 2018 05:19:54 +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=ham 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 45F282B3F4 for ; Wed, 21 Nov 2018 05:19:54 +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=TuofpNUVYkGRD6WOAiCtJl0NeFIOJQMce7ZIRnsGtPE=; b=VOw1h/NlQlt42p B3Mv7qDBt8Iu26lj2Nb95kDIWbCO294l9aPlJOacUIH8vD7RRB+3XCAgmVZvAB99sXdpNF1/R9eMZ AGmtguywW8t6H9r6K6RZ1XH7tLM7fJfz6KYsZ6HaSVvpsgUwSy+tS2WbxD9Giv4Zrau3sDlrawmC1 gRUaUanPiIMYiVm3Ztwo9+XmcvTXeiVgK3H/skJcrXtRPcvoPPnH23hcMpGbK98+y4C6aLWg4V+Ln GNqEGEmHan5vWXYUuk+ga45IhcFS39aEfzYY1PSQx6DcesPJZIx4hBrrozBeaY18V2+aN0Zp1ozuU HQtbG2IL/MIkJiqdhnVg==; 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 1gPKvT-0004Wa-1i; Wed, 21 Nov 2018 05:19:47 +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-00042c-V5 for linux-arm-kernel@lists.infradead.org; Wed, 21 Nov 2018 05:19:25 +0000 Received: by mail-pl1-x642.google.com with SMTP id b5so3725542plr.4 for ; Tue, 20 Nov 2018 21:19:17 -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=s/9a71YrIq79W4mLh48YxmoIHAK1ZXTX4Cfta5LSz2A=; b=jLMZbqQT6AuRR4TAwNqbjkC2ksyIDh6mEp3IQHVzWF4eoPHxSoZcWVBXIjCR8D2wZm NdSkQMsBuTSshGQhRWnE4Dv/QH2jV+s0maqil3GaDEV1EKgj4AN1CSsXRlIrSVmcTX9p B5DyrgrsD6iMqo5vb8SBcqGU9xZt7wd5JIxfqPhAsU7k/l35dusJy+y2k42NUQPQ3Tff HH/M27V0yReQD2ET2n4Zy4voeMYoAC9HBunzzxUXo8tFpX78X3jNHzso898truukGuDP 3oJ2+SMt2BH5JSGvGir1f/ziNPrI/eoaRnFfnCQl6PxN8fuEPYRLqJ87wMsRlHCa+x0Z +tUA== 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=s/9a71YrIq79W4mLh48YxmoIHAK1ZXTX4Cfta5LSz2A=; b=EdnbHrixsWahCjPY6cVyUz3dU9Z8Hpa6DqGFvnLpq4jBAneASqH9J6Ib80fDH1LgRz GXwZusqDk2zOgWQLuJnVsmYiZIsTkBekiJnPgWZJySYM/0wPTDWPyqiiIjU2XonEYgL3 177WZNebmXZUItMxFndj8yQ+ZiHcSsenQ7O1kGPgFgSe4yvRthmriNCcGU3LeqPBI72o zcdmYW2UuGi5KXCnx/+MnnWZah2/zRtJcpu1vEur80Psg0fL9HCTrciGJ6pvTt3SzDf3 82rjcRh8+co1U26wVMq66t3RNrL6DybtKye5lLdUl7Utq692hKprYZh8jfk864yZf8HB IZQQ== X-Gm-Message-State: AA+aEWYKueMgIM7CSgTb3JsPYj3JCJzXaruodAFwRi+IARUagbJkFtkd VCbKNnWsvoy9xUZi6iY6XeU= X-Google-Smtp-Source: AFSGD/WuPXWSj8hZHVnLN+qDPFZBSJ6M/tW5ZR0ElblLGviEy8i/Oscdnhovg/6baqRNns/rITgeag== X-Received: by 2002:a63:8d44:: with SMTP id z65mr4723651pgd.57.1542777557385; Tue, 20 Nov 2018 21:19:17 -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.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 21:19:16 -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 7/7] arm64: dts: allwinner: a64: enable sound on Pinebook Date: Tue, 20 Nov 2018 21:17:52 -0800 Message-Id: <20181121051752.18387-8-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_006936_65884BC8 X-CRM114-Status: GOOD ( 12.64 ) 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 Pinebook Signed-off-by: Vasily Khoruzhick --- .../dts/allwinner/sun50i-a64-pinebook.dts | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts index 77fac84797e9..cecfa7ea90b2 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts @@ -53,6 +53,12 @@ }; }; + headphone_amp: headphone_amp { + compatible = "simple-audio-amplifier"; + VCC-supply = <®_eldo1>; + sound-name-prefix = "HP"; + }; + reg_vcc3v3: vcc3v3 { compatible = "regulator-fixed"; regulator-name = "vcc3v3"; @@ -64,6 +70,26 @@ compatible = "mmc-pwrseq-simple"; reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ }; + + speaker_amp: speaker_amp { + compatible = "simple-audio-amplifier"; + VCC-supply = <®_ldo_io0>; + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ + sound-name-prefix = "SPEAKER"; + }; + +}; + +&codec { + status = "okay"; +}; + +&codec_analog { + status = "okay"; +}; + +&dai { + status = "okay"; }; &ehci0 { @@ -267,6 +293,33 @@ vcc-hdmi-supply = <®_dldo1>; }; +&sound { + status = "okay"; + simple-audio-card,aux-devs = <&codec_analog>, <&headphone_amp>, + <&speaker_amp>; + simple-audio-card,widgets = "Microphone", "Internal Microphone Left", + "Microphone", "Internal Microphone Right", + "Headphone", "Headphone Jack", + "Speaker", "Internal Speaker"; + simple-audio-card,routing = + "Left DAC", "AIF1 Slot 0 Left", + "Right DAC", "AIF1 Slot 0 Right", + "SPEAKER INL", "LINEOUT", + "SPEAKER INR", "LINEOUT", + "Internal Speaker", "SPEAKER OUTL", + "Internal Speaker", "SPEAKER OUTR", + "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", + "Internal Microphone Left", "MBIAS", + "MIC1", "Internal Microphone Left", + "Internal Microphone Right", "HBIAS", + "MIC2", "Internal Microphone Right"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pb_pins>;