From patchwork Fri Nov 4 12:05:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriranjani P X-Patchwork-Id: 13031688 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 3C581C4332F for ; Fri, 4 Nov 2022 12:10:42 +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=Ny0IzB20LCbwA3+2cTh8rZV7TFzgWZ/WWR2o198kwu8=; b=qYb4VWphXT3mWS OO4QpxvXUKFoveoyhEkRsntc/g7zEseuAAFv43JwQeMnV8GfQbuUm0ITvm7BzXS2+sgCdsbDtM+fL zrLg1q7w5D9nu5oHw+OkIM+gORGbiqWjHspwf/Na7K1F+E4xxppUeaq3BEvYOV5revwS1Z6Bd3yeO RIWR1cWLGBNlFiHJKKDHJGbYRg47Ps/kICfXKxH81fEtpaJ5S7OxI/nif0dow1F97yKudGEoColU5 UUkvBkerBWZCdLtiSJ+kfmFz+Ffmj6XLpCZul7Hl2YP+mL383gyBN6ReN3qhs0Dq8IqxcI4Cm8LMO RoOs1e5NIhQIJ5JVWtCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqvVy-003QNU-1i; Fri, 04 Nov 2022 12:09:38 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqvVo-003QJ4-Tj for linux-arm-kernel@lists.infradead.org; Fri, 04 Nov 2022 12:09:32 +0000 Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20221104120918epoutp01ec86813c356acf2eb9b2ce1c8a850653~kYGcfbVeF2140121401epoutp01u for ; Fri, 4 Nov 2022 12:09:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20221104120918epoutp01ec86813c356acf2eb9b2ce1c8a850653~kYGcfbVeF2140121401epoutp01u DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1667563758; bh=F/wrWKfkCJidaaPNHLM74M5Wux6bKyD0bMDJLStV66g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AhSQXyXhSX/ccbArx8z3FBMs38N9X/sERgr3ilyKst5w0m4RM+c8XyhRo0dxth9RN twZW0QFApXnr+YET9R3To88aGeT2PpfrlAB1q0pL9HANtVHvSlNqQjDX7mqhPVrWy+ AeMBITB8W/NjfQy6tw1b0LBgqyZ5hzrJn9MIIPKU= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20221104120917epcas5p4f597114d3c6e3153ad489682bb554a54~kYGbuJwjr1627316273epcas5p4n; Fri, 4 Nov 2022 12:09:17 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.180]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4N3fYk6HZnz4x9Q9; Fri, 4 Nov 2022 12:09:14 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id AC.FA.56352.1E005636; Fri, 4 Nov 2022 21:09:05 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20221104115909epcas5p25a8a564cd18910ec2368341855c1a6a2~kX9l-Zkjv3225732257epcas5p2d; Fri, 4 Nov 2022 11:59:09 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20221104115909epsmtrp2acc49ee7ecc0240ba7990a4c3ea51519~kX9l_bseC1557415574epsmtrp24; Fri, 4 Nov 2022 11:59:09 +0000 (GMT) X-AuditID: b6c32a4b-5f7fe7000001dc20-38-636500e1e0c2 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 49.B5.18644.D8EF4636; Fri, 4 Nov 2022 20:59:09 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20221104115906epsmtip2607fac1197dfad2641569a9cda057fe2~kX9izY3w62474124741epsmtip2K; Fri, 4 Nov 2022 11:59:06 +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 4/4] arm64: dts: fsd: Add Ethernet support for PERIC Block of FSD SoC Date: Fri, 4 Nov 2022 17:35:17 +0530 Message-Id: <20221104120517.77980-5-sriranjani.p@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221104120517.77980-1-sriranjani.p@samsung.com> X-Brightmail-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wXI/loXrWVorNP0qqZbfKx0W5FArNv21 YLnY6tchrRl8eZcNo9wcjBP8hLMc4p9eD/rns1vUoOC44BoV8cvN5gEcvSXv/kbNe9atwnf2 scE3h9WMyqdnyqlrxDOcZd/Na+hao2mnrJVTvjEx7MvJ+U7XZ9vPkHIS/yN2pmJlmELpucWP 6/4vYtoQk+p20u/P5oNH3usWWu140CHhL1a/lkX34+aFu3s2HC1245nKeHeqht//PRYmkUuz Z/pmOPXLK7EUZyQaajEXFScCAEYGT3MJAwAA X-CMS-MailID: 20221104115909epcas5p25a8a564cd18910ec2368341855c1a6a2 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20221104115909epcas5p25a8a564cd18910ec2368341855c1a6a2 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_050929_371820_D9E3D933 X-CRM114-Status: GOOD ( 19.47 ) 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 PERIC 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 | 58 ++++++++++++++++++++++ 3 files changed, 123 insertions(+) diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts b/arch/arm64/boot/dts/tesla/fsd-evb.dts index 42bf25c680e2..328db875667a 100644 --- a/arch/arm64/boot/dts/tesla/fsd-evb.dts +++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts @@ -39,6 +39,15 @@ }; }; +ðernet_1 { + 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 8c7e43085a2b..94ef5392ad9c 100644 --- a/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi +++ b/arch/arm64/boot/dts/tesla/fsd-pinctrl.dtsi @@ -395,6 +395,62 @@ samsung,pin-pud = ; samsung,pin-drv = ; }; + + eth1_tx_clk: eth1-tx-clk-pins { + samsung,pins = "gpf2-0"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + eth1_tx_data: eth1-tx-data-pins { + samsung,pins = "gpf2-1", "gpf2-2", "gpf2-3", "gpf2-4"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + eth1_tx_ctrl: eth1-tx-ctrl-pins { + samsung,pins = "gpf2-5"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + eth1_phy_intr: eth1-phy-intr-pins { + samsung,pins = "gpf2-6"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + eth1_rx_clk: eth1-rx-clk-pins { + samsung,pins = "gpf3-0"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + eth1_rx_data: eth1-rx-data-pins { + samsung,pins = "gpf3-1", "gpf3-2", "gpf3-3", "gpf3-4"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + eth1_rx_ctrl: eth1-rx-ctrl-pins { + samsung,pins = "gpf3-5"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + eth1_mdio: eth1-mdio-pins { + samsung,pins = "gpf3-6", "gpf3-7"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; }; &pinctrl_pmu { diff --git a/arch/arm64/boot/dts/tesla/fsd.dtsi b/arch/arm64/boot/dts/tesla/fsd.dtsi index 2495928b71dc..e63c1f8fa6ca 100644 --- a/arch/arm64/boot/dts/tesla/fsd.dtsi +++ b/arch/arm64/boot/dts/tesla/fsd.dtsi @@ -33,6 +33,7 @@ spi1 = &spi_1; spi2 = &spi_2; eth0 = ðernet_0; + eth1 = ðernet_1; }; cpus { @@ -898,6 +899,63 @@ status = "disabled"; phy-mode = "rgmii"; }; + + ethernet_1: ethernet@14300000 { + compatible = "tesla,dwc-qos-ethernet-4.21"; + reg = <0x0 0x14300000 0x0 0x10000>; + interrupts = ; + clocks = + /* ptp ref clock */ + <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_CLK_PTP_REF_I>, + /* aclk clocks */ + <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_ACLK_I>, + /* hclk clocks */ + <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_HCLK_I>, + /* rgmii clocks */ + <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_RGMII_CLK_I>, + /* rxi clocks */ + <&clock_peric PERIC_EQOS_TOP_IPCLKPORT_CLK_RX_I>, + /* eqos d-bus clocks */ + <&clock_peric PERIC_BUS_D_PERIC_IPCLKPORT_EQOSCLK>, + /* eqos p-bus clocks */ + <&clock_peric PERIC_BUS_P_PERIC_IPCLKPORT_EQOSCLK>, + /* eqos peric clock mux */ + <&clock_peric PERIC_EQOS_PHYRXCLK_MUX>, + /* eqos peric phy rxclock */ + <&clock_peric PERIC_EQOS_PHYRXCLK>, + /* internal peric rgmii clk */ + <&clock_peric PERIC_DOUT_RGMII_CLK>; + clock-names = + /* ptp ref clocks */ + "ptp_ref", + /* aclk clocks */ + "master_bus", + /* hclk clocks */ + "slave_bus", + /* rgmii clk */ + "tx", + /* rxi clocks */ + "rx", + /* eqos dbus clocks */ + "master2_bus", + /* eqos pbus clocks */ + "slave2_bus", + /* rgmii clock mux */ + "eqos_rxclk_mux", + /* rgmii phy rx clock */ + "eqos_phyrxclk", + /* internal peric rgmii clk */ + "dout_peric_rgmii_clk"; + pinctrl-names = "default"; + pinctrl-0 = <ð1_tx_clk>, <ð1_tx_data>, <ð1_tx_ctrl>, + <ð1_phy_intr>, <ð1_rx_clk>, <ð1_rx_data>, + <ð1_rx_ctrl>, <ð1_mdio>; + local-mac-address = [45 54 48 31 4d 43]; + rx-clock-skew = <&sysreg_peric 0x10 0x0>; + iommus = <&smmu_peric 0x0 0x1>; + status = "disabled"; + phy-mode = "rgmii"; + }; }; };