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 EE176C7618E for ; Wed, 26 Apr 2023 15:54:14 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E633686389; Wed, 26 Apr 2023 17:53:38 +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="I7+KwKOn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E370886375; Wed, 26 Apr 2023 17:53:31 +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 2D98F8636C for ; Wed, 26 Apr 2023 17:53:27 +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 6575966031F7; Wed, 26 Apr 2023 16:53:26 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1682524406; bh=JCTYHGeaWTfnLE+hGCRXtd/wCqO89M6eCt/iDDFzm4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I7+KwKOnMX3V5OYvCJJ8JpXUvgYBPYRHiD/512IfGkf5zM9zhRXAhtF5cRu9fm+MX meGh5WWpJhrkUsdGkmTjA12LGndhS5sikPYFZEAHBm8XHx2uAx9kDXYzsUjoImmFpL TCQ/N8dtGsy32eN8kGhm85P+rwVRqwJG2pERC0zS+cnN+zaH/BQKNtCEGP42ayfqEI PxsSuKBBtmvZrrkLDyTmWMVQ0t6sR5PRXuCmMz5fuPEfnQiBUh6zZs0NDdZBhqrZJX rkXG0V4/2fgbHlsRIlcowNTltAaYfZqakaIzffQcyXMrkrjDaHH39e6L+BIkBqm5+X 7hqNtTEvob1Uw== 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 v2 3/7] phy: rockchip: naneng-combphy: Add support for multiple resets Date: Wed, 26 Apr 2023 18:53:15 +0300 Message-Id: <20230426155319.148707-3-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230426155319.148707-1-eugen.hristev@collabora.com> References: <20230426155319.148707-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 --- Changes in v2: - 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