From patchwork Sat Oct 5 05:58:03 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: 1172124 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="gFtgMnq8"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46lbfF2YzMz9s7T for ; Sat, 5 Oct 2019 15:59:01 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726774AbfJEF7A (ORCPT ); Sat, 5 Oct 2019 01:59:00 -0400 Received: from mail-qk1-f201.google.com ([209.85.222.201]:34287 "EHLO mail-qk1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726636AbfJEF7A (ORCPT ); Sat, 5 Oct 2019 01:59:00 -0400 Received: by mail-qk1-f201.google.com with SMTP id b67so8847966qkc.1 for ; Fri, 04 Oct 2019 22:58:58 -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=gFtgMnq80CRltdZD2CtDjfFW9fMAbPsJ6Z6QbQC2WlafGF+ynGDGhWpB5ni5F1N+/n 55UQcqwE1AUa1ssuqGP1HE6MaaCd/sAQ39iz8V5ZG2iEtS6rkTWVTTqB1eYzb/gbHroj 6QMGpczoTv+fgvnvGPTT1E41AdH1FKliYhX4JV2o+lSq/B4HNc9quZLrKvZGTxd0wmlU qQQKESBNoAxwzF/fmhfj2cbKTNek0hyP4L2QLiAdOxKZMSLxWeOu8Nix5Q5S9qe49B9U ZdUEtXi8r4bRVWRp/m3BW+eI5LELMKl7Myl8zPXN/xO+++djQcq7b0tv3uSi+MInBr2Y kO6Q== 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=hQwtOkXXQMto5ABv5k/RpxRicjtwypVmC+qJcs5ydZSjGYRI/Rz68LlU7XvjdyKCL2 bnYJ8Ec53yrD+7mnP4spKNjGjvaRZyGv/rb2KW6sTR394HkWtWHrbrS9eIXV93PpTB0p J4srbR8gBgGsL/FCi0p8b24gTmjie2fODn1DyF8zR44q7q9Fg8vmLhjABTvlwoy0yMcw R1dVXIXOUzrFpKhPei5lvcIW3AoSiGYvreNsd/gB7mkxWYNpS110I0ZxY/829AAGqlxC 3TPPHE2UIcljVLv3POjRiYNpuvi0kG/R8Hsr1GA48Dh3gH7w9Giw1VbfwGNfQe02Aq+D yWug== X-Gm-Message-State: APjAAAUDjfUlSiwZI3iUVMofciwiRafO8dGHKfA1TIEHyVNqSD+IDCgs +rgI3dMaI/0V5kgS006dhssG6tw060NZ X-Google-Smtp-Source: APXvYqznoY2dXLLJ5jKS927F0PwtjR49ho8ZSS218g4wjclzdI0dpLKMD+GFs6AheYXzq4t30F31HUuOQbKY X-Received: by 2002:a0c:f68f:: with SMTP id p15mr17620024qvn.31.1570255137813; Fri, 04 Oct 2019 22:58:57 -0700 (PDT) Date: Sat, 5 Oct 2019 13:58:03 +0800 In-Reply-To: <20191005055808.249089-1-tzungbi@google.com> Message-Id: <20191005130552.5.Id4657c864d544634f2b5c1c9b34fa8232ecba44d@changeid> Mime-Version: 1.0 References: <20191005055808.249089-1-tzungbi@google.com> X-Mailer: git-send-email 2.23.0.581.g78d2f28ef7-goog Subject: [PATCH 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 --- .../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 05:58: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: 1172125 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="pwuDtpdQ"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46lbfJ3BfTz9s7T for ; Sat, 5 Oct 2019 15:59:04 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726831AbfJEF7E (ORCPT ); Sat, 5 Oct 2019 01:59:04 -0400 Received: from mail-qt1-f202.google.com ([209.85.160.202]:48423 "EHLO mail-qt1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726636AbfJEF7D (ORCPT ); Sat, 5 Oct 2019 01:59:03 -0400 Received: by mail-qt1-f202.google.com with SMTP id r19so8971773qtk.15 for ; Fri, 04 Oct 2019 22:59:03 -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=pwuDtpdQkUw37uPBkawWEH5UEbyKj/92rsZLEWnMWLxMfJsAhZ9w0XOUMla9UL+ict zwTJ951sb4e9imqEeEaRAqKqbyUKdpUPjfonRAMwhU6n29cI0HDW69Uvn5a03TSrTvLt C0879QsGt9rxTp4jVoYBu64vGTnrB/BrwXDw3x9E1W/6mZkccSQi+fJAKqPWzEUkY8/7 iukTLAEUGlZQm/jIBZREsZ0YcZmrPvfs5qjfFoXn8PeK168mCKeBATVj+Jud/JL0gM1y yYq66LTRfNBzUT4sWo4jigQOdsPTM1xBqZ7SqxJUir6hmFrdERt+j+8hqfYWpmJZc86s Ochg== 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=CTw3H9d5mI3glNmUErP8wFofjU5L1HWFfUqJmQbNbDSMzKkVP9ri+jUWM+glBMhnqS Icyrg1ZGQ7FMPu6zSl2z8XIOKiyjEjnR7FEouPyZI/F0Fnn0cM3z6VJYh8w2jYb8aoUd FiSfrepKfxnnCLKCE4UOhWvktXdYqcMw94C8Hz9395NwEiaUBw/Op16FINeshFyLiUZ0 nhNmNwQ8S40SkiPcStA3XW9opHCtfBmLaoKviDn2GOmQOtOi01/gv5IvAro52ZFdCF7X CnODIfKHbexHIwaaqHBWGQnB35O8+GHje3oYSS0uDxZc2WKevyGRWHSOFAvDPXc6iowN Wkmw== X-Gm-Message-State: APjAAAXT6rk6KOPLkIEqGTmHrg3FpSypcpBOO4XQi7Oi5v+ik9hbgB2P Gp+9ZtszHORy+FE6QLQT+4GiLUEBS3Xh X-Google-Smtp-Source: APXvYqwJeuGRCNWl0Jv58EQx56XvBq9ESjXplaVSwszfGBRajq9VaPPIgdc6Sw1gP56WuO7IHjsEaEu7Mh72 X-Received: by 2002:a05:6214:1189:: with SMTP id t9mr17900493qvv.89.1570255142531; Fri, 04 Oct 2019 22:59:02 -0700 (PDT) Date: Sat, 5 Oct 2019 13:58:04 +0800 In-Reply-To: <20191005055808.249089-1-tzungbi@google.com> Message-Id: <20191005130552.6.I0df85fe54162426e31f60a589d9b461c65df2faa@changeid> Mime-Version: 1.0 References: <20191005055808.249089-1-tzungbi@google.com> X-Mailer: git-send-email 2.23.0.581.g78d2f28ef7-goog Subject: [PATCH 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 05:58:07 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: 1172126 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="hrALEg/H"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46lbfc4tKWz9s7T for ; Sat, 5 Oct 2019 15:59:20 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726840AbfJEF7U (ORCPT ); Sat, 5 Oct 2019 01:59:20 -0400 Received: from mail-qk1-f201.google.com ([209.85.222.201]:57022 "EHLO mail-qk1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726636AbfJEF7U (ORCPT ); Sat, 5 Oct 2019 01:59:20 -0400 Received: by mail-qk1-f201.google.com with SMTP id n135so8736145qke.23 for ; Fri, 04 Oct 2019 22:59:18 -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=hrALEg/HmJ+RBF4lWI2dLrqiBrrs7sZA/d7m0qrc+yGchyARzfncsLzaSzGBuIU8ZL UWpgcF3zP14DCRh/RWgRZG15US8Z6o5hnN8Sk60a5IufhHdiwY40G0e5VO6nALCLFBn+ tSi0AWFUgslLrus5/5P3Je4gX0nLD96IGzBMvmDl3z8MRz9yDjFStJHjlSzbFBOovRwQ GdbNRZxFQxlvwUsTNTeLUrpN2vT1tdvfPoRdsAxpqNrBB4ch9vDvf01x20MIneIkhAlt /sLojDnfpPo45316rmbmfvE/MS3iTPke10abVjbfp90b9gVwBWPlSDWsM13wJIWfnOcC AUBw== 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=t8iYBPKgAUKSxeLxpIPnNau3l5e65A3K8kDoTxUME/mO93Sr7ZvX9JGTM6sHAq0ux+ nswEpzn5xoX3vaJUaB5fYBBYoANMEFx/W+6Mx3tO4UHNwgQqIJnI30WAjz9lF6OhtLHM uWYgIztZjSnXbMObuxdfeODn/oXjFcZ4tZD5h16ii6VEK++HFfx5zRVOHiqlVswHhl3S DcHlJ++0182NvOl/3xwBzfFp8DrX7OggX5nvT43ZFzbnBKK0khlNaJtDtRMnWTmTEQqo jV2ijTVnETtP1eC5/g1r0xO3EvB7DnLWy4WttqgWY2dXgK8wlj1kWsEi5v6dMNjEio61 CY1Q== X-Gm-Message-State: APjAAAWSzbvrZ6IOvlAK+YQUQDvwdA18iJhr7tQqurMRGiGporBOiPu3 iPAf5pFz07mm5usz2Uo1ugRdcAv9xMQt X-Google-Smtp-Source: APXvYqyADdkh+lHP8dRTBId0QoDCr/3kdmcRfZKzwDNBV8JzuoHxl6Bb9Z5JmrP7olAejzPd8rI8yjA0rUL/ X-Received: by 2002:a37:6789:: with SMTP id b131mr13603933qkc.314.1570255157630; Fri, 04 Oct 2019 22:59:17 -0700 (PDT) Date: Sat, 5 Oct 2019 13:58:07 +0800 In-Reply-To: <20191005055808.249089-1-tzungbi@google.com> Message-Id: <20191005130552.9.Iec97a3f137148cdf316056612590b3e0b302f5f3@changeid> Mime-Version: 1.0 References: <20191005055808.249089-1-tzungbi@google.com> X-Mailer: git-send-email 2.23.0.581.g78d2f28ef7-goog Subject: [PATCH 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>; };