Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1538176ybg; Wed, 29 Jul 2020 17:32:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjznCo2v7IDYfmfAxCuPjxCkZMA54nqodes9JWztxtW9TZVBXo+Urtf5/z6ti27PK0AnbW X-Received: by 2002:a17:906:1911:: with SMTP id a17mr153271eje.431.1596069166958; Wed, 29 Jul 2020 17:32:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596069166; cv=none; d=google.com; s=arc-20160816; b=Ru6wExK1F1XYuO847sNbXie2zdVAub18VDsxyjrlguLoU3aq4eHjS6KuX1yUIwcCGC YLj0UAUGB/QoIIaGyY9g/rFjzW+RH24M7ow01ZHXRL4i/Q6YNxN085h3+rKyhRmtJJnJ 2AhjKtyGYmxfex/NIIz9MbIgWuS7YoATrldRgkWUoinFVbWy1/HjliQuU6RrUc2KBTqN EeX5gW0WS45HRWGqwDEZswJ7aPB86eCoOnmHy88REonqzCzLF1vxkDdDfhjrrZjuJpq4 jM6LpFrnDb8DyNpNljZDHHkG7VSzkjBa9s+C1K4474bWaP0PfVLjRtPBxqSeDFgm+eFO 4l1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=ZVacFYGVPN4g3YsTbyPGFySWPU41Uv/NcrgGIRbhArM=; b=sAIlqKmJE+sfGhMjzkw9EFrNZ03JxsESVd4ALXufN9Ea60FXbL21DIvhpQb3DpDzjK hvP0Ze0spz6a6G3taLaQ5HQ8fLPEpFnDwzT+izoVnXTo/RSwbIRdPelqHtUQcbmG90xC btZydvFlaDgm9YpUZbHJCKHCXb5WhPUJxcyZQhYzPb/pnr5u3+comwHnrf4Q+86qxAd0 qr2N6loa1Nz+vSAiWGq2LP0nwHFF/gdiMrKjTmg2Wlrvj5J1NWxB0QOxYyOmgodYu/Ow Lv66FmK5Wa7y9C6bJkvzdl+L3AwRZtTXQH0wo6DBQoFGTzWy3qNLKCpfc4x6svAMv1q8 HRTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="MJv/c1zN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b31si2373755edf.456.2020.07.29.17.32.23; Wed, 29 Jul 2020 17:32:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="MJv/c1zN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728407AbgG3Abw (ORCPT + 99 others); Wed, 29 Jul 2020 20:31:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728321AbgG3AbZ (ORCPT ); Wed, 29 Jul 2020 20:31:25 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DD10C061794; Wed, 29 Jul 2020 17:31:24 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id s16so11779248ljc.8; Wed, 29 Jul 2020 17:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZVacFYGVPN4g3YsTbyPGFySWPU41Uv/NcrgGIRbhArM=; b=MJv/c1zNeN0Y5gPtpTwF8qnxVnppEDQGAM2rcHWruQWUzBP4mkFtGmXpEWQHAqv8Vt HvKU+v0luAKbhOnJUhnbnuGd8/PYr3Qt6jaVpPct2NBIsNs80hu9vnrIqYn1/YeA57TS FQgZA6Pli3yZZuWkEUSEXNJEM02d2/Iz/BTZ3XaYwZ6eWB5y/PAHoIAstrRKlwcUtJdu p0qGGWW2dK9RZwfgzJaud+XSiOfSaLekBEfKfGI90mFRItoVy7glD7Zwlc0+bWxuel0o gMvnN1Lg47xkrAFvxxkW5pi69ydwQEjbWJ2GdlVEbnoJQMJuRBtddlQloi/QHV72+VpI F34g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZVacFYGVPN4g3YsTbyPGFySWPU41Uv/NcrgGIRbhArM=; b=E1EhD2wVApRtsdeTcy2KQd03xOQtBT48EeuOipLIH0ShY51QbWAvHIoxXIlfRpTRcg T8ar1E0gFFXNLKyjwJIT9Zqh8I2fsannoZNKR7CZk45Ive0YlwpLWgyF/Vb/wSVkZYy4 kVACY91MyaToA3T1wSjyEXuHBSTMfepE+9Dmg1uJIR6eXOGuuvm2MQWYR73Rud7xM8Nr d9u+4yHbpQwFm0+PgqErlr4QJ44tUeq9b/e97BA0VqxS54ezBjE+DBw8fh4ZlW4X+/fe HmZag5tAGQfrDl8LLIjI2d6YZKM5j57/D632TN3V4G9YSCkyq35oC2X8e3cjgKjk8lfh QJHQ== X-Gm-Message-State: AOAM531lrIzZT4RvdgunLLHKNAdnFdTMWvMPki0eIb/M0wKi8/eESWh5 NqO6wwBM8g7SDC0SqahZGJoaV7EA X-Received: by 2002:a2e:8853:: with SMTP id z19mr199537ljj.267.1596069082777; Wed, 29 Jul 2020 17:31:22 -0700 (PDT) Received: from [192.168.2.145] (ppp91-76-12-16.pppoe.mtu-net.ru. [91.76.12.16]) by smtp.googlemail.com with ESMTPSA id r19sm794198lfi.58.2020.07.29.17.31.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Jul 2020 17:31:22 -0700 (PDT) Subject: Re: [RFC PATCH v5 12/14] gpu: host1x: mipi: Keep MIPI clock enabled till calibration is done To: Sowjanya Komatineni , thierry.reding@gmail.com, jonathanh@nvidia.com, frankc@nvidia.com, hverkuil@xs4all.nl, sakari.ailus@iki.fi, robh+dt@kernel.org, helen.koike@collabora.com Cc: sboyd@kernel.org, gregkh@linuxfoundation.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org References: <1595883452-17343-1-git-send-email-skomatineni@nvidia.com> <1595883452-17343-13-git-send-email-skomatineni@nvidia.com> <69903c67-8e5f-11c2-45ec-c76b97634aba@nvidia.com> <48977b6b-ef7e-1bdf-e3e0-2903032aa225@gmail.com> From: Dmitry Osipenko Message-ID: Date: Thu, 30 Jul 2020 03:31:20 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 30.07.2020 02:54, Sowjanya Komatineni пишет: > > On 7/29/20 4:42 PM, Dmitry Osipenko wrote: >> 29.07.2020 20:55, Sowjanya Komatineni пишет: >>> On 7/29/20 10:08 AM, Dmitry Osipenko wrote: >>>> 28.07.2020 19:04, Sowjanya Komatineni пишет: >>>> ... >>>>>>> +void tegra_mipi_cancel_calibration(struct tegra_mipi_device >>>>>>> *device) >>>>>>> +{ >>>>>> Doesn't MIPI_CAL need to be reset here? >>>>> No need to reset MIPI CAL >>>> Could you please explain why. There is a calibration state-machine that >>>> apparently needs to be returned into initial state, does it return by >>>> itself? >>>> >>>> TRM says that MIPI block needs to be reset before of starting >>>> calibration process. The reset is completely missing in the driver, I >>>> assume it needs to be corrected with another patch. >>> TRM documented incorrectly. There is no need to reset MIPI_CAL. >>> >>> MIPI CAL is FSM and it does not hang and done bit is to indicate if >>> results are applied to pads or not. >>> >>> If we don't see done bit set meaning, MIPI CAL did not see LP-11 and >>> results are not applied to pads. >> But how to stop calibration from triggering on LP-11 once it has been >> enabled? The reset should be needed since there is no other way to reset >> the calibration state. > > Its a finite state machine that goes thru fixed steps of sequence codes > internally and holds results in registers. > > When it sees LP-11 results are applied to pads. > > If it does not see LP-11, next start will again trigger calibrating with > finite sequence codes. > > As per HW designers, we don't have to do any reverts when done bit is > not set. Alright, then should be good if HW can't stuck. Reviewed-by: Dmitry Osipenko