From patchwork Fri Nov 4 12:05:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriranjani P X-Patchwork-Id: 13031687 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 C482CC433FE for ; Fri, 4 Nov 2022 12:10:32 +0000 (UTC) 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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id: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=V5vB7Ix38qcekI34BkRNDKn6VPK4yBE94EI5rUDPT14=; b=ncsUtJC0xsm1ib GE0PurxH5B+65z5HZwuwNgMCqQB2DTdhbqrA3kAdhKMzywwVl38XwcEgvLYWpmtpiw3AlwkOxBib7 NirTG5BJqMImBpDHKBYyO2TtBFYMP/lvMr7LKtr1Y+kbTiI3yvviDC6vjSIeHBy066XPNL/6qpSFl dt7i8T59/P4msMyRMSQbooGsbFJVhIHddRjC82WNMtolh+rFHsKHmN3G4kxOxFBUhyaXRx1WKvbQH B3FE2BZQPSmGyit6TRW7zLtBA+PmnDKqzRhtKg7DjZkTEKYAyRzJiBV5rCDd0m/SKZHiU5oHZOEel GDpReOJOHFqAm5q6XJFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqvVQ-003QAx-Qd; Fri, 04 Nov 2022 12:09:04 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqvVJ-003Q8x-0s for linux-arm-kernel@lists.infradead.org; Fri, 04 Nov 2022 12:08:58 +0000 Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20221104120852epoutp049bb8c5117e0053132821690df63185b7~kYGEn39Gw0796407964epoutp04V for ; Fri, 4 Nov 2022 12:08:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20221104120852epoutp049bb8c5117e0053132821690df63185b7~kYGEn39Gw0796407964epoutp04V DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1667563732; bh=5EeNE8lf7xpmShtco5wFgIBJumjTcSZflJH1YkpwoXA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H7BAG03jT1tbUKoehlcaHZb6xiDDfXwsN22I1i8WUIyUY71QHEajsp6MBxFnVrmO3 CG5ipKFt0j0PxhYLSz6UkdmBAgycrm0PrF3L4UKJIdMwCY+H1yubuxBeD7OJqekf90 kBAUq1RpVaLSro55wKIovjLkaCV7UBelMY9atQxk= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20221104120851epcas5p261b0e6c8a4db5996c602a749de452cd6~kYGDoD95a0274902749epcas5p2A; Fri, 4 Nov 2022 12:08:51 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.178]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4N3fYD5kmVz4x9Q6; Fri, 4 Nov 2022 12:08:48 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 05.57.01710.7C005636; Fri, 4 Nov 2022 21:08:39 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20221104115902epcas5p209442971ba9f4cb001a933bda3c50b25~kX9fVtraV2154621546epcas5p2U; Fri, 4 Nov 2022 11:59:02 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20221104115902epsmtrp25a60b1eb4238618d795f82e69e65fddd~kX9fUpgF81549915499epsmtrp2B; Fri, 4 Nov 2022 11:59:02 +0000 (GMT) X-AuditID: b6c32a49-c9ffa700000006ae-af-636500c78842 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id F7.1D.14392.68EF4636; Fri, 4 Nov 2022 20:59:02 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20221104115859epsmtip29d442538bcd0af376001989c62be6b81~kX9cwDlCl1901719017epsmtip2I; Fri, 4 Nov 2022 11:58:59 +0000 (GMT) From: Sriranjani P To: peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com, richardcochran@gmail.com Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sriranjani P , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, Pankaj Dubey , Jayati Sahu Subject: [PATCH 3/4] arm64: dts: fsd: Add Ethernet support for FSYS0 Block of FSD SoC Date: Fri, 4 Nov 2022 17:35:16 +0530 Message-Id: <20221104120517.77980-4-sriranjani.p@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221104120517.77980-1-sriranjani.p@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VTe0xTVx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nheqVXhK9pRn Mq/c9WWtwLIYzw83M4xi5sRdDN/myJ1n98aI4fnsNeE/TiXzTBbYuKqUZ0UUn654wa5PJzNt cme96NztqPTsf5b1jdBim5t5dzqkJ21U3VJ7oe0U30dHhneG6dNv6tSlKTIyW4QkOKfuk/z/ wnad+Y+S1Vcaj2cE/phzQNCqbnPWxZbSM+zbE2LZ3impq9seyCzZ0mOkKvD2ShCb3w/JNYdY VX3XssfIqd/PVmIpzkg01GIuKk4EAO9c1vQJAwAA X-CMS-MailID: 20221104115902epcas5p209442971ba9f4cb001a933bda3c50b25 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20221104115902epcas5p209442971ba9f4cb001a933bda3c50b25 References: <20221104120517.77980-1-sriranjani.p@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221104_050857_434740_080CADDD X-CRM114-Status: GOOD ( 16.77 ) 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The FSD SoC contains two instances of Synopsys DWC QoS Ethernet IP, one in FSYS0 block and other in PERIC block. Adds device tree node for Ethernet in FSYS0 Block and enables the same for FSD platform. Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Richard Cochran Cc: devicetree@vger.kernel.org Signed-off-by: Pankaj Dubey Signed-off-by: Jayati Sahu Signed-off-by: Sriranjani P --- arch/arm64/boot/dts/tesla/fsd-evb.dts | 9 ++++ arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi | 56 ++++++++++++++++++++++ arch/arm64/boot/dts/tesla/fsd.dtsi | 38 +++++++++++++++ 3 files changed, 103 insertions(+) diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts b/arch/arm64/boot/dts/tesla/fsd-evb.dts index 1db6ddf03f01..42bf25c680e2 100644 --- a/arch/arm64/boot/dts/tesla/fsd-evb.dts +++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts @@ -30,6 +30,15 @@ }; }; +ðernet_0 { + status = "okay"; + + fixed-link { + speed=<1000>; + full-duplex; + }; +}; + &fin_pll { clock-frequency = <24000000>; }; diff --git a/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi b/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi index d0abb9aa0e9e..8c7e43085a2b 100644 --- a/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi +++ b/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi @@ -64,6 +64,62 @@ samsung,pin-pud = ; samsung,pin-drv = ; }; + + eth0_tx_clk: eth0-tx-clk-pins { + samsung,pins = "gpf0-0"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + eth0_tx_data: eth0-tx-data-pins { + samsung,pins = "gpf0-1", "gpf0-2", "gpf0-3", "gpf0-4"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + eth0_tx_ctrl: eth0-tx-ctrl-pins { + samsung,pins = "gpf0-5"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + eth0_phy_intr: eth0-phy-intr-pins { + samsung,pins = "gpf0-6"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + eth0_rx_clk: eth0-rx-clk-pins { + samsung,pins = "gpf1-0"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + eth0_rx_data: eth0-rx-data-pins { + samsung,pins = "gpf1-1", "gpf1-2", "gpf1-3", "gpf1-4"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + eth0_rx_ctrl: eth0-rx-ctrl-pins { + samsung,pins = "gpf1-5"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + eth0_mdio: eth0-mdio-pins { + samsung,pins = "gpf1-6", "gpf1-7"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; }; &pinctrl_peric { diff --git a/arch/arm64/boot/dts/tesla/fsd.dtsi b/arch/arm64/boot/dts/tesla/fsd.dtsi index f35bc5a288c2..2495928b71dc 100644 --- a/arch/arm64/boot/dts/tesla/fsd.dtsi +++ b/arch/arm64/boot/dts/tesla/fsd.dtsi @@ -32,6 +32,7 @@ spi0 = &spi_0; spi1 = &spi_1; spi2 = &spi_2; + eth0 = ðernet_0; }; cpus { @@ -860,6 +861,43 @@ clocks = <&clock_fsys0 UFS0_MPHY_REFCLK_IXTAL26>; clock-names = "ref_clk"; }; + + ethernet_0: ethernet@15300000 { + compatible = "tesla,dwc-qos-ethernet-4.21"; + reg = <0x0 0x15300000 0x0 0x10000>; + interrupts = ; + clocks = + /* ptp ref clock */ + <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_CLK_PTP_REF_I>, + /* aclk clocks */ + <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_ACLK_I>, + /* hclk clocks */ + <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_HCLK_I>, + /* rgmii clocks */ + <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_RGMII_CLK_I>, + /* rxi clocks */ + <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_CLK_RX_I>; + clock-names = + /* ptp ref clocks */ + "ptp_ref", + /* aclk clocks */ + "master_bus", + /* hclk clocks */ + "slave_bus", + /* rgmii clk */ + "tx", + /* rxi clocks */ + "rx"; + pinctrl-names = "default"; + pinctrl-0 = <ð0_tx_clk>, <ð0_tx_data>, <ð0_tx_ctrl>, + <ð0_phy_intr>, <ð0_rx_clk>, <ð0_rx_data>, + <ð0_rx_ctrl>, <ð0_mdio>; + local-mac-address = [45 54 48 30 4d 43]; + rx-clock-skew = <&sysreg_fsys0 0x0 0x2>; + iommus = <&smmu_fsys0 0x0 0x1>; + status = "disabled"; + phy-mode = "rgmii"; + }; }; };