Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4280667pxf; Tue, 30 Mar 2021 04:03:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDfwxji4aZXCz0RC23FFaIfdZ27K3UCAnmlJNRX4c5RqKX6LGJJsfqFgXKDvgOIwoL2wUT X-Received: by 2002:a17:906:f12:: with SMTP id z18mr32957625eji.132.1617102232716; Tue, 30 Mar 2021 04:03:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617102232; cv=none; d=google.com; s=arc-20160816; b=wdHcEBBJUCy8lpqbPtQl6h3AIjMtkZIIXMSbmt/A40IEUfycNaA6U9nOt7pa4Hrnim nnOQT4wLQKy5WnC5HJIcCGxvO2iXgNJCpGRmxmk+/mhIjt8ZXnKwojg5MGEXLTlkGYZY 743kTPHL7jEHdBS/uSyJ+Qi+cB9/odarkxt2EpKpeWKNHiIX+WetnnTszG+pNApF0D2H v51WRhlrQ/8ihVodklv4rDPfN0DPPXwqla3l85ZJ0pponpLdXew1Nz5o0Vzo61mHRtVm EuMB52XBkvkAqdAeobSZd5Sn22CEH5pYyJjIVrjAj3LmFAqgdqlBLOKxI+bIJ5pjaB25 ODMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=dyOe3pqXIdf8j+8HvSMwBv/J0i5wdpG3jbV9aLdsIZ0=; b=qWVSnIhQKVE+bBZ14Fci1AjwcPlW4ZhI3++Mli5W9yGEwV4BrJmft6jh/kQOC++WjH F4Hdr3ugh/WinBq55YTLnuwX8+Ip6CYg7a6nSGmjgDUcyIyjBeVwi17T5GP1CM8iguzy SZtg1m1qqfr/y1QqHGs/4Ly6/Z13fo73diE+ONLmcA8H8JFR/Ra1kY9Tk37W9LsVjQt9 Qj5KqGamBKr11AkZ5xfp4vNg8LNcrTBF+dS1DRUQDG7+6cplriNSdPX8IVN2GK0ab87u t8PF8SVskrtX94ilkwgMrxh0JRcBGKPpS32u2PcB9p/TvLFp8rQmLKCb0yFALGcATBO0 L8lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dpclOnoD; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m1si14097315edc.349.2021.03.30.04.03.30; Tue, 30 Mar 2021 04:03:52 -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=@ti.com header.s=ti-com-17Q1 header.b=dpclOnoD; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231853AbhC3LCh (ORCPT + 99 others); Tue, 30 Mar 2021 07:02:37 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:44574 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231782AbhC3LCT (ORCPT ); Tue, 30 Mar 2021 07:02:19 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 12UB1xNs058344; Tue, 30 Mar 2021 06:01:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1617102119; bh=dyOe3pqXIdf8j+8HvSMwBv/J0i5wdpG3jbV9aLdsIZ0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=dpclOnoD9zx3RN8v4H9CDxycMI+napWi9w1izugPIuLVBtcUcq0uOtc3oYgHpo4d+ H78oySkiebWh98uX060DO1yEVvGGwwqMNZIzslEwGfCWk8p9yUIHo2eFyxad9pQFjk Pv1jfoiZSetmOzzACiHdgQaTu72J7AFvEDD/v2eQ= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 12UB1xkL023018 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 30 Mar 2021 06:01:59 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 30 Mar 2021 06:01:59 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Tue, 30 Mar 2021 06:01:59 -0500 Received: from a0393678-ssd.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 12UB1dcn094447; Tue, 30 Mar 2021 06:01:56 -0500 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Vinod Koul , Philipp Zabel CC: Swapnil Jakhade , , , Lokesh Vutla Subject: [PATCH v2 5/5] phy: cadence-torrent: Add delay for PIPE clock to be stable Date: Tue, 30 Mar 2021 16:31:38 +0530 Message-ID: <20210330110138.24356-6-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210330110138.24356-1-kishon@ti.com> References: <20210330110138.24356-1-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Torrent spec specifies delay of 660.5us after phy_reset is asserted by the controller. To be on the safe side provide a delay of 5ms to 10ms in ->phy_on() callback where the SERDES is already configured in bootloader. Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/cadence/phy-cadence-torrent.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c index ff8bb4b724c0..0477e7beebbf 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -371,7 +371,16 @@ static const struct phy_ops cdns_torrent_phy_ops = { .owner = THIS_MODULE, }; +static int cdns_torrent_noop_phy_on(struct phy *phy) +{ + /* Give 5ms to 10ms delay for the PIPE clock to be stable */ + usleep_range(5000, 10000); + + return 0; +} + static const struct phy_ops noop_ops = { + .power_on = cdns_torrent_noop_phy_on, .owner = THIS_MODULE, }; -- 2.17.1