From patchwork Tue Jul 13 05:52:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 474832 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 2B9A4C07E95 for ; Tue, 13 Jul 2021 05:53:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 133B26100C for ; Tue, 13 Jul 2021 05:53:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233312AbhGMF4K (ORCPT ); Tue, 13 Jul 2021 01:56:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233147AbhGMF4K (ORCPT ); Tue, 13 Jul 2021 01:56:10 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D457C0613DD; Mon, 12 Jul 2021 22:53:20 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id 17so18577593pfz.4; Mon, 12 Jul 2021 22:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Apgi9n+xzAXbVBKSBVdWWRXmCTfXVngS5mFHrsICTMs=; b=B3ioeD3woNIR4eb4hYTJ1NhFODGfBWkLQ9pbW53Ntmb0NMuamJ68xfCoZup2ihwriq wDTdzx1v3MTl+aAOIs/ekQHiM/aKejL/nxL3x8BJdgipqgLE3wFo2YPg7ldQwfZea4Bh 3dsNR7dD8JwY6QQ2KB7P8/RzBAAwf8aHWGHO0/clNBOfbGfL4AmVcKQUN807hxODN6gB EUucJO5xCUoV6wfDQ4zA+io413074TdWGFJDSU724W7lXds6Wxjq1TlPvEoMA/3pYU+w XDDAiUfnXdayzbwwUm8THqEOFh/pkzRqJDOxCfHAdJwf3vkbSZKByKaTbKEVRNfUWDO6 ny8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Apgi9n+xzAXbVBKSBVdWWRXmCTfXVngS5mFHrsICTMs=; b=nbYqxHWzfJCpBEb9TRhy0tGi66DtnM+PHKJPIwjONLM2SZ9JuqW+NoLfPDfersmLPI Gf/TMcZ/R5p2QSSi11xdnVQoDN9XmLY/py8gEV/X+bRPDNJJKuR+nZk5vFGHh5Dr7PuD a0WrqsxE0r/JKAN+Wo9Vs789FxeI4t3+KgW6r/uEOlsyyzWKZsDEc6uuGXQ2ZkGV5rAu 3iQMHJPNQif23jqPmpH7lU31AV7cmeqmo3chn4bNQkoN00pesQoHFykGEhPQMaAmcAre rZQ6QIjcNE0igYaFGNovhVUCNsdSVMSx3cdVOz0gLRcojjkk90B+x+CQueC9f9bXc9uW E6aQ== X-Gm-Message-State: AOAM533e/MBxrOGJdPGcp1koi3hF+J7pFNsH23/4zYv9dsyT2hlpIkz0 YWy/VaTvdKv25fHzgGs1y8I= X-Google-Smtp-Source: ABdhPJzxR8bJEgTzU8kGrjBoNAgSB6f2OziGqch2oqIf2DEC659r67p0cjibkB2R9Nn/dIX5P6vx4A== X-Received: by 2002:a63:e205:: with SMTP id q5mr2716251pgh.404.1626155599825; Mon, 12 Jul 2021 22:53:19 -0700 (PDT) Received: from archl-c2lm.. ([103.51.72.31]) by smtp.gmail.com with ESMTPSA id x19sm17755198pfa.104.2021.07.12.22.53.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 22:53:19 -0700 (PDT) From: Anand Moon To: linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Anand Moon , Matt Corallo , Martin Blumenstingl , Rob Herring , Neil Armstrong , Kevin Hilman , Jerome Brunet , Kishon Vijay Abraham I , Vinod Koul , Emiliano Ingrassia , devicetree@vger.kernel.org Subject: [PATCHv1 2/3] phy: amlogic: meson8b-usb2: Power off the PHY by putting it into reset mode Date: Tue, 13 Jul 2021 05:52:14 +0000 Message-Id: <20210713055227.1142-3-linux.amoon@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210713055227.1142-1-linux.amoon@gmail.com> References: <20210713055227.1142-1-linux.amoon@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Power off the PHY by putting it into reset mode. Cc: Martin Blumenstingl Signed-off-by: Anand Moon Acked-by: Martin Blumenstingl --- Fix the commit message. rfc - Keep vendor driver sequence for the power on reset of usb phy [0] https://patchwork.kernel.org/project/linux-amlogic/patch/20210617194154.2397-8-linux.amoon@gmail.com/ --- drivers/phy/amlogic/phy-meson8b-usb2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c b/drivers/phy/amlogic/phy-meson8b-usb2.c index 03c061dd5f0d..2aad45c55494 100644 --- a/drivers/phy/amlogic/phy-meson8b-usb2.c +++ b/drivers/phy/amlogic/phy-meson8b-usb2.c @@ -219,6 +219,10 @@ static int phy_meson8b_usb2_power_off(struct phy *phy) clk_disable_unprepare(priv->clk_usb); clk_disable_unprepare(priv->clk_usb_general); + /* power off the PHY by putting it into reset mode */ + regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_POWER_ON_RESET, + REG_CTRL_POWER_ON_RESET); + return 0; }