From patchwork Thu Oct 17 14:00:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 1178641 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="RgZgfhGK"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46v9mr3Vbbz9sCJ for ; Fri, 18 Oct 2019 01:01:00 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439755AbfJQOBA (ORCPT ); Thu, 17 Oct 2019 10:01:00 -0400 Received: from mail-yb1-f202.google.com ([209.85.219.202]:43349 "EHLO mail-yb1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437401AbfJQOA7 (ORCPT ); Thu, 17 Oct 2019 10:00:59 -0400 Received: by mail-yb1-f202.google.com with SMTP id h188so1792240yba.10 for ; Thu, 17 Oct 2019 07:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=q/IvedTRHUMrx17oBADKuif8KSHcgKyHjA5PaeyUYEs=; b=RgZgfhGKOqmMTHGuZO2klRKV0KCAL6YZI4NMN5tf595Txwjok6cdpxFplsFVwt8JFI AuOPlU6VRxLHfM/N0Kn6pVQL6Y/gueix3aeNlFb2KlMp61BrrP8vdAI0pC7jY/Ngd5UV gOi4gk7WMLiQdIGDEsm4IH/racUQXHemJUgLIqsG117kTZR5+i3rJmzYP0mssc1CSypt e1ywsImFwnq2cvbmGkFBmkz1BPe0OwLrtbCc0Q1L/r8kGerO4B7YF8jBtjAE7j7c4Dmf +P7M1M9LZRIz/eSJxSQcw3leFeuaML8N/BBLiBEjpGB7TXrpYo+i7jGsFvaOz5R2OfsG GYzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=q/IvedTRHUMrx17oBADKuif8KSHcgKyHjA5PaeyUYEs=; b=kDUD5Z3fXNsbYJrbZqfOG15ONVGm30CKzZ84TZRRfVr7dGrlMktvBNAQt2rMqVAc9K LulqfTvdZNnJXWbpNeiGiJlQVonQbwocz7nSjlRjhChOIi8zsPXgmApaRvqCOlAyir+M OyxezzEvDv2dlVeiw5jA7MORFrPP0eB0rOSWo0Xqjiit7iVoq0DMGJZF/pO8gUh284nO ZRaxxDkOW1lr+XmlyCL+ioz2RIXFXac/csagfzYCoK0rmNVoZUMmD8NSLnjGenaiSLtw mg2w5CSeYRLqZLWm+yugcv1TCj1z9VwJ40RXmDjA+/wrGQ389w7J8ON/h7Cq21Uwq8oL bEDg== X-Gm-Message-State: APjAAAXoCGJ1dgQEWGDCMBKoFtSwN76pTW7Ql3clUmKZ3KIBKwhYvolm Wp0SXl/tjLj5G+xttLo+p7pFapFtWj8Z X-Google-Smtp-Source: APXvYqzL3ud5ItfEYzWOzS7LTUstcIsuyVERzHEYBDrvfgcG7ri7+eVyI3q0feoxrg+MmwqIEeuXYodlC5Mk X-Received: by 2002:a81:9302:: with SMTP id k2mr2785321ywg.222.1571320858480; Thu, 17 Oct 2019 07:00:58 -0700 (PDT) Date: Thu, 17 Oct 2019 22:00:10 +0800 In-Reply-To: <20191017213539.00-tzungbi@google.com> Message-Id: <20191017213539.05.Id4657c864d544634f2b5c1c9b34fa8232ecba44d@changeid> Mime-Version: 1.0 References: <20191017213539.00-tzungbi@google.com> X-Mailer: git-send-email 2.23.0.700.g56cf767bdb-goog Subject: [PATCH v4 05/10] ASoC: cros_ec_codec: read max DMIC gain from EC codec From: Tzung-Bi Shih To: broonie@kernel.org Cc: alsa-devel@alsa-project.org, robh+dt@kernel.org, devicetree@vger.kernel.org, enric.balletbo@collabora.com, bleung@google.com, gwendal@google.com, drinkcat@google.com, cychiang@google.com, dgreid@google.com, tzungbi@google.com, Rob Herring , Benson Leung Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Read max DMIC gain from EC codec instead of DTS. Also removes the dt-binding of max-dmic-gain. Acked-by: Rob Herring Acked-by: Benson Leung Signed-off-by: Tzung-Bi Shih --- .../bindings/sound/google,cros-ec-codec.txt | 4 +- .../linux/platform_data/cros_ec_commands.h | 43 +++++++++++---- sound/soc/codecs/cros_ec_codec.c | 53 ++++++++++++++----- 3 files changed, 73 insertions(+), 27 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/google,cros-ec-codec.txt b/Documentation/devicetree/bindings/sound/google,cros-ec-codec.txt index 1084f7f22eea..0ce9fafc78e2 100644 --- a/Documentation/devicetree/bindings/sound/google,cros-ec-codec.txt +++ b/Documentation/devicetree/bindings/sound/google,cros-ec-codec.txt @@ -1,4 +1,4 @@ -* Audio codec controlled by ChromeOS EC +Audio codec controlled by ChromeOS EC Google's ChromeOS EC codec is a digital mic codec provided by the Embedded Controller (EC) and is controlled via a host-command interface. @@ -9,7 +9,6 @@ Documentation/devicetree/bindings/mfd/cros-ec.txt). Required properties: - compatible: Must contain "google,cros-ec-codec" - #sound-dai-cells: Should be 1. The cell specifies number of DAIs. -- max-dmic-gain: A number for maximum gain in dB on digital microphone. Example: @@ -21,6 +20,5 @@ cros-ec@0 { cros_ec_codec: ec-codec { compatible = "google,cros-ec-codec"; #sound-dai-cells = <1>; - max-dmic-gain = <43>; }; }; diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h index 3ca0fa9e92a7..21db0d4d4025 100644 --- a/include/linux/platform_data/cros_ec_commands.h +++ b/include/linux/platform_data/cros_ec_commands.h @@ -4530,30 +4530,53 @@ struct __ec_align4 ec_response_ec_codec_get_shm_addr { #define EC_CMD_EC_CODEC_DMIC 0x00BD enum ec_codec_dmic_subcmd { - EC_CODEC_DMIC_SET_GAIN = 0x0, - EC_CODEC_DMIC_GET_GAIN = 0x1, + EC_CODEC_DMIC_GET_MAX_GAIN = 0x0, + EC_CODEC_DMIC_SET_GAIN_IDX = 0x1, + EC_CODEC_DMIC_GET_GAIN_IDX = 0x2, EC_CODEC_DMIC_SUBCMD_COUNT, }; -struct __ec_align1 ec_param_ec_codec_dmic_set_gain { - uint8_t left; - uint8_t right; +enum ec_codec_dmic_channel { + EC_CODEC_DMIC_CHANNEL_0 = 0x0, + EC_CODEC_DMIC_CHANNEL_1 = 0x1, + EC_CODEC_DMIC_CHANNEL_2 = 0x2, + EC_CODEC_DMIC_CHANNEL_3 = 0x3, + EC_CODEC_DMIC_CHANNEL_4 = 0x4, + EC_CODEC_DMIC_CHANNEL_5 = 0x5, + EC_CODEC_DMIC_CHANNEL_6 = 0x6, + EC_CODEC_DMIC_CHANNEL_7 = 0x7, + EC_CODEC_DMIC_CHANNEL_COUNT, +}; + +struct __ec_align1 ec_param_ec_codec_dmic_set_gain_idx { + uint8_t channel; /* enum ec_codec_dmic_channel */ + uint8_t gain; uint8_t reserved[2]; }; +struct __ec_align1 ec_param_ec_codec_dmic_get_gain_idx { + uint8_t channel; /* enum ec_codec_dmic_channel */ + uint8_t reserved[3]; +}; + struct __ec_align4 ec_param_ec_codec_dmic { uint8_t cmd; /* enum ec_codec_dmic_subcmd */ uint8_t reserved[3]; union { - struct ec_param_ec_codec_dmic_set_gain - set_gain_param; + struct ec_param_ec_codec_dmic_set_gain_idx + set_gain_idx_param; + struct ec_param_ec_codec_dmic_get_gain_idx + get_gain_idx_param; }; }; -struct __ec_align1 ec_response_ec_codec_dmic_get_gain { - uint8_t left; - uint8_t right; +struct __ec_align1 ec_response_ec_codec_dmic_get_max_gain { + uint8_t max_gain; +}; + +struct __ec_align1 ec_response_ec_codec_dmic_get_gain_idx { + uint8_t gain; }; /*****************************************************************************/ diff --git a/sound/soc/codecs/cros_ec_codec.c b/sound/soc/codecs/cros_ec_codec.c index c19c7fe42e2e..3d4f9e82d6e9 100644 --- a/sound/soc/codecs/cros_ec_codec.c +++ b/sound/soc/codecs/cros_ec_codec.c @@ -65,18 +65,26 @@ static int dmic_get_gain(struct snd_kcontrol *kcontrol, struct cros_ec_codec_priv *priv = snd_soc_component_get_drvdata(component); struct ec_param_ec_codec_dmic p; - struct ec_response_ec_codec_dmic_get_gain r; + struct ec_response_ec_codec_dmic_get_gain_idx r; int ret; - p.cmd = EC_CODEC_DMIC_GET_GAIN; + p.cmd = EC_CODEC_DMIC_GET_GAIN_IDX; + p.get_gain_idx_param.channel = EC_CODEC_DMIC_CHANNEL_0; ret = send_ec_host_command(priv->ec_device, EC_CMD_EC_CODEC_DMIC, (uint8_t *)&p, sizeof(p), (uint8_t *)&r, sizeof(r)); if (ret < 0) return ret; + ucontrol->value.integer.value[0] = r.gain; - ucontrol->value.integer.value[0] = r.left; - ucontrol->value.integer.value[1] = r.right; + p.cmd = EC_CODEC_DMIC_GET_GAIN_IDX; + p.get_gain_idx_param.channel = EC_CODEC_DMIC_CHANNEL_1; + ret = send_ec_host_command(priv->ec_device, EC_CMD_EC_CODEC_DMIC, + (uint8_t *)&p, sizeof(p), + (uint8_t *)&r, sizeof(r)); + if (ret < 0) + return ret; + ucontrol->value.integer.value[1] = r.gain; return 0; } @@ -94,15 +102,24 @@ static int dmic_put_gain(struct snd_kcontrol *kcontrol, int left = ucontrol->value.integer.value[0]; int right = ucontrol->value.integer.value[1]; struct ec_param_ec_codec_dmic p; + int ret; if (left > max_dmic_gain || right > max_dmic_gain) return -EINVAL; dev_dbg(component->dev, "set mic gain to %u, %u\n", left, right); - p.cmd = EC_CODEC_DMIC_SET_GAIN; - p.set_gain_param.left = left; - p.set_gain_param.right = right; + p.cmd = EC_CODEC_DMIC_SET_GAIN_IDX; + p.set_gain_idx_param.channel = EC_CODEC_DMIC_CHANNEL_0; + p.set_gain_idx_param.gain = left; + ret = send_ec_host_command(priv->ec_device, EC_CMD_EC_CODEC_DMIC, + (uint8_t *)&p, sizeof(p), NULL, 0); + if (ret < 0) + return ret; + + p.cmd = EC_CODEC_DMIC_SET_GAIN_IDX; + p.set_gain_idx_param.channel = EC_CODEC_DMIC_CHANNEL_1; + p.set_gain_idx_param.gain = right; return send_ec_host_command(priv->ec_device, EC_CMD_EC_CODEC_DMIC, (uint8_t *)&p, sizeof(p), NULL, 0); } @@ -125,19 +142,27 @@ static int dmic_probe(struct snd_soc_component *component) struct cros_ec_codec_priv *priv = snd_soc_component_get_drvdata(component); struct device *dev = priv->dev; - int ret, val; struct soc_mixer_control *control; + struct ec_param_ec_codec_dmic p; + struct ec_response_ec_codec_dmic_get_max_gain r; + int ret; - ret = device_property_read_u32(dev, "max-dmic-gain", &val); - if (ret) { - dev_err(dev, "Failed to read 'max-dmic-gain'\n"); - return ret; + p.cmd = EC_CODEC_DMIC_GET_MAX_GAIN; + + ret = send_ec_host_command(priv->ec_device, EC_CMD_EC_CODEC_DMIC, + (uint8_t *)&p, sizeof(p), + (uint8_t *)&r, sizeof(r)); + if (ret < 0) { + dev_warn(dev, "get_max_gain() unsupported\n"); + return 0; } + dev_dbg(dev, "max gain = %d\n", r.max_gain); + control = (struct soc_mixer_control *) dmic_controls[DMIC_CTL_GAIN].private_value; - control->max = val; - control->platform_max = val; + control->max = r.max_gain; + control->platform_max = r.max_gain; return snd_soc_add_component_controls(component, &dmic_controls[DMIC_CTL_GAIN], 1); From patchwork Thu Oct 17 14:00:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 1178642 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="co8u00mk"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46v9my2sNkz9sPJ for ; Fri, 18 Oct 2019 01:01:06 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439757AbfJQOBG (ORCPT ); Thu, 17 Oct 2019 10:01:06 -0400 Received: from mail-vk1-f202.google.com ([209.85.221.202]:32923 "EHLO mail-vk1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437401AbfJQOBF (ORCPT ); Thu, 17 Oct 2019 10:01:05 -0400 Received: by mail-vk1-f202.google.com with SMTP id a130so977636vke.0 for ; Thu, 17 Oct 2019 07:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=NOI1mPAa3UePrvEcyGGunRNPwSdTxXGP0axdxShAK4g=; b=co8u00mkNN4YqCXon4IqCiiYFPoEvBQ3dyNyGtx43GJvnTt1HTGWkdHp1AF7H295In ojScYXCnfdl607cZ3fMAhlTwq9G3/97EJ9XXNiHyAutDJhDBMDrM+xskz9VT0RDwOCNr HAmnARLBIZ4jRg1otlN3dmLatXmqQ6tOj2qFPQOQ8bsqhSjPmnlSKxO4mA761Trr9/sz 9l6r0JOVhV+08enzyZA1gc3p4FcZwkvrgMTY8vZ6nnJbM/8AkVD3dQQDwBH7rj2uWYbm rIg9rxmMeBYoEkccod418osq33OnrabkZ50XW4b8ylTN+RZUN7FqwaFQaw1ssV3sblNE Rfiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=NOI1mPAa3UePrvEcyGGunRNPwSdTxXGP0axdxShAK4g=; b=JEDAHR7RrxQM0i+Eso6ukrWgONRzzpUs3TaU7+jP6u9POjRY43sBX3n9UgarpeDGlj Ad6qtgqgI1THN2XfgJg//1uX1x5Z2TwOtFIupAsBA/NaeoEY6xlBlbC+Kh6bTr9dLtAf U2GXCDFkw7AQMsnzfalB8DJzXLe68GO6dmdBQk79EOxdLQxphPDxNs8f+ENPXwu5ZRNf CgmZLNPtT/vXMWarSjD7qO7AOchP2mgku7Xt/5XuBzVE4N0A0a/0rxum6PyJ3mtAIu7E DQECr6CSu4NayLldjy8QVU17kb2wgwRcYNsjTjIrfheNIoDwLgPLnVyh3de7MYeubiS0 XdLg== X-Gm-Message-State: APjAAAUHrMLcLEd6VMPS1GKtenUPMogebV+3tzqF2DCNBW9sM4DD+IOc 4Um6qZuHCBZumijo1GBh3i8462QvpD57 X-Google-Smtp-Source: APXvYqxgcLB2fmxnEjzm9XFMmssqasHVsiK0nsCfeENxnDCDnfxF/CHrxmAxhwYjplMkMFfm0mGjb2gr9zfO X-Received: by 2002:a1f:5ed4:: with SMTP id s203mr1996971vkb.61.1571320863872; Thu, 17 Oct 2019 07:01:03 -0700 (PDT) Date: Thu, 17 Oct 2019 22:00:11 +0800 In-Reply-To: <20191017213539.00-tzungbi@google.com> Message-Id: <20191017213539.06.I0df85fe54162426e31f60a589d9b461c65df2faa@changeid> Mime-Version: 1.0 References: <20191017213539.00-tzungbi@google.com> X-Mailer: git-send-email 2.23.0.700.g56cf767bdb-goog Subject: [PATCH v4 06/10] ASoC: dt-bindings: cros_ec_codec: add SHM bindings From: Tzung-Bi Shih To: broonie@kernel.org Cc: alsa-devel@alsa-project.org, robh+dt@kernel.org, devicetree@vger.kernel.org, enric.balletbo@collabora.com, bleung@google.com, gwendal@google.com, drinkcat@google.com, cychiang@google.com, dgreid@google.com, tzungbi@google.com, Rob Herring , Benson Leung Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org - Add "reg" for binding to shared memory exposed by EC. - Add "memory-region" for binding to memory region shared by AP. Acked-by: Rob Herring Acked-by: Benson Leung Signed-off-by: Tzung-Bi Shih --- .../bindings/sound/google,cros-ec-codec.txt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/google,cros-ec-codec.txt b/Documentation/devicetree/bindings/sound/google,cros-ec-codec.txt index 0ce9fafc78e2..8ca52dcc5572 100644 --- a/Documentation/devicetree/bindings/sound/google,cros-ec-codec.txt +++ b/Documentation/devicetree/bindings/sound/google,cros-ec-codec.txt @@ -10,8 +10,26 @@ Required properties: - compatible: Must contain "google,cros-ec-codec" - #sound-dai-cells: Should be 1. The cell specifies number of DAIs. +Optional properties: +- reg: Pysical base address and length of shared memory region from EC. + It contains 3 unsigned 32-bit integer. The first 2 integers + combine to become an unsigned 64-bit physical address. The last + one integer is length of the shared memory. +- memory-region: Shared memory region to EC. A "shared-dma-pool". See + ../reserved-memory/reserved-memory.txt for details. + Example: +{ + ... + + reserved_mem: reserved_mem { + compatible = "shared-dma-pool"; + reg = <0 0x52800000 0 0x100000>; + no-map; + }; +} + cros-ec@0 { compatible = "google,cros-ec-spi"; @@ -20,5 +38,7 @@ cros-ec@0 { cros_ec_codec: ec-codec { compatible = "google,cros-ec-codec"; #sound-dai-cells = <1>; + reg = <0x0 0x10500000 0x80000>; + memory-region = <&reserved_mem>; }; }; From patchwork Thu Oct 17 14:00:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 1178643 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="GS4q6NIN"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46v9nH16jFz9sCJ for ; Fri, 18 Oct 2019 01:01:22 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439760AbfJQOBW (ORCPT ); Thu, 17 Oct 2019 10:01:22 -0400 Received: from mail-vs1-f74.google.com ([209.85.217.74]:50555 "EHLO mail-vs1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437401AbfJQOBW (ORCPT ); Thu, 17 Oct 2019 10:01:22 -0400 Received: by mail-vs1-f74.google.com with SMTP id w22so468269vsw.17 for ; Thu, 17 Oct 2019 07:01:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=8XXPJEKmRQHJ260AjlgjGDf0xJK5vMVAKae8lLscoNA=; b=GS4q6NINjE4xmnov9Tj1ZS/4JK8l9aGi1ykJcDV+DhEns0zPmLcnxU4YJ6gJc2Ugo3 A2MOVp/YJUc0sSR4QcuGvH/N0d4R+2DSO3r13spwS9WCjhI3P8uEUPAi1PaT2ze0rznP ghjZD7kPcxtZ0A8INTl0VB/NmbEbUIPEbVnYp1uNf3rKmJIcVeBor4C0m/c36zUrn8HI PllDvLoHoaNTjKD7Dj/j9cfj65qLcUtvvw+9DaSQOzuXzulLyz2yjxNPaceMQERfeVch zqcOBFRnhvbZ+hRM944VMMGT1YZMxdXboF2s1zLnv2C31O5zH3cyMZJwNzCBOjbLgfRF pZgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=8XXPJEKmRQHJ260AjlgjGDf0xJK5vMVAKae8lLscoNA=; b=JAZ4Dw6wYEjH/nN90tNzrhfgseAQdWWUs/Y+YCAfASwDGs/rR/jlXxkBzx11FXzAa7 JywFNwByA0kAIsjx5WLcwD/fkRnvnhyLIja82qadgthBiYENUxzcbV7SoOmFsPwkfLcV +Fh5ArSRYawvjltFVR8qLutfF1GP09SNto7bDjnQXFcNLkAK7AcIp59YAEaQX/Nymyar xzgXRuDT01hBh6CxMs9/eU+fE1kaj5ds/53yvhIeEIenLxteQn22mrrydglji4GPuihA fuIQUA6rkBGOTxraZ7HjntvVnJPKKUAUNJAaUb8hwj611IOvzik4YQ2dZEpGXBrquHUv UcxQ== X-Gm-Message-State: APjAAAX513bM/5AiNKTAzjV5hXxmrN46Gb64tMxRmfSNBY9YPQ3Uq88J 6UAzxBvyU6wu/pyu2QZtz+wYl/WGGrga X-Google-Smtp-Source: APXvYqwpVGe41Ec51jUiFN3Y7Lw5cwYf7xP9Z7G806scmiFjMPVFlEkaDEETTRRW6AvS2uVmHPj6zSsS1l5y X-Received: by 2002:a1f:3a15:: with SMTP id h21mr2067933vka.17.1571320879606; Thu, 17 Oct 2019 07:01:19 -0700 (PDT) Date: Thu, 17 Oct 2019 22:00:14 +0800 In-Reply-To: <20191017213539.00-tzungbi@google.com> Message-Id: <20191017213539.09.Iec97a3f137148cdf316056612590b3e0b302f5f3@changeid> Mime-Version: 1.0 References: <20191017213539.00-tzungbi@google.com> X-Mailer: git-send-email 2.23.0.700.g56cf767bdb-goog Subject: [PATCH v4 09/10] ASoC: dt-bindings: mt8183: add ec-codec From: Tzung-Bi Shih To: broonie@kernel.org Cc: alsa-devel@alsa-project.org, robh+dt@kernel.org, devicetree@vger.kernel.org, enric.balletbo@collabora.com, bleung@google.com, gwendal@google.com, drinkcat@google.com, cychiang@google.com, dgreid@google.com, tzungbi@google.com, Rob Herring Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add an optional property "ec-codec". If specified, mt8183 could use the "wake on voice" feature offered by EC codec. Acked-by: Rob Herring Signed-off-by: Tzung-Bi Shih --- .../bindings/sound/mt8183-mt6358-ts3a227-max98357.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt b/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt index 17ff3892f439..decaa013a07e 100644 --- a/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt +++ b/Documentation/devicetree/bindings/sound/mt8183-mt6358-ts3a227-max98357.txt @@ -6,12 +6,15 @@ Required properties: Optional properties: - mediatek,headset-codec: the phandles of ts3a227 codecs +- mediatek,ec-codec: the phandle of EC codecs. + See google,cros-ec-codec.txt for more details. Example: sound { compatible = "mediatek,mt8183_mt6358_ts3a227_max98357"; mediatek,headset-codec = <&ts3a227>; + mediatek,ec-codec = <&ec_codec>; mediatek,platform = <&afe>; };