From patchwork Wed Aug 7 12:19:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 13756193 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 83697C52D6F for ; Wed, 7 Aug 2024 12:21:53 +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: Content-Type:MIME-Version: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:In-Reply-To:References:List-Owner; bh=W9AoAUndBtl0FZOFTVxj/U4a/ipvfy1DskBxqtse6Ck=; b=MYfa3QNZT2DMzkiLh+PfWMy42d tMdZMDYdtCGww+mH69uQ5xthiGomYxc914TD5zRxONPFZ1aTgxFcOVI15NP0CLX6sQeCqRFRRrNKn WztvdKm15nnFDMEgBw1Yf3FnlH5ksxS8Uq+Zvt1wosswuDj8sog4eMA6j5OkXjUmVFHztX7oMPiyl /4mhv/b4wKXuKGI9bQkF2M3Wi7XLYOr/mFMOY5AhtFcClv9n3fzMEGN8pRVPR4SvAE2lOAJS8HVTz DtsUIi/1WDpOAznmeXtd6vN3YteJ1LKZyfhKdh3Ka8OFlQ9Z6k2Vsm4+Cx5/WMDakt21pqJQgWrnf NfhuKKdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbffg-00000004zC4-3qGO; Wed, 07 Aug 2024 12:21:40 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbff7-00000004z8P-0tWO for linux-arm-kernel@lists.infradead.org; Wed, 07 Aug 2024 12:21:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1723033265; x=1754569265; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=W9AoAUndBtl0FZOFTVxj/U4a/ipvfy1DskBxqtse6Ck=; b=mfTfp811cugFyTwMiucItVG8bNHUNJhoDTcb6z8/8zuP8WXyctlok3ky 4MEbWeSd6Kg5k1oHoQte1vbqeCyIWwjoa6aFsvaHZssIUX0m5t4f+E7Su fkzy+3+33w4LC4+bXvYrRB05AcORyofdktayAVNPFdFnzjiBgZWSN9ZWC FAkzxfCt5hatAx8IsSvtyvv8pZ3TQ7CXzFzigdOaQsYxovlG4+D9T70wy hTy3Aw80U0vIajsuijxVN3XCKktfFeFUbJzZiwJQl+2lZ2G6N3yqDgE06 p+5v/TuKxKb4T4TQxzSlJLEpoutDxp0vB5cVMnvGDpBtb5a2M0Hqu27Oh Q==; X-CSE-ConnectionGUID: Fd6x0rHaSHaE8RRvLnygkQ== X-CSE-MsgGUID: Fn4xV/B5QCKZw1Y0KFIT4w== X-IronPort-AV: E=Sophos;i="6.09,269,1716242400"; d="scan'208";a="38292858" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 07 Aug 2024 14:21:03 +0200 X-CheckPoint: {66B366AE-35-CC8A42C9-EEB26961} X-MAIL-CPID: E035F2E2B0B4EEB6A9ADCD96DF82BD37_2 X-Control-Analysis: str=0001.0A782F28.66B366AF.0039,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 46CAB167598; Wed, 7 Aug 2024 14:20:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1723033258; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding; bh=W9AoAUndBtl0FZOFTVxj/U4a/ipvfy1DskBxqtse6Ck=; b=d6XurfcvyQJaIjifnCrU8gLOsTnA1AkDYGp/Z+dhweUxfDcWa4aHtYhJ3fd5uzk1voF1OI Z7jv+kap0fFa+X6JN/aKvCim6MM2ZLsYjAVUApTkFFGVDbvv9LGEYL8qLPHHT9O08jcjlo hIicu6t++ox1XzbzkZL8A7k3DzlgIc2N3nsR9w+llHc7cs1O6MseRuEC4NQrpLwhyDVnft 6gwMJqa+YRmHQZC/IF+h93aptCTD02+TqEMzcVOL1fGz8BxO9I7xquHdR+7wd4E8RsVMfD zMpAGG+6+DwaZT8sPI4j8JCbg7X32g3RM5W/OehDNK7e9TQGK8nDfu7vW8fuZg== From: Matthias Schiffer To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux@ew.tq-group.com, Matthias Schiffer Subject: [PATCH v3] arm64: dts: ti: k3-am642-tqma64xxl-mbax4xxl: add PRU Ethernet support Date: Wed, 7 Aug 2024 14:19:21 +0200 Message-ID: <20240807121922.3180213-1-matthias.schiffer@ew.tq-group.com> X-Mailer: git-send-email 2.46.0 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-20240807_052105_695310_87B18ED5 X-CRM114-Status: GOOD ( 12.35 ) 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 PRU Ethernet controller and PHY nodes, as it was previously done for the AM64x EVM Device Trees. Signed-off-by: Matthias Schiffer --- v3: - Rebased to v6.11-rc1 v2: - Dropped binding change patch - Moved prueth device node to DTS toplevel, matching the AM64x EVM - Update firmware filenames to match EVM .../dts/ti/k3-am642-tqma64xxl-mbax4xxl.dts | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am642-tqma64xxl-mbax4xxl.dts b/arch/arm64/boot/dts/ti/k3-am642-tqma64xxl-mbax4xxl.dts index c40ad67cee019..c2a62cb763a59 100644 --- a/arch/arm64/boot/dts/ti/k3-am642-tqma64xxl-mbax4xxl.dts +++ b/arch/arm64/boot/dts/ti/k3-am642-tqma64xxl-mbax4xxl.dts @@ -24,6 +24,8 @@ / { aliases { ethernet0 = &cpsw_port1; + ethernet1 = &icssg1_emac0; + ethernet2 = &icssg1_emac1; i2c1 = &mcu_i2c0; mmc1 = &sdhci1; serial0 = &mcu_uart0; @@ -71,6 +73,66 @@ led-1 { }; }; + icssg1_eth: icssg1-eth { + compatible = "ti,am642-icssg-prueth"; + pinctrl-names = "default"; + pinctrl-0 = <&pru_icssg1_rgmii1_pins>, <&pru_icssg1_rgmii2_pins>; + interrupt-parent = <&icssg1_intc>; + interrupts = <24 0 2>, <25 1 3>; + interrupt-names = "tx_ts0", "tx_ts1"; + dmas = <&main_pktdma 0xc200 15>, /* egress slice 0 */ + <&main_pktdma 0xc201 15>, /* egress slice 0 */ + <&main_pktdma 0xc202 15>, /* egress slice 0 */ + <&main_pktdma 0xc203 15>, /* egress slice 0 */ + <&main_pktdma 0xc204 15>, /* egress slice 1 */ + <&main_pktdma 0xc205 15>, /* egress slice 1 */ + <&main_pktdma 0xc206 15>, /* egress slice 1 */ + <&main_pktdma 0xc207 15>, /* egress slice 1 */ + <&main_pktdma 0x4200 15>, /* ingress slice 0 */ + <&main_pktdma 0x4201 15>; /* ingress slice 1 */ + dma-names = "tx0-0", "tx0-1", "tx0-2", "tx0-3", + "tx1-0", "tx1-1", "tx1-2", "tx1-3", + "rx0", "rx1"; + sram = <&oc_sram>; + firmware-name = "ti-pruss/am64x-sr2-pru0-prueth-fw.elf", + "ti-pruss/am64x-sr2-rtu0-prueth-fw.elf", + "ti-pruss/am64x-sr2-txpru0-prueth-fw.elf", + "ti-pruss/am64x-sr2-pru1-prueth-fw.elf", + "ti-pruss/am64x-sr2-rtu1-prueth-fw.elf", + "ti-pruss/am64x-sr2-txpru1-prueth-fw.elf"; + ti,prus = <&pru1_0>, <&rtu1_0>, <&tx_pru1_0>, <&pru1_1>, <&rtu1_1>, <&tx_pru1_1>; + ti,pruss-gp-mux-sel = <2>, /* MII mode */ + <2>, + <2>, + <2>, /* MII mode */ + <2>, + <2>; + ti,mii-g-rt = <&icssg1_mii_g_rt>; + ti,mii-rt = <&icssg1_mii_rt>; + ti,iep = <&icssg1_iep0>, <&icssg1_iep1>; + + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + + icssg1_emac0: port@0 { + reg = <0>; + phy-handle = <&icssg1_phy0c>; + phy-mode = "rgmii-id"; + /* Filled in by bootloader */ + local-mac-address = [00 00 00 00 00 00]; + }; + + icssg1_emac1: port@1 { + reg = <1>; + phy-handle = <&icssg1_phy03>; + phy-mode = "rgmii-id"; + /* Filled in by bootloader */ + local-mac-address = [00 00 00 00 00 00]; + }; + }; + }; + fan0: pwm-fan { compatible = "pwm-fan"; pinctrl-names = "default"; @@ -154,6 +216,42 @@ &epwm5 { status = "okay"; }; +&icssg1_mdio { + pinctrl-names = "default"; + pinctrl-0 = <&pru_icssg1_mdio_pins>; + status = "okay"; + + /* phy-mode is fixed up to rgmii-rxid by prueth driver to account for + * the SoC integration, so the only rx-internal-delay and no + * tx-internal-delay is set for the PHYs. + */ + + icssg1_phy03: ethernet-phy@3 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x3>; + reset-gpios = <&main_gpio1 47 GPIO_ACTIVE_LOW>; + reset-assert-us = <1000>; + reset-deassert-us = <1000>; + ti,rx-fifo-depth = ; + ti,tx-fifo-depth = ; + ti,rx-internal-delay = ; + ti,clk-output-sel = ; + }; + + icssg1_phy0c: ethernet-phy@c { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0xc>; + reset-gpios = <&main_gpio1 51 GPIO_ACTIVE_LOW>; + reset-assert-us = <1000>; + reset-deassert-us = <1000>; + ti,rx-fifo-depth = ; + ti,tx-fifo-depth = ; + ti,rx-internal-delay = ; + ti,clk-output-sel = ; + }; +}; + + &main_gpio0 { pinctrl-names = "default"; pinctrl-0 = <&main_gpio0_digital_pins>,