Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1075421pxx; Fri, 30 Oct 2020 00:59:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKnTYWrkGQetgUt5G3opBS3BZgt41RMfn3pJKwnStpulbt/aEQKLj0cbWDKktNklYVhbBa X-Received: by 2002:a17:907:204c:: with SMTP id pg12mr1193385ejb.464.1604044791234; Fri, 30 Oct 2020 00:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604044791; cv=none; d=google.com; s=arc-20160816; b=tQ4l0QKLAf+ov011Viro8wEcSk74J1WWtB37ZLPWbF1um1cqr68bl5TfI73UzcSTf2 0xO/R5avb2/06n77AoEvilDMDbzKNkbxwyCh86if9n79FPNCNp58poB+hlSNMK2BxhZr XvoSuVGi/tcMSl5AJ47a+/4+Iz0MQfS3kpi2e2SDAViBn14vH5T/neI469fDNuOWIRhb uJQkd/nU7hy8V4i6UWZxZ2ZCTZ5TVCDecA7i0lRfutAGYghXgbX403qFDn+CZasKUEvt dc8n3qPIRoctpvHf7m3b909DUT+oFMlAyxFt1DkKzTCC4RvRUt8ga7TB/qMw2OvssVpH QTPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mdVPkO/q4ig27b41Ma0ipj3qPAj1LWAThPCU+KMAntY=; b=w8ulaglFjIKehb0pG8hdmiPjG3l05ZoTqdvakOD7GOob1aI3khj9SojtNZMSbN3WbH iVdD4ba8fdWPsiPlRC0jD/A1SCORqWcUeyZU+adSIfuNisqjnHcbXewKM0qsGq3lcAxI I4E0ZmUGGK2FYYswiZo/1S5e5Zp4BfltMCzWqxZng8/5ZFXLU36sIdNLsm9WzasSqOxn K6risFwoZg08t8xu4/Muf5UPSptchopTmOPQD4hwcMHeWdJdqsuVMBD+u2NahLBcTb8K rC5LpI//6/+UzXmCteO71fwa/XqXN1fPMSYPknZFaJoXzFlyuJiEoQ/2n4kR4dd7JRFS /ePQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TIAZA7N8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w16si3641795ejn.471.2020.10.30.00.59.28; Fri, 30 Oct 2020 00:59:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TIAZA7N8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726072AbgJ3H5m (ORCPT + 99 others); Fri, 30 Oct 2020 03:57:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726009AbgJ3H5l (ORCPT ); Fri, 30 Oct 2020 03:57:41 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD3AFC0613CF; Fri, 30 Oct 2020 00:57:41 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id g12so4523459pgm.8; Fri, 30 Oct 2020 00:57:41 -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=CBleGD76a/gwAARiQpxJH6tiJc6TnA2IfaPTDPG9CvTGJik0+MXsmWbKWTjB5bGb+z xRSW7c94GtW8lYvChAGTL8p42qdJ1jeHNyvtgbqa7yCU18KM5wEBsArPAFs4wNDc5uup CbO05SfGgxn3xjvpeWnevMtaYFJ2jztLbkVFRBS/TOEA1nia/n9x1clkbCT1bRPk2LiK gi4D/fypPefR8T/95OnmLkWJAs3aCRwofRCa5WxDU1C4DV5GkM0qzw2jOJaI8uJbVGTw zc+1/rtLPc4qr20NxXCiMXrhHssPEv5vgA0JRT8nBCMTaet6BEQRA4ozmAeacpLw32IS qF+w== X-Gm-Message-State: AOAM532PyDBsRUXMJKRJA3yk3OyRDaZPvW56G7D2uSMyCfClHo+0d6tY nmy8vZXX8Iu5VzcvqV4xi7rXd1qbwbIimA== 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 Cc: Mark Brown , Rohit kumar , Banajit Goswami , Patrick Lai , Srinivasa Rao Mandadapu , srinivas.kandagatla@linaro.org, Andy Gross , Bjorn Andersson , Liam Girdwood , Rob Herring , Jaroslav Kysela , cychiang@chromium.org, tzungbi@chromium.org, dianders@chromium.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Ajye Huang 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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>; + }; + }; + }; + +... -- 2.25.1