Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0BDE4C77B73 for ; Thu, 27 Apr 2023 07:36:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 634AF863A0; Thu, 27 Apr 2023 09:35:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="KtgvA2F0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A8D6286386; Thu, 27 Apr 2023 09:35:48 +0200 (CEST) Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4DB0586291 for ; Thu, 27 Apr 2023 09:35:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=eugen.hristev@collabora.com Received: from eugen-station.. (unknown [82.76.24.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ehristev) by madras.collabora.co.uk (Postfix) with ESMTPSA id 806C066031CD; Thu, 27 Apr 2023 08:35:45 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1682580946; bh=Xkw0VNGSI914s3M38zPGtw86y9mD6eJr8twJCbgwFds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KtgvA2F0MZYQXTcadCqRRTGapsRt4XZd2WLYyLQmvrb81OFdQJc5xDAHObfoblu/w Qc0pPR5fqu7qOwf2STw4VSqisAHJPmSCJfiIR21JQqSYWDFNF2HudA7jsPse0LXgw+ +dXASU5OWcFWE96Qd2vHzu+Fr17MbIfinXZAjpWLaIJI5vSjIHI+2mW88jwZJ++QID +34zB9Ql8OutFHFuLmNApdurkI7xwvFGb76M7ZBPEvsb5ka6tMrH06v42cGfPC/xCC yo5bAX1y38trkYZhsmp7c4GQzoLsg8Ea2JoPVf4NY+Lu/bPOq8MdkQco81PDdMZffD TYql3xDYSjw4A== From: Eugen Hristev To: u-boot@lists.denx.de Cc: jonas@kwiboo.se, jagan@edgeble.ai, kever.yang@rock-chips.com, eugen.hristev@collabora.com, Ren Jianing Subject: [PATCH v3 3/7] phy: rockchip: naneng-combphy: Add support for multiple resets Date: Thu, 27 Apr 2023 10:35:34 +0300 Message-Id: <20230427073538.158855-3-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230427073538.158855-1-eugen.hristev@collabora.com> References: <20230427073538.158855-1-eugen.hristev@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Some variants of the PHY have more than just one reset. To cover all cases, request the rests in bulk rather than just the reset at index 0. Co-developed-by: Ren Jianing Signed-off-by: Ren Jianing Signed-off-by: Eugen Hristev Reviewed-by: Kever Yang --- Changes in v2,v3: - none drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c index 78da5fe79700..b673a8da9f8e 100644 --- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c @@ -76,7 +76,7 @@ struct rockchip_combphy_priv { struct regmap *pipe_grf; struct regmap *phy_grf; struct phy *phy; - struct reset_ctl phy_rst; + struct reset_ctl_bulk phy_rsts; struct clk ref_clk; const struct rockchip_combphy_cfg *cfg; }; @@ -189,7 +189,7 @@ static int rockchip_combphy_init(struct phy *phy) if (ret) goto err_clk; - reset_deassert(&priv->phy_rst); + reset_deassert_bulk(&priv->phy_rsts); return 0; @@ -204,7 +204,7 @@ static int rockchip_combphy_exit(struct phy *phy) struct rockchip_combphy_priv *priv = dev_get_priv(phy->dev); clk_disable(&priv->ref_clk); - reset_assert(&priv->phy_rst); + reset_assert_bulk(&priv->phy_rsts); return 0; } @@ -255,7 +255,7 @@ static int rockchip_combphy_parse_dt(struct udevice *dev, return PTR_ERR(&priv->ref_clk); } - ret = reset_get_by_index(dev, 0, &priv->phy_rst); + ret = reset_get_bulk(dev, &priv->phy_rsts); if (ret) { dev_err(dev, "no phy reset control specified\n"); return ret; -- 2.34.1