Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp254373rdb; Mon, 22 Jan 2024 03:12:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IGba24krly2HXW+xdweVl6vyz6jI+gXvcBWJPjt0qWA8maVa3KiMpAEvHBKRX4TJJ8Ti66r X-Received: by 2002:a05:6402:4312:b0:55a:da0:8d80 with SMTP id m18-20020a056402431200b0055a0da08d80mr2338111edc.71.1705921941107; Mon, 22 Jan 2024 03:12:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705921941; cv=pass; d=google.com; s=arc-20160816; b=uymmn1se1hlYVTN5v6He/boZm9dCDgeYIsou5WLv3LtAfmoGLF4nNpscCldrtMg+Ff H88d04Osu2DsxVF6f3iQjcl7WjAS9L2QM9REzAWIMmKFNdpDlKCV0MFSiBfMnb/yIyLq D7CFaEM3adCcwawtbkO4FUmBtBnCJ/4CDdzkKPVKxBcXUc0A3vNet1du4VJH8JEiAzjU cFUgRlPc5lA3GhfupPOZhQi4dqtZ5JQ1nqFCmIYQ+NKIsU4g9WESUb0kORt7rQ1gQsCh HX3HSfdIE9fYcUIdM9BoLpghfcmgLBY49g+VyRCW0kW1wuTcZ2fFMwlFEW7cmzwUQ+Zx W+hA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=W2XyJzUvtenl+Fn3rJMYMnU3neDG4DPL8pDhnNZQfhs=; fh=vbnu+jAHWS2D7qhamU9/itK1p1nxVMW+62h/F/inpEE=; b=DJbiNPy2dxnVTZBdyQa1p4BYrKrMHXehUJL5YP5PSZfaL1+duIixnyj8HCLoCWDk1B 2N+VLHYLrp05f7F3yyvV86DufvIBlkaqV0tZpxtrxHpR0J2QK2wDjsp6/JjkfWoH+Kns IT0jZEo1JGnnxSOZQ2w5tJL3ZmHD5wZQfx4TxL9LqZ6GtJuoLKs4FKroGZ2WTBFE4RLX fZQYAY3YZJL0O9O3SOG8HHpM0fR2rsD4z4nf3Ct7Ef2mUEVnuzfv1zfDYrRU1gPMkbAq +MadfYpGvcBdBS1WAh2ZJTBMbkE0+Qo0hBzoFEKajys7Bc3az3eldgsFixYCiu0gw8EU vPfw== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-32833-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32833-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y13-20020a50e60d000000b00559476ecefdsi7723960edm.650.2024.01.22.03.12.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 03:12:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32833-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-32833-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32833-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 731011F26A7F for ; Mon, 22 Jan 2024 11:11:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A1773FB05; Mon, 22 Jan 2024 11:04:51 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88DA63EA7B for ; Mon, 22 Jan 2024 11:04:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705921490; cv=none; b=UsIa+N8LnMW2JNqa9spW9tl1RBCyoaZavgdqtTMAxaF+JCcB68a4FMWgNG6/RQmNZO4hzylNQZ/8smh6XoczBsomvwL9/8BgFcbqh8Xomij33ZSOE/TYjSjqpvCeDzWFeJnGV1m32cOu+3KedY6i+f6o3ocWVjcAJFCfVOqAbWY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705921490; c=relaxed/simple; bh=eqirOGjCZP2NBSEkK8uc5P/vksk2IIWKQWYB/n+5qkY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=E2kxXKBPea6hOHXm8U7wp1ZcJWLcoumKJqkc76cpzzeqeGsUnvG0wQ4b3Z/E4+9wkqMuJdNHTm86s3oVVMDAfI0RJNgBVGPSqb3+WHNsqptI8y4AJPTBQ0mRxtZo5222nOAciEiJF2BGJd48MUUaDW52PBeImbhxXvhoDW6+wNM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rRs6K-0003nV-7r; Mon, 22 Jan 2024 12:04:24 +0100 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rRs6I-001Zhh-Mi; Mon, 22 Jan 2024 12:04:22 +0100 Received: from fpf by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rRs6I-00BSQd-23; Mon, 22 Jan 2024 12:04:22 +0100 From: Fabian Pfitzner To: Michael Hennerich , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Lunn , Heiner Kallweit , Russell King , Alexandru Tachici Cc: kernel@pengutronix.de, Fabian Pfitzner , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: phy: adin: add missing clock option Date: Mon, 22 Jan 2024 12:03:12 +0100 Message-Id: <20240122110311.2725036-1-f.pfitzner@pengutronix.de> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: fpf@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org The GP_CLK pin on Adin1300 PHY's offers three different output clocks. This patch adds the missing 125MHz recovered clock option which is not yet availible in the driver. Signed-off-by: Fabian Pfitzner --- Documentation/devicetree/bindings/net/adi,adin.yaml | 7 +++++-- drivers/net/phy/adin.c | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/adi,adin.yaml b/Documentation/devicetree/bindings/net/adi,adin.yaml index 929cf8c0b0fd..cd1b4efa692b 100644 --- a/Documentation/devicetree/bindings/net/adi,adin.yaml +++ b/Documentation/devicetree/bindings/net/adi,adin.yaml @@ -38,14 +38,17 @@ properties: adi,phy-output-clock: description: | - Select clock output on GP_CLK pin. Two clocks are available: - A 25MHz reference and a free-running 125MHz. + Select clock output on GP_CLK pin. Three clocks are available: + - 25MHz reference + - free-running 125MHz + - recovered 125MHz The phy can alternatively automatically switch between the reference and the 125MHz clocks based on its internal state. $ref: /schemas/types.yaml#/definitions/string enum: - 25mhz-reference - 125mhz-free-running + - 125mhz-recovered - adaptive-free-running adi,phy-output-reference-clock: diff --git a/drivers/net/phy/adin.c b/drivers/net/phy/adin.c index 2e1a46e121d9..b1ed6fd24763 100644 --- a/drivers/net/phy/adin.c +++ b/drivers/net/phy/adin.c @@ -508,6 +508,8 @@ static int adin_config_clk_out(struct phy_device *phydev) sel |= ADIN1300_GE_CLK_CFG_25; } else if (strcmp(val, "125mhz-free-running") == 0) { sel |= ADIN1300_GE_CLK_CFG_FREE_125; + } else if (strcmp(val, "125mhz-recovered") == 0) { + sel |= ADIN1300_GE_CLK_CFG_RCVR_125; } else if (strcmp(val, "adaptive-free-running") == 0) { sel |= ADIN1300_GE_CLK_CFG_HRT_FREE; } else { base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d -- 2.39.2