From patchwork Sat Oct 5 08:55:04 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: 1172148 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) 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="UYGjJw4Y"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46lgZG3nYtz9s4Y for ; Sat, 5 Oct 2019 18:55:50 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727461AbfJEIzu (ORCPT ); Sat, 5 Oct 2019 04:55:50 -0400 Received: from mail-yw1-f74.google.com ([209.85.161.74]:46548 "EHLO mail-yw1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725976AbfJEIzt (ORCPT ); Sat, 5 Oct 2019 04:55:49 -0400 Received: by mail-yw1-f74.google.com with SMTP id 132so7976241ywo.13 for ; Sat, 05 Oct 2019 01:55:49 -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=HU4cbOuoYFqXlnJcy/p07LmBMaxvgrbFUK/zvntKxPw=; b=UYGjJw4YPEWdDN9o4g2gvWAVNBVzM1TG6Z+HEZG7VjCTJd5GhuMKsoNjf5aPEEMu9W //AzsK1ptKiR32XoQYODIWqI4pesyxEwUu8e1LXaxr9Y2JuoVAgVmtLieNtxQBWf4SjM 8VSnRofPKdIbaj548DiMM2e8uePAxJlTgzSQyFYE8gpfO+7FX5KvGVnayU2xv8mIzqEz PAMSfP6oYpze/IK5C+bVcSf9UWhLTtfRRJ24WvTf0GP1Sp/i43B9B96DPoDrwXiHGQkC nAgd9fY+GKS7v6E+ktPr9dBWAZddKWOE8ZYdXCLz7g8xTuDpgrnRqq2qZ48iXj24mbGl 9xJQ== 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=HU4cbOuoYFqXlnJcy/p07LmBMaxvgrbFUK/zvntKxPw=; b=mYIeOEqaZ0lSaX2R+zBeNhHnSypCmUCS3Ix+jAmFZWizilDyhPcsNWssf97I/Z51pT Ff4v1bOHwJerDjHqGuhu5p7uemPyt2/Yt6jCSqDTCaM55mHsZJcIQU/yXs6/xbbOFmyZ bPe2D320vVV1t4bn0dDnRmglIppRF4TGCOrrzaqIaLnJu196RK8TnktAQvorvwCuVt8U zh0ebUER1eSP2KChoYBXzJEoOjHoHaDZKSjrLZuTMqk2Y1/TpUqBnWOAuvVmABgFZyAX KJDQYShV9aRuP/oumZjMQ0NCVeDKZYuojWEUtRN9owP19RBYjHKiiPhbgU2I0qF0VWMB +psw== X-Gm-Message-State: APjAAAUgMVrnaMjGdDmPegG8YR1Jc0MCrMrk1v/On5x8pYHAWQWQPj44 PvNtSRksWQ4FKnh7PXq73HsOvx7eRUaG X-Google-Smtp-Source: APXvYqwLGeSg5aXPHUbf4MVCCrdMAlOw0YhquimqiIUQfdPlcUKg5nNPv9VYlPj80c8csDcttTXbSyDc5LY2 X-Received: by 2002:a25:be45:: with SMTP id d5mr4491339ybm.494.1570265748713; Sat, 05 Oct 2019 01:55:48 -0700 (PDT) Date: Sat, 5 Oct 2019 16:55:04 +0800 In-Reply-To: <20191005085509.187179-1-tzungbi@google.com> Message-Id: <20191005164320.05.Id4657c864d544634f2b5c1c9b34fa8232ecba44d@changeid> Mime-Version: 1.0 References: <20191005085509.187179-1-tzungbi@google.com> X-Mailer: git-send-email 2.23.0.581.g78d2f28ef7-goog Subject: [PATCH v2 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 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. Signed-off-by: Tzung-Bi Shih Acked-by: Rob Herring --- .../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 Sat Oct 5 08:55:05 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: 1172149 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) 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="cJpLy7YH"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46lgZP1S3kz9s4Y for ; Sat, 5 Oct 2019 18:55:57 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727466AbfJEIz4 (ORCPT ); Sat, 5 Oct 2019 04:55:56 -0400 Received: from mail-pg1-f202.google.com ([209.85.215.202]:40856 "EHLO mail-pg1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725976AbfJEIz4 (ORCPT ); Sat, 5 Oct 2019 04:55:56 -0400 Received: by mail-pg1-f202.google.com with SMTP id w5so5989023pgp.7 for ; Sat, 05 Oct 2019 01:55:56 -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=kmoQ5EfiuLPugExVdasoEEQ+xSgNc8VlrAlw91YpZWU=; b=cJpLy7YHnMDaIZiQzeucIuhSVgVwX/T/uIRDaMaSWPVblQ1e6ymh7GXJqCSmCo4GXT Jc4Zmu6OfUG4aPCpr9xLNxy2Pg7kez9HhFw8cfrclIghRTESqS1mpvNj3dUYHfUXsT5A FULp7yHNmqg+oQw3WzNeS+HE5cZIT4WPaZZ0opOgmdiLNNd1hvFoVNmUaw/zSuc4dbDk BdzwAmte2M0xqJHk/PLUy9QFN8/zwxad23V4tOmwXFHOMEZN0kU9WkcdO+Pt2hyF8zgF 1jvdGrqX3/r0jRSgdQYggIbZf4ZTaHWpAXTxyVZOuqWfWuRCvqMdkBgJBUu/oLmJkBov gRuw== 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=kmoQ5EfiuLPugExVdasoEEQ+xSgNc8VlrAlw91YpZWU=; b=RyjcvIyHM0yi/a/SVlSLiHodmenEShtsHcBjmgTifzcl90REoS8DGlju09OULCn9kK i/ycZy0NPGBoxHmf9TTU4j/ZTAtEf/mSuP+Y7yZV7WnUmJX994fgzcOtDMz0R1qSPdAL IPV7NC/adMGdL3a+64tG8Di2852WFejb3h/oKuEN9E0rQxa7l4A61sMOpJsCtXpjbjTj +k3uoYKRDwyQujMXWc75Ktn+/OcGCV4/x1DBptEKH3JYEK/xCpctgmwwovHucATR4YdC F6uP5s1+8ZODJg7k+K5S8mVUNlcrk63NfC7toqYxI7gM64C9BvctqIwxCrUYHlEFtljY fDwQ== X-Gm-Message-State: APjAAAUs8GgVaDdO1O72ANuWL58cx3v/agrWsqiDZJGEMJyNM5kALwbB fwvaSAnlkcLaYNlQi9osctEfy4c+eici X-Google-Smtp-Source: APXvYqwynwoYoFkQk/iqR6Um03rnnEYqoeUKYCC03KFr+9G5mr1Gtv+8iqBgDOJh+ZT7W5oEvjXdNeqyTLf/ X-Received: by 2002:a63:1515:: with SMTP id v21mr1565875pgl.270.1570265755484; Sat, 05 Oct 2019 01:55:55 -0700 (PDT) Date: Sat, 5 Oct 2019 16:55:05 +0800 In-Reply-To: <20191005085509.187179-1-tzungbi@google.com> Message-Id: <20191005164320.06.I0df85fe54162426e31f60a589d9b461c65df2faa@changeid> Mime-Version: 1.0 References: <20191005085509.187179-1-tzungbi@google.com> X-Mailer: git-send-email 2.23.0.581.g78d2f28ef7-goog Subject: [PATCH v2 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 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org - Add "ec-shm" for binding to shared memory exposed by EC. - Add "memory-region" for binding to memory region shared by AP. 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..cb46bc082b4b 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: +- ec-shm: Shared memory region from EC. It contains 3 unsigned 32-bit + integer. The first 2 integers combine to become an unsigned + 64-bit 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>; + ec-shm = <0x0 0x10500000 0x80000>; + memory-region = <&reserved_mem>; }; }; From patchwork Sat Oct 5 08:55:08 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: 1172150 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) 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="UraZicHw"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46lgZj5L0gz9s4Y for ; Sat, 5 Oct 2019 18:56:13 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727478AbfJEI4N (ORCPT ); Sat, 5 Oct 2019 04:56:13 -0400 Received: from mail-vk1-f201.google.com ([209.85.221.201]:47380 "EHLO mail-vk1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725976AbfJEI4N (ORCPT ); Sat, 5 Oct 2019 04:56:13 -0400 Received: by mail-vk1-f201.google.com with SMTP id h186so3816190vkg.14 for ; Sat, 05 Oct 2019 01:56:11 -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=qa8lzqL1R0bb0ynaHlYSrIGdb8PV3M5EMBcQMQXD2v8=; b=UraZicHwjCEtlcAcIlTe6U/OCfDrPJuOUT15Bs5ywid0E9tY6/NA6zYE6ek4sII0+V ZH4WsO2y2mQ0N+zgfx6xzFBEDbWCXLtjTyY0CyMYLt2U1oqThRk1YPVgC1/GMRVMF+aK 7Ja6+J3vzQk4PykixTC5Lm1ETCss7R/mqN5Q7+dBmBbRHQY3EOlcvwIZQ/5UJdgQM8d1 l/6RZibDM2z4E3W64TNi0jDw9ioFQ2o2pjmYtpe1/MFNkQ/7tnp5zjWmp9wk67/PFoCA gH6SCJscRPCYyuXtg+f5Nhg9WZ4sXGie9oJqM/+tjya4DUOXp3Y6BHbEM1WvLF/KMPjh jVlQ== 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=qa8lzqL1R0bb0ynaHlYSrIGdb8PV3M5EMBcQMQXD2v8=; b=pjrFqtyryHl0yt4+DFK4E0MuxLK3BMT1w42/t6sQFLNkZyhw/rpl66CZI7VJPuq5Q9 CQ5q7UXIYs3wvcMORfVIsUEza05inXX4ghqRP40mgKfzg5OT4rGEHU0DhnodIadkKUmd iJTbmOsTo8rebsXBNX6Zk8HECoJax8S4jbYco2NRbh0cjOo6eZdDicqS+n1+fIhIrwt6 WOXR1nE6E0PH4I7ikWf+mTFF3Az40om4Abj8b2v83QH9gagYsn+LRm+cJ5YrzgaC1PE1 NZMtPujbwtedFXOb53VBCzDtNM+dxXdCPxNN1kIGEfdQ6mDabjMVBp+R5g3kmmMKWhHz Be+A== X-Gm-Message-State: APjAAAXZYpc+Fw/wfFbP3XnhbzbrSgTDL2PIDxl/aUA59hQsltTgJdmX HJB4Dje7R/QfurzV+/cSEZLXIT8o15fP X-Google-Smtp-Source: APXvYqyjwL8MOE9N8yRaRWFpyHtPJoChFMKlMx/LTpE0kY6mCotQO59jomg21CrtUgtdWcFZQ0TtiitA4jKg X-Received: by 2002:a1f:4342:: with SMTP id q63mr10068217vka.69.1570265770569; Sat, 05 Oct 2019 01:56:10 -0700 (PDT) Date: Sat, 5 Oct 2019 16:55:08 +0800 In-Reply-To: <20191005085509.187179-1-tzungbi@google.com> Message-Id: <20191005164320.09.Iec97a3f137148cdf316056612590b3e0b302f5f3@changeid> Mime-Version: 1.0 References: <20191005085509.187179-1-tzungbi@google.com> X-Mailer: git-send-email 2.23.0.581.g78d2f28ef7-goog Subject: [PATCH v2 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 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. 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>; };