From patchwork Thu Feb 20 17:29:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer_via_B4_Relay?= X-Patchwork-Id: 13984343 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A2D342135B8; Thu, 20 Feb 2025 17:29:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740072566; cv=none; b=i/zGY/9TSG/L/9kS7iqZ5bNYrnUV59vHnq11jgcAIpSYXjy2fB9NJxFy45RJMe3hkgujOLzfmPk71YK2F68EK4FSvM+0HQT0+L1E7ihWaUk2oSCFvNhk5EVrOlSA9sSy+juColfEmaQv+6jhjA0RlFbmpm3nCxX9MU5a6t9SJQk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740072566; c=relaxed/simple; bh=v+jUDPgkoAiyPxHpecPwhgMByR89oraN5pKyrW5JOF0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ltx9p4N/CgESwhS52p/6Jmlgi5ZnBDQ6SxG3PxKyLQxV6sAU8MgMIb9AjeBCYTgKpYYXjAuWF3ZUeE8Kq7GyrmpYesCl3rujUpPwvd5Wl0eMFeEZCbCGzx4AhE8R0EcZ6YJbdt8oJPGfF2KymUzFvcQKIgueVmh52a1deh2u/Ms= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UGwCGV7z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UGwCGV7z" Received: by smtp.kernel.org (Postfix) with ESMTPS id 0A0BEC4CEDD; Thu, 20 Feb 2025 17:29:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740072566; bh=v+jUDPgkoAiyPxHpecPwhgMByR89oraN5pKyrW5JOF0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=UGwCGV7zDOnF1PHN361R4LqUXQc+VnOs4y5EjG+ZS0t5WEpaOdGpfH9e93AOPY2rp iLl1Ey0wSljVm4CjArjeLc6ZmNxWktQmcnu6mWAqDHzpKqMiixjpLX7+ucjiCOeVHM nhOOsUAUWgtcyKMhY+XqUaKc7fBa9VOnd9qhLuLnpctogBRVGOj7N0elxzXmaoO/eg /fT4mwQ9V/us/yJRSRmHBNkn9n0dZg/crqLkAnmVFalLwGucUHlR6zEjXDgV0bSGhn 3HcxXybQRtsYEGK3Sa60QpettmJL9DZVspEay1lyK9s+GkZyXPlYa0bF7ZQmXEoefF sPsUTyjkqNuPA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE494C021B3; Thu, 20 Feb 2025 17:29:25 +0000 (UTC) From: =?utf-8?q?J=2E_Neusch=C3=A4fer_via_B4_Relay?= Date: Thu, 20 Feb 2025 18:29:21 +0100 Subject: [PATCH 1/3] dt-bindings: net: Convert fsl,gianfar-{mdio,tbi} to YAML Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250220-gianfar-yaml-v1-1-0ba97fd1ef92@posteo.net> References: <20250220-gianfar-yaml-v1-0-0ba97fd1ef92@posteo.net> In-Reply-To: <20250220-gianfar-yaml-v1-0-0ba97fd1ef92@posteo.net> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Claudiu Manoil Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1740072564; l=5482; i=j.ne@posteo.net; s=20240329; h=from:subject:message-id; bh=qnxbD/jXtY3uKZ7Sist8y6DBAb/TVU3FnaZO8Ozz6qE=; b=k7+u3GllU6vuGGn4TBPSGchCao4eXuEycmGweUgFmR4/REdafseQuIY+gZqsbW0gBm0lbRNxL 1WgzF01CI4VAZs1G0cUplTqSDVWwdcRjq17IoucIcS0AzhQ8iaw30/j X-Developer-Key: i=j.ne@posteo.net; a=ed25519; pk=NIe0bK42wNaX/C4bi6ezm7NJK0IQE+8MKBm7igFMIS4= X-Endpoint-Received: by B4 Relay for j.ne@posteo.net/20240329 with auth_id=156 X-Original-From: =?utf-8?q?J=2E_Neusch=C3=A4fer?= Reply-To: j.ne@posteo.net X-Patchwork-Delegate: kuba@kernel.org From: "J. Neuschäfer" Move the information related to the Freescale Gianfar (TSEC) MDIO bus and the Ten-Bit Interface (TBI) from fsl-tsec-phy.txt to a new binding file in YAML format, fsl,gianfar-mdio.yaml. Signed-off-by: J. Neuschäfer --- dt-bindings: net: Convert fsl,gianfar-tbi to YAML --- .../devicetree/bindings/net/fsl,gianfar-mdio.yaml | 94 ++++++++++++++++++++++ .../devicetree/bindings/net/fsl-tsec-phy.txt | 41 +--------- 2 files changed, 96 insertions(+), 39 deletions(-) diff --git a/Documentation/devicetree/bindings/net/fsl,gianfar-mdio.yaml b/Documentation/devicetree/bindings/net/fsl,gianfar-mdio.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2dade7f48c366b7f5c7408e1f7de1a6f5fc80787 --- /dev/null +++ b/Documentation/devicetree/bindings/net/fsl,gianfar-mdio.yaml @@ -0,0 +1,94 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/fsl,gianfar-mdio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Gianfar (TSEC) MDIO Device + +description: + This binding describes the MDIO is a bus to which the PHY devices are + connected. For each device that exists on this bus, a child node should be + created. + + As of this writing, every TSEC is associated with an internal Ten-Bit + Interface (TBI) PHY. This PHY is accessed through the local MDIO bus. These + buses are defined similarly to the mdio buses, except they are compatible + with "fsl,gianfar-tbi". The TBI PHYs underneath them are similar to normal + PHYs, but the reg property is considered instructive, rather than + descriptive. The reg property should be chosen so it doesn't interfere with + other PHYs on the bus. + +maintainers: + - J. Neuschäfer + +properties: + compatible: + enum: + - fsl,gianfar-tbi + - fsl,gianfar-mdio + - fsl,etsec2-tbi + - fsl,etsec2-mdio + - fsl,ucc-mdio + - gianfar + - ucc_geth_phy + + reg: + minItems: 1 + items: + - description: + Offset and length of the register set for the device + + - description: + Optionally, the offset and length of the TBIPA register (TBI PHY + address register). If TBIPA register is not specified, the driver + will attempt to infer it from the register set specified (your + mileage may vary). + + device_type: + const: mdio + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +required: + - reg + - "#address-cells" + - "#size-cells" + +allOf: + - $ref: mdio.yaml# + + - if: + properties: + compatible: + contains: + enum: + - gianfar + - ucc_geth_phy + then: + required: + - device_type + +unevaluatedProperties: false + +examples: + - | + soc { + #address-cells = <1>; + #size-cells = <1>; + + mdio@24520 { + reg = <0x24520 0x20>; + compatible = "fsl,gianfar-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + ethernet-phy@0 { + reg = <0>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt index 9c9668c1b6a24edff7b7cf625b9f14c3cbc2e0c8..0e55e0af7d6f59cfb571dd3fcff704b7f4c140d2 100644 --- a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt +++ b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt @@ -1,47 +1,10 @@ * MDIO IO device -The MDIO is a bus to which the PHY devices are connected. For each -device that exists on this bus, a child node should be created. See -the definition of the PHY node in booting-without-of.txt for an example -of how to define a PHY. - -Required properties: - - reg : Offset and length of the register set for the device, and optionally - the offset and length of the TBIPA register (TBI PHY address - register). If TBIPA register is not specified, the driver will - attempt to infer it from the register set specified (your mileage may - vary). - - compatible : Should define the compatible device type for the - mdio. Currently supported strings/devices are: - - "fsl,gianfar-tbi" - - "fsl,gianfar-mdio" - - "fsl,etsec2-tbi" - - "fsl,etsec2-mdio" - - "fsl,ucc-mdio" - - "fsl,fman-mdio" - When device_type is "mdio", the following strings are also considered: - - "gianfar" - - "ucc_geth_phy" - -Example: - - mdio@24520 { - reg = <24520 20>; - compatible = "fsl,gianfar-mdio"; - - ethernet-phy@0 { - ...... - }; - }; +Refer to Documentation/devicetree/bindings/net/fsl,gianfar-mdio.yaml * TBI Internal MDIO bus -As of this writing, every tsec is associated with an internal TBI PHY. -This PHY is accessed through the local MDIO bus. These buses are defined -similarly to the mdio buses, except they are compatible with "fsl,gianfar-tbi". -The TBI PHYs underneath them are similar to normal PHYs, but the reg property -is considered instructive, rather than descriptive. The reg property should -be chosen so it doesn't interfere with other PHYs on the bus. +Refer to Documentation/devicetree/bindings/net/fsl,gianfar-mdio.yaml * Gianfar-compatible ethernet nodes From patchwork Thu Feb 20 17:29:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer_via_B4_Relay?= X-Patchwork-Id: 13984342 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 567C9212D68; Thu, 20 Feb 2025 17:29:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740072566; cv=none; b=ION8xOP/5TxflfKjJXf5xiC7KPrWU5gpOF+ZKFUf1guYmFUrnpDlbM/PCvlS+r3kealfOezW5XMfNSlZscwMB9KTxwpsFfHu6Opsdo4EJPn4LAYUaVnqoVcJmVhxs1vpNZDr4Rg+318kng4kl3BrTk4d4yx5oZPsVRcFl9kvQ88= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740072566; c=relaxed/simple; bh=8DRank7hcoqwzjzdr0LkR/6xtYkDEfTlYTLqYDTD3QU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Jyy5r9SUUT9CRV2U+VWmHrHDUYThRBIAHGhZPHglv9+8oZ2R67PDKO6S74CQBEfpfvYmDrfRFXb9v3FoOXWX7U6ytQAOcZ9FL0haHUg6xCQmEx17TnN8AUDOAPYoKnkEpDuIp490ueN5qPfHvFmYXcQt8/PNN6fCrfspiD/24y8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=To8z59bO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="To8z59bO" Received: by smtp.kernel.org (Postfix) with ESMTPS id 1D87FC4CEE2; Thu, 20 Feb 2025 17:29:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740072566; bh=8DRank7hcoqwzjzdr0LkR/6xtYkDEfTlYTLqYDTD3QU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=To8z59bOxpHqeEPKX+qgSBnsuWBTRYHvdzqVmJj7s66yFU/7Cl4blGmnEySzSYC5m X+gpEEgaVnPvp6bGSNakaNjN2isurABCp9VJcJojO8XexSh5DampNn7J/BltSuBTOb Lm5hCrhM30L4QwXRUEN2fqha/wFIrqYtpzspf3lWMXLkZlhwtZo8VIKO7k8nc/uL9h iKG8hn2hn8iQW9IZEVyWmhMdWZSUihNXxsc0LLHCgTSxvwFmln8XIdPoeXKRFfqjfM H1jwVgv9ZsAAhJyvK9qp8/W+C8858J3nDNooovvGakGvodckss2STv1kZr1Bom02gd Is8z66GguFVPA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D964C021B1; Thu, 20 Feb 2025 17:29:26 +0000 (UTC) From: =?utf-8?q?J=2E_Neusch=C3=A4fer_via_B4_Relay?= Date: Thu, 20 Feb 2025 18:29:22 +0100 Subject: [PATCH 2/3] dt-bindings: net: fsl,gianfar-mdio: Update information about TBI Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250220-gianfar-yaml-v1-2-0ba97fd1ef92@posteo.net> References: <20250220-gianfar-yaml-v1-0-0ba97fd1ef92@posteo.net> In-Reply-To: <20250220-gianfar-yaml-v1-0-0ba97fd1ef92@posteo.net> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Claudiu Manoil Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1740072564; l=2096; i=j.ne@posteo.net; s=20240329; h=from:subject:message-id; bh=RZWZAJph1/uEOt9gW5/ECKBcrLQZU1OohzXAiV6s6nw=; b=ZyXzj03I9b5jbSaN19fSe0Mt8Pzj7+eZFW6Ahv1uPV65xksQBOllsT6t+GhhXM7/WLqszpY/l u93QdxM2ErDCRhHx0RMHlS3nw39DTrX4q981Wdu2c+ePgNjqtPjuofJ X-Developer-Key: i=j.ne@posteo.net; a=ed25519; pk=NIe0bK42wNaX/C4bi6ezm7NJK0IQE+8MKBm7igFMIS4= X-Endpoint-Received: by B4 Relay for j.ne@posteo.net/20240329 with auth_id=156 X-Original-From: =?utf-8?q?J=2E_Neusch=C3=A4fer?= Reply-To: j.ne@posteo.net X-Patchwork-Delegate: kuba@kernel.org From: "J. Neuschäfer" When this binding was originally written, all known TSEC Ethernet controllers had a Ten-Bit Interface (TBI). However, some datasheets such as for the MPC8315E suggest that this is not universally true: The eTSECs do not support TBI, GMII, and FIFO operating modes, so all references to these interfaces and features should be ignored for this device. Signed-off-by: J. Neuschäfer Acked-by: Rob Herring (Arm) --- Documentation/devicetree/bindings/net/fsl,gianfar-mdio.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/net/fsl,gianfar-mdio.yaml b/Documentation/devicetree/bindings/net/fsl,gianfar-mdio.yaml index 2dade7f48c366b7f5c7408e1f7de1a6f5fc80787..0d2605512c4711a4dcb77620b94ea77a71b45fa8 100644 --- a/Documentation/devicetree/bindings/net/fsl,gianfar-mdio.yaml +++ b/Documentation/devicetree/bindings/net/fsl,gianfar-mdio.yaml @@ -11,13 +11,12 @@ description: connected. For each device that exists on this bus, a child node should be created. - As of this writing, every TSEC is associated with an internal Ten-Bit - Interface (TBI) PHY. This PHY is accessed through the local MDIO bus. These - buses are defined similarly to the mdio buses, except they are compatible - with "fsl,gianfar-tbi". The TBI PHYs underneath them are similar to normal - PHYs, but the reg property is considered instructive, rather than - descriptive. The reg property should be chosen so it doesn't interfere with - other PHYs on the bus. + Some TSECs are associated with an internal Ten-Bit Interface (TBI) PHY. This + PHY is accessed through the local MDIO bus. These buses are defined similarly + to the mdio buses, except they are compatible with "fsl,gianfar-tbi". The TBI + PHYs underneath them are similar to normal PHYs, but the reg property is + considered instructive, rather than descriptive. The reg property should be + chosen so it doesn't interfere with other PHYs on the bus. maintainers: - J. Neuschäfer From patchwork Thu Feb 20 17:29:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer_via_B4_Relay?= X-Patchwork-Id: 13984344 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 BBE49213E81; Thu, 20 Feb 2025 17:29:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740072567; cv=none; b=u242bLOTlndV2cWqHtx9NE82D1o8/q59yT9mndgN5W0ee51lKIt6OF5lvr0KaNH8CclLzlNK8Gxy1wJi7hXu08TEPZzx5Tq6yg2kKqImvBCrwPKJCzDAWmqtcGOUkPQKaE0evyumn/7vQDsYIuGlbQUf0ZZzr7kLgkBPr14ssnU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740072567; c=relaxed/simple; bh=FmB27SmbgvMkwhtEPLQ00VLOXk2KaxFeGZGVu5uE+0Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=b7NMEQGmRv5ZH5p/5C1qY+Nmg59qsjssgnkKVCHQR6Arhj4C7fcvpbss3WiKJP34nhxrUiYY+hq+MC1sfLtY69lfT2q8YPjl+yOg+BWLxGOCRBkOa1CvTrERFAzLdefSzyrbxWm0h0W9+eNLfcZFvJr4AMS73auYIlPaNsypIwY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gI+frmyr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gI+frmyr" Received: by smtp.kernel.org (Postfix) with ESMTPS id 2D246C4CEE8; Thu, 20 Feb 2025 17:29:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740072566; bh=FmB27SmbgvMkwhtEPLQ00VLOXk2KaxFeGZGVu5uE+0Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=gI+frmyrJGcxQ4y10n0gp01v4q21gu5Ykk/RbKQokMt0/mcYRFRsxpdlKLJl0ZZ5E fwjmbJYdT0tZ8CIs8ut2velsDlkqfIDU6ntSrok6sI4fApGtCx9wVZ84186awZZwAP YYLn63GDxtJOqGJLgi1mF7uYKimbNuDTt2k7FnUTqbtpneiE1B/EJG+ItYZ2ZyvXra KDk9a0wVipSm8MWIqVR3gcQtNz5Ca0u8WqZT7QkfuIkiN7s3lGuJbNGfn0dfOchHz0 6pB5KrWSY2MDG7RWWJAjAQRaOIp4mWnJBLpsMrxv4TEjf4xB80Yi053A8ZLi3txEe5 5SCfk/LQWv0Ug== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E91BC021B4; Thu, 20 Feb 2025 17:29:26 +0000 (UTC) From: =?utf-8?q?J=2E_Neusch=C3=A4fer_via_B4_Relay?= Date: Thu, 20 Feb 2025 18:29:23 +0100 Subject: [PATCH 3/3] dt-bindings: net: Convert fsl,gianfar to YAML Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250220-gianfar-yaml-v1-3-0ba97fd1ef92@posteo.net> References: <20250220-gianfar-yaml-v1-0-0ba97fd1ef92@posteo.net> In-Reply-To: <20250220-gianfar-yaml-v1-0-0ba97fd1ef92@posteo.net> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Claudiu Manoil Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1740072564; l=9350; i=j.ne@posteo.net; s=20240329; h=from:subject:message-id; bh=ym26/SjLOnhoBKNuOxw8M0QAUvBoR1fxquz9fbgUWwo=; b=oII80F8Gqfj3/3k3n+VGpeb5MH8UMOldjMTHB1ZJQyqiGepcBv8S1vLOvE163s+of9aJNSUmB E1Hsw4DeYVDA3007Gja/rGavCosPRv9SEcS/Lq58o63P/VcdgGkNFfw X-Developer-Key: i=j.ne@posteo.net; a=ed25519; pk=NIe0bK42wNaX/C4bi6ezm7NJK0IQE+8MKBm7igFMIS4= X-Endpoint-Received: by B4 Relay for j.ne@posteo.net/20240329 with auth_id=156 X-Original-From: =?utf-8?q?J=2E_Neusch=C3=A4fer?= Reply-To: j.ne@posteo.net X-Patchwork-Delegate: kuba@kernel.org From: "J. Neuschäfer" Add a binding for the "Gianfar" ethernet controller, also known as TSEC/eTSEC. Signed-off-by: J. Neuschäfer --- .../devicetree/bindings/net/fsl,gianfar.yaml | 242 +++++++++++++++++++++ .../devicetree/bindings/net/fsl-tsec-phy.txt | 39 +--- 2 files changed, 243 insertions(+), 38 deletions(-) diff --git a/Documentation/devicetree/bindings/net/fsl,gianfar.yaml b/Documentation/devicetree/bindings/net/fsl,gianfar.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dc75ceb5dc6fdee8765bb17273f394d01cce0710 --- /dev/null +++ b/Documentation/devicetree/bindings/net/fsl,gianfar.yaml @@ -0,0 +1,242 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/fsl,gianfar.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Three-Speed Ethernet Controller (TSEC), "Gianfar" + +maintainers: + - J. Neuschäfer + +properties: + compatible: + enum: + - gianfar + - fsl,etsec2 + + device_type: + const: network + + model: + enum: + - FEC + - TSEC + - eTSEC + + reg: + maxItems: 1 + + ranges: true + + "#address-cells": true + + "#size-cells": true + + cell-index: + $ref: /schemas/types.yaml#/definitions/uint32 + + interrupts: + maxItems: 3 + + dma-coherent: + type: boolean + + fsl,magic-packet: + $ref: /schemas/types.yaml#/definitions/flag + description: + If present, indicates that the hardware supports waking up via magic packet. + + fsl,wake-on-filer: + type: boolean + description: + If present, indicates that the hardware supports waking up by Filer + General Purpose Interrupt (FGPI) asserted on the Rx int line. This is + an advanced power management capability allowing certain packet types + (user) defined by filer rules to wake up the system. + + bd-stash: + type: boolean + description: + If present, indicates that the hardware supports stashing buffer + descriptors in the L2. + + rx-stash-len: + type: boolean + description: + Denotes the number of bytes of a received buffer to stash in the L2. + + tx-stash-len: + type: boolean + description: + Denotes the index of the first byte from the received buffer to stash in + the L2. + + fsl,num_rx_queues: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Number of receive queues + + fsl,num_tx_queues: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Number of transmit queues + + tbi-handle: + $ref: /schemas/types.yaml#/definitions/phandle + description: Reference (phandle) to the TBI node + +required: + - compatible + - model + +patternProperties: + "^mdio@[0-9a-f]+$": + type: object + # TODO: reference to gianfar MDIO binding + +allOf: + - $ref: ethernet-controller.yaml# + + # compatible = "gianfar" requires device_type = "network" + - if: + properties: + compatible: + contains: + const: gianfar + then: + required: + - device_type + + # eTSEC2 controller nodes have "queue group" subnodes and don't need a "reg" + # property. + - if: + properties: + compatible: + contains: + const: fsl,etsec2 + then: + patternProperties: + "^queue-group@[0-9a-f]+$": + type: object + + properties: + "#address-cells": true + + "#size-cells": true + + reg: + maxItems: 1 + + interrupts: + maxItems: 3 + + required: + - reg + - interrupts + + additionalProperties: false + else: + required: + - reg + + # TSEC and eTSEC devices require three interrupts + - if: + properties: + model: + contains: + enum: [ TSEC, eTSEC ] + then: + properties: + interrupts: + items: + - description: Transmit interrupt + - description: Receive interrupt + - description: Error interrupt + + + +unevaluatedProperties: false + +examples: + - | + ethernet@24000 { + device_type = "network"; + model = "TSEC"; + compatible = "gianfar"; + reg = <0x24000 0x1000>; + local-mac-address = [ 00 E0 0C 00 73 00 ]; + interrupts = <29 2>, <30 2>, <34 2>; + interrupt-parent = <&mpic>; + phy-handle = <&phy0>; + }; + + - | + #include + + soc1 { + #address-cells = <1>; + #size-cells = <1>; + + ethernet@24000 { + compatible = "gianfar"; + reg = <0x24000 0x1000>; + ranges = <0x0 0x24000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + cell-index = <0>; + device_type = "network"; + model = "eTSEC"; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <32 IRQ_TYPE_LEVEL_LOW>, + <33 IRQ_TYPE_LEVEL_LOW>, + <34 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&ipic>; + + mdio@520 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,gianfar-mdio"; + reg = <0x520 0x20>; + }; + }; + }; + + - | + #include + #include + + soc2 { + #address-cells = <2>; + #size-cells = <2>; + + ethernet { + compatible = "fsl,etsec2"; + ranges; + device_type = "network"; + #address-cells = <2>; + #size-cells = <2>; + interrupt-parent = <&gic>; + model = "eTSEC"; + fsl,magic-packet; + dma-coherent; + + queue-group@2d10000 { + #address-cells = <2>; + #size-cells = <2>; + reg = <0x0 0x2d10000 0x0 0x1000>; + interrupts = , + , + ; + }; + + queue-group@2d14000 { + #address-cells = <2>; + #size-cells = <2>; + reg = <0x0 0x2d14000 0x0 0x1000>; + interrupts = , + , + ; + }; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt index 0e55e0af7d6f59cfb571dd3fcff704b7f4c140d2..b18bb4c997ea3a221e599f694d9a28692cbcaa7c 100644 --- a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt +++ b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt @@ -8,44 +8,7 @@ Refer to Documentation/devicetree/bindings/net/fsl,gianfar-mdio.yaml * Gianfar-compatible ethernet nodes -Properties: - - - device_type : Should be "network" - - model : Model of the device. Can be "TSEC", "eTSEC", or "FEC" - - compatible : Should be "gianfar" - - reg : Offset and length of the register set for the device - - interrupts : For FEC devices, the first interrupt is the device's - interrupt. For TSEC and eTSEC devices, the first interrupt is - transmit, the second is receive, and the third is error. - - phy-handle : See ethernet.txt file in the same directory. - - fixed-link : See fixed-link.txt in the same directory. - - phy-connection-type : See ethernet.txt file in the same directory. - This property is only really needed if the connection is of type - "rgmii-id", as all other connection types are detected by hardware. - - fsl,magic-packet : If present, indicates that the hardware supports - waking up via magic packet. - - fsl,wake-on-filer : If present, indicates that the hardware supports - waking up by Filer General Purpose Interrupt (FGPI) asserted on the - Rx int line. This is an advanced power management capability allowing - certain packet types (user) defined by filer rules to wake up the system. - - bd-stash : If present, indicates that the hardware supports stashing - buffer descriptors in the L2. - - rx-stash-len : Denotes the number of bytes of a received buffer to stash - in the L2. - - rx-stash-idx : Denotes the index of the first byte from the received - buffer to stash in the L2. - -Example: - ethernet@24000 { - device_type = "network"; - model = "TSEC"; - compatible = "gianfar"; - reg = <0x24000 0x1000>; - local-mac-address = [ 00 E0 0C 00 73 00 ]; - interrupts = <29 2 30 2 34 2>; - interrupt-parent = <&mpic>; - phy-handle = <&phy0> - }; +Refer to Documentation/devicetree/bindings/net/fsl,gianfar.yaml * Gianfar PTP clock nodes