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: 15493 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp363915wru; Fri, 4 Nov 2022 05:20:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5sb956nsBmSAwRhvQvWqfNLJWlraaZxsAfI9mYn94rVQoPGd7JrqiIQP3o1eAEkJ2tK/ui X-Received: by 2002:a17:902:ef85:b0:187:85d:bd2e with SMTP id iz5-20020a170902ef8500b00187085dbd2emr32812822plb.31.1667564420134; Fri, 04 Nov 2022 05:20:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667564420; cv=none; d=google.com; s=arc-20160816; b=eisV/Ti+MRq4UcssUhI48f/Kmf222YdkT/2ZY7eoPfaNuo+meG2cYARY/v7sGJs8gu gr2zQg4ETjG4xaYOioiXR+g9HaDaIpdY7UTyUTZ5BD6JifmCi2YfblUfyJFM5t17rWmZ nl6CyOt2EMWO7qnclc3h4iBJDMII2+Vx8sJsD4CPA3SUw21vpXQ+33y9THnDdX0ffyWp c8YWvXeJLVeKgl108vzi1naHw6LpHPJxwbGo+ZmU/pWm2Ysw+garoHC0xsVXyrNfTtpk DcFJ8EBKJWNJ5s1sn7X9dzPVhYXTSYOU4YvkU5ZOSbnOFv3RPZR5fSYmJMmTpP0AiJsf sMxQ== 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=F/wrWKfkCJidaaPNHLM74M5Wux6bKyD0bMDJLStV66g=; b=ORziLIZFzn16RFBz7ttniXGfUAuz4fIv/7kpN17AlL0M4MhgX+EMbtzXV39G7B+JhF IMVIloYjVAozFkBlxhdRTvj05eEJ3XfCifRAvy03IdGZpvovlNBjzOVKGBxw5CRt46zO T5BGLxjGZnfoZ68KT/he5VOQ1fCphGY698HZvIftRtD/YzVk8y3pXAeNAdnFnRMjvTTw pkBqPQeofm+GweKuGL0wvq/0QVtDNxLCxCPTPxdFqW0yXUFU9R9ScEYyrfkjCQti+Dwq Us+1yOMGq2D1E2jgp9rHntXpN1JeIzTufADOzuDkzYLSj3iY/3Lf+zphH0Ons+o8zrMH DGgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=AhSQXyXh; 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 b127-20020a636785000000b004600ab82237si4407043pgc.293.2022.11.04.05.19.39; Fri, 04 Nov 2022 05:20:20 -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=AhSQXyXh; 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 S231817AbiKDMJh (ORCPT + 99 others); Fri, 4 Nov 2022 08:09:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231707AbiKDMJZ (ORCPT ); Fri, 4 Nov 2022 08:09:25 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9962A2D764 for ; Fri, 4 Nov 2022 05:09:19 -0700 (PDT) Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20221104120918epoutp0188cfa45bf0748571d35ccd2c9042b86a~kYGcmRqZT2273122731epoutp01a for ; Fri, 4 Nov 2022 12:09:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20221104120918epoutp0188cfa45bf0748571d35ccd2c9042b86a~kYGcmRqZT2273122731epoutp01a 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-Tracker: H4sIAAAAAAAAA+NgFjrEJsWRmVeSWpSXmKPExsWy7bCmpu5DhtRkg6eLZCx+vpzGaDHnfAuL xfwj51gtnh57xG5x5NQSJot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2 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-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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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?1748568029798440716?= X-GMAIL-MSGID: =?utf-8?q?1748568029798440716?= 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"; + }; }; };