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: 15490 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp363234wru; Fri, 4 Nov 2022 05:18:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM426z13RzdYer7Aqr5PdzhawDJ/fGIWRqqIGnqRLdxv7EUs4B44yPaYPenPLljXhUoci3Hg X-Received: by 2002:a17:90a:86c6:b0:213:36b6:1b4c with SMTP id y6-20020a17090a86c600b0021336b61b4cmr36925616pjv.7.1667564338060; Fri, 04 Nov 2022 05:18:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667564338; cv=none; d=google.com; s=arc-20160816; b=jCTl0tBfRLaUID2D1g663Je4H2a41m61EpJpC4kh6PRXnAc0ZOIfNhiW0urG/oQ6Ek wGS2ERT8T6TLChp20lXR3aPWpoBRWlvy2eFQJD752UWeCJhcefoegERkDHaKeHPCKPfm hLMA69ba5xYMOKP5U+WXr/6rqNlRKM5WjLsZa9Fn+jkg1cDE4IaitEoHfyIc6Mg8+Q1o HAY+i1P6I5CdcuzRBYy4Bq2i7LorSw4axay2enTPM9VffgqsIU7y35goMmR/ta1L2UYc QlSt7DxspOBbUL9WOrDXuhyIS6vUGB6FCwsPv+OiYs1Lpz3iBMSM5bTSYF+4OrzTH3Uv MO0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=5EeNE8lf7xpmShtco5wFgIBJumjTcSZflJH1YkpwoXA=; b=0tcKVe8yY4wN4yw2bmhDhH+HO2Vqrd7AyohWglrbROTQ26OIyBjn2Jj4VEc1gKyfsu lv8Bi++lXMWYO/08E9xTrUxP7ERa0y2YbCe1Exn/ipEdrHc98p/S8vi8vhYef7lok0Er FEGHTpKlIPPEvpjyDZ18J0V3Z6kfsZQwLLwPpeKXWJXMC/jk8eSKo22212/wnn7IMwME hyvM+RoBdZ8cx+aYKXmLNuFEsOgswAhSzlCFAySVbuHCieCSdXOYKra+NFT44BGY5zr9 vOmK7wwjjdjPi0YPlzQNXuK536+tekldLCxbC4v5P8tD+jyFsQTc6pRc+ZCciFzthY1u evRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=H7BAG03j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c14-20020a056a000ace00b0056de69b0c7esi4593938pfl.284.2022.11.04.05.18.43; Fri, 04 Nov 2022 05:18:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=H7BAG03j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231806AbiKDMJN (ORCPT + 99 others); Fri, 4 Nov 2022 08:09:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231570AbiKDMI4 (ORCPT ); Fri, 4 Nov 2022 08:08:56 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D47B12D1F8 for ; Fri, 4 Nov 2022 05:08:54 -0700 (PDT) Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20221104120852epoutp02a9cde402728c29b8241a78e0f96774b3~kYGEoUUY93167931679epoutp02W for ; Fri, 4 Nov 2022 12:08:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20221104120852epoutp02a9cde402728c29b8241a78e0f96774b3~kYGEoUUY93167931679epoutp02W 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: H4sIAAAAAAAAA0VTe0xTVxze6e1tL5iauyLuwJiwO2STBWwHlAOCI86Yiy4ZzmwuJEvXtXeF tLRNH9vckmnkJVVh6OaMI6yrHaMYHistE2cFKdN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NztqPTsf5b1jdBim5t5dzqkJ21U3VJ7oe0U30dHhneG6dNv6tSlKTIyW4QkOKfuk/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-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748567943288691467?= X-GMAIL-MSGID: =?utf-8?q?1748567943288691467?= 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"; + }; }; };