From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5E12C48BE5 for ; Mon, 21 Jun 2021 07:15:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9DCD861156 for ; Mon, 21 Jun 2021 07:15:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229888AbhFUHR3 (ORCPT ); Mon, 21 Jun 2021 03:17:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229597AbhFUHR2 (ORCPT ); Mon, 21 Jun 2021 03:17:28 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55EC0C06175F for ; Mon, 21 Jun 2021 00:15:13 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id i5so25071eds.1 for ; Mon, 21 Jun 2021 00:15:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=g2VmOBbh4kfF26YhpUPXGB28rPvNAwUjRDpuCeiXVHo=; b=fqKD5IDT5oHBC8maBgSPfZhCXdKhsBTj5jzlUbJgQijXi1mI575CgsyZDErzU7gicQ 6zayRSxarLEgm9D8EQ+x9C2pNhfQIcNUNBg/LYsQeopH3uwf+qu4W5L1BU1+Af4L5TYT Bfyt1AlBB6sL1WTP8+D1QO5VUuD1Qazv+e09PNXA0WOTO1L2OeovaSWYfhGDIP56NVfd 1DDM4cTu4NUx3w8g0z36UnxoC4gWrOWrei5wWqoRdD0B9Okc69xFtNlY7DfE1pu0HeGW IK4LE+G6hFiGGG1fuvzlvKAXqTIg1/qjHo+ynoQDOddWnwXkTtkV7jM7NceWlViXHmSm 0eQQ== 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=g2VmOBbh4kfF26YhpUPXGB28rPvNAwUjRDpuCeiXVHo=; b=ZFJpgFRa2y/Hb6XkNiauNY2c61GBSep6cjjiVwa8Xc+VGSBXyw0XBumBSaHeQjLKRP B2EIVLFMWj2N/TIyyNg1E0ZIE/gfmDp1iPwKZF6gt2xavFx5pgm1ZKmSHZP2oHXXD7Ks OpSMBS4LuMAmxr94bOWofIEo3tpHIlaGdzDGdZyoA+ieubgOzDZFcpgSCN6ZvcaBzMRG tTHdhCV9gaKQXehTs4RFomHTcjWARwY7FDWejBGhuRQY3KROCK2DT0EtL5C/Dgdm3g2p gqqQNopwA+x5ofV0qPM3FCylapPjVoKgjJsRQ5/RCE4mKvwBDAMWS7JsV8V+Hz2UbtMC CSRQ== X-Gm-Message-State: AOAM532jQy15fbt3j9kgTXV/ZUpHKNP53jRv4BkPmKoRM3oaozucBgxt gWIeSwEzXrm64a0PQgmFSUKVGHoD13XVMPtUbA8= X-Google-Smtp-Source: ABdhPJxMw27+fNAEFULQjd6QLuyehyn4PR4Z6KE+kRdu0VUzdLm6B8ZIFnOIpuWRHMTIhMVnTwggmWHQo2W09KWm6rQ= X-Received: by 2002:a05:6402:4395:: with SMTP id o21mr19677609edc.163.1624259711929; Mon, 21 Jun 2021 00:15:11 -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: Anand Moon Date: Mon, 21 Jun 2021 12:45:00 +0530 Message-ID: Subject: Re: [RFCv1 7/8] phy: amlogic: meson8b-usb2: Power off the PHY by putting it into reset mode. To: Martin Blumenstingl 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 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. There is another parameter REG_CTRL_PORT_RESET to be considered. > > Best regards, > Martin Thanks -Anand From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E949DC49361 for ; Mon, 21 Jun 2021 07:15:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AADAE611CC for ; Mon, 21 Jun 2021 07:15:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AADAE611CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=37rOmSLlW7XzAII0lahqNgFOYSoayjIX7v5cmqiiKfk=; b=I+TKRo1YBCvRTa 8yQLziyp3SCSxljPe5ur76brc1UtkF0c9tb52gtztwuhYr/TpqCrLN/8j12Tk3nQZl+JJx47Pq1qF WDqON2xmb1GbIb4maHb3xTRBis9EFtQ4OXsBns4mXNQKvB0QQtsUCDY9EytwNCJHY3DcEAVARNgrV Z/JS/h2CeVQK+TZSrEARCNmHy5M6rvn/IHr7vvwh7/fcQzJHiuwLr3NtU3R+ThSeP228ErV1BcQoN XE2s2nNxFTuzADUSpoIJDfOdWfgioNaVnWxCTTRjDm3zDuJnFEpq0yulDq82DWGkTBdVqMo08FNsN Ku6xhdt4i+SC8OtSZKTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvE9M-002RdX-2A; Mon, 21 Jun 2021 07:15:16 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvE9K-002Rcz-0V; Mon, 21 Jun 2021 07:15:15 +0000 Received: by mail-ed1-x533.google.com with SMTP id d7so17551664edx.0; Mon, 21 Jun 2021 00:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=g2VmOBbh4kfF26YhpUPXGB28rPvNAwUjRDpuCeiXVHo=; b=fqKD5IDT5oHBC8maBgSPfZhCXdKhsBTj5jzlUbJgQijXi1mI575CgsyZDErzU7gicQ 6zayRSxarLEgm9D8EQ+x9C2pNhfQIcNUNBg/LYsQeopH3uwf+qu4W5L1BU1+Af4L5TYT Bfyt1AlBB6sL1WTP8+D1QO5VUuD1Qazv+e09PNXA0WOTO1L2OeovaSWYfhGDIP56NVfd 1DDM4cTu4NUx3w8g0z36UnxoC4gWrOWrei5wWqoRdD0B9Okc69xFtNlY7DfE1pu0HeGW IK4LE+G6hFiGGG1fuvzlvKAXqTIg1/qjHo+ynoQDOddWnwXkTtkV7jM7NceWlViXHmSm 0eQQ== 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=g2VmOBbh4kfF26YhpUPXGB28rPvNAwUjRDpuCeiXVHo=; b=N8GwRfoXZuNB8ww6Z2mu2NDARqfFtYKQ4KJM+wrxgAwUi1GZOX3TuISKGWWyabbZNf tNNhty1r5nxmiFR/QScZQrM6v5fBETYo6BmNdC3/ucuFBkAiMQl9LMjSbW8ROibJLjlY x908c32h6B+q8cJ6OgnR32hg85dyyqsyWLrNOZxAsPbCtT+r/qPurQG3sHN9rVzBWYvS fJ2tQ7PkaGPp/JPigm7JcFqIwDk8Znww7WugOj0RMcMHAcynuIhK7B53MByDaQJ3CKPt cYVCsWkHWokSxRe3HqE99qVaGEmcG5mvb4kYhesGCsl5OBkG+tWd/dcnVO4vTXIzUilA 7bfw== X-Gm-Message-State: AOAM533DsbCpRWwSGNMEzkVCFdjElR8Ss8OQoVezszKc16J33IfJeFSh gfUsigOcusFruWaB7slOQe7rQEckRHJ2TI2+Dus= X-Google-Smtp-Source: ABdhPJxMw27+fNAEFULQjd6QLuyehyn4PR4Z6KE+kRdu0VUzdLm6B8ZIFnOIpuWRHMTIhMVnTwggmWHQo2W09KWm6rQ= X-Received: by 2002:a05:6402:4395:: with SMTP id o21mr19677609edc.163.1624259711929; Mon, 21 Jun 2021 00:15:11 -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: Anand Moon Date: Mon, 21 Jun 2021 12:45:00 +0530 Message-ID: Subject: Re: [RFCv1 7/8] phy: amlogic: meson8b-usb2: Power off the PHY by putting it into reset mode. To: Martin Blumenstingl 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210621_001514_095118_479157F3 X-CRM114-Status: GOOD ( 18.46 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org 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. There is another parameter REG_CTRL_PORT_RESET to be considered. > > Best regards, > Martin Thanks -Anand -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74DDDC49EA3 for ; Mon, 21 Jun 2021 07:15:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3849C61156 for ; Mon, 21 Jun 2021 07:15:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3849C61156 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zK7bKcuvZKb53VO9T/AqQgxsqHWo60O7i6dQ5koa3Po=; b=VUtQAhnh3hiv2N J7NXKKkRUs1riZ6BKPsMsWxPT/VoEPry9u2e5ADz4UQjngpCe+ct+UIdwQDs6JBhc16WgHnElRHMK C+qFks0UDXo3FxvFgXJR/k918HnmTc7keIcTl6JvsGxwFdbhQYqRJc6foGNpOaQxxBxfiQTSSM9rx hqOqJL2FNGoATqWduttY0pT7z8MC1V5610cORCIZaut5MkBU9GX0GrZhUwhFsQCN/+zrpLVJWtgwA WUBFkb0Gig2QMQMx8vUe7yOK3jKXVQNEBT+U7eTdXcl9trdOkX9WCmZpamQnej9oNwFWlhdQRfXA6 ld58D9zI5NpfZo5NXyRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvE9W-002ReJ-Sq; Mon, 21 Jun 2021 07:15:26 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvE9K-002Rcz-0V; Mon, 21 Jun 2021 07:15:15 +0000 Received: by mail-ed1-x533.google.com with SMTP id d7so17551664edx.0; Mon, 21 Jun 2021 00:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=g2VmOBbh4kfF26YhpUPXGB28rPvNAwUjRDpuCeiXVHo=; b=fqKD5IDT5oHBC8maBgSPfZhCXdKhsBTj5jzlUbJgQijXi1mI575CgsyZDErzU7gicQ 6zayRSxarLEgm9D8EQ+x9C2pNhfQIcNUNBg/LYsQeopH3uwf+qu4W5L1BU1+Af4L5TYT Bfyt1AlBB6sL1WTP8+D1QO5VUuD1Qazv+e09PNXA0WOTO1L2OeovaSWYfhGDIP56NVfd 1DDM4cTu4NUx3w8g0z36UnxoC4gWrOWrei5wWqoRdD0B9Okc69xFtNlY7DfE1pu0HeGW IK4LE+G6hFiGGG1fuvzlvKAXqTIg1/qjHo+ynoQDOddWnwXkTtkV7jM7NceWlViXHmSm 0eQQ== 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=g2VmOBbh4kfF26YhpUPXGB28rPvNAwUjRDpuCeiXVHo=; b=N8GwRfoXZuNB8ww6Z2mu2NDARqfFtYKQ4KJM+wrxgAwUi1GZOX3TuISKGWWyabbZNf tNNhty1r5nxmiFR/QScZQrM6v5fBETYo6BmNdC3/ucuFBkAiMQl9LMjSbW8ROibJLjlY x908c32h6B+q8cJ6OgnR32hg85dyyqsyWLrNOZxAsPbCtT+r/qPurQG3sHN9rVzBWYvS fJ2tQ7PkaGPp/JPigm7JcFqIwDk8Znww7WugOj0RMcMHAcynuIhK7B53MByDaQJ3CKPt cYVCsWkHWokSxRe3HqE99qVaGEmcG5mvb4kYhesGCsl5OBkG+tWd/dcnVO4vTXIzUilA 7bfw== X-Gm-Message-State: AOAM533DsbCpRWwSGNMEzkVCFdjElR8Ss8OQoVezszKc16J33IfJeFSh gfUsigOcusFruWaB7slOQe7rQEckRHJ2TI2+Dus= X-Google-Smtp-Source: ABdhPJxMw27+fNAEFULQjd6QLuyehyn4PR4Z6KE+kRdu0VUzdLm6B8ZIFnOIpuWRHMTIhMVnTwggmWHQo2W09KWm6rQ= X-Received: by 2002:a05:6402:4395:: with SMTP id o21mr19677609edc.163.1624259711929; Mon, 21 Jun 2021 00:15:11 -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: Anand Moon Date: Mon, 21 Jun 2021 12:45:00 +0530 Message-ID: Subject: Re: [RFCv1 7/8] phy: amlogic: meson8b-usb2: Power off the PHY by putting it into reset mode. To: Martin Blumenstingl 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210621_001514_095118_479157F3 X-CRM114-Status: GOOD ( 18.46 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org 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. There is another parameter REG_CTRL_PORT_RESET to be considered. > > Best regards, > Martin Thanks -Anand _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E468BC48BE5 for ; Mon, 21 Jun 2021 07:17:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A572A610CA for ; Mon, 21 Jun 2021 07:17:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A572A610CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0lxq9VJWCi/3zGnF9yetJNc+YJM3Y8Pno6b7S6e+9xU=; b=FnyiqrUGNDM2+n opntzQqtsx3mbMGlDm/dfJHG5wmg7PPfZaSLgZJZylX0HUa8ZnxvNW3EwvO/WLO5TLvI4uiZfqyd6 e1m03R6i0HZ8CGuRFQ47xstMRohS8eSYSI8I7QT6bVJixkkVFch4I3eogLCOG2bsDasNU1yU7SxIO eX7nfJvmKWH8rH0n+cA0DDV/lyAmFq8AyZ9m1QMW+rMDkUHx+qe2xQKjv78wwACMjygSHOip0Q1LR vZdGi82BLxFGpnQNXkBBNUZq807kyCh+GeuACeBE4LubY9ThLvzUwxSarZOO8FklGJmygtB8fdj/R c1Z+7smSWRed42w0M95w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvE9O-002Rdt-7x; Mon, 21 Jun 2021 07:15:18 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lvE9K-002Rcz-0V; Mon, 21 Jun 2021 07:15:15 +0000 Received: by mail-ed1-x533.google.com with SMTP id d7so17551664edx.0; Mon, 21 Jun 2021 00:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=g2VmOBbh4kfF26YhpUPXGB28rPvNAwUjRDpuCeiXVHo=; b=fqKD5IDT5oHBC8maBgSPfZhCXdKhsBTj5jzlUbJgQijXi1mI575CgsyZDErzU7gicQ 6zayRSxarLEgm9D8EQ+x9C2pNhfQIcNUNBg/LYsQeopH3uwf+qu4W5L1BU1+Af4L5TYT Bfyt1AlBB6sL1WTP8+D1QO5VUuD1Qazv+e09PNXA0WOTO1L2OeovaSWYfhGDIP56NVfd 1DDM4cTu4NUx3w8g0z36UnxoC4gWrOWrei5wWqoRdD0B9Okc69xFtNlY7DfE1pu0HeGW IK4LE+G6hFiGGG1fuvzlvKAXqTIg1/qjHo+ynoQDOddWnwXkTtkV7jM7NceWlViXHmSm 0eQQ== 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=g2VmOBbh4kfF26YhpUPXGB28rPvNAwUjRDpuCeiXVHo=; b=N8GwRfoXZuNB8ww6Z2mu2NDARqfFtYKQ4KJM+wrxgAwUi1GZOX3TuISKGWWyabbZNf tNNhty1r5nxmiFR/QScZQrM6v5fBETYo6BmNdC3/ucuFBkAiMQl9LMjSbW8ROibJLjlY x908c32h6B+q8cJ6OgnR32hg85dyyqsyWLrNOZxAsPbCtT+r/qPurQG3sHN9rVzBWYvS fJ2tQ7PkaGPp/JPigm7JcFqIwDk8Znww7WugOj0RMcMHAcynuIhK7B53MByDaQJ3CKPt cYVCsWkHWokSxRe3HqE99qVaGEmcG5mvb4kYhesGCsl5OBkG+tWd/dcnVO4vTXIzUilA 7bfw== X-Gm-Message-State: AOAM533DsbCpRWwSGNMEzkVCFdjElR8Ss8OQoVezszKc16J33IfJeFSh gfUsigOcusFruWaB7slOQe7rQEckRHJ2TI2+Dus= X-Google-Smtp-Source: ABdhPJxMw27+fNAEFULQjd6QLuyehyn4PR4Z6KE+kRdu0VUzdLm6B8ZIFnOIpuWRHMTIhMVnTwggmWHQo2W09KWm6rQ= X-Received: by 2002:a05:6402:4395:: with SMTP id o21mr19677609edc.163.1624259711929; Mon, 21 Jun 2021 00:15:11 -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: Anand Moon Date: Mon, 21 Jun 2021 12:45:00 +0530 Message-ID: Subject: Re: [RFCv1 7/8] phy: amlogic: meson8b-usb2: Power off the PHY by putting it into reset mode. To: Martin Blumenstingl 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210621_001514_095118_479157F3 X-CRM114-Status: GOOD ( 18.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. There is another parameter REG_CTRL_PORT_RESET to be considered. > > Best regards, > Martin Thanks -Anand _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel