Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2624155pxb; Sun, 17 Oct 2021 20:49:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwndiKbn0zAec6DcAQALyiZXbp8AAEqfw09PBTzB8rWz1mHIRMzSaVq5nt7kFKvgEJBIyyH X-Received: by 2002:a17:90a:c206:: with SMTP id e6mr16016160pjt.193.1634528984221; Sun, 17 Oct 2021 20:49:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528984; cv=none; d=google.com; s=arc-20160816; b=Sd4CuVAudJFY8ZxY8naVwzdpdLcw4Zk6WPZ3nNDH2vwJ1FcolGwJ7aF4WQXDX+Pq8a FbG69ng+3gtLZ95xPE17ubLcXPCohq4t7j8edLTC1XqLNneC2y57WEcWT+FszJmjVZwH IIzrkd8YMJhQqyPeGf6MtEs4GLFbEEWi+hPk0iXcD3S0Fj+lJRq4fDd11hXhJqFaNBh4 SbpM6KgAIFBb3/OSG/7RTbnoeLe2yy68Qvvhgf5Tos7kymOD96M5MwObcRif3SOtZudd L/NKSZPg/VUZI9wHKDSH+unZlrAtaItStjxrdlzSB78OxkdBqHbobHW6f/0+xDPkBVsL YyjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=O2UYL2vwwrFX+xVYrMAyYBcqHgKcOdHT45FDP++g4Tw=; b=WCsynga8z95BGw/aWdC6TjLnzk3Tt9Z5n7KV5m+b15qX128rj9ot4D4T5VK2upCDIs FeAdYUHQ60FfvuhSHSLflx1D90R92xWUfTEvDdVUIpg2gLbvrsaxYSuXx+wUH2pCoK/f qAsInjanoPeC9VlHvybiUNXFe55dXe/iqx6VYkHItXv24o0in/dMkFsYna1HyJnaHMOq PqVxsjKvxqG90RHf59tYrSOnWIRZP+sfut6aCPo4ESfM7AfZNetJkpYevY28jadvrryD oeXczXMdJhLhiJePVcdXzeZhVy5tseFOIgnWLS8Fsr91qtHIBfTbPPYCATSNGeo7tYjR S38A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=SCHxk1QC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f1si20879380pfe.360.2021.10.17.20.49.31; Sun, 17 Oct 2021 20:49:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=SCHxk1QC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344944AbhJRBOe (ORCPT + 98 others); Sun, 17 Oct 2021 21:14:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344947AbhJRBOd (ORCPT ); Sun, 17 Oct 2021 21:14:33 -0400 Received: from gate2.alliedtelesis.co.nz (gate2.alliedtelesis.co.nz [IPv6:2001:df5:b000:5::4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 249FBC061769 for ; Sun, 17 Oct 2021 18:12:18 -0700 (PDT) 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 4725A891B0; Mon, 18 Oct 2021 14:12:14 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1634519534; bh=O2UYL2vwwrFX+xVYrMAyYBcqHgKcOdHT45FDP++g4Tw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=SCHxk1QCDgiN3ArAQF0bVGLskU52pq/Fl8wt4sel5e09N+czgx0uac1zllfbbWvvf uhfsHwuxfErTO0ho473pYki1BVcgsL0SfO/EaG5xpwcbwggmPgleZqa73a5aOyRp+6 +Ssdtq8mM9+NxVeyTfr8QAfIAOQdDkKgCRGE6UrgEC4a9Y+1X7SBjzTMg0RdKwThhj T6p4RE3qggZeag06kqWxvWMnMaA7RN99qpAsz3Vem0aMsuugBWBabj2yUKph0M8AvP 5z5p98KJ9UfRLf/R20kODzKF+7QtVV+kof0tAGXB7aXLyQYSFgFOXG3saJ1uoQx6jl ibBthkcGHWRow== 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 ; Mon, 18 Oct 2021 14:12:14 +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 2F49013ED1E; Mon, 18 Oct 2021 14:12:14 +1300 (NZDT) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id 2D8E82A0B00; Mon, 18 Oct 2021 14:12:14 +1300 (NZDT) From: Chris Packham To: andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, robh+dt@kernel.org Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Packham Subject: [PATCH v2 2/2] arm/arm64: dts: Add MV88E6393X to CN9130-CRB device tree Date: Mon, 18 Oct 2021 14:12:11 +1300 Message-Id: <20211018011211.3836590-3-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211018011211.3836590-1-chris.packham@alliedtelesis.co.nz> References: <20211018011211.3836590-1-chris.packham@alliedtelesis.co.nz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SEG-SpamProfiler-Analysis: v=2.3 cv=eIJtc0h1 c=1 sm=1 tr=0 a=KLBiSEs5mFS1a/PbTCJxuA==:117 a=8gfv0ekSlNoA:10 a=RPquEeSGPLc92inKvdoA:9 X-SEG-SpamProfiler-Score: 0 x-atlnz-ls: pat Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 based on the Marvell SDK. I've re-ordered the port entries to be in ascending order renamed the wan ports and connected the SFP+. Changes in v2: - Remove unused port0 - Label all ports "pN" - Add interrupt connections - Add SFP arch/arm64/boot/dts/marvell/cn9130-crb.dtsi | 129 ++++++++++++++++++++ 1 file changed, 129 insertions(+) diff --git a/arch/arm64/boot/dts/marvell/cn9130-crb.dtsi b/arch/arm64/boo= t/dts/marvell/cn9130-crb.dtsi index 0885c6339d1b..d600422afd6c 100644 --- a/arch/arm64/boot/dts/marvell/cn9130-crb.dtsi +++ b/arch/arm64/boot/dts/marvell/cn9130-crb.dtsi @@ -73,6 +73,16 @@ cp0_reg_sd_vcc: cp0_sd_vcc@0 { enable-active-high; regulator-always-on; }; + + sfp: sfp { + compatible =3D "sff,sfp"; + i2c-bus =3D <&cp0_i2c1>; + mod-def0-gpios =3D <&expander0 3 GPIO_ACTIVE_LOW>; + los-gpio =3D <&expander0 15 GPIO_ACTIVE_HIGH>; + tx-disable-gpio =3D <&expander0 2 GPIO_ACTIVE_HIGH>; + tx-fault-gpio =3D <&cp0_gpio1 24 GPIO_ACTIVE_HIGH>; + status =3D "okay"; + }; }; =20 &uart0 { @@ -195,6 +205,125 @@ &cp0_mdio { phy0: ethernet-phy@0 { reg =3D <0>; }; + + switch6: switch0@6 { + /* Actual device is MV88E6393X */ + compatible =3D "marvell,mv88e6190"; + #address-cells =3D <1>; + #size-cells =3D <0>; + reg =3D <6>; + interrupt-parent =3D <&cp0_gpio1>; + interrupts =3D <28 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; + #interrupt-cells =3D <2>; + + dsa,member =3D <0 0>; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@1 { + reg =3D <1>; + label =3D "p1"; + phy-handle =3D <&switch0phy1>; + }; + + port@2 { + reg =3D <2>; + label =3D "p2"; + phy-handle =3D <&switch0phy2>; + }; + + port@3 { + reg =3D <3>; + label =3D "p3"; + phy-handle =3D <&switch0phy3>; + }; + + port@4 { + reg =3D <4>; + label =3D "p4"; + phy-handle =3D <&switch0phy4>; + }; + + port@5 { + reg =3D <5>; + label =3D "p5"; + phy-handle =3D <&switch0phy5>; + }; + + port@6 { + reg =3D <6>; + label =3D "p6"; + phy-handle =3D <&switch0phy6>; + }; + + port@7 { + reg =3D <7>; + label =3D "p7"; + phy-handle =3D <&switch0phy7>; + }; + + port@8 { + reg =3D <8>; + label =3D "p8"; + phy-handle =3D <&switch0phy8>; + }; + + port@9 { + reg =3D <9>; + label =3D "p9"; + phy-mode =3D "10gbase-r"; + sfp =3D <&sfp>; + managed =3D "in-band-status"; + }; + + port@10 { + reg =3D <10>; + label =3D "cpu"; + ethernet =3D <&cp0_eth0>; + }; + + }; + + mdio { + #address-cells =3D <1>; + #size-cells =3D <0>; + + switch0phy1: switch0phy1@1 { + reg =3D <0x1>; + }; + + switch0phy2: switch0phy2@2 { + reg =3D <0x2>; + }; + + switch0phy3: switch0phy3@3 { + reg =3D <0x3>; + }; + + switch0phy4: switch0phy4@4 { + reg =3D <0x4>; + }; + + switch0phy5: switch0phy5@5 { + reg =3D <0x5>; + }; + + switch0phy6: switch0phy6@6 { + reg =3D <0x6>; + }; + + switch0phy7: switch0phy7@7 { + reg =3D <0x7>; + }; + + switch0phy8: switch0phy8@8 { + reg =3D <0x8>; + }; + }; + }; }; =20 &cp0_xmdio { --=20 2.33.0