From patchwork Tue Mar 25 11:57:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 14029003 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 C9534C35FFC for ; Tue, 25 Mar 2025 13:08:43 +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:References:In-Reply-To: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:List-Owner; bh=Nb+uumKIAlcQT03N8XP/zmijiZ83zsuKYhUq6ru23a8=; b=BEsS1qFhJwqLOHq4rTcAC7jP7l taDgaxeC4fTLpQOXNZvNI1+G8AEqTEArKrny193H5VAVkns4tx1fWmanaKM4O1RdGVOUB7G5VjBAi Fn5ydahzH66DrGMGVEjDbRFsP/87rox9q/oJKXa8GH7GNl8RzDAVOCi/VYOqt/lPdMnBAq+ISb0IS vDjr1jUoJri95+DD47zDxKoF3yAV+j6YYZzofJpb/BcxpuE70+l0o6tgLo39ObZaoAPYBgR201IN1 OPkPEoHId7gmroO+AfYFRKkFVrR35fIoMtE6LUNbeuvwvpwiwEwOZlj6ju/nneTcK9VKOWXzBlsr8 mMz/2bTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1tx41C-00000005zGK-3TUT; Tue, 25 Mar 2025 13:08:34 +0000 Received: from mx.denx.de ([2a03:4000:64:cc:545d:19ff:fe05:8172]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1tx2vD-00000005iDY-3X4I for linux-arm-kernel@lists.infradead.org; Tue, 25 Mar 2025 11:58:21 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 97F9D102EBA43; Tue, 25 Mar 2025 12:58:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=mx-20241105; t=1742903897; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=Nb+uumKIAlcQT03N8XP/zmijiZ83zsuKYhUq6ru23a8=; b=hE9L4sZcZzz9FzHmEBdosqshpQdnTj6W+zRWPlaT00yc64jvRwPQ/olH5eIdJ8kR6wUrcC LWNxVQGxsOs2ba95HFP2LKKWf9vcYHbYp6IWi8HTOw6eKAlpsySTTQaV000hiPzZMdiskr jVyKTtAIuU8JfmsZL5Jf46JJ0y7aRXuSdxhniMd+3mI6DmDRb9AH8UdmZwXToI4b10wsPp wbp4bU1ejZmpw7pG1l/Pb+n1iR9M8XPm+Cin3OTPj9gbE3i4ugBN3UU2AmFpLZhZwE2qCt J7i3VWbs308Sl3qPCSXdJcIA0sJjCYmYZmcj8THMaTbnC8K1UHduDCQKWBfucA== From: Lukasz Majewski To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Paolo Abeni , Jakub Kicinski , Eric Dumazet , davem@davemloft.net, Andrew Lunn Cc: Pengutronix Kernel Team , Fabio Estevam , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Richard Cochran , netdev@vger.kernel.org, Maxime Chevallier , Lukasz Majewski Subject: [PATCH 1/5] MAINTAINERS: Add myself as the MTIP L2 switch maintainer (IMX SoCs: imx287) Date: Tue, 25 Mar 2025 12:57:32 +0100 Message-Id: <20250325115736.1732721-2-lukma@denx.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250325115736.1732721-1-lukma@denx.de> References: <20250325115736.1732721-1-lukma@denx.de> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250325_045820_020883_D9791F78 X-CRM114-Status: UNSURE ( 8.73 ) 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 Add myself as a maintainer for this particular network driver. Signed-off-by: Lukasz Majewski --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5959513a7359..255edd825fa1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9270,6 +9270,13 @@ S: Maintained F: Documentation/devicetree/bindings/i2c/i2c-mpc.yaml F: drivers/i2c/busses/i2c-mpc.c +FREESCALE MTIP ETHERNET SWITCH DRIVER +M: Lukasz Majewski +L: netdev@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/net/fec,mtip-switch.yaml +F: drivers/net/ethernet/freescale/mtipsw/* + FREESCALE QORIQ DPAA ETHERNET DRIVER M: Madalin Bucur L: netdev@vger.kernel.org From patchwork Tue Mar 25 11:57:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 14028436 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 7D5A8C35FFC for ; Tue, 25 Mar 2025 12:03:52 +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:References:In-Reply-To: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:List-Owner; bh=wkjvXpluXHZIyk2FPJLHBibzQd9cgpPYKEkveOICekU=; b=GXhr/8ub7ydDH4bZ8yT7c2sblq A75N351fL/XmYJdfHBXmJzAKlJrilIWj3FiHeeK/cJYltSx8ow7VyqnnHib0nygEAYEN49y0CtsvJ BkMj+4nQ2/YrsXgUqh9slQ4PZjdcmFLpdO0zzrd0RJJmXP/u2J4iNMUjzkz8LOYkEVk1MQzFwMUDm 6gk3nT+KOeKsGQHOch8f02jrXnWVEXiuKqpSG1AOvy6+VcGP6b4WXEn6nvhDT26d3aU1Knmxu1o7T o0q6gQbf73wMjGxSGmq9jPeM+rXDHoPlGAPfylM/ZQfbyz/1Bw3nhfu/zfbt7MnmdtseORma+tSe7 WlRI5fvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1tx30L-00000005jQe-3inX; Tue, 25 Mar 2025 12:03:37 +0000 Received: from mx.denx.de ([2a03:4000:64:cc:545d:19ff:fe05:8172]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1tx2vE-00000005iDh-2qPe for linux-arm-kernel@lists.infradead.org; Tue, 25 Mar 2025 11:58:22 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 76329102EBA4A; Tue, 25 Mar 2025 12:58:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=mx-20241105; t=1742903898; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=wkjvXpluXHZIyk2FPJLHBibzQd9cgpPYKEkveOICekU=; b=a75CWyZLI/mtX4BBgVvlvy0gl8YN7T8r6CFmKMRLIe1xop8h8A3BOkSRHm62mPSuH4m5Ab DqHOIUQ+/VTodkeEYQoIQeyUMjX65j4r2aN27Y1kbW20eNWIp5oSQxsZRNmjQJ+U6MGkZ3 PJxIrKdRCJKU7KCShMtzgjaMKsZcaxoGoGXQ/dJBzTobByZgYyueHwI5+JEPfSWRAkuHBU 9p6rg5kodjQw90TrkFa2QQ8r4JVbQMrW6BBdqg79j+u8gAu6mU9jA92RTlk+D8rE4PGsQk l1MvmgGQkHNkiC8k8uo4emYcgQMnIxeIuyDXmp1RtpsYUDVo0+7c6DgNfbDSDA== From: Lukasz Majewski To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Paolo Abeni , Jakub Kicinski , Eric Dumazet , davem@davemloft.net, Andrew Lunn Cc: Pengutronix Kernel Team , Fabio Estevam , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Richard Cochran , netdev@vger.kernel.org, Maxime Chevallier , Lukasz Majewski Subject: [PATCH 2/5] dt-bindings: net: Add MTIP L2 switch description (fec,mtip-switch.yaml) Date: Tue, 25 Mar 2025 12:57:33 +0100 Message-Id: <20250325115736.1732721-3-lukma@denx.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250325115736.1732721-1-lukma@denx.de> References: <20250325115736.1732721-1-lukma@denx.de> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250325_045821_003798_D3A37B4E X-CRM114-Status: GOOD ( 16.10 ) 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 This patch provides description of the MTIP L2 switch available in some NXP's SOCs - imx287, vf610. Signed-off-by: Lukasz Majewski --- .../bindings/net/fec,mtip-switch.yaml | 160 ++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/fec,mtip-switch.yaml diff --git a/Documentation/devicetree/bindings/net/fec,mtip-switch.yaml b/Documentation/devicetree/bindings/net/fec,mtip-switch.yaml new file mode 100644 index 000000000000..cd85385e0f79 --- /dev/null +++ b/Documentation/devicetree/bindings/net/fec,mtip-switch.yaml @@ -0,0 +1,160 @@ +# SPDX-License-Identifier: GPL-2.0-only +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/fsl,mtip-switch.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MTIP Level 2 (L2) switch + +maintainers: + - Lukasz Majewski + +allOf: + - $ref: ethernet-controller.yaml# + +properties: + compatible: + oneOf: + - enum: + - imx287-mtip-switch + reg: + maxItems: 1 + + interrupts: + maxItems: 3 + + clocks: + maxItems: 4 + description: + The "ipg", for MAC ipg_clk_s, ipg_clk_mac_s that are for register accessing. + The "ahb", for MAC ipg_clk, ipg_clk_mac that are bus clock. + The "ptp"(option), for IEEE1588 timer clock that requires the clock. + The "enet_out"(option), output clock for external device, like supply clock + for PHY. The clock is required if PHY clock source from SOC. + + clock-names: + minItems: 4 + maxItems: 4 + items: + enum: + - ipg + - ahb + - ptp + - enet_out + + phy-supply: + description: + Regulator that powers the Ethernet PHY. + + phy-reset-gpios: + deprecated: true + description: + Should specify the gpio for phy reset. + + phy-reset-duration: + $ref: /schemas/types.yaml#/definitions/uint32 + deprecated: true + description: + Reset duration in milliseconds. Should present only if property + "phy-reset-gpios" is available. Missing the property will have the + duration be 1 millisecond. Numbers greater than 1000 are invalid + and 1 millisecond will be used instead. + + phy-reset-post-delay: + $ref: /schemas/types.yaml#/definitions/uint32 + deprecated: true + description: + Post reset delay in milliseconds. If present then a delay of phy-reset-post-delay + milliseconds will be observed after the phy-reset-gpios has been toggled. + Can be omitted thus no delay is observed. Delay is in range of 1ms to 1000ms. + Other delays are invalid. + + mdio: + $ref: mdio.yaml# + unevaluatedProperties: false + description: + Specifies the mdio bus in the FEC, used as a container for phy nodes. + + ethernet-ports: + type: object + additionalProperties: false + + patternProperties: + "^port@[0-9a-f]+$": + $ref: /schemas/net/ethernet-switch-controller.yaml# + unevaluatedProperties: false + + properties: + reg: + description: Switch port number + + required: + - reg + - phy-mode + - phy-handle + +required: + - compatible + - reg + - interrupts + - mdio + - ethernet-ports + +unevaluatedProperties: false + +examples: + - | + switch@800f0000 { + compatible = "fsl,imx287-mtip-switch"; + pinctrl-names = "default"; + pinctrl-0 = <&mac0_pins_a>, <&mac1_pins_a>; + phy-supply = <®_fec_3v3>; + phy-reset-duration = <25>; + phy-reset-post-delay = <10>; + interrupts = <100>, <101>, <102>; + clocks = <&clks 57>, <&clks 57>, <&clks 64>, <&clks 35>; + clock-names = "ipg", "ahb", "enet_out", "ptp"; + status = "okay"; + + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + + mtip_port1: port@1 { + reg = <1>; + label = "lan0"; + local-mac-address = [ 00 00 00 00 00 00 ]; + phy-mode = "rmii"; + phy-handle = <ðphy0>; + }; + + mtip_port2: port@2 { + reg = <2>; + label = "lan1"; + local-mac-address = [ 00 00 00 00 00 00 ]; + phy-mode = "rmii"; + phy-handle = <ðphy1>; + }; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethphy0: ethernet-phy@0 { + reg = <0>; + smsc,disable-energy-detect; + /* Both PHYs (i.e. 0,1) have the same, single GPIO, */ + /* line to handle both, their interrupts (AND'ed) */ + interrupt-parent = <&gpio4>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + }; + + ethphy1: ethernet-phy@1 { + reg = <1>; + smsc,disable-energy-detect; + interrupt-parent = <&gpio4>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + }; + }; + }; From patchwork Tue Mar 25 11:57:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 14028437 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 5D0F1C35FFC for ; Tue, 25 Mar 2025 12:05:35 +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:References:In-Reply-To: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:List-Owner; bh=NgHm99vQLnC3l+PaIOvp8HpQsfYyteeTPS/neTnwgPg=; b=dUZtfZqN7EPvUfvVKVyBNz1fGM jf/Y0aiBmudruVcwRkyPDuZQVt/BqMAZWU4o0YhAS2E5aUUKDoknRR2aTrsSC8bLiLgXyiB11St3u sn62i3lL6PR3LQ1rxMNADSvkCd8QZiSCUjcwcTxzwEK7yQWk1rHIdY5YSTeFcyChX1qSW9HCNuhQp S1ZGt8svPTP0gVOwe8aTUnJJr0EdNQgngQb/iqCxFaGQjsYl68OW45+NZK6T0fIC6j2pMZZWhY4kp lYFLpVs0qOzRPojrUjm9K6+ElqppRwb0iQIO1UMVyAC9DyCIyRJm6bLYUDlSCeOwnFDVwjrYe/nl0 LcWfrnTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1tx323-00000005jw1-2RNo; Tue, 25 Mar 2025 12:05:23 +0000 Received: from mx.denx.de ([89.58.32.78]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1tx2vG-00000005iEf-2r4o for linux-arm-kernel@lists.infradead.org; Tue, 25 Mar 2025 11:58:23 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 6918C102EB802; Tue, 25 Mar 2025 12:58:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=mx-20241105; t=1742903900; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=NgHm99vQLnC3l+PaIOvp8HpQsfYyteeTPS/neTnwgPg=; b=fRl1iL5N86NB0V3k2iW8G3UZ0S70ZOKBdrgIhZIK81UK0B8ygdiReNfwNgvWZ08lZvsi0/ NQkY6TKhqjdHMw6tZPjGNJxcSmvE2aJsSic4cQVFyoAHysvOw4gKgTwZgAVRJ4AJTMoVWW s3xcTURf2ntfgNlAMZ4VvlCRlZ++g7hDJYAI17OBzXYjXw5padR0lgU4RCK0q10s5Y+Hp+ Tv8wtmj3BNPotlVVj6Qu8AmPcS8oLScHleTqAr1fBCcz0eLwK/N0DjSACMCrf6xFCphZVQ IO+RNdr4fj2y6L82njSgGOqHORV0rUxcV5Rv/cM2jT1PvjG+4wocNu03YL5dCw== From: Lukasz Majewski To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Paolo Abeni , Jakub Kicinski , Eric Dumazet , davem@davemloft.net, Andrew Lunn Cc: Pengutronix Kernel Team , Fabio Estevam , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Richard Cochran , netdev@vger.kernel.org, Maxime Chevallier , Lukasz Majewski Subject: [PATCH 3/5] arm: dts: Adjust the 'reg' range for imx287 L2 switch description Date: Tue, 25 Mar 2025 12:57:34 +0100 Message-Id: <20250325115736.1732721-4-lukma@denx.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250325115736.1732721-1-lukma@denx.de> References: <20250325115736.1732721-1-lukma@denx.de> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250325_045822_861659_48B70E37 X-CRM114-Status: GOOD ( 11.70 ) 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 current range of 'reg' property is too small to allow full control of the L2 switch on imx287. As this IP block also uses ENET-MAC blocks for its operation, the address range for it must be included as well. Signed-off-by: Lukasz Majewski --- arch/arm/boot/dts/nxp/mxs/imx28.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/nxp/mxs/imx28.dtsi b/arch/arm/boot/dts/nxp/mxs/imx28.dtsi index bbea8b77386f..8f2aa32208cf 100644 --- a/arch/arm/boot/dts/nxp/mxs/imx28.dtsi +++ b/arch/arm/boot/dts/nxp/mxs/imx28.dtsi @@ -1321,8 +1321,8 @@ mac1: ethernet@800f4000 { status = "disabled"; }; - eth_switch: switch@800f8000 { - reg = <0x800f8000 0x8000>; + eth_switch: switch@800f0000 { + reg = <0x800f0000 0x20000>; status = "disabled"; }; }; From patchwork Tue Mar 25 11:57:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 14028438 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 7DF0BC35FFC for ; Tue, 25 Mar 2025 12:07:21 +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:References:In-Reply-To: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:List-Owner; bh=PvnjP1KZvNHykTcRfl9qD1j5GE4bTQS8Z3I6LLaUEwQ=; b=aY/43//HLsj+f5A5gRiVNL/pN8 GFENhWqjVeN5aVPJJsPSkpWBdFNXKMMYqaK0g0v3HKUrNUDFg3qkK2dFNY0zwrfWxqkC8/eumgFKV wO2/ha95cLgxnz3Z/lLYCZcHpXLp/6aHVz9V/YEp4q8fzanITV3MFmhbk2HbwzL3UGhZJiLeibz+c /+WTftJa2+/vSs/B+XVgn8j9vYK2sgSNpq2RTGgiHqxBmU0tSwLZGLpE1S6CaHFJOzJjt3YZbT80e m97lH9Dut66nci4Yam924dz9u8ziJ9wFraV7gophJvvxoT8N9Bnfn7ZGQsgJf4pzzoWSj+bckfs1J GC7vHn8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1tx33l-00000005kIv-1QTB; Tue, 25 Mar 2025 12:07:09 +0000 Received: from mx.denx.de ([89.58.32.78]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1tx2vI-00000005iFA-1KnT for linux-arm-kernel@lists.infradead.org; Tue, 25 Mar 2025 11:58:25 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 5304C102E64C4; Tue, 25 Mar 2025 12:58:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=mx-20241105; t=1742903902; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=PvnjP1KZvNHykTcRfl9qD1j5GE4bTQS8Z3I6LLaUEwQ=; b=DHfs+3dK6bKFwwpkizkeqhOSPyaZyj6ZOLzH4VIMXX5CgnIA0WrlPzdOFVUdR9rJVbChC2 HIJY0YLP/M+k+78/uaG43pZHPpcL8d6eGOZIfhiEazLKD2Nm7+7Ywj9zj42PEp9GDa6bMG j8CK35jWW+WqZk+SZhZwwYEGWBfhkSHC0Gd9gWSV3egr+AexVDoDtNtvkTnIpupcuDF32E firURP4b7LHre60bJtATXNAuUf3d1/UEq2TUn9MtFWqV5gTTiBWN+dl+/p9doq44PXe7uL OUlzEGWiRijHptWq0KjvkXbUlcj82oZhhKTq3wwAgPy4nHEOJVu2fULh6MwHfQ== From: Lukasz Majewski To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Paolo Abeni , Jakub Kicinski , Eric Dumazet , davem@davemloft.net, Andrew Lunn Cc: Pengutronix Kernel Team , Fabio Estevam , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Richard Cochran , netdev@vger.kernel.org, Maxime Chevallier , Lukasz Majewski Subject: [PATCH 4/5] arm: dts: imx287: Provide description for MTIP L2 switch Date: Tue, 25 Mar 2025 12:57:35 +0100 Message-Id: <20250325115736.1732721-5-lukma@denx.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250325115736.1732721-1-lukma@denx.de> References: <20250325115736.1732721-1-lukma@denx.de> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250325_045824_499005_B71317FC X-CRM114-Status: GOOD ( 10.74 ) 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 This description is similar to one supprted with the cpsw_new.c driver. It has separated ports and PHYs (connected to mdio bus). Signed-off-by: Lukasz Majewski --- arch/arm/boot/dts/nxp/mxs/imx28-xea.dts | 56 +++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-xea.dts b/arch/arm/boot/dts/nxp/mxs/imx28-xea.dts index 6c5e6856648a..e645b086574d 100644 --- a/arch/arm/boot/dts/nxp/mxs/imx28-xea.dts +++ b/arch/arm/boot/dts/nxp/mxs/imx28-xea.dts @@ -5,6 +5,7 @@ */ /dts-v1/; +#include #include "imx28-lwe.dtsi" / { @@ -18,6 +19,61 @@ &can0 { status = "okay"; }; +ð_switch { + compatible = "fsl,imx287-mtip-switch"; + pinctrl-names = "default"; + pinctrl-0 = <&mac0_pins_a>, <&mac1_pins_a>; + phy-supply = <®_fec_3v3>; + phy-reset-duration = <25>; + phy-reset-post-delay = <10>; + interrupts = <100>, <101>, <102>; + clocks = <&clks 57>, <&clks 57>, <&clks 64>, <&clks 35>; + clock-names = "ipg", "ahb", "enet_out", "ptp"; + status = "okay"; + + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + + mtip_port1: port@1 { + reg = <1>; + label = "lan0"; + local-mac-address = [ 00 00 00 00 00 00 ]; + phy-mode = "rmii"; + phy-handle = <ðphy0>; + }; + + mtip_port2: port@2 { + reg = <2>; + label = "lan1"; + local-mac-address = [ 00 00 00 00 00 00 ]; + phy-mode = "rmii"; + phy-handle = <ðphy1>; + }; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethphy0: ethernet-phy@0 { + reg = <0>; + smsc,disable-energy-detect; + /* Both PHYs (i.e. 0,1) have the same, single GPIO, */ + /* line to handle both, their interrupts (AND'ed) */ + interrupt-parent = <&gpio4>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + }; + + ethphy1: ethernet-phy@1 { + reg = <1>; + smsc,disable-energy-detect; + interrupt-parent = <&gpio4>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + }; + }; +}; + &i2c1 { pinctrl-names = "default"; pinctrl-0 = <&i2c1_pins_b>;