Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp880826lqh; Thu, 28 Mar 2024 22:32:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXNnOt6Sjhlh2Mz2Ws3UDC8MhlpYBg3NfiLgSkea4R37BNf3vy0x6K1r78Eir9Eu6akPdJxRUSNTKsBj6vMHD6AGGRBaGbe75W7CXz4pg== X-Google-Smtp-Source: AGHT+IEhb/R0W+DkkC05WDk6QQ6B9xjiChYh1NNuRVS/RYNnMQN8ZPuKiA9jmVdyIDWG9gVLanE+ X-Received: by 2002:a17:906:f284:b0:a45:f209:d2cb with SMTP id gu4-20020a170906f28400b00a45f209d2cbmr1185745ejb.28.1711690367191; Thu, 28 Mar 2024 22:32:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711690367; cv=pass; d=google.com; s=arc-20160816; b=N3u9Q1c6KjvQkomv0HU6A0pP/gFomgyTXPUygy9LXmrbeUQWhs14BpqRBS73GBI8KX y9BTd+/G2o70kdqitNW8/Q3DdebnPZ63ENMOSadex2K/mOjJOFjOBh8Fvjr/g4LsZ7V9 tm1L89w1699AEq7OoAV9W6gdQwCB6vGLwg0k7hosOcDtbc1Z8kvvi+isL+CH1fXKMSyQ dT3aTfvJyUACedqaJCktYhqpXBPQSeXgTPT1HmM8bfudbYBwWpJ8dwmPdH90dGGb40My 0+OaDoDRq4lD4Q9PrKnIvD0xW2arRrJbaMcBP8lX7opKnEl/vHlVpdKUJEsGntJJMPwq NGzA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=gokzMs7KhXVFBe4lvSvEkJY1RLon4TGO+ZGA7mN+Mro=; fh=yJeSJJmltMxJoMzJg7K/purRl9N6GYhU++GhTau6wjQ=; b=oSQ8t/7Q/ddqw3CzyIO78WrYxr6tBU07IIyjUOTSkWAgPuvIIbjQ2hO5rC2j5gx4D1 Am1CbAyoCZrWjJlJkdrMJPPvZntASQka1ske9XcR13LrOnISVTwsiwYwIUpun+Tl7dgY WNzr5PM8JfNxkAw7dbMawe2T0y1mLO+2I9jZyLZarEOTQYAeDV9nCJksrEiGAQtGylYP 6GvkJ9e3xej1AKx6dl3fdGc1juT7OBoFeqDet7lJ2XZyHBkO8o2sknakvsR8QUfm1d+c SKi6UV9n2QM4m7sqZUU70+3rMJJZOkkL/jpYYPthjT1AmD2aLhK/FiIEUjVtvEIJZuo5 xVBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="oo/extyM"; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-124159-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124159-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id l24-20020a1709065a9800b00a473065dc65si1417040ejq.97.2024.03.28.22.32.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 22:32:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124159-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="oo/extyM"; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-124159-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124159-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BC1561F223AF for ; Fri, 29 Mar 2024 05:32:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D361B3C08E; Fri, 29 Mar 2024 05:32:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="oo/extyM" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 368A33EA92; Fri, 29 Mar 2024 05:32:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711690336; cv=none; b=dl++vKDotKfSEFG2rZA8J71oPEz/96jh7iy9wsv+zMYUIN2i+PtI8g2OqCJ0a7vub46j3n/kp0SBzJzb7fb2CcBi4ZDTTpH/urtlCLaZqt+xAMXOI7VdbPm9L+RZoHk5KvaDgJP38gWvKSuhQSRzvMq6U1eCXZVoLk7I6HEetbM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711690336; c=relaxed/simple; bh=fPSTd3E9vT5XAtMWPJSGLfWid5Xsmh0/t0CaJdJkYfw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=km6arkBM82b+CSCvQ/jlFC1VbRD6qpqztmjB1Bd++SE/LI8Kvwz/C4Vqzq7hyn05XaVJjBlB5bd9OapD2ruB3xaRDVnlduNL8H21G/xXUwGgmldhzbIXVoxIV4DIzJLpWJJCqhZyG26Tjla2ei436c9mTpdhPcriklbcpnxFfE8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=oo/extyM; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42T5W30D065285; Fri, 29 Mar 2024 00:32:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1711690323; bh=gokzMs7KhXVFBe4lvSvEkJY1RLon4TGO+ZGA7mN+Mro=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=oo/extyMg+ZKJntkaNEXdvbNnVc557uJ3TAPYsepPttuR9CHimC4fjSg9LybUThX2 70sa3rOi60bGRcYV/3qzXZFn7x6oWadou8Vb3p4EJTFSraBvB50yDBAr2uT8Vfmksi EpQyUnjW+80PxpEmsS2zCS+mUs5LATUV8VQEYab4= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42T5W3oo034063 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 29 Mar 2024 00:32:03 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 29 Mar 2024 00:32:03 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 29 Mar 2024 00:32:03 -0500 Received: from localhost (chintan-thinkstation-p360-tower.dhcp.ti.com [172.24.227.220]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42T5W2Jk108804; Fri, 29 Mar 2024 00:32:03 -0500 From: Chintan Vankar To: Conor Dooley , Krzysztof Kozlowski , Rob Herring , Tero Kristo , Vignesh Raghavendra , Nishanth Menon CC: , , , , Chintan Vankar Subject: [PATCH v6 5/5] arm64: dts: ti: k3-j784s4: Add overlay for dual port USXGMII mode Date: Fri, 29 Mar 2024 11:01:30 +0530 Message-ID: <20240329053130.2822129-6-c-vankar@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240329053130.2822129-1-c-vankar@ti.com> References: <20240329053130.2822129-1-c-vankar@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 From: Siddharth Vadapalli The CPSW9G instance of the CPSW Ethernet Switch supports USXGMII mode with MAC Ports 1 and 2 of the instance, which are connected to ENET Expansion 1 and ENET Expansion 2 slots on the EVM respectively, through the Serdes2 instance of the SERDES. Enable CPSW9G MAC Ports 1 and 2 in fixed-link configuration USXGMII mode at 5 Gbps each. Signed-off-by: Siddharth Vadapalli Signed-off-by: Chintan Vankar --- Link to v5: https://lore.kernel.org/r/20240314072129.1520475-6-c-vankar@ti.com/ Changes from v5 to v6: - Updated order of properties in Device Nodes based on https://docs.kernel.org/devicetree/bindings/dts-coding-style.html#order-of-properties-in-device-node arch/arm64/boot/dts/ti/Makefile | 6 +- .../ti/k3-j784s4-evm-usxgmii-exp1-exp2.dtso | 81 +++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/ti/k3-j784s4-evm-usxgmii-exp1-exp2.dtso diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index f8e47278df43..2d798ef415e4 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -101,6 +101,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-j722s-evm.dtb dtb-$(CONFIG_ARCH_K3) += k3-am69-sk.dtb dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm.dtb dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm-quad-port-eth-exp1.dtbo +dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm-usxgmii-exp1-exp2.dtbo # Build time test only, enabled by CONFIG_OF_ALL_DTBS k3-am625-beagleplay-csi2-ov5640-dtbs := k3-am625-beagleplay.dtb \ @@ -148,6 +149,8 @@ k3-j721s2-evm-pcie1-ep-dtbs := k3-j721s2-common-proc-board.dtb \ k3-j721s2-evm-pcie1-ep.dtbo k3-j784s4-evm-quad-port-eth-exp1-dtbs := k3-j784s4-evm.dtb \ k3-j784s4-evm-quad-port-eth-exp1.dtbo +k3-j784s4-evm-usxgmii-exp1-exp2.dtbs := k3-j784s4-evm.dtb \ + k3-j784s4-evm-usxgmii-exp1-exp2.dtbo dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \ k3-am625-beagleplay-csi2-tevi-ov5640.dtb \ k3-am625-sk-csi2-imx219.dtb \ @@ -169,7 +172,8 @@ dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \ k3-j721e-evm-pcie0-ep.dtb \ k3-j721e-sk-csi2-dual-imx219-dtbs \ k3-j721s2-evm-pcie1-ep.dtb \ - k3-j784s4-evm-quad-port-eth-exp1.dtb + k3-j784s4-evm-quad-port-eth-exp1.dtb \ + k3-j784s4-evm-usxgmii-exp1-exp2.dtb # Enable support for device-tree overlays DTC_FLAGS_k3-am625-beagleplay += -@ diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm-usxgmii-exp1-exp2.dtso b/arch/arm64/boot/dts/ti/k3-j784s4-evm-usxgmii-exp1-exp2.dtso new file mode 100644 index 000000000000..d5f8c8531923 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm-usxgmii-exp1-exp2.dtso @@ -0,0 +1,81 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR MIT */ +/** + * DT Overlay for CPSW9G in dual port fixed-link USXGMII mode using ENET-1 + * and ENET-2 Expansion slots of J784S4 EVM. + * + * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/dts-v1/; +/plugin/; + +#include +#include +#include + +#include "k3-serdes.h" + +&{/} { + aliases { + ethernet1 = "/bus@100000/ethernet@c000000/ethernet-ports/port@1"; + ethernet2 = "/bus@100000/ethernet@c000000/ethernet-ports/port@2"; + ethernet3 = "/bus@100000/ethernet@c200000/ethernet-ports/port@1"; + }; +}; + +&main_cpsw0 { + pinctrl-names = "default"; + status = "okay"; +}; + +&main_cpsw0_port1 { + phy-mode = "usxgmii"; + mac-address = [00 00 00 00 00 00]; + phys = <&cpsw0_phy_gmii_sel 1>, <&serdes2_usxgmii_link>; + phy-names = "mac", "serdes"; + status = "okay"; + fixed-link { + speed = <5000>; + full-duplex; + }; +}; + +&main_cpsw0_port2 { + phy-mode = "usxgmii"; + mac-address = [00 00 00 00 00 00]; + phys = <&cpsw0_phy_gmii_sel 2>, <&serdes2_usxgmii_link>; + phy-names = "mac", "serdes"; + status = "okay"; + fixed-link { + speed = <5000>; + full-duplex; + }; +}; + +&serdes_wiz2 { + assigned-clock-parents = <&k3_clks 406 9>; /* Use 156.25 MHz clock for USXGMII */ + status = "okay"; +}; + +&serdes2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + serdes2_usxgmii_link: phy@2 { + reg = <2>; + cdns,num-lanes = <2>; + #phy-cells = <0>; + cdns,phy-type = ; + resets = <&serdes_wiz2 3>, <&serdes_wiz2 4>; + }; +}; + +&serdes_ln_ctrl { + idle-states = , , + , , + , , + , , + , , + , ; +}; -- 2.34.1