From patchwork Fri Oct 30 07:57:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ajye huang X-Patchwork-Id: 11868659 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.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 A3176C55179 for ; Fri, 30 Oct 2020 07:59:26 +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 2515A20719 for ; Fri, 30 Oct 2020 07:59:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bohhuEhX"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TIAZA7N8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2515A20719 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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=KbAz5Hy45ztcK/RLb0PnNDYSBOyKrcBqhjPEYw3S3ME=; b=bohhuEhXAr8qRUF0w8++S4pip jBTPB/sk65z6Vr9T+cuWooENcyjXnIuo1tFdbUKK/8J78IPTsdCq5oA0nV+UlPrkUYUbjggbnDguV 4CRd3mkgk1GBv0lXUudT0w41gRG/bjFBXi63Ht2hUXkhvvqXg2U7Mt7OQ8GrLgzvFSWZjEAEaAYKV 2IB0+ESbyun38nqMc7dRaMYQz8exJu8xAYJl3S25GUxJODMGB5gdL8wN5mRMGnVtaviK3V7RmoQwU /PKGBINcxLBwNbD7J5ur+yrD23OsexKRpakk34mU4McOYeCiZmy3y0NT7DpMieWNZZwNDpV83Ih8v 1KeCSWDEw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYPII-0007FZ-Uo; Fri, 30 Oct 2020 07:57:55 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYPI7-0007An-An for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 07:57:45 +0000 Received: by mail-pg1-x529.google.com with SMTP id r10so4515573pgb.10 for ; Fri, 30 Oct 2020 00:57:42 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=mdVPkO/q4ig27b41Ma0ipj3qPAj1LWAThPCU+KMAntY=; b=TIAZA7N8mLmP6GAoy04oBaSwZCDUDemagaep0eIu6AVKSnUnnYtVhNIHCbEpMG83/6 vFXKk85L3GDQnUQja8BMduB43h6WCwm8GO4sbAEsIrOZpCMsw25Rlj5buLnDSbAY8TC2 q+NMGg0/JaGHONi3izuRNMWV2o1sWYA657QDl4nEksP5Ok8DkeycBPgkZHTGM78FKv3x K2PLL+kUkHWEwPwA8LYwqbm4s0h+r71tMTD+99n/xZLMae79b0SvC9FTGmqnvsmOiNVX WwmsrRnCJGM2VyOSe+SLDQ5H4X8FDJDIGW2af4SZPRevmXkuIfOPj4X2svN3nKlzQ0AP LbyA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=mdVPkO/q4ig27b41Ma0ipj3qPAj1LWAThPCU+KMAntY=; b=c8pg+EI63zUJ3X9NFJFiLHp9WOgfCFbOjWmrVN5sT1D7MxNTGQO1DRu8YokUdLmZg8 U4tJiFH2FHCaz4GEzPeUrS4nvW9r7j/SU4nQweksJyWC5VmcvGfRWnNIaIs7mzcXI6OG /NBWlTcENJI/A+V39mTyibxW9SIfdWP+7WNrIw3dqtCLkp1azXolB6ePS6pFwC8c9K5y lEU6Rtg4Gi7NQz3f+jmU9Mm840r22MJ2aqidD1tkNqlH7OIHQzrVDDlS+zAUehk6/Osf o+PLYXeiGVMweWFcKXCoh9kndWZLPWVsuLU/gS6CbxuSiI3p1JsOUbkWuYgxtNizIm0s 8Nfw== X-Gm-Message-State: AOAM533lVPk1epsgjtL98x1M/zWtDdWfpr4yQtVDfkG8fyl3AsSHMiBL aLP4AOVjyAWCxmm1XPsAf4M= X-Google-Smtp-Source: ABdhPJw/cGM0YEr1SGpC70+EE0aduMjiy3DUOtzXdXm1f2UI48ICWPnnjkNAv7zmg2/7VnoLQWJSkw== X-Received: by 2002:a17:90a:5106:: with SMTP id t6mr1303122pjh.235.1604044661233; Fri, 30 Oct 2020 00:57:41 -0700 (PDT) Received: from localhost (114-34-18-97.HINET-IP.hinet.net. [114.34.18.97]) by smtp.gmail.com with ESMTPSA id a143sm5423045pfd.138.2020.10.30.00.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 00:57:40 -0700 (PDT) From: Ajye Huang X-Google-Original-From: Ajye Huang To: linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] ASoC: google: dt-bindings: modify machine bindings for two MICs case Date: Fri, 30 Oct 2020 15:57:23 +0800 Message-Id: <20201030075724.1616766-2-ajye_huang@compal.corp-partner.google.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030075724.1616766-1-ajye_huang@compal.corp-partner.google.com> References: <20201030075724.1616766-1-ajye_huang@compal.corp-partner.google.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201030_035743_473511_099BE068 X-CRM114-Status: GOOD ( 12.37 ) 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: dianders@chromium.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Banajit Goswami , Srinivasa Rao Mandadapu , Liam Girdwood , linux-arm-msm@vger.kernel.org, Patrick Lai , Ajye Huang , Andy Gross , Rob Herring , Bjorn Andersson , Mark Brown , Rohit kumar , tzungbi@chromium.org, srinivas.kandagatla@linaro.org, Jaroslav Kysela , linux-arm-kernel@lists.infradead.org, cychiang@chromium.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a property "dmic-gpios" for switching between two MICs. Signed-off-by: Ajye Huang --- .../bindings/sound/google,sc7180-trogdor.yaml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml index efc34689d6b5..9e0505467e57 100644 --- a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml +++ b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml @@ -34,6 +34,9 @@ properties: "#size-cells": const: 0 + dmic-gpios: + description: GPIO for switching between DMICs + patternProperties: "^dai-link(@[0-9])?$": description: @@ -81,6 +84,7 @@ additionalProperties: false examples: - | + //Example 1 sound { compatible = "google,sc7180-trogdor"; model = "sc7180-rt5682-max98357a-1mic"; @@ -128,3 +132,57 @@ examples: }; }; }; + + - | + //Example 2 (2mic case) + sound { + compatible = "google,sc7180-trogdor"; + model = "sc7180-rt5682-max98357a-2mic"; + + audio-routing = + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR"; + + #address-cells = <1>; + #size-cells = <0>; + + dmic-gpios = <&tlmm 86 0>; + + dai-link@0 { + link-name = "MultiMedia0"; + reg = <0>; + cpu { + sound-dai = <&lpass_cpu 0>; + }; + + codec { + sound-dai = <&alc5682 0>; + }; + }; + + dai-link@1 { + link-name = "MultiMedia1"; + reg = <1>; + cpu { + sound-dai = <&lpass_cpu 1>; + }; + + codec { + sound-dai = <&max98357a>; + }; + }; + + dai-link@2 { + link-name = "MultiMedia2"; + reg = <2>; + cpu { + sound-dai = <&lpass_hdmi 0>; + }; + + codec { + sound-dai = <&msm_dp>; + }; + }; + }; + +...