From patchwork Fri Nov 6 04:15:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 11885979 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CFF3C5517A for ; Fri, 6 Nov 2020 04:18:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9172A20B80 for ; Fri, 6 Nov 2020 04:17:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IuKuYPM4"; dkim=temperror (0-bit key) header.d=sholland.org header.i=@sholland.org header.b="JOSd5y5T"; dkim=temperror (0-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="jVX6tJHi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9172A20B80 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc: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:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TnaS2matRq9YKlu2RWAD+Qof1fcE/zFMmwQZzoIRMSY=; b=IuKuYPM4P4b8oCZztlQfHhu3C SrrrwhpdhnrHhMWJXLOPb/IinFrTaDi2jCCt/yEJTi3hUaHslpx2++4ZTONwWxSDWHU0AMOXwKKi4 g2cnE8W56JReM65y9ve+uz5GG9dEwSLFrWUJWbPP9xPBi3T3idz+d21riz/ZsfGMRKGeaI1VoKEOw YC5mxX9z0XffoNrf0hCbLp5f3p7ZfOrN77yCU3NyZfCAPb/wXC9FjCQi2SM8feGPGkRe70Dagf5uM 8w3uBGg6CZ+lTYZxqwhYNXxZqTNrDezqat1T/f71FtH5zf7tW1zEIF3IvpnJs1sK0A0ztT1eIKSVl 0dNcfUuAg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1katA4-0001w5-Nj; Fri, 06 Nov 2020 04:15:41 +0000 Received: from new3-smtp.messagingengine.com ([66.111.4.229]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kat9i-0001o3-Gr for linux-arm-kernel@lists.infradead.org; Fri, 06 Nov 2020 04:15:20 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 6AD6658054F; Thu, 5 Nov 2020 23:15:17 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 05 Nov 2020 23:15:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=FLNKgMQp1sEij kf7PisxaNL+a7J3S3rke3nEpFDnkfY=; b=JOSd5y5TbhDmbIit1LNIQMorGbdZJ qilSynMCvH2up6KQBfUabRULaa09UveIlGJ05BMEuzNb00X+I1oAnY8e6QCJBxoR D4d+cIOb4jC/3kiOMo2nBLHsLFDac351zpxdF82svhdsthdZiUGv4RCYUVAH5+pc rasSwalDyniIfqAcnTayx9uPkO12oz3KyiXKWaZy2lTPscGj5txNGC+XrxXArs61 u+12yV223f8SPNFVr8HTD2Z6jI4up/P7DOP/koNcdefcXx1fpAyPIUhl4d72EYnR iHmmNfKzdjJ9yXHA2nymov53cPv7m0GY0s4J/mH5ghQ4XlvjR6tpLkozg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=FLNKgMQp1sEijkf7PisxaNL+a7J3S3rke3nEpFDnkfY=; b=jVX6tJHi J9FRcScOzES4WTtJtDOgrC3mnEkTgrevRFLJt6O/YDQcNbukmubdguSX4BAgE0ry YOjTcr9RuPjK/NAcokIQgowATDOVEomD4Ox8B2smJsmJfKc+Xb3eDNaOWVQmrQgz XBb5JGAtUQ4y/mkXSbJNhAXOrAvx2aikVbNCMigxNtGTWkHHe20ytVZaTqjnYEFg 0bun2cFA7w3vf8vjVNx59hlAHIIjXKHXPCujSRjUznk++whCm0wFH0cCv7Vy8N+D u+wNhRBJ6sbY8GbEDeGMUR6biB6ykyFQouUI4FbLCG7OS654x8l5ktygQ4fxLcnn dRCE6o2mYZyqMQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddtkedgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucfkphepjedtrddufeehrddugeekrdduhedunecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhhuvghlsehshhholhhlrghn ugdrohhrgh X-ME-Proxy: Received: from titanium.stl.sholland.net (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA id 9F8EA3060057; Thu, 5 Nov 2020 23:15:16 -0500 (EST) From: Samuel Holland To: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Liam Girdwood , Mark Brown , Rob Herring Subject: [PATCH 6/7] arm64: dts: allwinner: pinephone: Add support for Bluetooth audio Date: Thu, 5 Nov 2020 22:15:12 -0600 Message-Id: <20201106041513.38481-7-samuel@sholland.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201106041513.38481-1-samuel@sholland.org> References: <20201106041513.38481-1-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201105_231518_730069_692638A8 X-CRM114-Status: GOOD ( 13.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Samuel Holland , linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The PinePhone has a Bluetooth chip with its PCM interface connected to AIF3. Add the DAI link so headeset audio can be routed in hardware. Even though the link is mono, configuring the link for 2 slots is required for compatibility with AIF2, which also uses 2 slots, and which shares clock dividers with AIF3. Using equal clock frequencies allows the modem and headset to be used at the same time. Signed-off-by: Samuel Holland --- .../dts/allwinner/sun50i-a64-pinephone.dtsi | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi index 5780713b0dba..6125910d29db 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi @@ -23,6 +23,11 @@ backlight: backlight { /* Backlight configuration differs per PinePhone revision. */ }; + bt_sco_codec: bt-sco-codec { + #sound-dai-cells = <1>; + compatible = "linux,bt-sco"; + }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -63,6 +68,8 @@ vibrator { }; &codec { + pinctrl-names = "default"; + pinctrl-0 = <&aif3_pins>; status = "okay"; }; @@ -400,6 +407,23 @@ &sound { "MIC1", "Internal Microphone", "Headset Microphone", "HBIAS", "MIC2", "Headset Microphone"; + + simple-audio-card,dai-link@2 { + format = "dsp_a"; + frame-master = <&link2_codec>; + bitclock-master = <&link2_codec>; + bitclock-inversion; + + link2_cpu: cpu { + sound-dai = <&bt_sco_codec 0>; + }; + + link2_codec: codec { + sound-dai = <&codec 2>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <16>; + }; + }; }; &uart0 {