Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1000272pxj; Thu, 17 Jun 2021 19:47:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdJA17jgRfA/vG1pZ6JY8TZqJlCkbfCltn5gKeWNnLJ7g5tA18k4MTJZYxnjuirTb+PSvb X-Received: by 2002:a5e:9602:: with SMTP id a2mr6488898ioq.146.1623984479305; Thu, 17 Jun 2021 19:47:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623984479; cv=none; d=google.com; s=arc-20160816; b=TuhRYJ1mTEmCGl/qZxmFQu2r1ItAKbRTNUNZDkLpFVQ2FoMFzR9fUdz4+r/2BrbimJ aWRA4meUqkvkAw5B+Fqmdzb7tXSNAG+w1pc1pd7QULq7QHe33IA9+wn3/JsMfJLOjktU OsPwyPSaI5BKKGqralXtFodQc3eOdtLoEREUfK1c0dEdT8qCmI2JM85mJkyEZ4Fp5kzN y8cwGaJd1ntzaahq91VgGWKdMUlPC4Ei+CW0EgCBXVWSKWSBxVz9/xCp038YAcCQWP98 fz7wd9XOyZJ4TYOuve4Vll4eFAHuOYW5dYbmx0up9StHHIyXFQlKjt+WledQhimn1H/P X01g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hUciLQPe2Dk0W8P+MRSTjK4kMOaVU6u+TFpGcIEqZkg=; b=kOZJx+eOUgXD0bK7bi8TlzS9t58Loy0ZAUDdb15K4vWMJ/t+iAHcwnaLyCa2+36yG1 JEawcQSQwYRTwt9ZXh8UvbviluPRqHc2zeFUy/7hN5GpECu+Pq0iRdOhIrPaUM5cNVsR NcOABOaBxhAg3hclTA6n7dihwVRm9zyUiVswhP9mB5MCgYLsoOqtrcGImobmkJL1nfLs irtFctz7IuJhxvBoVXG+yzYEbMXmveRsZG2SXwyBdo3Mky6GWQjAKRVLH+rIama918vU ti8Xv0uzYR5A1B0xIdY+CGdo2c/+EiMR38Rl7kPJ6QzasG85qIjr2YpkObEbjao+PLYa lZUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b="go05/on9"; 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=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g4si874754ilj.40.2021.06.17.19.47.47; Thu, 17 Jun 2021 19:47:59 -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=@googlemail.com header.s=20161025 header.b="go05/on9"; 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=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232622AbhFQWjX (ORCPT + 99 others); Thu, 17 Jun 2021 18:39:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232203AbhFQWjW (ORCPT ); Thu, 17 Jun 2021 18:39:22 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F1D0C061574 for ; Thu, 17 Jun 2021 15:37:14 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id c7so4986357edn.6 for ; Thu, 17 Jun 2021 15:37:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hUciLQPe2Dk0W8P+MRSTjK4kMOaVU6u+TFpGcIEqZkg=; b=go05/on96W3tqe+r5HAAC/EouJUuzocIqNZcxoyePCdqdf1ZyIv5X0OUulBSw0vFZa eBB8nourSCgCsbxJd2wzMqaSLUgIRzkvaQ+2jr17NDmhJ07lCqDGcvBD7EJgnZrlHi4J HAk2KFnY3OvRz2WHPJyEmEpmnCqJ9mntAbLGKGZI7wkw60NgJmZDB6ulfCTijFuaqZLM RgVWqIWPEPVSPn7wEyuAmaVaxomq9Rw7qVF5ZK/zX1OiKq9zboVk4jZjOjQ+cp3uI8TT xyfuXJq0VXzpXXoOLCyzc8cjgeodHCsdfRXTMLmuhFf9SQKUFnHywo8IYtKhSFDN6E2J jbEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hUciLQPe2Dk0W8P+MRSTjK4kMOaVU6u+TFpGcIEqZkg=; b=uFnBSTdVNSFIPvX+29WiRytNFU9mbO2a+nvcQB/2intRIWPV095zk92txnYjJppkIU C6XEXWkTcFESZ2lvfN9JK2PT4h3O4KTv9Tge35j0OhpHB5mQrGDi4dF6zomUCnuvJUaF cyqrzbAnz2qI75w0aB1eFuepApLNUv3iLkZdhnj4i5xoD20AQKSr/jlfV0JkCeoLorh4 JJbOA6adLcEwcFUyy9NS05WMzm/SpfGR3iGzV3nD9NUusOx/pqBJytnSbRLxSrdu9WlT YVlSZ6Fc3tGfWFbfCyJuQEmPdEVkPtmJudwGnw/fT8Mgr1Jv0SzBBm4rjsnO1KIEX1c/ 59CQ== X-Gm-Message-State: AOAM533Po04LnlG5kLOUqO7Gnc46hoE8YcQxQHhhICUvmWG1+DzN0UgX UAas5E39nCX25F8iRp5VdLk0vvFlKm64snfVTVc= X-Received: by 2002:aa7:de1a:: with SMTP id h26mr830256edv.176.1623969433156; Thu, 17 Jun 2021 15:37:13 -0700 (PDT) MIME-Version: 1.0 References: <20210617194154.2397-1-linux.amoon@gmail.com> <20210617194154.2397-8-linux.amoon@gmail.com> In-Reply-To: <20210617194154.2397-8-linux.amoon@gmail.com> From: Martin Blumenstingl Date: Fri, 18 Jun 2021 00:37:02 +0200 Message-ID: Subject: Re: [RFCv1 7/8] phy: amlogic: meson8b-usb2: Power off the PHY by putting it into reset mode. To: Anand Moon Cc: Kishon Vijay Abraham I , Vinod Koul , Neil Armstrong , Kevin Hilman , Jerome Brunet , Philipp Zabel , linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Anand, On Thu, Jun 17, 2021 at 9:44 PM Anand Moon wrote: [...] > @@ -245,8 +250,6 @@ static int phy_meson8b_usb2_power_on(struct phy *phy) > regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_FSEL_MASK, > 0x5 << REG_CTRL_FSEL_SHIFT); > /* reset the PHY */ > - regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_POWER_ON_RESET, > - REG_CTRL_POWER_ON_RESET); The vendor driver uses the following sequence for the power on reset: - set the power on reset bit - wait 500us - clear the power on reset bit - wait 500us With your change we now: - wait 500us - clear the power on reset bit - wait 500us I don't know if this is sufficient to bring the PHY into a well-defined state. Maybe it works, maybe it doesn't reset at all in this case - I don't know how to verify this though. Best regards, Martin