Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5010444pxj; Tue, 22 Jun 2021 13:03:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdukdq+jO4EeiNifN8MYR2G0H9MZyRNf6xvtt4Gh3I+/2r3X8RttBNmXtZdRUmjyj3iM4t X-Received: by 2002:a92:c78d:: with SMTP id c13mr270332ilk.11.1624392188825; Tue, 22 Jun 2021 13:03:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624392188; cv=none; d=google.com; s=arc-20160816; b=YzLHbKKAintQw+5o/B0NRQtFriQAXpgRkQ87xqrV+WRZpq5mWBT/8Es7XpzXA2CXVp Ci0CLraW/F2IVBB+UMBG7/CioxAZ1sfVl47G4nbduSl9D4sdP2Qu/yxS712nDtD04o8m uTwqDWYsLUgk2Oo8YsIjDjEH9Z/R3cclzIXqRXyd+4NDtqrBpvnJBnDCqUV+4g3RqCes u7afBhz/TPcAOjl4a21Nf6HkFleSIgekBzNgXLc++hVatiqgzmSx7e3TUoGs9hCO2U77 AuJ73TLtIK/5lJqeHrVHpiZ/dTu/qRkRPMZKHWn7WOkdMwXfdKCIxJSB2J+TbjymSBPJ KZkw== 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=Zf4vdgRI2eIvOyP4BfdsN5wqUDVZRwFofOZUaIYATtY=; b=PTiGs+qEL1t4taOy1SZHi/sA0k5g4+Fu6QNTFRj0rg4g8Yh8IKpsWumWTg6GtTBNbY Mx41+d2/bc5PN4bgpc8LPHtWd6QaX9NKnCPv8HQnIyuntTvigPLnpY6wPOVotONCT7Vk VLJGfIyR90fVbi66os61oUafRQW1NxNkmjg8NS1A2Obrk28qm1J1aUPNXKCoF0ZRqFW1 /iAxn4DKCqohGe/sC8sOzupeY22TJg0ais0ApgzKMHiSDcQOAWpvyESVeZ8DP4/0Q+dO 8uC1EfdvORDchwrbYLCeQ8fgaKYFM8f1ZJoGywVdSx9f0ydRlQEs6Z5VuBCz51LMD54T 6unw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=Xg5E90d+; 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 w4si26353057iov.14.2021.06.22.13.02.56; Tue, 22 Jun 2021 13:03:08 -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=Xg5E90d+; 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 S232582AbhFVUDW (ORCPT + 99 others); Tue, 22 Jun 2021 16:03:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232418AbhFVUDV (ORCPT ); Tue, 22 Jun 2021 16:03:21 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94B2AC061574 for ; Tue, 22 Jun 2021 13:01:04 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id hz1so300944ejc.1 for ; Tue, 22 Jun 2021 13:01:04 -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=Zf4vdgRI2eIvOyP4BfdsN5wqUDVZRwFofOZUaIYATtY=; b=Xg5E90d+x7IHvd/rCJj3o+qjOEM4/AqGVdQHwicqleR2GFmKMJHRY9cvZgzHw86/if tznrosDerhJy+e7zX7Mx5kJmlnmmU5NF7vNhlzJ5dymzT2wGhQiVyDdlXdDYPL58wpTa BSNCwXlew5vXQ3W3lXJn5DO+f3JucPqUu1BYh3aEezggPgSfaEiiXXbWr0YlcBVsu5go 6nxrn5NW+fUFsh8NFcnVEh0+8mBDjxibwRtGGDaZjQNLCYK1yTTJ8DjYbw2HA6o4LIQu ho0jE/spAvLFFsIAk3PUZwld3AuKaV58T5AydE6JNGqqRXq42T+FKerU/2wRvAF9G7rX Qtog== 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=Zf4vdgRI2eIvOyP4BfdsN5wqUDVZRwFofOZUaIYATtY=; b=d6Sj9it6GOx2B5m/VGx2VtJ9WFmpMnqP/+kCGiPp7yJUBoNMkq4ub/3ZgxcLKkRGBQ fMA6M53eAhhiF6jPdT71/VdngT2xsv7zKv/T9gcamJq+KM00hJdBokIi2jsu2Udh15SO 8UHLxTToBn0D00kAhjpBbp2PiU7G5rDYJybF1zM9VrGW1qVTOmFM7vknl8+qU9bBdNQr Bq/l34hHyTPSvGdB/zEIPk00YUf+r5JXcshygLHzP5zwxHyxou/XkkWVoHTJA5ZM7U2b W+k1sshytSQUm5AbPTEGwLISivCCawdGoVvfRMC7MVgrpuhW8TZQf3OVAB1fOwA2A4we Fl1w== X-Gm-Message-State: AOAM533bmwji596v75f6Z6JLQMGO0UFSbF2iidKR9Rx1I2vj+gAHOGVF lY0iv+g+UiR3T46YW3R966KqgAoCGeLWFWZwF4o= X-Received: by 2002:a17:906:64c8:: with SMTP id p8mr5646217ejn.428.1624392060989; Tue, 22 Jun 2021 13:01:00 -0700 (PDT) MIME-Version: 1.0 References: <20210617194154.2397-1-linux.amoon@gmail.com> <20210617194154.2397-8-linux.amoon@gmail.com> In-Reply-To: From: Martin Blumenstingl Date: Tue, 22 Jun 2021 22:00:50 +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 , linux-amlogic@lists.infradead.org, Linux Kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Anand, On Mon, Jun 21, 2021 at 9:15 AM Anand Moon wrote: > > Hi Martin, > > On Fri, 18 Jun 2021 at 04:07, Martin Blumenstingl > wrote: > > > > 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. > > > Initially, I tried to some bit mask code to resolve this but it failed, > So no harm in keeping the original changes. yes, I feel more comfortable with that > There is another parameter REG_CTRL_PORT_RESET to be considered. none of the vendor kernels that I have sets or clears this bit explicitly I agree that the name seems related, but due to lack of an example or documentation how/when to use this bit I suggest we don't touch it for now Best rergards, Martin