Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4747730imb; Wed, 6 Mar 2019 22:53:26 -0800 (PST) X-Google-Smtp-Source: APXvYqyKywr6gxLoeCarNrZ6FosSe+iymR5jvvO7g36uQ1XDGm4k0Gs0MPu5t2EbdMcZPEvwKjAJ X-Received: by 2002:a17:902:14b:: with SMTP id 69mr6548413plb.216.1551941606644; Wed, 06 Mar 2019 22:53:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551941606; cv=none; d=google.com; s=arc-20160816; b=VEMYk30/siVYnlfyvnEDlcULObhoWAmkYp1OJ7ZkPn/MdlZgTAUcGt2ZKrR4gi310W uv5qz0tGvRZd5uVkrqQ8Nly8d3cjUd9475op0Z2q+7HdZEz5nRIoLFBP6CCZ1RvdK/mz FudUpJG9xJCGjrcmpArzxak2zU1tP5k7SJm+V5bjfUs5ialUv5W9QcOcvVIzwqtho+Me Md1jsSMYMBpk92WaicVLAEqXopBgqgt9vvU75A7GaA86r3mvPNBZQFQFqvBY0DTGc1TW KfDuUTt29CHggb2sBn2ZV5ki28GiuH3d4SKdDOEvSXSWPhCDcRSnGo2F27Yk4TZERGEC DKOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=lW8w7aIW4joUznyzXv4OfWYcByOuIgACWALKmxd0e6I=; b=Zr0iTiKIXmaBMi2JhgwLpUfNKPZv0MVQ8nq7X28B+S/t6RXW5/vC8snoo8LEDuYk9X I3qGUYEFdq6RzJZ22QgUTZZ3OUFkso0jwKyFOh+3+FcerD16b6qJL5i3oktOVsc1YpW5 bVNSn74+XHJQLFa53+jRbRuuRprjHPlOkmNib9idB8tNPuF15c7wRPm+swwCA0LFj1Ob FXP+4B7KAkWQVJZ7btLcw0AsISUTvqgV719QbLuez3Uuax2Y/HR9m92TopAjXqj4BVCk vcmBo7TFNcCbKljaJIZOA1w3P4o8iY6F2c8L7hVXOW9aJT8jb7FvOXZfRMvFrue2dETD Isgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=JqLlM7eQ; dkim=pass header.i=@codeaurora.org header.s=default header.b=LSxHpZI5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p4si3837561pli.159.2019.03.06.22.53.11; Wed, 06 Mar 2019 22:53:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=JqLlM7eQ; dkim=pass header.i=@codeaurora.org header.s=default header.b=LSxHpZI5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726491AbfCGGwv (ORCPT + 99 others); Thu, 7 Mar 2019 01:52:51 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:38112 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbfCGGwu (ORCPT ); Thu, 7 Mar 2019 01:52:50 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5763E60316; Thu, 7 Mar 2019 06:52:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1551941570; bh=xMsAy5jX7PfN1+hij6szv5EyTekRG3WhVJp4UcLaYxg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JqLlM7eQBQ0so2KQ+LAG15KVE8p1TEoO3T3EVVOrJe1BbLKUc9t7yh5Z3gWgPXUJf SJAG0kaLvNb6OlN29XwK+NZWhKpePcscX7OJYQoy96VUE8IxCrrk2MpNwce6IxcmhZ C0PGvwhUFQAdqSChtD8RiFDgovY1yO0E6cxdwkuQ= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 98BBE60316; Thu, 7 Mar 2019 06:52:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1551941569; bh=xMsAy5jX7PfN1+hij6szv5EyTekRG3WhVJp4UcLaYxg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LSxHpZI5KA1Ozls2zyFRGI0hSM2JyZF/bY6cre9UQ7WVWBnlypSe1k1Sar2FhvBCR Hpm0anw5TQuGbLDMP5ZA/u1wdkTk/iFbDBgIz2SoUy10F8cibxyz41KSezsW3ZYeSf zjcEM88HJrHbga80CEk+jJrYs0NWdNsirmT0XG1g= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 07 Mar 2019 14:52:49 +0800 From: rjliao@codeaurora.org To: Balakrishna Godavarthi Cc: Stephen Boyd , johan.hedberg@gmail.com, marcel@holtmann.org, mka@chromium.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, hemantg@codeaurora.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v1] Bluetooth: hci_qca: Give enough time to ROME controller to bootup. In-Reply-To: References: <20190306162113.8585-1-bgodavar@codeaurora.org> <155191158734.20095.15990837191526416248@swboyd.mtv.corp.google.com> Message-ID: <9df1c9cbbe655d4aca9464cf7ca69900@codeaurora.org> X-Sender: rjliao@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2019-03-07 14:49,Balakrishna Godavarthi 写道: > Hi Stepen, > > On 2019-03-07 04:03, Stephen Boyd wrote: >> Quoting Balakrishna Godavarthi (2019-03-06 08:21:13) >>> This patch enables enough time to ROME controller to bootup >>> after we bring the enable ping out of reset. >>> >>> Signed-off-by: Balakrishna Godavarthi >>> --- >> >> Any Fixes tag? And maybe some more explanation or background on where >> 150 ms sleep comes from would be useful. Was it determined >> experimentally or did it come from a datasheet somewhere? Does the >> time >> differ between boards? >> > [Bala]: this was observed in our stress testing and even the CHIP > firmware team > confirmed that BT chip required at least 150 ms to boot up. > > @Rocky to confirm my statement. > >>> drivers/bluetooth/hci_qca.c | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/drivers/bluetooth/hci_qca.c >>> b/drivers/bluetooth/hci_qca.c >>> index 237aea34b69f..1953b13511e7 100644 >>> --- a/drivers/bluetooth/hci_qca.c >>> +++ b/drivers/bluetooth/hci_qca.c >>> @@ -508,6 +508,8 @@ static int qca_open(struct hci_uart *hu) >>> qcadev = serdev_device_get_drvdata(hu->serdev); >>> if (qcadev->btsoc_type != QCA_WCN3990) { >>> gpiod_set_value_cansleep(qcadev->bt_en, 1); >>> + /* Controller needs time to bootup. */ >>> + msleep(150); >>> } else { >>> hu->init_speed = qcadev->init_speed; >>> hu->oper_speed = qcadev->oper_speed; Yes,ROME firmware needs 150ms to boot up after toggle the BT_EN pin.