From patchwork Thu Oct 7 23:06:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 12543749 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 873C7C433EF for ; Thu, 7 Oct 2021 23:08:34 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4F42A6128C for ; Thu, 7 Oct 2021 23:08:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4F42A6128C Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=alliedtelesis.co.nz Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GWRi4lFZkFqhqxHLAGsmXHVRHBvEwod4mAWtJi+P68Q=; b=ikyefZ6I/v5Xzw LVy3+IGtAkMUGFIBAzsp7IYLOH+7zvXtadtUkLQzvEML/HovH2squ0yPlQ4puU45ZTHGLBp/2OJAs /HbQbUk5ZREssiNY0sLpwQpflv3RSHurbbrItpd6uTfXL808YMM7XhJczqP8igSJ0mJskVj/oV/cU ckMVwTj8cIpZJyBoVsHHej8WrhOIzM/QDMj5wD4JNMJh5XpyglwzlrXxkHduTwl2tgJMgAzbG3nGW rsHGB7GQ7B3plJPoh5GP8r4wytum28ni6jFkEjW5WjkCsCdQWJ9ICXU+78ckuADWVRQ2AP8LuHM2B nGIUDp+rqPnvSslYl/8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYcTB-000wFl-Lc; Thu, 07 Oct 2021 23:06:33 +0000 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYcT7-000wE8-GS for linux-arm-kernel@lists.infradead.org; Thu, 07 Oct 2021 23:06:31 +0000 Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id C59818364F; Fri, 8 Oct 2021 12:06:21 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1633647981; bh=wX/X2kD1QXhISStI3ADWriII7Y2rdwpkkQwJV7ZPUWg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ls4DsNZXNQRZpnHOeNZ9ELTy0uuJpaB9NgguDZ2A1ytTV77eEC/7TDp6LEf8UQW/d jrYbvcWDecHaoYVDZyFIbyCLh/CrpPfwIR7LwyesDekeQ5q86vB+tk/X+nX1lR9hzo GhDdC3noYBoUfV02MZqr82jw2nhi4rAODPc7Ix+U2aSAkErBL7H0yRtemyyggjdr2H RYdats1CTgx8032P4rHZe+OSn2isQGxHg7xzOraj2WU9GFtioI79C3h4Eyov2xFcBC 8Q+8WuEh82B7u/211jQMm/2pGI/2ZUuOkBLoE6mv+KPHnrNGFwKzC0PAbU+Ks5jASP zyIlxF/1Bp26w== Received: from pat.atlnz.lc (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8, 2, 6, 11305) id ; Fri, 08 Oct 2021 12:06:21 +1300 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.26]) by pat.atlnz.lc (Postfix) with ESMTP id A4B7E13EE39; Fri, 8 Oct 2021 12:06:21 +1300 (NZDT) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id A34822A0B00; Fri, 8 Oct 2021 12:06:21 +1300 (NZDT) From: Chris Packham To: andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, robh+dt@kernel.org, kostap@marvell.com Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Packham Subject: [PATCH 1/2] arm/arm64: dts: Enable 2.5G Ethernet port on CN9130-CRB Date: Fri, 8 Oct 2021 12:06:18 +1300 Message-Id: <20211007230619.957016-2-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211007230619.957016-1-chris.packham@alliedtelesis.co.nz> References: <20211007230619.957016-1-chris.packham@alliedtelesis.co.nz> MIME-Version: 1.0 X-SEG-SpamProfiler-Analysis: v=2.3 cv=fKRHIqSe c=1 sm=1 tr=0 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=8gfv0ekSlNoA:10 a=kLFBgOLU39b1_2hPZ6UA:9 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211007_160629_749314_6A8DB128 X-CRM114-Status: GOOD ( 13.57 ) 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 Enable the 2.5G Ethernet port by setting the status to "okay" and the phy-mode to "2500base-x" on the cn9130-crb boards. Tested on a CN9130-CRB-A. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn --- The Marvell SDK adds 2500base-t and uses it in the equivalent dtsi but looking at the documentation for both the SoC and the PHY I think 2500base-x is correct for the system interface (the line side is 2500base-t). arch/arm64/boot/dts/marvell/cn9130-crb.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/marvell/cn9130-crb.dtsi b/arch/arm64/boot/dts/marvell/cn9130-crb.dtsi index 505ae69289f6..e7918f325646 100644 --- a/arch/arm64/boot/dts/marvell/cn9130-crb.dtsi +++ b/arch/arm64/boot/dts/marvell/cn9130-crb.dtsi @@ -214,8 +214,8 @@ &cp0_eth1 { }; &cp0_eth2 { - /* This port uses "2500base-t" phy-mode */ - status = "disabled"; + status = "okay"; + phy-mode = "2500base-x"; phy = <&nbaset_phy0>; phys = <&cp0_comphy5 2>; }; From patchwork Thu Oct 7 23:06:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 12543753 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B52FC433F5 for ; Thu, 7 Oct 2021 23:08:44 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id DFE5E60F9C for ; Thu, 7 Oct 2021 23:08:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DFE5E60F9C Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=alliedtelesis.co.nz Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GtHqRH7BOC2jf8Uq87YuET4cHVsfuX1dE5q53q/YoJU=; b=JeANW4ahIGNYrD piHGOzh4y/SeQBjmfqWPi95T0Ye0TntpaGZFG+MI/m6DFoBGmByvquf7FbWHsFkbqwrgmkJtcuHTX Pey74XKHVtCPEy9tzeGzqm7084nE6ot4mi+143sR6un6G8IwKFJpZiBgbNeITt/PT5DPqwcXZ5NxT 3Hz5sxBS7nWdzFg6S46s335EwNESjrjG9RTWj/TlzDMzZ2PImPk0RUbfDwAsEfNKWlLDBjqZy4M1A qnqXaruzRah+B8bIefZyhusUbYsKPOMJSnRiq+A5dG5BdrDHRWQ3fIx47h1oZa9kW1OgkZeYxRO3x UpsquCyVpBvr1Kosndbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYcTV-000wH2-FS; Thu, 07 Oct 2021 23:06:53 +0000 Received: from gate2.alliedtelesis.co.nz ([2001:df5:b000:5::4]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYcT7-000wEA-Ff for linux-arm-kernel@lists.infradead.org; Thu, 07 Oct 2021 23:06:32 +0000 Received: from svr-chch-seg1.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id ED60E83651; Fri, 8 Oct 2021 12:06:21 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1633647981; bh=uUekCejAnirxuenb1bdmJTf1s5Qm7uQA4xDwgWAaD7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=1ICtPeKnDlZlbzwHsYzrtpkb5KzqqlANVZS8VfLCXDCruVlT+wR92+vNExVX3rMB1 z/fQLsRhpjKZGBRmpEmP5fzuqlv1YKdWkZScTW2AVYlcJ+xRvppByg0TnuqlqyxIwo 5hak2uu/6CFLD5ycipFP9U3qgGglBGNc+04bkHxfGnEIx89siNFWUwm/cRe2WKpLNH xrgCSrGDpxdVIsWYRq6iThEVWhgFfilDYfE9I7ABShZDwRb8CYx3vCir/KCfa2k9pS IMlcjYehWHTQPBolltEY/nxWiweHoGFEuGaDu0PqvfbB/jqmApniDgpljEN/S0e+UV sIG4acUnpxaTQ== Received: from pat.atlnz.lc (Not Verified[10.32.16.33]) by svr-chch-seg1.atlnz.lc with Trustwave SEG (v8, 2, 6, 11305) id ; Fri, 08 Oct 2021 12:06:21 +1300 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.26]) by pat.atlnz.lc (Postfix) with ESMTP id BFCEA13EE39; Fri, 8 Oct 2021 12:06:21 +1300 (NZDT) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id BE7112A0B00; Fri, 8 Oct 2021 12:06:21 +1300 (NZDT) From: Chris Packham To: andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, robh+dt@kernel.org, kostap@marvell.com Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Packham Subject: [PATCH 2/2] arm/arm64: dts: Add MV88E6393X to CN9130-CRB device tree Date: Fri, 8 Oct 2021 12:06:19 +1300 Message-Id: <20211007230619.957016-3-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211007230619.957016-1-chris.packham@alliedtelesis.co.nz> References: <20211007230619.957016-1-chris.packham@alliedtelesis.co.nz> MIME-Version: 1.0 X-SEG-SpamProfiler-Analysis: v=2.3 cv=fKRHIqSe c=1 sm=1 tr=0 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=8gfv0ekSlNoA:10 a=IKpnBzii7tR9GoWT8zoA:9 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211007_160629_892991_B245F24C X-CRM114-Status: GOOD ( 11.27 ) 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 CN9130-CRB boards have a MV88E6393X switch connected to eth0. Add the necessary dts nodes and properties for this. Signed-off-by: Chris Packham --- This is taken from the Marvell SDK. I've re-ordered the port entries to be in ascending order. arch/arm64/boot/dts/marvell/cn9130-crb.dtsi | 125 ++++++++++++++++++++ 1 file changed, 125 insertions(+) diff --git a/arch/arm64/boot/dts/marvell/cn9130-crb.dtsi b/arch/arm64/boot/dts/marvell/cn9130-crb.dtsi index e7918f325646..171f7394948e 100644 --- a/arch/arm64/boot/dts/marvell/cn9130-crb.dtsi +++ b/arch/arm64/boot/dts/marvell/cn9130-crb.dtsi @@ -185,6 +185,131 @@ &cp0_mdio { phy0: ethernet-phy@0 { reg = <0>; }; + + switch6: switch0@6 { + /* Actual device is MV88E6393X */ + compatible = "marvell,mv88e6190"; + #address-cells = <1>; + #size-cells = <0>; + reg = <6>; + + dsa,member = <0 0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "notused-port0"; + phy-mode = "10gbase-kr"; + status = "disabled"; + + }; + + port@1 { + reg = <1>; + label = "wan1"; + phy-handle = <&switch0phy1>; + }; + + port@2 { + reg = <2>; + label = "lan2"; + phy-handle = <&switch0phy2>; + }; + + port@3 { + reg = <3>; + label = "lan3"; + phy-handle = <&switch0phy3>; + }; + + port@4 { + reg = <4>; + label = "lan4"; + phy-handle = <&switch0phy4>; + }; + + port@5 { + reg = <5>; + label = "lan5"; + phy-handle = <&switch0phy5>; + }; + + port@6 { + reg = <6>; + label = "lan6"; + phy-handle = <&switch0phy6>; + }; + + port@7 { + reg = <7>; + label = "lan7"; + phy-handle = <&switch0phy7>; + }; + + port@8 { + reg = <8>; + label = "lan8"; + phy-handle = <&switch0phy8>; + }; + + port@9 { + reg = <9>; + label = "wanp9"; + phy-mode = "10gbase-kr"; + fixed-link { + speed = <10000>; + full-duplex; + }; + }; + + port@10 { + reg = <10>; + label = "cpu"; + ethernet = <&cp0_eth0>; + }; + + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + switch0phy1: switch0phy1@1 { + reg = <0x1>; + }; + + switch0phy2: switch0phy2@2 { + reg = <0x2>; + }; + + switch0phy3: switch0phy3@3 { + reg = <0x3>; + }; + + switch0phy4: switch0phy4@4 { + reg = <0x4>; + }; + + switch0phy5: switch0phy5@5 { + reg = <0x5>; + }; + + switch0phy6: switch0phy6@6 { + reg = <0x6>; + }; + + switch0phy7: switch0phy7@7 { + reg = <0x7>; + }; + + switch0phy8: switch0phy8@8 { + reg = <0x8>; + }; + }; + }; }; &cp0_xmdio {