From patchwork Mon Aug 14 11:25:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriranjani P X-Patchwork-Id: 713753 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A680C001B0 for ; Mon, 14 Aug 2023 12:12:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232824AbjHNMM0 (ORCPT ); Mon, 14 Aug 2023 08:12:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234771AbjHNMMQ (ORCPT ); Mon, 14 Aug 2023 08:12:16 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 528041708 for ; Mon, 14 Aug 2023 05:12:10 -0700 (PDT) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20230814121208epoutp013bbd262f435b8cae9fe35b21e9cb197f~7Pst1fyIK0382103821epoutp01q for ; Mon, 14 Aug 2023 12:12:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20230814121208epoutp013bbd262f435b8cae9fe35b21e9cb197f~7Pst1fyIK0382103821epoutp01q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1692015128; bh=Yt8aeFtvj8RBIiFEZAHOORINuFCPLtv7/UQIZ9mjqfw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W6MQFNyitQLzIQbDr/OkPUqIpg18ruXsiCZPLhOUgTRfdPhio4aHseXbmgCAMnwDU LqIHyj9yrw31/sRHAhNA6rLb2sP+seJEL3Aa23L1PmGmld0R8CBVp5HJJKws7XnqOA uXjsqm1PUIBBqrrp6iaika2gnCg46FNeq7yzYXCs= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p1.samsung.com (KnoxPortal) with ESMTP id 20230814121208epcas5p171e8078cf4fac54dbe1c2717ee332725~7Pstbv7Gi1932619326epcas5p1Z; Mon, 14 Aug 2023 12:12:08 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.181]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4RPYDQ438fz4x9Pw; Mon, 14 Aug 2023 12:12:06 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id E0.45.06099.61A1AD46; Mon, 14 Aug 2023 21:12:06 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20230814112617epcas5p1bc094e9cf29da5dd7d1706e3f509ac28~7PEr22lzI0846108461epcas5p1B; Mon, 14 Aug 2023 11:26:17 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230814112617epsmtrp16c05658d5ca9d52ca053f549714f649d~7PEr0SJHL1862118621epsmtrp1G; Mon, 14 Aug 2023 11:26:17 +0000 (GMT) X-AuditID: b6c32a4b-d308d700000017d3-e3-64da1a16b865 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id 35.C5.64355.95F0AD46; Mon, 14 Aug 2023 20:26:17 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230814112614epsmtip261ca8640136d92023569d408c59fd627~7PEo5uJMl0830008300epsmtip2M; Mon, 14 Aug 2023 11:26:14 +0000 (GMT) From: Sriranjani P To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, richardcochran@gmail.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com, alim.akhtar@samsung.com, linux-fsd@tesla.com, pankaj.dubey@samsung.com, swathi.ks@samsung.com, ravi.patel@samsung.com Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sriranjani P , Jayati Sahu Subject: [PATCH v3 3/4] arm64: dts: fsd: Add Ethernet support for FSYS0 Block of FSD SoC Date: Mon, 14 Aug 2023 16:55:38 +0530 Message-Id: <20230814112539.70453-4-sriranjani.p@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230814112539.70453-1-sriranjani.p@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrIJsWRmVeSWpSXmKPExsWy7bCmlq6Y1K0Ug5MvZS1+vpzGaPFg3jY2 izV7zzFZzDnfwmIx/8g5Vounxx6xWxw5tYTJ4t6id6wWfS8eMltc2NbHarHp8TVWi4evwi0u 75rDZjHj/D4mi3l/17JaHFsgZvHt9BtGi0Vbv7BbPPywB6j9zAtmi9a9R9gtbr9Zx2rxZeNN dgdxjy0rbzJ5PO3fyu6xc9Zddo8Fm0o9Nq3qZPO4c20Pm8fmJfUe7/ddZfPo27KK0WPL/s+M Hv+a5rJ7fN4kF8ATlW2TkZqYklqkkJqXnJ+SmZduq+QdHO8cb2pmYKhraGlhrqSQl5ibaqvk 4hOg65aZA/S1kkJZYk4pUCggsbhYSd/Opii/tCRVISO/uMRWKbUgJafApECvODG3uDQvXS8v tcTK0MDAyBSoMCE7Y+vnPUwFh5Urvux7wNLAuFm2i5GTQ0LAROLdqltsXYxcHEICuxkl5m6/ zgLhfGKU6DgygRHOebt8OitMy5a5J6CqdjJK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m u4O4x5aVN5k8nvZvZffYOesuu8eCTaUem1Z1snncubaHzWPzknqP9/uusnn0bVnF6LFl/2dG j39Nc9k9Pm+SC+CJ4rJJSc3JLEst0rdL4MrY+nkPU8Fh5Yov+x6wNDBulu1i5OSQEDCR2DL3 BEsXIxeHkMB2Romd/yczQyRkJE4+WAJlC0us/PecHaKomUmi7/s3dpAEm4CuROu1z0wgCRGB WcwS8yavAOtgFvjJKLHhsCSILSwQIbF3djcTiM0ioCqxavMjRhCbV8BW4uGeV6wQG+QlVm84 ANbLKWAn8eH6HhYQWwioZtfXpawTGPkWMDKsYhRNLSjOTc9NLjDUK07MLS7NS9dLzs/dxAiO J62gHYzL1v/VO8TIxMF4iFGCg1lJhLeH91aKEG9KYmVValF+fFFpTmrxIUZpDhYlcV7lnM4U IYH0xJLU7NTUgtQimCwTB6dUA1Puia0MO1TbWF2n26i03VnaKRNUu0TvmKL5zMVxfp8VBR+s D9+UVBR8PCL35pfUj/WnX2/vdWef2Z7g8KhK6HAQb/mRaxuctzcYXbPyilpu4vaDy+2Mk3/2 8zW6X+7PryrcpZyxR+zAZRVehtRlIiKP20Xlz8yewHpBZOqiA2ebdu2cbZE+m33Jq3qnwPvn Spz0FzZf5f20Pf1/vPOXyJKpK+7N+135a+Fb38IPO41MtA37ToQ0F2/ZluF3oWOt96MVkp83 73G4PlVNdP/OJxvVpv9yPaCkb6V3yC/4c9j0C803zk/peDwzb3NMzMUQzQ9h5U93+DzI6DrB +zW8sdppIW/qvfb9d9ZenjuxI4FFiaU4I9FQi7moOBEA2UhC1hYDAAA= X-CMS-MailID: 20230814112617epcas5p1bc094e9cf29da5dd7d1706e3f509ac28 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230814112617epcas5p1bc094e9cf29da5dd7d1706e3f509ac28 References: <20230814112539.70453-1-sriranjani.p@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.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. Signed-off-by: Pankaj Dubey Signed-off-by: Jayati Sahu Signed-off-by: Swathi K S 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 | 22 +++++++++ 3 files changed, 87 insertions(+) diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts b/arch/arm64/boot/dts/tesla/fsd-evb.dts index 8d7794642900..2c37097c709a 100644 --- a/arch/arm64/boot/dts/tesla/fsd-evb.dts +++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts @@ -64,6 +64,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 3f898cf4874c..cb437483ff6e 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 1c53c68efd53..9a991f021711 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 { @@ -984,6 +985,27 @@ 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 = <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_CLK_PTP_REF_I>, + <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_ACLK_I>, + <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_HCLK_I>, + <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_RGMII_CLK_I>, + <&clock_fsys0 FSYS0_EQOS_TOP0_IPCLKPORT_CLK_RX_I>; + clock-names = "ptp_ref", "master_bus", "slave_bus", "tx", "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 = [00 00 00 00 00 00]; + fsd-rx-clock-skew = <&sysreg_fsys0 0x0>; + iommus = <&smmu_fsys0 0x0 0x1>; + phy-mode = "rgmii"; + status = "disabled"; + }; }; };