From patchwork Mon Jan 6 07:00:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chukun Pan X-Patchwork-Id: 13926986 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 70D0EE77188 for ; Mon, 6 Jan 2025 07:02:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=6eWURVKPzzWffy68tRM807yxARM7khe5LIklnOKgv8U=; b=eCLUy2ukhRm6HCUiWmVV0o+DXe Uwc+Y4RCJk/GI58392Rvd3RLpaZqUqGwapeYLl2MnX1sH6LSDmN7lUvG1/B5LmD5OkJ2ida6KIBqV z8j12+6uug5tjy+vC2wzmeqjLlR7RUn/xCiZOsOklInWXifl07a+FPTsbBkKXvSdVqaZaYAntC3ES HBr4R0Fd4+TsgAnHQETWStuzP1gLi576dJmG00zRHlSUrqIknLd5lYpO8gfEvajRZXg+FDvH9/cKK GNTAqLT8F2x/pSQVq2rWY0dD7Z/d+5aPp7DWYZqKMKdgDtSRm3Pmfam3+zwWlEl+qpUZUfg6QarQb XnDmcjUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tUh7d-00000000Lw6-282t; Mon, 06 Jan 2025 07:01:57 +0000 Received: from mail-m49197.qiye.163.com ([45.254.49.197]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tUh5x-00000000LfX-45f3; Mon, 06 Jan 2025 07:00:15 +0000 Received: from amadeus-Vostro-3710.lan (unknown [IPV6:240e:3b3:2c05:ad20::1]) by smtp.qiye.163.com (Hmail) with ESMTP id 7cec4144; Mon, 6 Jan 2025 15:00:05 +0800 (GMT+08:00) From: Chukun Pan To: Vinod Koul Cc: Heiko Stuebner , Philipp Zabel , Kishon Vijay Abraham I , Jianfeng Liu , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Chukun Pan Subject: [PATCH 1/1] phy: rockchip: naneng-combphy: compatible with old DT for RK3568 Date: Mon, 6 Jan 2025 15:00:00 +0800 Message-Id: <20250106070000.605284-1-amadeus@jmu.edu.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVlCTkwfVk1CSElIHRodQxgfTFYeHw5VEwETFhoSFy QUDg9ZV1kYEgtZQVlJT0seQUgZSEFJGEtOQRofSUtBQUpZV1kWGg8SFR0UWUFZT0tIVUpLSU9PT0 tVSktLVUtZBg++ X-HM-Tid: 0a943a69e2cd03a2kunm7cec4144 X-HM-MType: 10 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NxA6SBw6SDILKRgoQ0kxCFE0 CjcKCyhVSlVKTEhNSk9NQ0tNTkNJVTMWGhIXVRoWGh8eDgg7ERYOVR4fDlUYFUVZV1kSC1lBWUlP Sx5BSBlIQUkYS05BGh9JS0FBSllXWQgBWUFKSkNKNwY+ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250105_230014_225839_7BA4901A X-CRM114-Status: UNSURE ( 8.18 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The device tree of RK3568 did not specify reset-names before. So add fallback to old behaviour to be compatible with old DT. Fixes: fbcbffbac994 ("phy: rockchip: naneng-combphy: fix phy reset") Cc: Jianfeng Liu Signed-off-by: Chukun Pan --- drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c index a1532ef8bbe9..372f5c07b5bd 100644 --- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c @@ -325,6 +325,10 @@ static int rockchip_combphy_parse_dt(struct device *dev, struct rockchip_combphy priv->ext_refclk = device_property_present(dev, "rockchip,ext-refclk"); priv->phy_rst = devm_reset_control_get(dev, "phy"); + /* fallback to old behaviour */ + if (IS_ERR(ERR_PTR(priv->phy_rst))) + priv->phy_rst = devm_reset_control_array_get_exclusive(dev); + if (IS_ERR(priv->phy_rst)) return dev_err_probe(dev, PTR_ERR(priv->phy_rst), "failed to get phy reset\n");