From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.0 required=3.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 322E1C282C2 for ; Sun, 10 Feb 2019 15:46:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 07C7C21773 for ; Sun, 10 Feb 2019 15:46:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726751AbfBJPqL (ORCPT ); Sun, 10 Feb 2019 10:46:11 -0500 Received: from mout.gmx.net ([212.227.17.20]:38705 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726102AbfBJPqK (ORCPT ); Sun, 10 Feb 2019 10:46:10 -0500 Received: from localhost.localdomain ([178.7.117.106]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lx5hl-1h8f3z0JJJ-016ikJ; Sun, 10 Feb 2019 16:45:22 +0100 From: Peter Seiderer To: linux-kernel@vger.kernel.org Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , b-ak , Kuninori Morimoto , alsa-devel@alsa-project.org Subject: [RFC v1] tlv320aic32x4: delay i2c access by 1 ms after hardware reset Date: Sun, 10 Feb 2019 16:45:19 +0100 Message-Id: <20190210154519.2506-1-ps.report@gmx.net> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: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OpgbFRK/tisGyZ8sBPCvM ot8t29am5QQ6lDngIjzURP+NtmlbK3gdHaFX+n8Eqh+RjxtB1f+tqszH8Kl5vAZoJcDNS65fI cB4k2EliXQ1kWYHv9qeQIyf2KsH7iK5EimNfyCobQC7rG3cF+jlKpsNdK1DVpC Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As stated in 'TLV320AIC3254 Application Reference Guide' ([1]): 3.2 Device Startup Lockout Times After the TLV320AIC3254 initializes through hardware reset at power-up or software reset, the internal registers initialize to default values. This initialization takes place within 1ms after pulling the RESET signal high. During this initialization phase, no register-read or register-write operation should be performed on ADC or DAC coefficient buffers. Also, no block within the codec should be powered up during the initialization phase. [1] http://www.ti.com/lit/an/slaa408a/slaa408a.pdf Signed-off-by: Peter Seiderer --- Note: This came up after the electronic departement took a deeper look at the i2c-bus/vcc/reset pins with a logic analyzer and the documentation because of a vcc/reset timing problem (now fixed on custom board). Not 100% sure if the 1 ms is needed (as restricted to ADC/DAC coefficent and codec block power up). --- sound/soc/codecs/tlv320aic32x4.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c index e1bfba62fc08..b3beb0ca87c3 100644 --- a/sound/soc/codecs/tlv320aic32x4.c +++ b/sound/soc/codecs/tlv320aic32x4.c @@ -972,6 +972,8 @@ static int aic32x4_component_probe(struct snd_soc_component *component) gpio_set_value(aic32x4->rstn_gpio, 1); } + mdelay(1); + snd_soc_component_write(component, AIC32X4_RESET, 0x01); if (aic32x4->setup) -- 2.20.1