From nobody Mon Sep 28 04:55:37 2026 Received: from mx1.white.stw.pengutronix.de (mx1.white.stw.pengutronix.de [185.203.200.13]) (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 F3AC937CD29; Wed, 26 Aug 2026 12:49:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.200.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787748544; cv=none; b=V3q3+2j68gTtV1w59Pt2c0uHt+XMgX5kz/MqgAgjFlturmBE+zDEu6G0YDaGl16ZMtQwDRO4oLvwoEu0RYsZ2nJ/7tgkftbWnv+ilvlo8DUKYNxwmhFFvHUbZl3Fnuh/ykzVUW5maxJmQZ8G0UAfVySVmLb+KgZc1bS6FPlqbDQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787748544; c=relaxed/simple; bh=mUrPlJT0hJRrTfA5qoFrn9r4BgqyF0M1XSh9PhhKE4g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SUcJ5t9vjn5PIW5o2JUjGjJgOUARLkb43vVdx0TxKrrsLt6JQ8iM3SA8XOv4UOsNtHnm9CMWs1l4sO8kpJthAdH/ukTJfmJ8f9YyC5c9AmEzbYlcVvl9HSslD0yB8Rkg/rRvOHGDYEro7nfYvaMj7Fn1uRiLXQ0xSFvesKvq1iw= 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.200.13 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 (drehscheibe.grey.stw.pengutronix.de [IPv6:2a0a:edc0:0:c01:1d::a2]) (Authenticated sender: relay-from-drehscheibe.grey.stw.pengutronix.de) by mx1.white.stw.pengutronix.de (Postfix) with ESMTPSA id D67D8202101; Wed, 26 Aug 2026 14:48:55 +0200 (CEST) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=ratatoskr.trumtrar.info) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1wzD3n-003RRH-2J; Wed, 26 Aug 2026 14:48:55 +0200 From: Steffen Trumtrar Date: Wed, 26 Aug 2026 14:48:39 +0200 Subject: [PATCH v2 1/3] dt-bindings: net: dp83867: make exclusivity explicit Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260826-v7-2-topic-dp83867-v2-1-a97b4cec6e93@pengutronix.de> References: <20260826-v7-2-topic-dp83867-v2-0-a97b4cec6e93@pengutronix.de> In-Reply-To: <20260826-v7-2-topic-dp83867-v2-0-a97b4cec6e93@pengutronix.de> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Davis , Andrew Lunn , Heiner Kallweit , Russell King Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Steffen Trumtrar X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1475; i=s.trumtrar@pengutronix.de; h=from:subject:message-id; bh=mUrPlJT0hJRrTfA5qoFrn9r4BgqyF0M1XSh9PhhKE4g=; b=owGbwMvMwCUmtVehiCsuTInxtFoSQ1bfg20TTXRZou8mcm43YI17X292J+6LiTJjo2umm1/sa bHJpbM7SlkYxLgYZMUUWVQWVvCJenzwjJwmwgUzh5UJZAgDF6cATOTTNUaGleuaPFhS+fkYXbx4 v9/bW6EfyJu6TNxtilWT4B+XwgYehv/Z0TNuxLV2ZSyY3LIyUyG3ubHOKZub49SjPYuOhmlGT2Y CAA== X-Developer-Key: i=s.trumtrar@pengutronix.de; a=openpgp; fpr=24A1780E1548F0495996140A1ABD20720A5E5622 The properties nvmem-cells and ti,{min,max}-output-impedance are mutually exclusive as already noted in the ti,max-output-impedance description. As this is only stated in the description and not made explicit in the schema, the binding checker will not catch if this condition is ignored. Make it explicit in the schema, that nmvem-cells can not be used with ti,min-output-impedance or ti,max-output-impedance. Signed-off-by: Steffen Trumtrar --- Documentation/devicetree/bindings/net/ti,dp83867.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/net/ti,dp83867.yaml b/Docume= ntation/devicetree/bindings/net/ti,dp83867.yaml index 4bc1f98fd9fe5..7a6fe516bab27 100644 --- a/Documentation/devicetree/bindings/net/ti,dp83867.yaml +++ b/Documentation/devicetree/bindings/net/ti,dp83867.yaml @@ -7,9 +7,6 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# =20 title: TI DP83867 ethernet PHY =20 -allOf: - - $ref: ethernet-controller.yaml# - maintainers: - Andrew Davis =20 @@ -118,6 +115,13 @@ properties: Transmitt FIFO depth- see dt-bindings/net/ti-dp83867.h for applicable values. =20 +allOf: + - $ref: ethernet-controller.yaml# + - not: + required: [nvmem-cells, "ti,min-output-impedance"] + - not: + required: [nvmem-cells, "ti,max-output-impedance"] + required: - reg =20 --=20 2.54.0 From nobody Mon Sep 28 04:55:37 2026 Received: from mx1.white.stw.pengutronix.de (mx1.white.stw.pengutronix.de [185.203.200.13]) (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 658D33EDAC9; Wed, 26 Aug 2026 12:49:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.200.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787748544; cv=none; b=ch8hep0Y8imnnxoQ0vEjafh34MRbxf54X/IRN+Mc2xrX+2xmUQQR142kzrSsJTv5KVm67kjgrMGVy54hwQBfi3q6mAymyNM2bsPBf+dE5B2t9zluJ36gS0f+YXxZunKLrnRxSttSoLHSNGl6RxMVaaNSw/qWPq3acCl3j98wNXY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787748544; c=relaxed/simple; bh=FwO7NRScNjPZPZNztHILGrfKLuGU+02hnMNDWWbRBEI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=h4K1WPyNsoY+aSLvyhgXdNdqZI5w7X6TxO3EL9+TMJOucKiri8mEAHG28uEtLQXHeTaP/hPDnD0K/Tm++xU/t3JY3+v/FxSk3Z8ONOlP0Me9kVYlM5BKsXCJnK8v2Lb6xCeaaJlfjQ06RlZg1DLJLz/ZV66ijDIrJNBfWizH+hk= 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.200.13 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 (drehscheibe.grey.stw.pengutronix.de [IPv6:2a0a:edc0:0:c01:1d::a2]) (Authenticated sender: relay-from-drehscheibe.grey.stw.pengutronix.de) by mx1.white.stw.pengutronix.de (Postfix) with ESMTPSA id 3C3272021C8; Wed, 26 Aug 2026 14:48:56 +0200 (CEST) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=ratatoskr.trumtrar.info) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1wzD3o-003RRH-0P; Wed, 26 Aug 2026 14:48:56 +0200 From: Steffen Trumtrar Date: Wed, 26 Aug 2026 14:48:40 +0200 Subject: [PATCH v2 2/3] dt-bindings: dp83867: add binding for output-impedance Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260826-v7-2-topic-dp83867-v2-2-a97b4cec6e93@pengutronix.de> References: <20260826-v7-2-topic-dp83867-v2-0-a97b4cec6e93@pengutronix.de> In-Reply-To: <20260826-v7-2-topic-dp83867-v2-0-a97b4cec6e93@pengutronix.de> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Davis , Andrew Lunn , Heiner Kallweit , Russell King Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Steffen Trumtrar X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1795; i=s.trumtrar@pengutronix.de; h=from:subject:message-id; bh=FwO7NRScNjPZPZNztHILGrfKLuGU+02hnMNDWWbRBEI=; b=owGbwMvMwCUmtVehiCsuTInxtFoSQ1bfg20/l07cJNjMUcgY+ojbUVn8/p5JD2tlToTc2ev0j 69rFffkjlIWBjEuBlkxRRaVhRV8oh4fPCOniXDBzGFlAhnCwMUpABNJKWT47+F7WNr+cfSqRZPM zytqh7yZwfljqujpz/e/MreZbT1dL8Pwv/ab8LoZLOVTlxdmBi3p0ze4kL9mQT2Lk2RDifHS8sP X+QA= X-Developer-Key: i=s.trumtrar@pengutronix.de; a=openpgp; fpr=24A1780E1548F0495996140A1ABD20720A5E5622 Currently, the output-impedance can only be set to default, minimum or maximum or via a nvmem cell. In cases where there is no backend for a nvmem cell, a value can not be set. Add a DT binding, 'ti,output-impedance-ohms', for specifying the output-impedance via a fixed value. The existing boolean values for minimum and maximum still take precedence over the new value. Signed-off-by: Steffen Trumtrar --- Documentation/devicetree/bindings/net/ti,dp83867.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/net/ti,dp83867.yaml b/Docume= ntation/devicetree/bindings/net/ti,dp83867.yaml index 7a6fe516bab27..49fafe3ce6f47 100644 --- a/Documentation/devicetree/bindings/net/ti,dp83867.yaml +++ b/Documentation/devicetree/bindings/net/ti,dp83867.yaml @@ -38,6 +38,16 @@ properties: items: - const: io_impedance_ctrl =20 + ti,output-impedance-ohms: + description: | + MAC Interface Impedance control to set the programmable output imped= ance. + Valid range is 0x00 to 0x1f (32 steps). + - 0x1f =3D 35 ohms (minimum impedance) + - 0x00 =3D 70 ohms (maximum impedance) + - Step size varies with process. + minimum: 0 + maximum: 31 + ti,min-output-impedance: type: boolean description: | @@ -121,6 +131,12 @@ allOf: required: [nvmem-cells, "ti,min-output-impedance"] - not: required: [nvmem-cells, "ti,max-output-impedance"] + - not: + required: [nvmem-cells, "ti,output-impedance-ohms"] + - not: + required: ["ti,output-impedance-ohms", "ti,min-output-impedance"] + - not: + required: ["ti,output-impedance-ohms", "ti,max-output-impedance"] =20 required: - reg --=20 2.54.0 From nobody Mon Sep 28 04:55:37 2026 Received: from mx1.white.stw.pengutronix.de (mx1.white.stw.pengutronix.de [185.203.200.13]) (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 920F73F8220; Wed, 26 Aug 2026 12:49:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.200.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787748544; cv=none; b=KH51ssqMLjgukooOwhjDwjC7PJ7KS5Vnlt+xICOw37EP7oTkkZ8FbZ4FI9jZDtl5utV3fpXwyedk785qwIjzeiI7i4hn0xhSPtXrbB1lai8//EBQ5s/fK/VsrtqB1yP3FohDgFhDJKOumQ7ohZ0Kimpo4N1LkrxcRyNjHXfD4CA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787748544; c=relaxed/simple; bh=4cluWBe9p81nkFKag7OIs81PFmBPD135mnSU3QQzEYc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HKOGv3jNXm0j0EMoXjCrg/9Mys/5H4wBNp4LHGA9l/jVW0uIy/ZpQvjmT6JCuF5qYhg4p34E/D1soo/eidQmo0R8n/wkZGMv+0FepuwfVFpxrstTJNlDsnQm8E+swfSHRbkJ/5Oupw7rXYI8kYmtseAnRHshzoHI6cpt1GHlR2Y= 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.200.13 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 (drehscheibe.grey.stw.pengutronix.de [IPv6:2a0a:edc0:0:c01:1d::a2]) (Authenticated sender: relay-from-drehscheibe.grey.stw.pengutronix.de) by mx1.white.stw.pengutronix.de (Postfix) with ESMTPSA id 9B7522021C9; Wed, 26 Aug 2026 14:48:56 +0200 (CEST) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=ratatoskr.trumtrar.info) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1wzD3o-003RRH-1e; Wed, 26 Aug 2026 14:48:56 +0200 From: Steffen Trumtrar Date: Wed, 26 Aug 2026 14:48:41 +0200 Subject: [PATCH v2 3/3] net: phy: dp83867: support setting output-impedance Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260826-v7-2-topic-dp83867-v2-3-a97b4cec6e93@pengutronix.de> References: <20260826-v7-2-topic-dp83867-v2-0-a97b4cec6e93@pengutronix.de> In-Reply-To: <20260826-v7-2-topic-dp83867-v2-0-a97b4cec6e93@pengutronix.de> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Davis , Andrew Lunn , Heiner Kallweit , Russell King Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Steffen Trumtrar X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2317; i=s.trumtrar@pengutronix.de; h=from:subject:message-id; bh=4cluWBe9p81nkFKag7OIs81PFmBPD135mnSU3QQzEYc=; b=owGbwMvMwCUmtVehiCsuTInxtFoSQ1bfg23FrIuCNYQPOf+0O92wobXQ7aiVSmTnLdUZIlZ1p eacxu4dpSwMYlwMsmKKLCoLK/hEPT54Rk4T4YKZw8oEMoSBi1MAJnLrLSPDnu5t7PNuKH2VOi29 bInZx2WLgr6uiEh9HcV2TGjy1s1+bQz/1KsqAjp797/j7jde7q+30Lcg8tpux/TLh6ccerbF86o YKwA= X-Developer-Key: i=s.trumtrar@pengutronix.de; a=openpgp; fpr=24A1780E1548F0495996140A1ABD20720A5E5622 Currently the dp83867 supports setting the io impedance to minimum, maximum, default or a value from a nvmem cell. In situations where there is no backend for a nvmem cell, the value can not be set to anything but minimum, maximum or default. Add support for the ti,output-impedance-ohms binding, allowing to specify the impedance via the devicetree. The existing boolean bindings for minimum and maximum take precedence over this new binding. The nvmem consumer still takes lowest precedence. Signed-off-by: Steffen Trumtrar --- drivers/net/phy/dp83867.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 88255e92b4cdb..973b70f11c45a 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -531,7 +531,8 @@ static int dp83867_of_init_io_impedance(struct phy_devi= ce *phydev) struct device *dev =3D &phydev->mdio.dev; struct device_node *of_node =3D dev->of_node; struct nvmem_cell *cell; - u8 *buf, val; + u8 *buf; + u32 val; int ret; =20 cell =3D of_nvmem_cell_get(of_node, "io_impedance_ctrl"); @@ -542,12 +543,21 @@ static int dp83867_of_init_io_impedance(struct phy_de= vice *phydev) "failed to get nvmem cell io_impedance_ctrl\n"); =20 /* If no nvmem cell, check for the boolean properties. */ - if (of_property_read_bool(of_node, "ti,max-output-impedance")) + if (of_property_read_bool(of_node, "ti,max-output-impedance")) { dp83867->io_impedance =3D DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX; - else if (of_property_read_bool(of_node, "ti,min-output-impedance")) + } else if (of_property_read_bool(of_node, "ti,min-output-impedance")) { dp83867->io_impedance =3D DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN; - else + } else if (of_property_read_u32(of_node, "ti,output-impedance-ohms", &va= l) =3D=3D 0) { + val =3D val & DP83867_IO_MUX_CFG_IO_IMPEDANCE_MASK; + if (val > DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN || + val < DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX) { + phydev_err(phydev, "'ti,output-impedance-ohms' contents out of range\n= "); + return -ERANGE; + } + dp83867->io_impedance =3D val; + } else { dp83867->io_impedance =3D -1; /* leave at default */ + } =20 return 0; } --=20 2.54.0